1 #!/bin/bash
   2 #
   3 # ##########################################################
   4 # ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
   5 # ##########################################################
   6 #
   7 #! /bin/sh
   8 # Guess values for system-dependent variables and create Makefiles.
   9 # Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
  10 #
  11 # Report bugs to <build-dev@openjdk.java.net>.
  12 #
  13 #
  14 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
  15 #
  16 #
  17 # This configure script is free software; the Free Software Foundation
  18 # gives unlimited permission to copy, distribute and modify it.
  19 ## -------------------- ##
  20 ## M4sh Initialization. ##
  21 ## -------------------- ##
  22 
  23 # Be more Bourne compatible
  24 DUALCASE=1; export DUALCASE # for MKS sh
  25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  26   emulate sh
  27   NULLCMD=:
  28   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  29   # is contrary to our usage.  Disable this feature.
  30   alias -g '${1+"$@"}'='"$@"'
  31   setopt NO_GLOB_SUBST
  32 else
  33   case `(set -o) 2>/dev/null` in #(
  34   *posix*) :
  35     set -o posix ;; #(
  36   *) :
  37      ;;
  38 esac
  39 fi
  40 
  41 
  42 as_nl='
  43 '
  44 export as_nl
  45 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  46 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  47 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  48 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  49 # Prefer a ksh shell builtin over an external printf program on Solaris,
  50 # but without wasting forks for bash or zsh.
  51 if test -z "$BASH_VERSION$ZSH_VERSION" \
  52     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  53   as_echo='print -r --'
  54   as_echo_n='print -rn --'
  55 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  56   as_echo='printf %s\n'
  57   as_echo_n='printf %s'
  58 else
  59   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  60     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  61     as_echo_n='/usr/ucb/echo -n'
  62   else
  63     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  64     as_echo_n_body='eval
  65       arg=$1;
  66       case $arg in #(
  67       *"$as_nl"*)
  68         expr "X$arg" : "X\\(.*\\)$as_nl";
  69         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  70       esac;
  71       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  72     '
  73     export as_echo_n_body
  74     as_echo_n='sh -c $as_echo_n_body as_echo'
  75   fi
  76   export as_echo_body
  77   as_echo='sh -c $as_echo_body as_echo'
  78 fi
  79 
  80 # The user is always right.
  81 if test "${PATH_SEPARATOR+set}" != set; then
  82   PATH_SEPARATOR=:
  83   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  84     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  85       PATH_SEPARATOR=';'
  86   }
  87 fi
  88 
  89 
  90 # IFS
  91 # We need space, tab and new line, in precisely that order.  Quoting is
  92 # there to prevent editors from complaining about space-tab.
  93 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  94 # splitting by setting IFS to empty value.)
  95 IFS=" ""        $as_nl"
  96 
  97 # Find who we are.  Look in the path if we contain no directory separator.
  98 as_myself=
  99 case $0 in #((
 100   *[\\/]* ) as_myself=$0 ;;
 101   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 102 for as_dir in $PATH
 103 do
 104   IFS=$as_save_IFS
 105   test -z "$as_dir" && as_dir=.
 106     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 107   done
 108 IFS=$as_save_IFS
 109 
 110      ;;
 111 esac
 112 # We did not find ourselves, most probably we were run as `sh COMMAND'
 113 # in which case we are not to be found in the path.
 114 if test "x$as_myself" = x; then
 115   as_myself=$0
 116 fi
 117 if test ! -f "$as_myself"; then
 118   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 119   exit 1
 120 fi
 121 
 122 # Unset variables that we do not need and which cause bugs (e.g. in
 123 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 124 # suppresses any "Segmentation fault" message there.  '((' could
 125 # trigger a bug in pdksh 5.2.14.
 126 for as_var in BASH_ENV ENV MAIL MAILPATH
 127 do eval test x\${$as_var+set} = xset \
 128   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 129 done
 130 PS1='$ '
 131 PS2='> '
 132 PS4='+ '
 133 
 134 # NLS nuisances.
 135 LC_ALL=C
 136 export LC_ALL
 137 LANGUAGE=C
 138 export LANGUAGE
 139 
 140 # CDPATH.
 141 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 142 
 143 # Use a proper internal environment variable to ensure we don't fall
 144   # into an infinite loop, continuously re-executing ourselves.
 145   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 146     _as_can_reexec=no; export _as_can_reexec;
 147     # We cannot yet assume a decent shell, so we have to provide a
 148 # neutralization value for shells without unset; and this also
 149 # works around shells that cannot unset nonexistent variables.
 150 # Preserve -v and -x to the replacement shell.
 151 BASH_ENV=/dev/null
 152 ENV=/dev/null
 153 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 154 case $- in # ((((
 155   *v*x* | *x*v* ) as_opts=-vx ;;
 156   *v* ) as_opts=-v ;;
 157   *x* ) as_opts=-x ;;
 158   * ) as_opts= ;;
 159 esac
 160 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 161 # Admittedly, this is quite paranoid, since all the known shells bail
 162 # out after a failed `exec'.
 163 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 164 as_fn_exit 255
 165   fi
 166   # We don't want this to propagate to other subprocesses.
 167           { _as_can_reexec=; unset _as_can_reexec;}
 168 if test "x$CONFIG_SHELL" = x; then
 169   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 170   emulate sh
 171   NULLCMD=:
 172   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 173   # is contrary to our usage.  Disable this feature.
 174   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 175   setopt NO_GLOB_SUBST
 176 else
 177   case \`(set -o) 2>/dev/null\` in #(
 178   *posix*) :
 179     set -o posix ;; #(
 180   *) :
 181      ;;
 182 esac
 183 fi
 184 "
 185   as_required="as_fn_return () { (exit \$1); }
 186 as_fn_success () { as_fn_return 0; }
 187 as_fn_failure () { as_fn_return 1; }
 188 as_fn_ret_success () { return 0; }
 189 as_fn_ret_failure () { return 1; }
 190 
 191 exitcode=0
 192 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 193 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 194 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 195 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 196 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 197 
 198 else
 199   exitcode=1; echo positional parameters were not saved.
 200 fi
 201 test x\$exitcode = x0 || exit 1
 202 test -x / || exit 1"
 203   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 204   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 205   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 206   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 207 test \$(( 1 + 1 )) = 2 || exit 1"
 208   if (eval "$as_required") 2>/dev/null; then :
 209   as_have_required=yes
 210 else
 211   as_have_required=no
 212 fi
 213   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 214 
 215 else
 216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 217 as_found=false
 218 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 219 do
 220   IFS=$as_save_IFS
 221   test -z "$as_dir" && as_dir=.
 222   as_found=:
 223   case $as_dir in #(
 224          /*)
 225            for as_base in sh bash ksh sh5; do
 226              # Try only shells that exist, to save several forks.
 227              as_shell=$as_dir/$as_base
 228              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 229                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 230   CONFIG_SHELL=$as_shell as_have_required=yes
 231                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 232   break 2
 233 fi
 234 fi
 235            done;;
 236        esac
 237   as_found=false
 238 done
 239 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 240               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 241   CONFIG_SHELL=$SHELL as_have_required=yes
 242 fi; }
 243 IFS=$as_save_IFS
 244 
 245 
 246       if test "x$CONFIG_SHELL" != x; then :
 247   export CONFIG_SHELL
 248              # We cannot yet assume a decent shell, so we have to provide a
 249 # neutralization value for shells without unset; and this also
 250 # works around shells that cannot unset nonexistent variables.
 251 # Preserve -v and -x to the replacement shell.
 252 BASH_ENV=/dev/null
 253 ENV=/dev/null
 254 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 255 case $- in # ((((
 256   *v*x* | *x*v* ) as_opts=-vx ;;
 257   *v* ) as_opts=-v ;;
 258   *x* ) as_opts=-x ;;
 259   * ) as_opts= ;;
 260 esac
 261 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 262 # Admittedly, this is quite paranoid, since all the known shells bail
 263 # out after a failed `exec'.
 264 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 265 exit 255
 266 fi
 267 
 268     if test x$as_have_required = xno; then :
 269   $as_echo "$0: This script requires a shell more modern than all"
 270   $as_echo "$0: the shells that I found on your system."
 271   if test x${ZSH_VERSION+set} = xset ; then
 272     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 273     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 274   else
 275     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 276 $0: build-dev@openjdk.java.net about your system, including
 277 $0: any error possibly output before this message. Then
 278 $0: install a modern shell, or manually run the script
 279 $0: under such a shell if you do have one."
 280   fi
 281   exit 1
 282 fi
 283 fi
 284 fi
 285 SHELL=${CONFIG_SHELL-/bin/sh}
 286 export SHELL
 287 # Unset more variables known to interfere with behavior of common tools.
 288 CLICOLOR_FORCE= GREP_OPTIONS=
 289 unset CLICOLOR_FORCE GREP_OPTIONS
 290 
 291 ## --------------------- ##
 292 ## M4sh Shell Functions. ##
 293 ## --------------------- ##
 294 # as_fn_unset VAR
 295 # ---------------
 296 # Portably unset VAR.
 297 as_fn_unset ()
 298 {
 299   { eval $1=; unset $1;}
 300 }
 301 as_unset=as_fn_unset
 302 
 303 # as_fn_set_status STATUS
 304 # -----------------------
 305 # Set $? to STATUS, without forking.
 306 as_fn_set_status ()
 307 {
 308   return $1
 309 } # as_fn_set_status
 310 
 311 # as_fn_exit STATUS
 312 # -----------------
 313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 314 as_fn_exit ()
 315 {
 316   set +e
 317   as_fn_set_status $1
 318   exit $1
 319 } # as_fn_exit
 320 
 321 # as_fn_mkdir_p
 322 # -------------
 323 # Create "$as_dir" as a directory, including parents if necessary.
 324 as_fn_mkdir_p ()
 325 {
 326 
 327   case $as_dir in #(
 328   -*) as_dir=./$as_dir;;
 329   esac
 330   test -d "$as_dir" || eval $as_mkdir_p || {
 331     as_dirs=
 332     while :; do
 333       case $as_dir in #(
 334       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 335       *) as_qdir=$as_dir;;
 336       esac
 337       as_dirs="'$as_qdir' $as_dirs"
 338       as_dir=`$as_dirname -- "$as_dir" ||
 339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 340          X"$as_dir" : 'X\(//\)[^/]' \| \
 341          X"$as_dir" : 'X\(//\)$' \| \
 342          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 343 $as_echo X"$as_dir" |
 344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 345             s//\1/
 346             q
 347           }
 348           /^X\(\/\/\)[^/].*/{
 349             s//\1/
 350             q
 351           }
 352           /^X\(\/\/\)$/{
 353             s//\1/
 354             q
 355           }
 356           /^X\(\/\).*/{
 357             s//\1/
 358             q
 359           }
 360           s/.*/./; q'`
 361       test -d "$as_dir" && break
 362     done
 363     test -z "$as_dirs" || eval "mkdir $as_dirs"
 364   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 365 
 366 
 367 } # as_fn_mkdir_p
 368 
 369 # as_fn_executable_p FILE
 370 # -----------------------
 371 # Test if FILE is an executable regular file.
 372 as_fn_executable_p ()
 373 {
 374   test -f "$1" && test -x "$1"
 375 } # as_fn_executable_p
 376 # as_fn_append VAR VALUE
 377 # ----------------------
 378 # Append the text in VALUE to the end of the definition contained in VAR. Take
 379 # advantage of any shell optimizations that allow amortized linear growth over
 380 # repeated appends, instead of the typical quadratic growth present in naive
 381 # implementations.
 382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 383   eval 'as_fn_append ()
 384   {
 385     eval $1+=\$2
 386   }'
 387 else
 388   as_fn_append ()
 389   {
 390     eval $1=\$$1\$2
 391   }
 392 fi # as_fn_append
 393 
 394 # as_fn_arith ARG...
 395 # ------------------
 396 # Perform arithmetic evaluation on the ARGs, and store the result in the
 397 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 398 # must be portable across $(()) and expr.
 399 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 400   eval 'as_fn_arith ()
 401   {
 402     as_val=$(( $* ))
 403   }'
 404 else
 405   as_fn_arith ()
 406   {
 407     as_val=`expr "$@" || test $? -eq 1`
 408   }
 409 fi # as_fn_arith
 410 
 411 
 412 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 413 # ----------------------------------------
 414 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 415 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 416 # script with STATUS, using 1 if that was 0.
 417 as_fn_error ()
 418 {
 419   as_status=$1; test $as_status -eq 0 && as_status=1
 420   if test "$4"; then
 421     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 422     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 423   fi
 424   $as_echo "$as_me: error: $2" >&2
 425   as_fn_exit $as_status
 426 } # as_fn_error
 427 
 428 if expr a : '\(a\)' >/dev/null 2>&1 &&
 429    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 430   as_expr=expr
 431 else
 432   as_expr=false
 433 fi
 434 
 435 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 436   as_basename=basename
 437 else
 438   as_basename=false
 439 fi
 440 
 441 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 442   as_dirname=dirname
 443 else
 444   as_dirname=false
 445 fi
 446 
 447 as_me=`$as_basename -- "$0" ||
 448 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 449          X"$0" : 'X\(//\)$' \| \
 450          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 451 $as_echo X/"$0" |
 452     sed '/^.*\/\([^/][^/]*\)\/*$/{
 453             s//\1/
 454             q
 455           }
 456           /^X\/\(\/\/\)$/{
 457             s//\1/
 458             q
 459           }
 460           /^X\/\(\/\).*/{
 461             s//\1/
 462             q
 463           }
 464           s/.*/./; q'`
 465 
 466 # Avoid depending upon Character Ranges.
 467 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 468 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 469 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 470 as_cr_digits='0123456789'
 471 as_cr_alnum=$as_cr_Letters$as_cr_digits
 472 
 473 
 474   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 475   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 476   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 477   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 478   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 479   sed -n '
 480     p
 481     /[$]LINENO/=
 482   ' <$as_myself |
 483     sed '
 484       s/[$]LINENO.*/&-/
 485       t lineno
 486       b
 487       :lineno
 488       N
 489       :loop
 490       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 491       t loop
 492       s/-\n.*//
 493     ' >$as_me.lineno &&
 494   chmod +x "$as_me.lineno" ||
 495     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 496 
 497   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 498   # already done that, so ensure we don't try to do so again and fall
 499   # in an infinite loop.  This has already happened in practice.
 500   _as_can_reexec=no; export _as_can_reexec
 501   # Don't try to exec as it changes $[0], causing all sort of problems
 502   # (the dirname of $[0] is not the place where we might find the
 503   # original and so on.  Autoconf is especially sensitive to this).
 504   . "./$as_me.lineno"
 505   # Exit status is that of the last command.
 506   exit
 507 }
 508 
 509 ECHO_C= ECHO_N= ECHO_T=
 510 case `echo -n x` in #(((((
 511 -n*)
 512   case `echo 'xy\c'` in
 513   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 514   xy)  ECHO_C='\c';;
 515   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 516        ECHO_T=' ';;
 517   esac;;
 518 *)
 519   ECHO_N='-n';;
 520 esac
 521 
 522 rm -f conf$$ conf$$.exe conf$$.file
 523 if test -d conf$$.dir; then
 524   rm -f conf$$.dir/conf$$.file
 525 else
 526   rm -f conf$$.dir
 527   mkdir conf$$.dir 2>/dev/null
 528 fi
 529 if (echo >conf$$.file) 2>/dev/null; then
 530   if ln -s conf$$.file conf$$ 2>/dev/null; then
 531     as_ln_s='ln -s'
 532     # ... but there are two gotchas:
 533     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 534     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 535     # In both cases, we have to default to `cp -pR'.
 536     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 537       as_ln_s='cp -pR'
 538   elif ln conf$$.file conf$$ 2>/dev/null; then
 539     as_ln_s=ln
 540   else
 541     as_ln_s='cp -pR'
 542   fi
 543 else
 544   as_ln_s='cp -pR'
 545 fi
 546 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 547 rmdir conf$$.dir 2>/dev/null
 548 
 549 if mkdir -p . 2>/dev/null; then
 550   as_mkdir_p='mkdir -p "$as_dir"'
 551 else
 552   test -d ./-p && rmdir ./-p
 553   as_mkdir_p=false
 554 fi
 555 
 556 as_test_x='test -x'
 557 as_executable_p=as_fn_executable_p
 558 
 559 # Sed expression to map a string onto a valid CPP name.
 560 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 561 
 562 # Sed expression to map a string onto a valid variable name.
 563 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 564 
 565 
 566 test -n "$DJDIR" || exec 7<&0 </dev/null
 567 exec 6>&1
 568 
 569 # Name of the host.
 570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 571 # so uname gets run too.
 572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 573 
 574 #
 575 # Initializations.
 576 #
 577 ac_default_prefix=/usr/local
 578 ac_clean_files=
 579 ac_config_libobj_dir=.
 580 LIBOBJS=
 581 cross_compiling=no
 582 subdirs=
 583 MFLAGS=
 584 MAKEFLAGS=
 585 
 586 # Identity of this package.
 587 PACKAGE_NAME='OpenJDK'
 588 PACKAGE_TARNAME='openjdk'
 589 PACKAGE_VERSION='jdk8'
 590 PACKAGE_STRING='OpenJDK jdk8'
 591 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 592 PACKAGE_URL='http://openjdk.java.net'
 593 
 594 # Factoring default headers for most tests.
 595 ac_includes_default="\
 596 #include <stdio.h>
 597 #ifdef HAVE_SYS_TYPES_H
 598 # include <sys/types.h>
 599 #endif
 600 #ifdef HAVE_SYS_STAT_H
 601 # include <sys/stat.h>
 602 #endif
 603 #ifdef STDC_HEADERS
 604 # include <stdlib.h>
 605 # include <stddef.h>
 606 #else
 607 # ifdef HAVE_STDLIB_H
 608 #  include <stdlib.h>
 609 # endif
 610 #endif
 611 #ifdef HAVE_STRING_H
 612 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 613 #  include <memory.h>
 614 # endif
 615 # include <string.h>
 616 #endif
 617 #ifdef HAVE_STRINGS_H
 618 # include <strings.h>
 619 #endif
 620 #ifdef HAVE_INTTYPES_H
 621 # include <inttypes.h>
 622 #endif
 623 #ifdef HAVE_STDINT_H
 624 # include <stdint.h>
 625 #endif
 626 #ifdef HAVE_UNISTD_H
 627 # include <unistd.h>
 628 #endif"
 629 
 630 ac_subst_vars='LTLIBOBJS
 631 LIBOBJS
 632 CCACHE
 633 USE_PRECOMPILED_HEADER
 634 SJAVAC_SERVER_DIR
 635 ENABLE_SJAVAC
 636 SJAVAC_SERVER_JAVA
 637 JOBS
 638 MEMORY_SIZE
 639 NUM_CORES
 640 ENABLE_INTREE_EC
 641 SALIB_NAME
 642 HOTSPOT_MAKE_ARGS
 643 MSVCP_DLL
 644 MSVCR_DLL
 645 LIBCXX
 646 LLVM_LIBS
 647 LLVM_LDFLAGS
 648 LLVM_CFLAGS
 649 LLVM_CONFIG
 650 LIBFFI_LIBS
 651 LIBFFI_CFLAGS
 652 STATIC_CXX_SETTING
 653 LIBDL
 654 LIBM
 655 LIBZIP_CAN_USE_MMAP
 656 USE_EXTERNAL_LIBZ
 657 USE_EXTERNAL_LIBGIF
 658 USE_EXTERNAL_LIBJPEG
 659 ALSA_LIBS
 660 ALSA_CFLAGS
 661 FREETYPE_BUNDLE_LIB_PATH
 662 FREETYPE_LIBS
 663 FREETYPE_CFLAGS
 664 CUPS_CFLAGS
 665 X_EXTRA_LIBS
 666 X_LIBS
 667 X_PRE_LIBS
 668 X_CFLAGS
 669 XMKMF
 670 FIXPATH
 671 ZIP_DEBUGINFO_FILES
 672 DEBUG_BINARIES
 673 STRIP_POLICY
 674 ENABLE_DEBUG_SYMBOLS
 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 NO_LIFETIME_DSE_CFLAG
 688 NO_DELETE_NULL_POINTER_CHECKS_CFLAG
 689 LEGACY_EXTRA_LDFLAGS
 690 LEGACY_EXTRA_CXXFLAGS
 691 LEGACY_EXTRA_CFLAGS
 692 CXXSTD_CXXFLAG
 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 CXXFLAGS_DEBUG_SYMBOLS
 702 CFLAGS_DEBUG_SYMBOLS
 703 ASFLAGS_DEBUG_SYMBOLS
 704 CXX_FLAG_DEPS
 705 C_FLAG_DEPS
 706 SET_SHARED_LIBRARY_MAPFILE
 707 SET_SHARED_LIBRARY_NAME
 708 SET_SHARED_LIBRARY_ORIGIN
 709 SET_EXECUTABLE_ORIGIN
 710 SHARED_LIBRARY_FLAGS
 711 CXX_FLAG_REORDER
 712 C_FLAG_REORDER
 713 SYSROOT_LDFLAGS
 714 SYSROOT_CFLAGS
 715 RC_FLAGS
 716 AR_OUT_OPTION
 717 LD_OUT_OPTION
 718 EXE_OUT_OPTION
 719 CC_OUT_OPTION
 720 POST_MCS_CMD
 721 POST_STRIP_CMD
 722 ARFLAGS
 723 COMPILER_TARGET_BITS_FLAG
 724 JT_HOME
 725 JTREGEXE
 726 USING_BROKEN_SUSE_LD
 727 PACKAGE_PATH
 728 LDEXECXX
 729 LDEXE
 730 USE_CLANG
 731 HOTSPOT_LD
 732 HOTSPOT_CXX
 733 HOTSPOT_RC
 734 HOTSPOT_MT
 735 BUILD_LD
 736 BUILD_CXX
 737 BUILD_CC
 738 ac_ct_OBJDUMP
 739 OBJDUMP
 740 ac_ct_OBJCOPY
 741 OBJCOPY
 742 ac_ct_NM
 743 OTOOL
 744 ac_ct_STRIP
 745 MCS
 746 GNM
 747 NM
 748 STRIP
 749 MSBUILD
 750 DUMPBIN
 751 RC
 752 MT
 753 LIPO
 754 ac_ct_OBJC
 755 OBJCFLAGS
 756 OBJC
 757 ac_ct_AR
 758 AR
 759 AS
 760 LDCXX
 761 LD
 762 CXXCPP
 763 CPP
 764 CXX_VERSION_NUMBER
 765 CC_VERSION_NUMBER
 766 ac_ct_CXX
 767 CXXFLAGS
 768 CXX
 769 ac_ct_PROPER_COMPILER_CXX
 770 PROPER_COMPILER_CXX
 771 TOOLCHAIN_PATH_CXX
 772 POTENTIAL_CXX
 773 OBJEXT
 774 EXEEXT
 775 ac_ct_CC
 776 CPPFLAGS
 777 LDFLAGS
 778 CFLAGS
 779 CC
 780 ac_ct_PROPER_COMPILER_CC
 781 PROPER_COMPILER_CC
 782 TOOLCHAIN_PATH_CC
 783 POTENTIAL_CC
 784 SDKPATH
 785 XCODEBUILD
 786 SET_DEVELOPER_DIR
 787 VS_LIB
 788 VS_INCLUDE
 789 VS_PATH
 790 CYGWIN_LINK
 791 EXE_SUFFIX
 792 OBJ_SUFFIX
 793 STATIC_LIBRARY
 794 SHARED_LIBRARY
 795 STATIC_LIBRARY_SUFFIX
 796 SHARED_LIBRARY_SUFFIX
 797 LIBRARY_PREFIX
 798 TOOLCHAIN_TYPE
 799 BUILD_HOTSPOT
 800 HOTSPOT_DIST
 801 BUILD_OUTPUT
 802 OVERRIDE_SRC_ROOT
 803 ADD_SRC_ROOT
 804 JDK_TOPDIR
 805 NASHORN_TOPDIR
 806 HOTSPOT_TOPDIR
 807 JAXWS_TOPDIR
 808 JAXP_TOPDIR
 809 CORBA_TOPDIR
 810 LANGTOOLS_TOPDIR
 811 JAVA_FLAGS_SMALL
 812 JAVA_FLAGS_BIG
 813 JAVA_FLAGS
 814 BOOT_JDK_BITS
 815 JAVAC_FLAGS
 816 BOOT_JDK_SOURCETARGET
 817 BOOT_JDK
 818 BOOT_TOOLSJAR
 819 BOOT_RTJAR
 820 JAVA_CHECK
 821 JAVAC_CHECK
 822 COOKED_BUILD_NUMBER
 823 COOKED_JDK_UPDATE_VERSION
 824 JDK_VERSION
 825 COPYRIGHT_YEAR
 826 MACOSX_BUNDLE_ID_BASE
 827 MACOSX_BUNDLE_NAME_BASE
 828 COMPANY_NAME
 829 JDK_RC_PLATFORM_NAME
 830 PRODUCT_SUFFIX
 831 PRODUCT_NAME
 832 LAUNCHER_NAME
 833 MILESTONE
 834 JDK_BUILD_NUMBER
 835 JDK_UPDATE_VERSION
 836 JDK_MICRO_VERSION
 837 JDK_MINOR_VERSION
 838 JDK_MAJOR_VERSION
 839 USER_RELEASE_SUFFIX
 840 COMPRESS_JARS
 841 UNLIMITED_CRYPTO
 842 CACERTS_FILE
 843 TEST_IN_BUILD
 844 BUILD_HEADLESS
 845 SUPPORT_HEADFUL
 846 SUPPORT_HEADLESS
 847 BDEPS_FTP
 848 BDEPS_UNZIP
 849 OS_VERSION_MICRO
 850 OS_VERSION_MINOR
 851 OS_VERSION_MAJOR
 852 PKG_CONFIG
 853 CODESIGN
 854 XATTR
 855 DSYMUTIL
 856 IS_GNU_TIME
 857 TIME
 858 STAT
 859 HG
 860 READELF
 861 LDD
 862 ZIP
 863 UNZIP
 864 FIND_DELETE
 865 MAKE
 866 CHECK_TOOLSDIR_MAKE
 867 CHECK_TOOLSDIR_GMAKE
 868 CHECK_MAKE
 869 CHECK_GMAKE
 870 PKGHANDLER
 871 OUTPUT_ROOT
 872 CONF_NAME
 873 SPEC
 874 DEVKIT_LIB_DIR
 875 BUILD_VARIANT_RELEASE
 876 DEBUG_CLASSFILES
 877 FASTDEBUG
 878 VARIANT
 879 DEBUG_LEVEL
 880 MACOSX_UNIVERSAL
 881 INCLUDE_SA
 882 JVM_VARIANT_CORE
 883 JVM_VARIANT_ZEROSHARK
 884 JVM_VARIANT_ZERO
 885 JVM_VARIANT_KERNEL
 886 JVM_VARIANT_MINIMAL1
 887 JVM_VARIANT_CLIENT
 888 JVM_VARIANT_SERVER
 889 JVM_VARIANTS
 890 JVM_INTERPRETER
 891 JDK_VARIANT
 892 SET_OPENJDK
 893 BUILD_LOG_WRAPPER
 894 BUILD_LOG_PREVIOUS
 895 BUILD_LOG
 896 TOPDIR
 897 PATH_SEP
 898 ZERO_ARCHDEF
 899 DEFINE_CROSS_COMPILE_ARCH
 900 LP64
 901 OPENJDK_TARGET_OS_EXPORT_DIR
 902 OPENJDK_TARGET_OS_API_DIR
 903 OPENJDK_TARGET_CPU_JLI_CFLAGS
 904 OPENJDK_TARGET_CPU_OSARCH
 905 OPENJDK_TARGET_CPU_ISADIR
 906 OPENJDK_TARGET_CPU_LIBDIR
 907 OPENJDK_TARGET_CPU_LEGACY_LIB
 908 OPENJDK_TARGET_CPU_LEGACY
 909 REQUIRED_OS_VERSION
 910 REQUIRED_OS_NAME
 911 COMPILE_TYPE
 912 OPENJDK_TARGET_CPU_ENDIAN
 913 OPENJDK_TARGET_CPU_BITS
 914 OPENJDK_TARGET_CPU_ARCH
 915 OPENJDK_TARGET_CPU
 916 OPENJDK_TARGET_OS_ENV
 917 OPENJDK_TARGET_OS_API
 918 OPENJDK_TARGET_OS
 919 OPENJDK_BUILD_CPU_ENDIAN
 920 OPENJDK_BUILD_CPU_BITS
 921 OPENJDK_BUILD_CPU_ARCH
 922 OPENJDK_BUILD_CPU
 923 OPENJDK_BUILD_OS_ENV
 924 OPENJDK_BUILD_OS_API
 925 OPENJDK_BUILD_OS
 926 OPENJDK_BUILD_AUTOCONF_NAME
 927 OPENJDK_TARGET_AUTOCONF_NAME
 928 target_os
 929 target_vendor
 930 target_cpu
 931 target
 932 host_os
 933 host_vendor
 934 host_cpu
 935 host
 936 build_os
 937 build_vendor
 938 build_cpu
 939 build
 940 CPIO
 941 SETFILE
 942 DF
 943 READLINK
 944 CYGPATH
 945 SED
 946 FGREP
 947 EGREP
 948 GREP
 949 AWK
 950 XARGS
 951 WHICH
 952 WC
 953 UNIQ
 954 UNAME
 955 TR
 956 TOUCH
 957 TEE
 958 TAR
 959 TAIL
 960 SORT
 961 SH
 962 RM
 963 PRINTF
 964 NAWK
 965 MV
 966 MKTEMP
 967 MKDIR
 968 LS
 969 LN
 970 HEAD
 971 FIND
 972 FILE
 973 EXPR
 974 ECHO
 975 DIRNAME
 976 DIFF
 977 DATE
 978 CUT
 979 CP
 980 COMM
 981 CMP
 982 CHMOD
 983 CAT
 984 BASH
 985 BASENAME
 986 DATE_WHEN_CONFIGURED
 987 CONFIGURE_COMMAND_LINE
 988 CUSTOM_MAKE_DIR
 989 target_alias
 990 host_alias
 991 build_alias
 992 LIBS
 993 ECHO_T
 994 ECHO_N
 995 ECHO_C
 996 DEFS
 997 mandir
 998 localedir
 999 libdir
1000 psdir
1001 pdfdir
1002 dvidir
1003 htmldir
1004 infodir
1005 docdir
1006 oldincludedir
1007 includedir
1008 localstatedir
1009 sharedstatedir
1010 sysconfdir
1011 datadir
1012 datarootdir
1013 libexecdir
1014 sbindir
1015 bindir
1016 program_transform_name
1017 prefix
1018 exec_prefix
1019 PACKAGE_URL
1020 PACKAGE_BUGREPORT
1021 PACKAGE_STRING
1022 PACKAGE_VERSION
1023 PACKAGE_TARNAME
1024 PACKAGE_NAME
1025 PATH_SEPARATOR
1026 SHELL'
1027 ac_subst_files=''
1028 ac_user_opts='
1029 enable_option_checking
1030 with_custom_make_dir
1031 with_target_bits
1032 enable_openjdk_only
1033 with_jdk_variant
1034 with_jvm_interpreter
1035 with_jvm_variants
1036 enable_debug
1037 with_debug_level
1038 with_devkit
1039 with_sys_root
1040 with_sysroot
1041 with_tools_dir
1042 with_toolchain_path
1043 with_extra_path
1044 with_xcode_path
1045 with_conf_name
1046 with_builddeps_conf
1047 with_builddeps_server
1048 with_builddeps_dir
1049 with_builddeps_group
1050 enable_headful
1051 enable_hotspot_test_in_build
1052 with_cacerts_file
1053 enable_unlimited_crypto
1054 with_milestone
1055 with_update_version
1056 with_user_release_suffix
1057 with_build_number
1058 with_copyright_year
1059 with_boot_jdk
1060 with_boot_jdk_jvmargs
1061 with_add_source_root
1062 with_override_source_root
1063 with_adds_and_overrides
1064 with_override_langtools
1065 with_override_corba
1066 with_override_jaxp
1067 with_override_jaxws
1068 with_override_hotspot
1069 with_override_nashorn
1070 with_override_jdk
1071 with_import_hotspot
1072 with_toolchain_type
1073 with_toolchain_version
1074 with_jtreg
1075 with_extra_cflags
1076 with_extra_cxxflags
1077 with_extra_ldflags
1078 enable_debug_symbols
1079 enable_zip_debug_info
1080 with_native_debug_symbols
1081 enable_macosx_runtime_support
1082 with_x
1083 with_cups
1084 with_cups_include
1085 with_freetype
1086 with_freetype_include
1087 with_freetype_lib
1088 with_freetype_src
1089 enable_freetype_bundling
1090 with_alsa
1091 with_alsa_include
1092 with_alsa_lib
1093 with_giflib
1094 with_zlib
1095 with_stdc__lib
1096 with_msvcr_dll
1097 with_msvcp_dll
1098 with_dxsdk
1099 with_dxsdk_lib
1100 with_dxsdk_include
1101 with_num_cores
1102 with_memory_size
1103 with_jobs
1104 with_sjavac_server_java
1105 enable_sjavac
1106 enable_precompiled_headers
1107 enable_ccache
1108 with_ccache_dir
1109 '
1110       ac_precious_vars='build_alias
1111 host_alias
1112 target_alias
1113 BASENAME
1114 BASH
1115 CAT
1116 CHMOD
1117 CMP
1118 COMM
1119 CP
1120 CUT
1121 DATE
1122 DIFF
1123 DIRNAME
1124 ECHO
1125 EXPR
1126 FILE
1127 FIND
1128 HEAD
1129 LN
1130 LS
1131 MKDIR
1132 MKTEMP
1133 MV
1134 NAWK
1135 PRINTF
1136 RM
1137 SH
1138 SORT
1139 TAIL
1140 TAR
1141 TEE
1142 TOUCH
1143 TR
1144 UNAME
1145 UNIQ
1146 WC
1147 WHICH
1148 XARGS
1149 AWK
1150 GREP
1151 EGREP
1152 FGREP
1153 SED
1154 CYGPATH
1155 READLINK
1156 DF
1157 SETFILE
1158 CPIO
1159 UNZIP
1160 ZIP
1161 LDD
1162 READELF
1163 HG
1164 STAT
1165 TIME
1166 DSYMUTIL
1167 XATTR
1168 CODESIGN
1169 PKG_CONFIG
1170 CC
1171 CFLAGS
1172 LDFLAGS
1173 LIBS
1174 CPPFLAGS
1175 CXX
1176 CXXFLAGS
1177 CCC
1178 CPP
1179 CXXCPP
1180 AS
1181 AR
1182 OBJC
1183 OBJCFLAGS
1184 LIPO
1185 STRIP
1186 NM
1187 GNM
1188 MCS
1189 OBJCOPY
1190 OBJDUMP
1191 BUILD_CC
1192 BUILD_CXX
1193 BUILD_LD
1194 JTREGEXE
1195 XMKMF
1196 FREETYPE_CFLAGS
1197 FREETYPE_LIBS
1198 ALSA_CFLAGS
1199 ALSA_LIBS
1200 LIBFFI_CFLAGS
1201 LIBFFI_LIBS
1202 CCACHE'
1203 
1204 
1205 # Initialize some variables set by options.
1206 ac_init_help=
1207 ac_init_version=false
1208 ac_unrecognized_opts=
1209 ac_unrecognized_sep=
1210 # The variables have the same names as the options, with
1211 # dashes changed to underlines.
1212 cache_file=/dev/null
1213 exec_prefix=NONE
1214 no_create=
1215 no_recursion=
1216 prefix=NONE
1217 program_prefix=NONE
1218 program_suffix=NONE
1219 program_transform_name=s,x,x,
1220 silent=
1221 site=
1222 srcdir=
1223 verbose=
1224 x_includes=NONE
1225 x_libraries=NONE
1226 
1227 # Installation directory options.
1228 # These are left unexpanded so users can "make install exec_prefix=/foo"
1229 # and all the variables that are supposed to be based on exec_prefix
1230 # by default will actually change.
1231 # Use braces instead of parens because sh, perl, etc. also accept them.
1232 # (The list follows the same order as the GNU Coding Standards.)
1233 bindir='${exec_prefix}/bin'
1234 sbindir='${exec_prefix}/sbin'
1235 libexecdir='${exec_prefix}/libexec'
1236 datarootdir='${prefix}/share'
1237 datadir='${datarootdir}'
1238 sysconfdir='${prefix}/etc'
1239 sharedstatedir='${prefix}/com'
1240 localstatedir='${prefix}/var'
1241 includedir='${prefix}/include'
1242 oldincludedir='/usr/include'
1243 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1244 infodir='${datarootdir}/info'
1245 htmldir='${docdir}'
1246 dvidir='${docdir}'
1247 pdfdir='${docdir}'
1248 psdir='${docdir}'
1249 libdir='${exec_prefix}/lib'
1250 localedir='${datarootdir}/locale'
1251 mandir='${datarootdir}/man'
1252 
1253 ac_prev=
1254 ac_dashdash=
1255 for ac_option
1256 do
1257   # If the previous option needs an argument, assign it.
1258   if test -n "$ac_prev"; then
1259     eval $ac_prev=\$ac_option
1260     ac_prev=
1261     continue
1262   fi
1263 
1264   case $ac_option in
1265   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1266   *=)   ac_optarg= ;;
1267   *)    ac_optarg=yes ;;
1268   esac
1269 
1270   # Accept the important Cygnus configure options, so we can diagnose typos.
1271 
1272   case $ac_dashdash$ac_option in
1273   --)
1274     ac_dashdash=yes ;;
1275 
1276   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1277     ac_prev=bindir ;;
1278   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1279     bindir=$ac_optarg ;;
1280 
1281   -build | --build | --buil | --bui | --bu)
1282     ac_prev=build_alias ;;
1283   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1284     build_alias=$ac_optarg ;;
1285 
1286   -cache-file | --cache-file | --cache-fil | --cache-fi \
1287   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1288     ac_prev=cache_file ;;
1289   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1290   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1291     cache_file=$ac_optarg ;;
1292 
1293   --config-cache | -C)
1294     cache_file=config.cache ;;
1295 
1296   -datadir | --datadir | --datadi | --datad)
1297     ac_prev=datadir ;;
1298   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1299     datadir=$ac_optarg ;;
1300 
1301   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1302   | --dataroo | --dataro | --datar)
1303     ac_prev=datarootdir ;;
1304   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1305   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1306     datarootdir=$ac_optarg ;;
1307 
1308   -disable-* | --disable-*)
1309     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1310     # Reject names that are not valid shell variable names.
1311     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1312       as_fn_error $? "invalid feature name: $ac_useropt"
1313     ac_useropt_orig=$ac_useropt
1314     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1315     case $ac_user_opts in
1316       *"
1317 "enable_$ac_useropt"
1318 "*) ;;
1319       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1320          ac_unrecognized_sep=', ';;
1321     esac
1322     eval enable_$ac_useropt=no ;;
1323 
1324   -docdir | --docdir | --docdi | --doc | --do)
1325     ac_prev=docdir ;;
1326   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1327     docdir=$ac_optarg ;;
1328 
1329   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1330     ac_prev=dvidir ;;
1331   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1332     dvidir=$ac_optarg ;;
1333 
1334   -enable-* | --enable-*)
1335     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1336     # Reject names that are not valid shell variable names.
1337     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1338       as_fn_error $? "invalid feature name: $ac_useropt"
1339     ac_useropt_orig=$ac_useropt
1340     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1341     case $ac_user_opts in
1342       *"
1343 "enable_$ac_useropt"
1344 "*) ;;
1345       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1346          ac_unrecognized_sep=', ';;
1347     esac
1348     eval enable_$ac_useropt=\$ac_optarg ;;
1349 
1350   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1351   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1352   | --exec | --exe | --ex)
1353     ac_prev=exec_prefix ;;
1354   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1355   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1356   | --exec=* | --exe=* | --ex=*)
1357     exec_prefix=$ac_optarg ;;
1358 
1359   -gas | --gas | --ga | --g)
1360     # Obsolete; use --with-gas.
1361     with_gas=yes ;;
1362 
1363   -help | --help | --hel | --he | -h)
1364     ac_init_help=long ;;
1365   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1366     ac_init_help=recursive ;;
1367   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1368     ac_init_help=short ;;
1369 
1370   -host | --host | --hos | --ho)
1371     ac_prev=host_alias ;;
1372   -host=* | --host=* | --hos=* | --ho=*)
1373     host_alias=$ac_optarg ;;
1374 
1375   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1376     ac_prev=htmldir ;;
1377   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1378   | --ht=*)
1379     htmldir=$ac_optarg ;;
1380 
1381   -includedir | --includedir | --includedi | --included | --include \
1382   | --includ | --inclu | --incl | --inc)
1383     ac_prev=includedir ;;
1384   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1385   | --includ=* | --inclu=* | --incl=* | --inc=*)
1386     includedir=$ac_optarg ;;
1387 
1388   -infodir | --infodir | --infodi | --infod | --info | --inf)
1389     ac_prev=infodir ;;
1390   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1391     infodir=$ac_optarg ;;
1392 
1393   -libdir | --libdir | --libdi | --libd)
1394     ac_prev=libdir ;;
1395   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1396     libdir=$ac_optarg ;;
1397 
1398   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1399   | --libexe | --libex | --libe)
1400     ac_prev=libexecdir ;;
1401   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1402   | --libexe=* | --libex=* | --libe=*)
1403     libexecdir=$ac_optarg ;;
1404 
1405   -localedir | --localedir | --localedi | --localed | --locale)
1406     ac_prev=localedir ;;
1407   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1408     localedir=$ac_optarg ;;
1409 
1410   -localstatedir | --localstatedir | --localstatedi | --localstated \
1411   | --localstate | --localstat | --localsta | --localst | --locals)
1412     ac_prev=localstatedir ;;
1413   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1414   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1415     localstatedir=$ac_optarg ;;
1416 
1417   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1418     ac_prev=mandir ;;
1419   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1420     mandir=$ac_optarg ;;
1421 
1422   -nfp | --nfp | --nf)
1423     # Obsolete; use --without-fp.
1424     with_fp=no ;;
1425 
1426   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1427   | --no-cr | --no-c | -n)
1428     no_create=yes ;;
1429 
1430   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1431   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1432     no_recursion=yes ;;
1433 
1434   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1435   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1436   | --oldin | --oldi | --old | --ol | --o)
1437     ac_prev=oldincludedir ;;
1438   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1439   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1440   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1441     oldincludedir=$ac_optarg ;;
1442 
1443   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1444     ac_prev=prefix ;;
1445   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1446     prefix=$ac_optarg ;;
1447 
1448   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1449   | --program-pre | --program-pr | --program-p)
1450     ac_prev=program_prefix ;;
1451   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1452   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1453     program_prefix=$ac_optarg ;;
1454 
1455   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1456   | --program-suf | --program-su | --program-s)
1457     ac_prev=program_suffix ;;
1458   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1459   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1460     program_suffix=$ac_optarg ;;
1461 
1462   -program-transform-name | --program-transform-name \
1463   | --program-transform-nam | --program-transform-na \
1464   | --program-transform-n | --program-transform- \
1465   | --program-transform | --program-transfor \
1466   | --program-transfo | --program-transf \
1467   | --program-trans | --program-tran \
1468   | --progr-tra | --program-tr | --program-t)
1469     ac_prev=program_transform_name ;;
1470   -program-transform-name=* | --program-transform-name=* \
1471   | --program-transform-nam=* | --program-transform-na=* \
1472   | --program-transform-n=* | --program-transform-=* \
1473   | --program-transform=* | --program-transfor=* \
1474   | --program-transfo=* | --program-transf=* \
1475   | --program-trans=* | --program-tran=* \
1476   | --progr-tra=* | --program-tr=* | --program-t=*)
1477     program_transform_name=$ac_optarg ;;
1478 
1479   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1480     ac_prev=pdfdir ;;
1481   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1482     pdfdir=$ac_optarg ;;
1483 
1484   -psdir | --psdir | --psdi | --psd | --ps)
1485     ac_prev=psdir ;;
1486   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1487     psdir=$ac_optarg ;;
1488 
1489   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1490   | -silent | --silent | --silen | --sile | --sil)
1491     silent=yes ;;
1492 
1493   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1494     ac_prev=sbindir ;;
1495   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1496   | --sbi=* | --sb=*)
1497     sbindir=$ac_optarg ;;
1498 
1499   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1500   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1501   | --sharedst | --shareds | --shared | --share | --shar \
1502   | --sha | --sh)
1503     ac_prev=sharedstatedir ;;
1504   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1505   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1506   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1507   | --sha=* | --sh=*)
1508     sharedstatedir=$ac_optarg ;;
1509 
1510   -site | --site | --sit)
1511     ac_prev=site ;;
1512   -site=* | --site=* | --sit=*)
1513     site=$ac_optarg ;;
1514 
1515   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1516     ac_prev=srcdir ;;
1517   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1518     srcdir=$ac_optarg ;;
1519 
1520   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1521   | --syscon | --sysco | --sysc | --sys | --sy)
1522     ac_prev=sysconfdir ;;
1523   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1524   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1525     sysconfdir=$ac_optarg ;;
1526 
1527   -target | --target | --targe | --targ | --tar | --ta | --t)
1528     ac_prev=target_alias ;;
1529   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1530     target_alias=$ac_optarg ;;
1531 
1532   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1533     verbose=yes ;;
1534 
1535   -version | --version | --versio | --versi | --vers | -V)
1536     ac_init_version=: ;;
1537 
1538   -with-* | --with-*)
1539     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1540     # Reject names that are not valid shell variable names.
1541     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1542       as_fn_error $? "invalid package name: $ac_useropt"
1543     ac_useropt_orig=$ac_useropt
1544     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1545     case $ac_user_opts in
1546       *"
1547 "with_$ac_useropt"
1548 "*) ;;
1549       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1550          ac_unrecognized_sep=', ';;
1551     esac
1552     eval with_$ac_useropt=\$ac_optarg ;;
1553 
1554   -without-* | --without-*)
1555     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1556     # Reject names that are not valid shell variable names.
1557     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1558       as_fn_error $? "invalid package name: $ac_useropt"
1559     ac_useropt_orig=$ac_useropt
1560     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1561     case $ac_user_opts in
1562       *"
1563 "with_$ac_useropt"
1564 "*) ;;
1565       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1566          ac_unrecognized_sep=', ';;
1567     esac
1568     eval with_$ac_useropt=no ;;
1569 
1570   --x)
1571     # Obsolete; use --with-x.
1572     with_x=yes ;;
1573 
1574   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1575   | --x-incl | --x-inc | --x-in | --x-i)
1576     ac_prev=x_includes ;;
1577   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1578   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1579     x_includes=$ac_optarg ;;
1580 
1581   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1582   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1583     ac_prev=x_libraries ;;
1584   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1585   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1586     x_libraries=$ac_optarg ;;
1587 
1588   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1589 Try \`$0 --help' for more information"
1590     ;;
1591 
1592   *=*)
1593     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1594     # Reject names that are not valid shell variable names.
1595     case $ac_envvar in #(
1596       '' | [0-9]* | *[!_$as_cr_alnum]* )
1597       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1598     esac
1599     eval $ac_envvar=\$ac_optarg
1600     export $ac_envvar ;;
1601 
1602   *)
1603     # FIXME: should be removed in autoconf 3.0.
1604     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1605     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1606       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1607     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1608     ;;
1609 
1610   esac
1611 done
1612 
1613 if test -n "$ac_prev"; then
1614   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1615   as_fn_error $? "missing argument to $ac_option"
1616 fi
1617 
1618 if test -n "$ac_unrecognized_opts"; then
1619   case $enable_option_checking in
1620     no) ;;
1621     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1622     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1623   esac
1624 fi
1625 
1626 # Check all directory arguments for consistency.
1627 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1628                 datadir sysconfdir sharedstatedir localstatedir includedir \
1629                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1630                 libdir localedir mandir
1631 do
1632   eval ac_val=\$$ac_var
1633   # Remove trailing slashes.
1634   case $ac_val in
1635     */ )
1636       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1637       eval $ac_var=\$ac_val;;
1638   esac
1639   # Be sure to have absolute directory names.
1640   case $ac_val in
1641     [\\/$]* | ?:[\\/]* )  continue;;
1642     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1643   esac
1644   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1645 done
1646 
1647 # There might be people who depend on the old broken behavior: `$host'
1648 # used to hold the argument of --host etc.
1649 # FIXME: To remove some day.
1650 build=$build_alias
1651 host=$host_alias
1652 target=$target_alias
1653 
1654 # FIXME: To remove some day.
1655 if test "x$host_alias" != x; then
1656   if test "x$build_alias" = x; then
1657     cross_compiling=maybe
1658   elif test "x$build_alias" != "x$host_alias"; then
1659     cross_compiling=yes
1660   fi
1661 fi
1662 
1663 ac_tool_prefix=
1664 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1665 
1666 test "$silent" = yes && exec 6>/dev/null
1667 
1668 
1669 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1670 ac_ls_di=`ls -di .` &&
1671 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1672   as_fn_error $? "working directory cannot be determined"
1673 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1674   as_fn_error $? "pwd does not report name of working directory"
1675 
1676 
1677 # Find the source files, if location was not specified.
1678 if test -z "$srcdir"; then
1679   ac_srcdir_defaulted=yes
1680   # Try the directory containing this script, then the parent directory.
1681   ac_confdir=`$as_dirname -- "$as_myself" ||
1682 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1683          X"$as_myself" : 'X\(//\)[^/]' \| \
1684          X"$as_myself" : 'X\(//\)$' \| \
1685          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1686 $as_echo X"$as_myself" |
1687     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1688             s//\1/
1689             q
1690           }
1691           /^X\(\/\/\)[^/].*/{
1692             s//\1/
1693             q
1694           }
1695           /^X\(\/\/\)$/{
1696             s//\1/
1697             q
1698           }
1699           /^X\(\/\).*/{
1700             s//\1/
1701             q
1702           }
1703           s/.*/./; q'`
1704   srcdir=$ac_confdir
1705   if test ! -r "$srcdir/$ac_unique_file"; then
1706     srcdir=..
1707   fi
1708 else
1709   ac_srcdir_defaulted=no
1710 fi
1711 if test ! -r "$srcdir/$ac_unique_file"; then
1712   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1713   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1714 fi
1715 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1716 ac_abs_confdir=`(
1717         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1718         pwd)`
1719 # When building in place, set srcdir=.
1720 if test "$ac_abs_confdir" = "$ac_pwd"; then
1721   srcdir=.
1722 fi
1723 # Remove unnecessary trailing slashes from srcdir.
1724 # Double slashes in file names in object file debugging info
1725 # mess up M-x gdb in Emacs.
1726 case $srcdir in
1727 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1728 esac
1729 for ac_var in $ac_precious_vars; do
1730   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1731   eval ac_env_${ac_var}_value=\$${ac_var}
1732   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1733   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1734 done
1735 
1736 #
1737 # Report the --help message.
1738 #
1739 if test "$ac_init_help" = "long"; then
1740   # Omit some internal or obsolete options to make the list less imposing.
1741   # This message is too long to be a string in the A/UX 3.1 sh.
1742   cat <<_ACEOF
1743 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1744 
1745 Usage: $0 [OPTION]... [VAR=VALUE]...
1746 
1747 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1748 VAR=VALUE.  See below for descriptions of some of the useful variables.
1749 
1750 Defaults for the options are specified in brackets.
1751 
1752 Configuration:
1753   -h, --help              display this help and exit
1754       --help=short        display options specific to this package
1755       --help=recursive    display the short help of all the included packages
1756   -V, --version           display version information and exit
1757   -q, --quiet, --silent   do not print \`checking ...' messages
1758       --cache-file=FILE   cache test results in FILE [disabled]
1759   -C, --config-cache      alias for \`--cache-file=config.cache'
1760   -n, --no-create         do not create output files
1761       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1762 
1763 Installation directories:
1764   --prefix=PREFIX         install architecture-independent files in PREFIX
1765                           [$ac_default_prefix]
1766   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1767                           [PREFIX]
1768 
1769 By default, \`make install' will install all the files in
1770 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1771 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1772 for instance \`--prefix=\$HOME'.
1773 
1774 For better control, use the options below.
1775 
1776 Fine tuning of the installation directories:
1777   --bindir=DIR            user executables [EPREFIX/bin]
1778   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1779   --libexecdir=DIR        program executables [EPREFIX/libexec]
1780   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1781   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1782   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1783   --libdir=DIR            object code libraries [EPREFIX/lib]
1784   --includedir=DIR        C header files [PREFIX/include]
1785   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1786   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1787   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1788   --infodir=DIR           info documentation [DATAROOTDIR/info]
1789   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1790   --mandir=DIR            man documentation [DATAROOTDIR/man]
1791   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1792   --htmldir=DIR           html documentation [DOCDIR]
1793   --dvidir=DIR            dvi documentation [DOCDIR]
1794   --pdfdir=DIR            pdf documentation [DOCDIR]
1795   --psdir=DIR             ps documentation [DOCDIR]
1796 _ACEOF
1797 
1798   cat <<\_ACEOF
1799 
1800 X features:
1801   --x-includes=DIR    X include files are in DIR
1802   --x-libraries=DIR   X library files are in DIR
1803 
1804 System types:
1805   --build=BUILD     configure for building on BUILD [guessed]
1806   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1807   --target=TARGET   configure for building compilers for TARGET [HOST]
1808 _ACEOF
1809 fi
1810 
1811 if test -n "$ac_init_help"; then
1812   case $ac_init_help in
1813      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1814    esac
1815   cat <<\_ACEOF
1816 
1817 Optional Features:
1818   --disable-option-checking  ignore unrecognized --enable/--with options
1819   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1820   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1821   --enable-openjdk-only   suppress building custom source even if present
1822                           [disabled]
1823   --enable-debug          set the debug level to fastdebug (shorthand for
1824                           --with-debug-level=fastdebug) [disabled]
1825   --disable-headful       disable building headful support (graphical UI
1826                           support) [enabled]
1827   --enable-hotspot-test-in-build
1828                           run the Queens test after Hotspot build [disabled]
1829   --enable-unlimited-crypto
1830                           Enable unlimited crypto policy [disabled]
1831   --disable-debug-symbols disable generation of debug symbols [enabled]
1832   --disable-zip-debug-info
1833                           disable zipping of debug-info files [enabled]
1834   --enable-macosx-runtime-support
1835                           Deprecated. Option is kept for backwards
1836                           compatibility and is ignored
1837   --disable-freetype-bundling
1838                           disable bundling of the freetype library with the
1839                           build result [enabled on Windows or when using
1840                           --with-freetype, disabled otherwise]
1841   --enable-sjavac         use sjavac to do fast incremental compiles
1842                           [disabled]
1843   --disable-precompiled-headers
1844                           disable using precompiled headers when compiling C++
1845                           [enabled]
1846   --enable-ccache         enable using ccache to speed up recompilations
1847                           [disabled]
1848 
1849 Optional Packages:
1850   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1851   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1852   --with-custom-make-dir  use this directory for custom build/make files
1853   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1854                           support it), e.g. --with-target-bits=32 [guessed]
1855   --with-jdk-variant      JDK variant to build (normal) [normal]
1856   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1857   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1858                           client, minimal1, kernel, zero, zeroshark, core)
1859                           [server]
1860   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1861                           [release]
1862   --with-devkit           use this devkit for compilers, tools and resources
1863   --with-sys-root         alias for --with-sysroot for backwards compatability
1864   --with-sysroot          use this directory as sysroot)
1865   --with-tools-dir        alias for --with-toolchain-path for backwards
1866                           compatibility
1867   --with-toolchain-path   prepend these directories when searching for
1868                           toolchain binaries (compilers etc)
1869   --with-extra-path       prepend these directories to the default path
1870   --with-xcode-path       explicit path to Xcode 4 (generally for building on
1871                           10.9 and later)
1872   --with-conf-name        use this as the name of the configuration [generated
1873                           from important configuration options]
1874   --with-builddeps-conf   use this configuration file for the builddeps
1875   --with-builddeps-server download and use build dependencies from this server
1876                           url
1877   --with-builddeps-dir    store downloaded build dependencies here
1878                           [/localhome/builddeps]
1879   --with-builddeps-group  chgrp the downloaded build dependencies to this
1880                           group
1881   --with-cacerts-file     specify alternative cacerts file
1882   --with-milestone        Set milestone value for build [internal]
1883   --with-update-version   Set update version value for build [b00]
1884   --with-user-release-suffix
1885                           Add a custom string to the version string if build
1886                           number isn't set.[username_builddateb00]
1887   --with-build-number     Set build number value for build [b00]
1888   --with-copyright-year   Set copyright year value for build [current year]
1889   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1890   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1891                           invocations of the Boot JDK, overriding the default
1892                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1893                           -enableassertions"
1894   --with-add-source-root  for each and every source directory, look in this
1895                           additional source root for the same directory; if it
1896                           exists and have files in it, include it in the build
1897   --with-override-source-root
1898                           for each and every source directory, look in this
1899                           override source root for the same directory; if it
1900                           exists, use that directory instead and ignore the
1901                           directory in the original source root
1902   --with-adds-and-overrides
1903                           use the subdirs 'adds' and 'overrides' in the
1904                           specified directory as add-source-root and
1905                           override-source-root
1906   --with-override-langtools
1907                           use this langtools dir for the build
1908   --with-override-corba   use this corba dir for the build
1909   --with-override-jaxp    use this jaxp dir for the build
1910   --with-override-jaxws   use this jaxws dir for the build
1911   --with-override-hotspot use this hotspot dir for the build
1912   --with-override-nashorn use this nashorn dir for the build
1913   --with-override-jdk     use this jdk dir for the build
1914   --with-import-hotspot   import hotspot binaries from this jdk image or
1915                           hotspot build dist dir instead of building from
1916                           source
1917   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1918                           to show possible values [platform dependent]
1919   --with-toolchain-version
1920                           the version of the toolchain to look for, use
1921                           '--help' to show possible values [platform
1922                           dependent]
1923   --with-jtreg            Regression Test Harness [probed]
1924   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1925   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1926   --with-extra-ldflags    extra flags to be used when linking jdk
1927   --with-native-debug-symbols
1928                           set the native debug symbol configuration (none,
1929                           internal, external, zipped) [varying]
1930   --with-x                use the X Window System
1931   --with-cups             specify prefix directory for the cups package
1932                           (expecting the headers under PATH/include)
1933   --with-cups-include     specify directory for the cups include files
1934   --with-freetype         specify prefix directory for the freetype package
1935                           (expecting the libraries under PATH/lib and the
1936                           headers under PATH/include)
1937   --with-freetype-include specify directory for the freetype include files
1938   --with-freetype-lib     specify directory for the freetype library
1939   --with-freetype-src     specify directory with freetype sources to
1940                           automatically build the library (experimental,
1941                           Windows-only)
1942   --with-alsa             specify prefix directory for the alsa package
1943                           (expecting the libraries under PATH/lib and the
1944                           headers under PATH/include)
1945   --with-alsa-include     specify directory for the alsa include files
1946   --with-alsa-lib         specify directory for the alsa library
1947   --with-giflib           use giflib from build system or OpenJDK source
1948                           (system, bundled) [bundled]
1949   --with-zlib             use zlib from build system or OpenJDK source
1950                           (system, bundled) [bundled]
1951   --with-stdc++lib=<static>,<dynamic>,<default>
1952                           force linking of the C++ runtime on Linux to either
1953                           static or dynamic, default is static with dynamic as
1954                           fallback
1955   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1956                           (Windows only) [probed]
1957   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1958                           (Windows only) [probed]
1959   --with-dxsdk            Deprecated. Option is kept for backwards
1960                           compatibility and is ignored
1961   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1962                           compatibility and is ignored
1963   --with-dxsdk-include    Deprecated. Option is kept for backwards
1964                           compatibility and is ignored
1965   --with-num-cores        number of cores in the build system, e.g.
1966                           --with-num-cores=8 [probed]
1967   --with-memory-size      memory (in MB) available in the build system, e.g.
1968                           --with-memory-size=1024 [probed]
1969   --with-jobs             number of parallel jobs to let make run [calculated
1970                           based on cores and memory]
1971   --with-sjavac-server-java
1972                           use this java binary for running the sjavac
1973                           background server [Boot JDK java]
1974   --with-ccache-dir       where to store ccache files [~/.ccache]
1975 
1976 Some influential environment variables:
1977   BASENAME    Override default value for BASENAME
1978   BASH        Override default value for BASH
1979   CAT         Override default value for CAT
1980   CHMOD       Override default value for CHMOD
1981   CMP         Override default value for CMP
1982   COMM        Override default value for COMM
1983   CP          Override default value for CP
1984   CUT         Override default value for CUT
1985   DATE        Override default value for DATE
1986   DIFF        Override default value for DIFF
1987   DIRNAME     Override default value for DIRNAME
1988   ECHO        Override default value for ECHO
1989   EXPR        Override default value for EXPR
1990   FILE        Override default value for FILE
1991   FIND        Override default value for FIND
1992   HEAD        Override default value for HEAD
1993   LN          Override default value for LN
1994   LS          Override default value for LS
1995   MKDIR       Override default value for MKDIR
1996   MKTEMP      Override default value for MKTEMP
1997   MV          Override default value for MV
1998   NAWK        Override default value for NAWK
1999   PRINTF      Override default value for PRINTF
2000   RM          Override default value for RM
2001   SH          Override default value for SH
2002   SORT        Override default value for SORT
2003   TAIL        Override default value for TAIL
2004   TAR         Override default value for TAR
2005   TEE         Override default value for TEE
2006   TOUCH       Override default value for TOUCH
2007   TR          Override default value for TR
2008   UNAME       Override default value for UNAME
2009   UNIQ        Override default value for UNIQ
2010   WC          Override default value for WC
2011   WHICH       Override default value for WHICH
2012   XARGS       Override default value for XARGS
2013   AWK         Override default value for AWK
2014   GREP        Override default value for GREP
2015   EGREP       Override default value for EGREP
2016   FGREP       Override default value for FGREP
2017   SED         Override default value for SED
2018   CYGPATH     Override default value for CYGPATH
2019   READLINK    Override default value for READLINK
2020   DF          Override default value for DF
2021   SETFILE     Override default value for SETFILE
2022   CPIO        Override default value for CPIO
2023   UNZIP       Override default value for UNZIP
2024   ZIP         Override default value for ZIP
2025   LDD         Override default value for LDD
2026   READELF     Override default value for READELF
2027   HG          Override default value for HG
2028   STAT        Override default value for STAT
2029   TIME        Override default value for TIME
2030   DSYMUTIL    Override default value for DSYMUTIL
2031   XATTR       Override default value for XATTR
2032   CODESIGN    Override default value for CODESIGN
2033   PKG_CONFIG  path to pkg-config utility
2034   CC          C compiler command
2035   CFLAGS      C compiler flags
2036   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2037               nonstandard directory <lib dir>
2038   LIBS        libraries to pass to the linker, e.g. -l<library>
2039   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2040               you have headers in a nonstandard directory <include dir>
2041   CXX         C++ compiler command
2042   CXXFLAGS    C++ compiler flags
2043   CPP         C preprocessor
2044   CXXCPP      C++ preprocessor
2045   AS          Override default value for AS
2046   AR          Override default value for AR
2047   OBJC        Objective C compiler command
2048   OBJCFLAGS   Objective C compiler flags
2049   LIPO        Override default value for LIPO
2050   STRIP       Override default value for STRIP
2051   NM          Override default value for NM
2052   GNM         Override default value for GNM
2053   MCS         Override default value for MCS
2054   OBJCOPY     Override default value for OBJCOPY
2055   OBJDUMP     Override default value for OBJDUMP
2056   BUILD_CC    Override default value for BUILD_CC
2057   BUILD_CXX   Override default value for BUILD_CXX
2058   BUILD_LD    Override default value for BUILD_LD
2059   JTREGEXE    Override default value for JTREGEXE
2060   XMKMF       Path to xmkmf, Makefile generator for X Window System
2061   FREETYPE_CFLAGS
2062               C compiler flags for FREETYPE, overriding pkg-config
2063   FREETYPE_LIBS
2064               linker flags for FREETYPE, overriding pkg-config
2065   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2066   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2067   LIBFFI_CFLAGS
2068               C compiler flags for LIBFFI, overriding pkg-config
2069   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2070   CCACHE      Override default value for CCACHE
2071 
2072 Use these variables to override the choices made by `configure' or to help
2073 it to find libraries and programs with nonstandard names/locations.
2074 
2075 Report bugs to <build-dev@openjdk.java.net>.
2076 OpenJDK home page: <http://openjdk.java.net>.
2077 _ACEOF
2078 ac_status=$?
2079 fi
2080 
2081 if test "$ac_init_help" = "recursive"; then
2082   # If there are subdirs, report their specific --help.
2083   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2084     test -d "$ac_dir" ||
2085       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2086       continue
2087     ac_builddir=.
2088 
2089 case "$ac_dir" in
2090 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2091 *)
2092   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2093   # A ".." for each directory in $ac_dir_suffix.
2094   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2095   case $ac_top_builddir_sub in
2096   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2097   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2098   esac ;;
2099 esac
2100 ac_abs_top_builddir=$ac_pwd
2101 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2102 # for backward compatibility:
2103 ac_top_builddir=$ac_top_build_prefix
2104 
2105 case $srcdir in
2106   .)  # We are building in place.
2107     ac_srcdir=.
2108     ac_top_srcdir=$ac_top_builddir_sub
2109     ac_abs_top_srcdir=$ac_pwd ;;
2110   [\\/]* | ?:[\\/]* )  # Absolute name.
2111     ac_srcdir=$srcdir$ac_dir_suffix;
2112     ac_top_srcdir=$srcdir
2113     ac_abs_top_srcdir=$srcdir ;;
2114   *) # Relative name.
2115     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2116     ac_top_srcdir=$ac_top_build_prefix$srcdir
2117     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2118 esac
2119 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2120 
2121     cd "$ac_dir" || { ac_status=$?; continue; }
2122     # Check for guested configure.
2123     if test -f "$ac_srcdir/configure.gnu"; then
2124       echo &&
2125       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2126     elif test -f "$ac_srcdir/configure"; then
2127       echo &&
2128       $SHELL "$ac_srcdir/configure" --help=recursive
2129     else
2130       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2131     fi || ac_status=$?
2132     cd "$ac_pwd" || { ac_status=$?; break; }
2133   done
2134 fi
2135 
2136 test -n "$ac_init_help" && exit $ac_status
2137 if $ac_init_version; then
2138   cat <<\_ACEOF
2139 OpenJDK configure jdk8
2140 generated by GNU Autoconf 2.69
2141 
2142 Copyright (C) 2012 Free Software Foundation, Inc.
2143 This configure script is free software; the Free Software Foundation
2144 gives unlimited permission to copy, distribute and modify it.
2145 _ACEOF
2146   exit
2147 fi
2148 
2149 ## ------------------------ ##
2150 ## Autoconf initialization. ##
2151 ## ------------------------ ##
2152 
2153 # ac_fn_c_try_compile LINENO
2154 # --------------------------
2155 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2156 ac_fn_c_try_compile ()
2157 {
2158   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2159   rm -f conftest.$ac_objext
2160   if { { ac_try="$ac_compile"
2161 case "(($ac_try" in
2162   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2163   *) ac_try_echo=$ac_try;;
2164 esac
2165 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2166 $as_echo "$ac_try_echo"; } >&5
2167   (eval "$ac_compile") 2>conftest.err
2168   ac_status=$?
2169   if test -s conftest.err; then
2170     grep -v '^ *+' conftest.err >conftest.er1
2171     cat conftest.er1 >&5
2172     mv -f conftest.er1 conftest.err
2173   fi
2174   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2175   test $ac_status = 0; } && {
2176          test -z "$ac_c_werror_flag" ||
2177          test ! -s conftest.err
2178        } && test -s conftest.$ac_objext; then :
2179   ac_retval=0
2180 else
2181   $as_echo "$as_me: failed program was:" >&5
2182 sed 's/^/| /' conftest.$ac_ext >&5
2183 
2184         ac_retval=1
2185 fi
2186   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2187   as_fn_set_status $ac_retval
2188 
2189 } # ac_fn_c_try_compile
2190 
2191 # ac_fn_cxx_try_compile LINENO
2192 # ----------------------------
2193 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2194 ac_fn_cxx_try_compile ()
2195 {
2196   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2197   rm -f conftest.$ac_objext
2198   if { { ac_try="$ac_compile"
2199 case "(($ac_try" in
2200   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2201   *) ac_try_echo=$ac_try;;
2202 esac
2203 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2204 $as_echo "$ac_try_echo"; } >&5
2205   (eval "$ac_compile") 2>conftest.err
2206   ac_status=$?
2207   if test -s conftest.err; then
2208     grep -v '^ *+' conftest.err >conftest.er1
2209     cat conftest.er1 >&5
2210     mv -f conftest.er1 conftest.err
2211   fi
2212   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2213   test $ac_status = 0; } && {
2214          test -z "$ac_cxx_werror_flag" ||
2215          test ! -s conftest.err
2216        } && test -s conftest.$ac_objext; then :
2217   ac_retval=0
2218 else
2219   $as_echo "$as_me: failed program was:" >&5
2220 sed 's/^/| /' conftest.$ac_ext >&5
2221 
2222         ac_retval=1
2223 fi
2224   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2225   as_fn_set_status $ac_retval
2226 
2227 } # ac_fn_cxx_try_compile
2228 
2229 # ac_fn_c_try_cpp LINENO
2230 # ----------------------
2231 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2232 ac_fn_c_try_cpp ()
2233 {
2234   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2235   if { { ac_try="$ac_cpp conftest.$ac_ext"
2236 case "(($ac_try" in
2237   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2238   *) ac_try_echo=$ac_try;;
2239 esac
2240 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2241 $as_echo "$ac_try_echo"; } >&5
2242   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2243   ac_status=$?
2244   if test -s conftest.err; then
2245     grep -v '^ *+' conftest.err >conftest.er1
2246     cat conftest.er1 >&5
2247     mv -f conftest.er1 conftest.err
2248   fi
2249   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2250   test $ac_status = 0; } > conftest.i && {
2251          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2252          test ! -s conftest.err
2253        }; then :
2254   ac_retval=0
2255 else
2256   $as_echo "$as_me: failed program was:" >&5
2257 sed 's/^/| /' conftest.$ac_ext >&5
2258 
2259     ac_retval=1
2260 fi
2261   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2262   as_fn_set_status $ac_retval
2263 
2264 } # ac_fn_c_try_cpp
2265 
2266 # ac_fn_cxx_try_cpp LINENO
2267 # ------------------------
2268 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2269 ac_fn_cxx_try_cpp ()
2270 {
2271   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272   if { { ac_try="$ac_cpp conftest.$ac_ext"
2273 case "(($ac_try" in
2274   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2275   *) ac_try_echo=$ac_try;;
2276 esac
2277 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2278 $as_echo "$ac_try_echo"; } >&5
2279   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2280   ac_status=$?
2281   if test -s conftest.err; then
2282     grep -v '^ *+' conftest.err >conftest.er1
2283     cat conftest.er1 >&5
2284     mv -f conftest.er1 conftest.err
2285   fi
2286   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2287   test $ac_status = 0; } > conftest.i && {
2288          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2289          test ! -s conftest.err
2290        }; then :
2291   ac_retval=0
2292 else
2293   $as_echo "$as_me: failed program was:" >&5
2294 sed 's/^/| /' conftest.$ac_ext >&5
2295 
2296     ac_retval=1
2297 fi
2298   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2299   as_fn_set_status $ac_retval
2300 
2301 } # ac_fn_cxx_try_cpp
2302 
2303 # ac_fn_objc_try_compile LINENO
2304 # -----------------------------
2305 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2306 ac_fn_objc_try_compile ()
2307 {
2308   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309   rm -f conftest.$ac_objext
2310   if { { ac_try="$ac_compile"
2311 case "(($ac_try" in
2312   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2313   *) ac_try_echo=$ac_try;;
2314 esac
2315 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2316 $as_echo "$ac_try_echo"; } >&5
2317   (eval "$ac_compile") 2>conftest.err
2318   ac_status=$?
2319   if test -s conftest.err; then
2320     grep -v '^ *+' conftest.err >conftest.er1
2321     cat conftest.er1 >&5
2322     mv -f conftest.er1 conftest.err
2323   fi
2324   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2325   test $ac_status = 0; } && {
2326          test -z "$ac_objc_werror_flag" ||
2327          test ! -s conftest.err
2328        } && test -s conftest.$ac_objext; then :
2329   ac_retval=0
2330 else
2331   $as_echo "$as_me: failed program was:" >&5
2332 sed 's/^/| /' conftest.$ac_ext >&5
2333 
2334         ac_retval=1
2335 fi
2336   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2337   as_fn_set_status $ac_retval
2338 
2339 } # ac_fn_objc_try_compile
2340 
2341 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2342 # ---------------------------------------------------------
2343 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2344 # the include files in INCLUDES and setting the cache variable VAR
2345 # accordingly.
2346 ac_fn_cxx_check_header_mongrel ()
2347 {
2348   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2349   if eval \${$3+:} false; then :
2350   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2351 $as_echo_n "checking for $2... " >&6; }
2352 if eval \${$3+:} false; then :
2353   $as_echo_n "(cached) " >&6
2354 fi
2355 eval ac_res=\$$3
2356                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2357 $as_echo "$ac_res" >&6; }
2358 else
2359   # Is the header compilable?
2360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2361 $as_echo_n "checking $2 usability... " >&6; }
2362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2363 /* end confdefs.h.  */
2364 $4
2365 #include <$2>
2366 _ACEOF
2367 if ac_fn_cxx_try_compile "$LINENO"; then :
2368   ac_header_compiler=yes
2369 else
2370   ac_header_compiler=no
2371 fi
2372 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2374 $as_echo "$ac_header_compiler" >&6; }
2375 
2376 # Is the header present?
2377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2378 $as_echo_n "checking $2 presence... " >&6; }
2379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2380 /* end confdefs.h.  */
2381 #include <$2>
2382 _ACEOF
2383 if ac_fn_cxx_try_cpp "$LINENO"; then :
2384   ac_header_preproc=yes
2385 else
2386   ac_header_preproc=no
2387 fi
2388 rm -f conftest.err conftest.i conftest.$ac_ext
2389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2390 $as_echo "$ac_header_preproc" >&6; }
2391 
2392 # So?  What about this header?
2393 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2394   yes:no: )
2395     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2396 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2397     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2398 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2399     ;;
2400   no:yes:* )
2401     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2402 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2403     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2404 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2405     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2406 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2407     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2408 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2409     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2410 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2411 ( $as_echo "## ----------------------------------------- ##
2412 ## Report this to build-dev@openjdk.java.net ##
2413 ## ----------------------------------------- ##"
2414      ) | sed "s/^/$as_me: WARNING:     /" >&2
2415     ;;
2416 esac
2417   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2418 $as_echo_n "checking for $2... " >&6; }
2419 if eval \${$3+:} false; then :
2420   $as_echo_n "(cached) " >&6
2421 else
2422   eval "$3=\$ac_header_compiler"
2423 fi
2424 eval ac_res=\$$3
2425                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2426 $as_echo "$ac_res" >&6; }
2427 fi
2428   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2429 
2430 } # ac_fn_cxx_check_header_mongrel
2431 
2432 # ac_fn_cxx_try_run LINENO
2433 # ------------------------
2434 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2435 # that executables *can* be run.
2436 ac_fn_cxx_try_run ()
2437 {
2438   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2439   if { { ac_try="$ac_link"
2440 case "(($ac_try" in
2441   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2442   *) ac_try_echo=$ac_try;;
2443 esac
2444 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2445 $as_echo "$ac_try_echo"; } >&5
2446   (eval "$ac_link") 2>&5
2447   ac_status=$?
2448   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2449   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2450   { { case "(($ac_try" in
2451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2452   *) ac_try_echo=$ac_try;;
2453 esac
2454 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2455 $as_echo "$ac_try_echo"; } >&5
2456   (eval "$ac_try") 2>&5
2457   ac_status=$?
2458   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2459   test $ac_status = 0; }; }; then :
2460   ac_retval=0
2461 else
2462   $as_echo "$as_me: program exited with status $ac_status" >&5
2463        $as_echo "$as_me: failed program was:" >&5
2464 sed 's/^/| /' conftest.$ac_ext >&5
2465 
2466        ac_retval=$ac_status
2467 fi
2468   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2469   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2470   as_fn_set_status $ac_retval
2471 
2472 } # ac_fn_cxx_try_run
2473 
2474 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2475 # ---------------------------------------------------------
2476 # Tests whether HEADER exists and can be compiled using the include files in
2477 # INCLUDES, setting the cache variable VAR accordingly.
2478 ac_fn_cxx_check_header_compile ()
2479 {
2480   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2481   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2482 $as_echo_n "checking for $2... " >&6; }
2483 if eval \${$3+:} false; then :
2484   $as_echo_n "(cached) " >&6
2485 else
2486   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2487 /* end confdefs.h.  */
2488 $4
2489 #include <$2>
2490 _ACEOF
2491 if ac_fn_cxx_try_compile "$LINENO"; then :
2492   eval "$3=yes"
2493 else
2494   eval "$3=no"
2495 fi
2496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2497 fi
2498 eval ac_res=\$$3
2499                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2500 $as_echo "$ac_res" >&6; }
2501   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2502 
2503 } # ac_fn_cxx_check_header_compile
2504 
2505 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2506 # ----------------------------------------------
2507 # Tries to find the compile-time value of EXPR in a program that includes
2508 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2509 # computed
2510 ac_fn_cxx_compute_int ()
2511 {
2512   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2513   if test "$cross_compiling" = yes; then
2514     # Depending upon the size, compute the lo and hi bounds.
2515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2516 /* end confdefs.h.  */
2517 $4
2518 int
2519 main ()
2520 {
2521 static int test_array [1 - 2 * !(($2) >= 0)];
2522 test_array [0] = 0;
2523 return test_array [0];
2524 
2525   ;
2526   return 0;
2527 }
2528 _ACEOF
2529 if ac_fn_cxx_try_compile "$LINENO"; then :
2530   ac_lo=0 ac_mid=0
2531   while :; do
2532     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2533 /* end confdefs.h.  */
2534 $4
2535 int
2536 main ()
2537 {
2538 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2539 test_array [0] = 0;
2540 return test_array [0];
2541 
2542   ;
2543   return 0;
2544 }
2545 _ACEOF
2546 if ac_fn_cxx_try_compile "$LINENO"; then :
2547   ac_hi=$ac_mid; break
2548 else
2549   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2550                         if test $ac_lo -le $ac_mid; then
2551                           ac_lo= ac_hi=
2552                           break
2553                         fi
2554                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2555 fi
2556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2557   done
2558 else
2559   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2560 /* end confdefs.h.  */
2561 $4
2562 int
2563 main ()
2564 {
2565 static int test_array [1 - 2 * !(($2) < 0)];
2566 test_array [0] = 0;
2567 return test_array [0];
2568 
2569   ;
2570   return 0;
2571 }
2572 _ACEOF
2573 if ac_fn_cxx_try_compile "$LINENO"; then :
2574   ac_hi=-1 ac_mid=-1
2575   while :; do
2576     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2577 /* end confdefs.h.  */
2578 $4
2579 int
2580 main ()
2581 {
2582 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2583 test_array [0] = 0;
2584 return test_array [0];
2585 
2586   ;
2587   return 0;
2588 }
2589 _ACEOF
2590 if ac_fn_cxx_try_compile "$LINENO"; then :
2591   ac_lo=$ac_mid; break
2592 else
2593   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2594                         if test $ac_mid -le $ac_hi; then
2595                           ac_lo= ac_hi=
2596                           break
2597                         fi
2598                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2599 fi
2600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2601   done
2602 else
2603   ac_lo= ac_hi=
2604 fi
2605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2606 fi
2607 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2608 # Binary search between lo and hi bounds.
2609 while test "x$ac_lo" != "x$ac_hi"; do
2610   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2611   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2612 /* end confdefs.h.  */
2613 $4
2614 int
2615 main ()
2616 {
2617 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2618 test_array [0] = 0;
2619 return test_array [0];
2620 
2621   ;
2622   return 0;
2623 }
2624 _ACEOF
2625 if ac_fn_cxx_try_compile "$LINENO"; then :
2626   ac_hi=$ac_mid
2627 else
2628   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2629 fi
2630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2631 done
2632 case $ac_lo in #((
2633 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2634 '') ac_retval=1 ;;
2635 esac
2636   else
2637     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2638 /* end confdefs.h.  */
2639 $4
2640 static long int longval () { return $2; }
2641 static unsigned long int ulongval () { return $2; }
2642 #include <stdio.h>
2643 #include <stdlib.h>
2644 int
2645 main ()
2646 {
2647 
2648   FILE *f = fopen ("conftest.val", "w");
2649   if (! f)
2650     return 1;
2651   if (($2) < 0)
2652     {
2653       long int i = longval ();
2654       if (i != ($2))
2655         return 1;
2656       fprintf (f, "%ld", i);
2657     }
2658   else
2659     {
2660       unsigned long int i = ulongval ();
2661       if (i != ($2))
2662         return 1;
2663       fprintf (f, "%lu", i);
2664     }
2665   /* Do not output a trailing newline, as this causes \r\n confusion
2666      on some platforms.  */
2667   return ferror (f) || fclose (f) != 0;
2668 
2669   ;
2670   return 0;
2671 }
2672 _ACEOF
2673 if ac_fn_cxx_try_run "$LINENO"; then :
2674   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2675 else
2676   ac_retval=1
2677 fi
2678 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2679   conftest.$ac_objext conftest.beam conftest.$ac_ext
2680 rm -f conftest.val
2681 
2682   fi
2683   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2684   as_fn_set_status $ac_retval
2685 
2686 } # ac_fn_cxx_compute_int
2687 
2688 # ac_fn_cxx_try_link LINENO
2689 # -------------------------
2690 # Try to link conftest.$ac_ext, and return whether this succeeded.
2691 ac_fn_cxx_try_link ()
2692 {
2693   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2694   rm -f conftest.$ac_objext conftest$ac_exeext
2695   if { { ac_try="$ac_link"
2696 case "(($ac_try" in
2697   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2698   *) ac_try_echo=$ac_try;;
2699 esac
2700 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2701 $as_echo "$ac_try_echo"; } >&5
2702   (eval "$ac_link") 2>conftest.err
2703   ac_status=$?
2704   if test -s conftest.err; then
2705     grep -v '^ *+' conftest.err >conftest.er1
2706     cat conftest.er1 >&5
2707     mv -f conftest.er1 conftest.err
2708   fi
2709   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2710   test $ac_status = 0; } && {
2711          test -z "$ac_cxx_werror_flag" ||
2712          test ! -s conftest.err
2713        } && test -s conftest$ac_exeext && {
2714          test "$cross_compiling" = yes ||
2715          test -x conftest$ac_exeext
2716        }; then :
2717   ac_retval=0
2718 else
2719   $as_echo "$as_me: failed program was:" >&5
2720 sed 's/^/| /' conftest.$ac_ext >&5
2721 
2722         ac_retval=1
2723 fi
2724   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2725   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2726   # interfere with the next link command; also delete a directory that is
2727   # left behind by Apple's compiler.  We do this before executing the actions.
2728   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2729   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2730   as_fn_set_status $ac_retval
2731 
2732 } # ac_fn_cxx_try_link
2733 
2734 # ac_fn_cxx_check_func LINENO FUNC VAR
2735 # ------------------------------------
2736 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2737 ac_fn_cxx_check_func ()
2738 {
2739   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2740   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2741 $as_echo_n "checking for $2... " >&6; }
2742 if eval \${$3+:} false; then :
2743   $as_echo_n "(cached) " >&6
2744 else
2745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2746 /* end confdefs.h.  */
2747 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2748    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2749 #define $2 innocuous_$2
2750 
2751 /* System header to define __stub macros and hopefully few prototypes,
2752     which can conflict with char $2 (); below.
2753     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2754     <limits.h> exists even on freestanding compilers.  */
2755 
2756 #ifdef __STDC__
2757 # include <limits.h>
2758 #else
2759 # include <assert.h>
2760 #endif
2761 
2762 #undef $2
2763 
2764 /* Override any GCC internal prototype to avoid an error.
2765    Use char because int might match the return type of a GCC
2766    builtin and then its argument prototype would still apply.  */
2767 #ifdef __cplusplus
2768 extern "C"
2769 #endif
2770 char $2 ();
2771 /* The GNU C library defines this for functions which it implements
2772     to always fail with ENOSYS.  Some functions are actually named
2773     something starting with __ and the normal name is an alias.  */
2774 #if defined __stub_$2 || defined __stub___$2
2775 choke me
2776 #endif
2777 
2778 int
2779 main ()
2780 {
2781 return $2 ();
2782   ;
2783   return 0;
2784 }
2785 _ACEOF
2786 if ac_fn_cxx_try_link "$LINENO"; then :
2787   eval "$3=yes"
2788 else
2789   eval "$3=no"
2790 fi
2791 rm -f core conftest.err conftest.$ac_objext \
2792     conftest$ac_exeext conftest.$ac_ext
2793 fi
2794 eval ac_res=\$$3
2795                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2796 $as_echo "$ac_res" >&6; }
2797   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2798 
2799 } # ac_fn_cxx_check_func
2800 
2801 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2802 # -------------------------------------------------------
2803 # Tests whether HEADER exists and can be compiled using the include files in
2804 # INCLUDES, setting the cache variable VAR accordingly.
2805 ac_fn_c_check_header_compile ()
2806 {
2807   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2808   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2809 $as_echo_n "checking for $2... " >&6; }
2810 if eval \${$3+:} false; then :
2811   $as_echo_n "(cached) " >&6
2812 else
2813   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2814 /* end confdefs.h.  */
2815 $4
2816 #include <$2>
2817 _ACEOF
2818 if ac_fn_c_try_compile "$LINENO"; then :
2819   eval "$3=yes"
2820 else
2821   eval "$3=no"
2822 fi
2823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2824 fi
2825 eval ac_res=\$$3
2826                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2827 $as_echo "$ac_res" >&6; }
2828   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2829 
2830 } # ac_fn_c_check_header_compile
2831 cat >config.log <<_ACEOF
2832 This file contains any messages produced by compilers while
2833 running configure, to aid debugging if configure makes a mistake.
2834 
2835 It was created by OpenJDK $as_me jdk8, which was
2836 generated by GNU Autoconf 2.69.  Invocation command line was
2837 
2838   $ $0 $@
2839 
2840 _ACEOF
2841 exec 5>>config.log
2842 {
2843 cat <<_ASUNAME
2844 ## --------- ##
2845 ## Platform. ##
2846 ## --------- ##
2847 
2848 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2849 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2850 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2851 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2852 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2853 
2854 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2855 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2856 
2857 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2858 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2859 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2860 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2861 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2862 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2863 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2864 
2865 _ASUNAME
2866 
2867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2868 for as_dir in $PATH
2869 do
2870   IFS=$as_save_IFS
2871   test -z "$as_dir" && as_dir=.
2872     $as_echo "PATH: $as_dir"
2873   done
2874 IFS=$as_save_IFS
2875 
2876 } >&5
2877 
2878 cat >&5 <<_ACEOF
2879 
2880 
2881 ## ----------- ##
2882 ## Core tests. ##
2883 ## ----------- ##
2884 
2885 _ACEOF
2886 
2887 
2888 # Keep a trace of the command line.
2889 # Strip out --no-create and --no-recursion so they do not pile up.
2890 # Strip out --silent because we don't want to record it for future runs.
2891 # Also quote any args containing shell meta-characters.
2892 # Make two passes to allow for proper duplicate-argument suppression.
2893 ac_configure_args=
2894 ac_configure_args0=
2895 ac_configure_args1=
2896 ac_must_keep_next=false
2897 for ac_pass in 1 2
2898 do
2899   for ac_arg
2900   do
2901     case $ac_arg in
2902     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2903     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2904     | -silent | --silent | --silen | --sile | --sil)
2905       continue ;;
2906     *\'*)
2907       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2908     esac
2909     case $ac_pass in
2910     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2911     2)
2912       as_fn_append ac_configure_args1 " '$ac_arg'"
2913       if test $ac_must_keep_next = true; then
2914         ac_must_keep_next=false # Got value, back to normal.
2915       else
2916         case $ac_arg in
2917           *=* | --config-cache | -C | -disable-* | --disable-* \
2918           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2919           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2920           | -with-* | --with-* | -without-* | --without-* | --x)
2921             case "$ac_configure_args0 " in
2922               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2923             esac
2924             ;;
2925           -* ) ac_must_keep_next=true ;;
2926         esac
2927       fi
2928       as_fn_append ac_configure_args " '$ac_arg'"
2929       ;;
2930     esac
2931   done
2932 done
2933 { ac_configure_args0=; unset ac_configure_args0;}
2934 { ac_configure_args1=; unset ac_configure_args1;}
2935 
2936 # When interrupted or exit'd, cleanup temporary files, and complete
2937 # config.log.  We remove comments because anyway the quotes in there
2938 # would cause problems or look ugly.
2939 # WARNING: Use '\'' to represent an apostrophe within the trap.
2940 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2941 trap 'exit_status=$?
2942   # Save into config.log some information that might help in debugging.
2943   {
2944     echo
2945 
2946     $as_echo "## ---------------- ##
2947 ## Cache variables. ##
2948 ## ---------------- ##"
2949     echo
2950     # The following way of writing the cache mishandles newlines in values,
2951 (
2952   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2953     eval ac_val=\$$ac_var
2954     case $ac_val in #(
2955     *${as_nl}*)
2956       case $ac_var in #(
2957       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2958 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2959       esac
2960       case $ac_var in #(
2961       _ | IFS | as_nl) ;; #(
2962       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2963       *) { eval $ac_var=; unset $ac_var;} ;;
2964       esac ;;
2965     esac
2966   done
2967   (set) 2>&1 |
2968     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2969     *${as_nl}ac_space=\ *)
2970       sed -n \
2971         "s/'\''/'\''\\\\'\'''\''/g;
2972           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2973       ;; #(
2974     *)
2975       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2976       ;;
2977     esac |
2978     sort
2979 )
2980     echo
2981 
2982     $as_echo "## ----------------- ##
2983 ## Output variables. ##
2984 ## ----------------- ##"
2985     echo
2986     for ac_var in $ac_subst_vars
2987     do
2988       eval ac_val=\$$ac_var
2989       case $ac_val in
2990       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2991       esac
2992       $as_echo "$ac_var='\''$ac_val'\''"
2993     done | sort
2994     echo
2995 
2996     if test -n "$ac_subst_files"; then
2997       $as_echo "## ------------------- ##
2998 ## File substitutions. ##
2999 ## ------------------- ##"
3000       echo
3001       for ac_var in $ac_subst_files
3002       do
3003         eval ac_val=\$$ac_var
3004         case $ac_val in
3005         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3006         esac
3007         $as_echo "$ac_var='\''$ac_val'\''"
3008       done | sort
3009       echo
3010     fi
3011 
3012     if test -s confdefs.h; then
3013       $as_echo "## ----------- ##
3014 ## confdefs.h. ##
3015 ## ----------- ##"
3016       echo
3017       cat confdefs.h
3018       echo
3019     fi
3020     test "$ac_signal" != 0 &&
3021       $as_echo "$as_me: caught signal $ac_signal"
3022     $as_echo "$as_me: exit $exit_status"
3023   } >&5
3024   rm -f core *.core core.conftest.* &&
3025     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3026     exit $exit_status
3027 ' 0
3028 for ac_signal in 1 2 13 15; do
3029   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3030 done
3031 ac_signal=0
3032 
3033 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3034 rm -f -r conftest* confdefs.h
3035 
3036 $as_echo "/* confdefs.h */" > confdefs.h
3037 
3038 # Predefined preprocessor variables.
3039 
3040 cat >>confdefs.h <<_ACEOF
3041 #define PACKAGE_NAME "$PACKAGE_NAME"
3042 _ACEOF
3043 
3044 cat >>confdefs.h <<_ACEOF
3045 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3046 _ACEOF
3047 
3048 cat >>confdefs.h <<_ACEOF
3049 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3050 _ACEOF
3051 
3052 cat >>confdefs.h <<_ACEOF
3053 #define PACKAGE_STRING "$PACKAGE_STRING"
3054 _ACEOF
3055 
3056 cat >>confdefs.h <<_ACEOF
3057 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3058 _ACEOF
3059 
3060 cat >>confdefs.h <<_ACEOF
3061 #define PACKAGE_URL "$PACKAGE_URL"
3062 _ACEOF
3063 
3064 
3065 # Let the site file select an alternate cache file if it wants to.
3066 # Prefer an explicitly selected file to automatically selected ones.
3067 ac_site_file1=NONE
3068 ac_site_file2=NONE
3069 if test -n "$CONFIG_SITE"; then
3070   # We do not want a PATH search for config.site.
3071   case $CONFIG_SITE in #((
3072     -*)  ac_site_file1=./$CONFIG_SITE;;
3073     */*) ac_site_file1=$CONFIG_SITE;;
3074     *)   ac_site_file1=./$CONFIG_SITE;;
3075   esac
3076 elif test "x$prefix" != xNONE; then
3077   ac_site_file1=$prefix/share/config.site
3078   ac_site_file2=$prefix/etc/config.site
3079 else
3080   ac_site_file1=$ac_default_prefix/share/config.site
3081   ac_site_file2=$ac_default_prefix/etc/config.site
3082 fi
3083 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3084 do
3085   test "x$ac_site_file" = xNONE && continue
3086   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3087     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3088 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3089     sed 's/^/| /' "$ac_site_file" >&5
3090     . "$ac_site_file" \
3091       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3092 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3093 as_fn_error $? "failed to load site script $ac_site_file
3094 See \`config.log' for more details" "$LINENO" 5; }
3095   fi
3096 done
3097 
3098 if test -r "$cache_file"; then
3099   # Some versions of bash will fail to source /dev/null (special files
3100   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3101   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3102     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3103 $as_echo "$as_me: loading cache $cache_file" >&6;}
3104     case $cache_file in
3105       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3106       *)                      . "./$cache_file";;
3107     esac
3108   fi
3109 else
3110   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3111 $as_echo "$as_me: creating cache $cache_file" >&6;}
3112   >$cache_file
3113 fi
3114 
3115 # Check that the precious variables saved in the cache have kept the same
3116 # value.
3117 ac_cache_corrupted=false
3118 for ac_var in $ac_precious_vars; do
3119   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3120   eval ac_new_set=\$ac_env_${ac_var}_set
3121   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3122   eval ac_new_val=\$ac_env_${ac_var}_value
3123   case $ac_old_set,$ac_new_set in
3124     set,)
3125       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3126 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3127       ac_cache_corrupted=: ;;
3128     ,set)
3129       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3130 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3131       ac_cache_corrupted=: ;;
3132     ,);;
3133     *)
3134       if test "x$ac_old_val" != "x$ac_new_val"; then
3135         # differences in whitespace do not lead to failure.
3136         ac_old_val_w=`echo x $ac_old_val`
3137         ac_new_val_w=`echo x $ac_new_val`
3138         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3139           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3140 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3141           ac_cache_corrupted=:
3142         else
3143           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3144 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3145           eval $ac_var=\$ac_old_val
3146         fi
3147         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3148 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3149         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3150 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3151       fi;;
3152   esac
3153   # Pass precious variables to config.status.
3154   if test "$ac_new_set" = set; then
3155     case $ac_new_val in
3156     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3157     *) ac_arg=$ac_var=$ac_new_val ;;
3158     esac
3159     case " $ac_configure_args " in
3160       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3161       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3162     esac
3163   fi
3164 done
3165 if $ac_cache_corrupted; then
3166   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3167 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3168   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3169 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3170   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3171 fi
3172 ## -------------------- ##
3173 ## Main body of script. ##
3174 ## -------------------- ##
3175 
3176 ac_ext=c
3177 ac_cpp='$CPP $CPPFLAGS'
3178 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3179 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3180 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3181 
3182 
3183 
3184 ac_aux_dir=
3185 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3186   if test -f "$ac_dir/install-sh"; then
3187     ac_aux_dir=$ac_dir
3188     ac_install_sh="$ac_aux_dir/install-sh -c"
3189     break
3190   elif test -f "$ac_dir/install.sh"; then
3191     ac_aux_dir=$ac_dir
3192     ac_install_sh="$ac_aux_dir/install.sh -c"
3193     break
3194   elif test -f "$ac_dir/shtool"; then
3195     ac_aux_dir=$ac_dir
3196     ac_install_sh="$ac_aux_dir/shtool install -c"
3197     break
3198   fi
3199 done
3200 if test -z "$ac_aux_dir"; then
3201   as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3202 fi
3203 
3204 # These three variables are undocumented and unsupported,
3205 # and are intended to be withdrawn in a future Autoconf release.
3206 # They can cause serious problems if a builder's source tree is in a directory
3207 # whose full name contains unusual characters.
3208 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3209 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3210 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3211 
3212 
3213 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3214 
3215 #
3216 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3217 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3218 #
3219 # This code is free software; you can redistribute it and/or modify it
3220 # under the terms of the GNU General Public License version 2 only, as
3221 # published by the Free Software Foundation.  Oracle designates this
3222 # particular file as subject to the "Classpath" exception as provided
3223 # by Oracle in the LICENSE file that accompanied this code.
3224 #
3225 # This code is distributed in the hope that it will be useful, but WITHOUT
3226 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3227 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3228 # version 2 for more details (a copy is included in the LICENSE file that
3229 # accompanied this code).
3230 #
3231 # You should have received a copy of the GNU General Public License version
3232 # 2 along with this work; if not, write to the Free Software Foundation,
3233 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3234 #
3235 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3236 # or visit www.oracle.com if you need additional information or have any
3237 # questions.
3238 #
3239 
3240 #
3241 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3242 #
3243 # This program is free software; you can redistribute it and/or modify
3244 # it under the terms of the GNU General Public License as published by
3245 # the Free Software Foundation; either version 2 of the License, or
3246 # (at your option) any later version.
3247 #
3248 # This program is distributed in the hope that it will be useful, but
3249 # WITHOUT ANY WARRANTY; without even the implied warranty of
3250 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3251 # General Public License for more details.
3252 #
3253 # You should have received a copy of the GNU General Public License
3254 # along with this program; if not, write to the Free Software
3255 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3256 #
3257 # As a special exception to the GNU General Public License, if you
3258 # distribute this file as part of a program that contains a
3259 # configuration script generated by Autoconf, you may include it under
3260 # the same distribution terms that you use for the rest of that program.
3261 
3262 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3263 # ----------------------------------
3264 # PKG_PROG_PKG_CONFIG
3265 
3266 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3267 #
3268 # Check to see whether a particular set of modules exists.  Similar
3269 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3270 #
3271 #
3272 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3273 # this or PKG_CHECK_MODULES is called, or make sure to call
3274 # PKG_CHECK_EXISTS manually
3275 # --------------------------------------------------------------
3276 
3277 
3278 
3279 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3280 # ---------------------------------------------
3281 # _PKG_CONFIG
3282 
3283 # _PKG_SHORT_ERRORS_SUPPORTED
3284 # -----------------------------
3285 # _PKG_SHORT_ERRORS_SUPPORTED
3286 
3287 
3288 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3289 # [ACTION-IF-NOT-FOUND])
3290 #
3291 #
3292 # Note that if there is a possibility the first call to
3293 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3294 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3295 #
3296 #
3297 # --------------------------------------------------------------
3298 # PKG_CHECK_MODULES
3299 
3300 
3301 # Include these first...
3302 #
3303 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3304 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3305 #
3306 # This code is free software; you can redistribute it and/or modify it
3307 # under the terms of the GNU General Public License version 2 only, as
3308 # published by the Free Software Foundation.  Oracle designates this
3309 # particular file as subject to the "Classpath" exception as provided
3310 # by Oracle in the LICENSE file that accompanied this code.
3311 #
3312 # This code is distributed in the hope that it will be useful, but WITHOUT
3313 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3314 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3315 # version 2 for more details (a copy is included in the LICENSE file that
3316 # accompanied this code).
3317 #
3318 # You should have received a copy of the GNU General Public License version
3319 # 2 along with this work; if not, write to the Free Software Foundation,
3320 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3321 #
3322 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3323 # or visit www.oracle.com if you need additional information or have any
3324 # questions.
3325 #
3326 
3327 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3328 # If so, then append $1 to $2 \
3329 # Also set JVM_ARG_OK to true/false depending on outcome.
3330 
3331 
3332 # Appends a string to a path variable, only adding the : when needed.
3333 
3334 
3335 # Prepends a string to a path variable, only adding the : when needed.
3336 
3337 
3338 # This will make sure the given variable points to a full and proper
3339 # 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 # $1: The name of the variable to fix
3346 
3347 
3348 # This will make sure the given variable points to a executable
3349 # with a full and proper path. This means:
3350 # 1) There will be no spaces in the path. On posix platforms,
3351 #    spaces in the path will result in an error. On Windows,
3352 #    the path will be rewritten using short-style to be space-free.
3353 # 2) The path will be absolute, and it will be in unix-style (on
3354 #     cygwin).
3355 # Any arguments given to the executable is preserved.
3356 # If the input variable does not have a directory specification, then
3357 # it need to be in the PATH.
3358 # $1: The name of the variable to fix
3359 
3360 
3361 
3362 
3363 # Register a --with argument but mark it as deprecated
3364 # $1: The name of the with argument to deprecate, not including --with-
3365 
3366 
3367 # Register a --enable argument but mark it as deprecated
3368 # $1: The name of the with argument to deprecate, not including --enable-
3369 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3370 
3371 
3372 
3373 
3374 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3375 # $1: variable to check
3376 
3377 
3378 # Check that there are no unprocessed overridden variables left.
3379 # If so, they are an incorrect argument and we will exit with an error.
3380 
3381 
3382 # Setup a tool for the given variable. If correctly specified by the user,
3383 # use that value, otherwise search for the tool using the supplied code snippet.
3384 # $1: variable to set
3385 # $2: code snippet to call to look for the tool
3386 
3387 
3388 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3389 # $1: variable to set
3390 # $2: executable name (or list of names) to look for
3391 
3392 
3393 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3394 # $1: variable to set
3395 # $2: executable name (or list of names) to look for
3396 
3397 
3398 # Like BASIC_PATH_PROGS but fails if no tool was found.
3399 # $1: variable to set
3400 # $2: executable name (or list of names) to look for
3401 
3402 
3403 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3404 # $1: variable to set
3405 # $2: autoconf macro to call to look for the special tool
3406 
3407 
3408 # Setup the most fundamental tools that relies on not much else to set up,
3409 # but is used by much of the early bootstrap code.
3410 
3411 
3412 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3413 
3414 
3415 # Evaluates platform specific overrides for devkit variables.
3416 # $1: Name of variable
3417 
3418 
3419 
3420 
3421 
3422 
3423 
3424 
3425 
3426 #%%% Simple tools %%%
3427 
3428 # Check if we have found a usable version of make
3429 # $1: the path to a potential make binary (or empty)
3430 # $2: the description on how we found this
3431 
3432 
3433 # Goes looking for a usable version of GNU make.
3434 
3435 
3436 
3437 
3438 
3439 
3440 # Check if build directory is on local disk. If not possible to determine,
3441 # we prefer to claim it's local.
3442 # Argument 1: directory to test
3443 # Argument 2: what to do if it is on local disk
3444 # Argument 3: what to do otherwise (remote disk or failure)
3445 
3446 
3447 # Check that source files have basic read permissions set. This might
3448 # not be the case in cygwin in certain conditions.
3449 
3450 
3451 
3452 
3453 #
3454 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3455 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3456 #
3457 # This code is free software; you can redistribute it and/or modify it
3458 # under the terms of the GNU General Public License version 2 only, as
3459 # published by the Free Software Foundation.  Oracle designates this
3460 # particular file as subject to the "Classpath" exception as provided
3461 # by Oracle in the LICENSE file that accompanied this code.
3462 #
3463 # This code is distributed in the hope that it will be useful, but WITHOUT
3464 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3465 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3466 # version 2 for more details (a copy is included in the LICENSE file that
3467 # accompanied this code).
3468 #
3469 # You should have received a copy of the GNU General Public License version
3470 # 2 along with this work; if not, write to the Free Software Foundation,
3471 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3472 #
3473 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3474 # or visit www.oracle.com if you need additional information or have any
3475 # questions.
3476 #
3477 
3478 
3479 
3480 
3481 
3482 # Helper function which possibly converts a path using DOS-style short mode.
3483 # If so, the updated path is stored in $new_path.
3484 # $1: The path to check
3485 
3486 
3487 # Helper function which possibly converts a path using DOS-style short mode.
3488 # If so, the updated path is stored in $new_path.
3489 # $1: The path to check
3490 
3491 
3492 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3493 # and could probably be heavily simplified. However, all changes in this
3494 # area tend to need lot of testing in different scenarios, and in lack of
3495 # proper unit testing, cleaning this up has not been deemed worth the effort
3496 # at the moment.
3497 
3498 
3499 
3500 
3501 
3502 
3503 
3504 
3505 
3506 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3507 
3508 
3509 
3510 
3511 #
3512 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3513 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3514 #
3515 # This code is free software; you can redistribute it and/or modify it
3516 # under the terms of the GNU General Public License version 2 only, as
3517 # published by the Free Software Foundation.  Oracle designates this
3518 # particular file as subject to the "Classpath" exception as provided
3519 # by Oracle in the LICENSE file that accompanied this code.
3520 #
3521 # This code is distributed in the hope that it will be useful, but WITHOUT
3522 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3523 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3524 # version 2 for more details (a copy is included in the LICENSE file that
3525 # accompanied this code).
3526 #
3527 # You should have received a copy of the GNU General Public License version
3528 # 2 along with this work; if not, write to the Free Software Foundation,
3529 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3530 #
3531 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3532 # or visit www.oracle.com if you need additional information or have any
3533 # questions.
3534 #
3535 
3536 
3537 
3538 
3539 
3540 
3541 
3542 
3543 
3544 
3545 
3546 # ... then the rest
3547 #
3548 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3549 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3550 #
3551 # This code is free software; you can redistribute it and/or modify it
3552 # under the terms of the GNU General Public License version 2 only, as
3553 # published by the Free Software Foundation.  Oracle designates this
3554 # particular file as subject to the "Classpath" exception as provided
3555 # by Oracle in the LICENSE file that accompanied this code.
3556 #
3557 # This code is distributed in the hope that it will be useful, but WITHOUT
3558 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3559 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3560 # version 2 for more details (a copy is included in the LICENSE file that
3561 # accompanied this code).
3562 #
3563 # You should have received a copy of the GNU General Public License version
3564 # 2 along with this work; if not, write to the Free Software Foundation,
3565 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3566 #
3567 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3568 # or visit www.oracle.com if you need additional information or have any
3569 # questions.
3570 #
3571 
3572 # Execute the check given as argument, and verify the result
3573 # If the Boot JDK was previously found, do nothing
3574 # $1 A command line (typically autoconf macro) to execute
3575 
3576 
3577 # Test: Is bootjdk explicitely set by command line arguments?
3578 
3579 
3580 # Test: Is bootjdk available from builddeps?
3581 
3582 
3583 # Test: Is $JAVA_HOME set?
3584 
3585 
3586 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3587 
3588 
3589 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3590 
3591 
3592 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3593 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3594 # $1 = Path to directory containing jdk installations.
3595 # $2 = String to append to the found JDK directory to get the proper JDK home
3596 
3597 
3598 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3599 # environmental variable as base for where to look.
3600 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3601 
3602 
3603 # Test: Is there a JDK installed in default, well-known locations?
3604 
3605 
3606 # Check that a command-line tool in the Boot JDK is correct
3607 # $1 = name of variable to assign
3608 # $2 = name of binary
3609 
3610 
3611 ###############################################################################
3612 #
3613 # We need a Boot JDK to bootstrap the build.
3614 #
3615 
3616 
3617 
3618 
3619 
3620 #
3621 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3622 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3623 #
3624 # This code is free software; you can redistribute it and/or modify it
3625 # under the terms of the GNU General Public License version 2 only, as
3626 # published by the Free Software Foundation.  Oracle designates this
3627 # particular file as subject to the "Classpath" exception as provided
3628 # by Oracle in the LICENSE file that accompanied this code.
3629 #
3630 # This code is distributed in the hope that it will be useful, but WITHOUT
3631 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3632 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3633 # version 2 for more details (a copy is included in the LICENSE file that
3634 # accompanied this code).
3635 #
3636 # You should have received a copy of the GNU General Public License version
3637 # 2 along with this work; if not, write to the Free Software Foundation,
3638 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3639 #
3640 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3641 # or visit www.oracle.com if you need additional information or have any
3642 # questions.
3643 #
3644 
3645 
3646 
3647 
3648 
3649 
3650 
3651 
3652 
3653 
3654 
3655 
3656 
3657 
3658 
3659 
3660 
3661 
3662 
3663 
3664 #
3665 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3666 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3667 #
3668 # This code is free software; you can redistribute it and/or modify it
3669 # under the terms of the GNU General Public License version 2 only, as
3670 # published by the Free Software Foundation.  Oracle designates this
3671 # particular file as subject to the "Classpath" exception as provided
3672 # by Oracle in the LICENSE file that accompanied this code.
3673 #
3674 # This code is distributed in the hope that it will be useful, but WITHOUT
3675 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3676 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3677 # version 2 for more details (a copy is included in the LICENSE file that
3678 # accompanied this code).
3679 #
3680 # You should have received a copy of the GNU General Public License version
3681 # 2 along with this work; if not, write to the Free Software Foundation,
3682 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3683 #
3684 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3685 # or visit www.oracle.com if you need additional information or have any
3686 # questions.
3687 #
3688 
3689 
3690 
3691 
3692 
3693 # Documentation on common flags used for solstudio in HIGHEST.
3694 #
3695 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3696 #          done with care, there are some assumptions below that need to
3697 #          be understood about the use of pointers, and IEEE behavior.
3698 #
3699 # -fns: Use non-standard floating point mode (not IEEE 754)
3700 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3701 # -fsingle: Use single precision floating point with 'float'
3702 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3703 #   (Source with excessing pointer casting and data access with mixed
3704 #    pointer types are not recommended)
3705 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3706 #   (If you expect perfect errno behavior, do not use this)
3707 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3708 # -xrestrict: Pointer parameters to functions do not overlap
3709 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3710 #    If you pass in multiple pointers to the same data, do not use this)
3711 # -xlibmil: Inline some library routines
3712 #   (If you expect perfect errno behavior, do not use this)
3713 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3714 #   (If you expect perfect errno behavior, do not use this)
3715 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3716 
3717     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3718     # Bug?
3719     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3720     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3721     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3722     #fi
3723 
3724 
3725 
3726 
3727 
3728 
3729 # FLAGS_C_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3730 #                                  [RUN-IF-FALSE])
3731 # ------------------------------------------------------------
3732 # Check that the C compiler supports an argument
3733 
3734 
3735 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3736 #                                    [RUN-IF-FALSE])
3737 # ------------------------------------------------------------
3738 # Check that the C++ compiler supports an argument
3739 
3740 
3741 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3742 #                                [RUN-IF-FALSE])
3743 # ------------------------------------------------------------
3744 # Check that the C and C++ compilers support an argument
3745 
3746 
3747 
3748 
3749 
3750 
3751 
3752 #
3753 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3754 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3755 #
3756 # This code is free software; you can redistribute it and/or modify it
3757 # under the terms of the GNU General Public License version 2 only, as
3758 # published by the Free Software Foundation.  Oracle designates this
3759 # particular file as subject to the "Classpath" exception as provided
3760 # by Oracle in the LICENSE file that accompanied this code.
3761 #
3762 # This code is distributed in the hope that it will be useful, but WITHOUT
3763 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3764 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3765 # version 2 for more details (a copy is included in the LICENSE file that
3766 # accompanied this code).
3767 #
3768 # You should have received a copy of the GNU General Public License version
3769 # 2 along with this work; if not, write to the Free Software Foundation,
3770 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3771 #
3772 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3773 # or visit www.oracle.com if you need additional information or have any
3774 # questions.
3775 #
3776 
3777 
3778 
3779 
3780 
3781 cygwin_help() {
3782   case $1 in
3783     unzip)
3784       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3785       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3786       ;;
3787     zip)
3788       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3789       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3790       ;;
3791     make)
3792       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3793       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3794       ;;
3795     freetype)
3796       HELP_MSG="
3797 The freetype library can now be build during the configure process.
3798 Download the freetype sources and unpack them into an arbitrary directory:
3799 
3800 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3801 tar -xzf freetype-2.5.3.tar.gz
3802 
3803 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3804 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3805 builds or into '<freetype_src>/lib32' for 32-bit builds.
3806 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3807 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3808       ;;
3809   esac
3810 }
3811 
3812 msys_help() {
3813   PKGHANDLER_COMMAND=""
3814 }
3815 
3816 apt_help() {
3817   case $1 in
3818     devkit)
3819       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3820     openjdk)
3821       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3822     alsa)
3823       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3824     cups)
3825       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3826     freetype)
3827       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3828     pulse)
3829       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3830     x11)
3831       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3832     ccache)
3833       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3834   esac
3835 }
3836 
3837 yum_help() {
3838   case $1 in
3839     devkit)
3840       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3841     openjdk)
3842       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3843     alsa)
3844       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3845     cups)
3846       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3847     freetype)
3848       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3849     pulse)
3850       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3851     x11)
3852       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3853     ccache)
3854       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3855   esac
3856 }
3857 
3858 port_help() {
3859   PKGHANDLER_COMMAND=""
3860 }
3861 
3862 pkgutil_help() {
3863   PKGHANDLER_COMMAND=""
3864 }
3865 
3866 pkgadd_help() {
3867   PKGHANDLER_COMMAND=""
3868 }
3869 
3870 # This function will check if we're called from the "configure" wrapper while
3871 # printing --help. If so, we will print out additional information that can
3872 # only be extracted within the autoconf script, and then exit. This must be
3873 # called at the very beginning in configure.ac.
3874 
3875 
3876 
3877 
3878 #
3879 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3880 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3881 #
3882 # This code is free software; you can redistribute it and/or modify it
3883 # under the terms of the GNU General Public License version 2 only, as
3884 # published by the Free Software Foundation.  Oracle designates this
3885 # particular file as subject to the "Classpath" exception as provided
3886 # by Oracle in the LICENSE file that accompanied this code.
3887 #
3888 # This code is distributed in the hope that it will be useful, but WITHOUT
3889 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3890 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3891 # version 2 for more details (a copy is included in the LICENSE file that
3892 # accompanied this code).
3893 #
3894 # You should have received a copy of the GNU General Public License version
3895 # 2 along with this work; if not, write to the Free Software Foundation,
3896 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3897 #
3898 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3899 # or visit www.oracle.com if you need additional information or have any
3900 # questions.
3901 #
3902 
3903 
3904 
3905 
3906 
3907 
3908 
3909 
3910 
3911 
3912 ###############################################################################
3913 #
3914 # Should we build only OpenJDK even if closed sources are present?
3915 #
3916 
3917 
3918 
3919 
3920 ###############################################################################
3921 #
3922 # Setup version numbers
3923 #
3924 
3925 
3926 
3927 
3928 
3929 
3930 # Support for customization of the build process. Some build files
3931 # will include counterparts from this location, if they exist. This allows
3932 # for a degree of customization of the build targets and the rules/recipes
3933 # to create them
3934 
3935 # Check whether --with-custom-make-dir was given.
3936 if test "${with_custom_make_dir+set}" = set; then :
3937   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3938 fi
3939 
3940 
3941 
3942 #
3943 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3944 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3945 #
3946 # This code is free software; you can redistribute it and/or modify it
3947 # under the terms of the GNU General Public License version 2 only, as
3948 # published by the Free Software Foundation.  Oracle designates this
3949 # particular file as subject to the "Classpath" exception as provided
3950 # by Oracle in the LICENSE file that accompanied this code.
3951 #
3952 # This code is distributed in the hope that it will be useful, but WITHOUT
3953 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3954 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3955 # version 2 for more details (a copy is included in the LICENSE file that
3956 # accompanied this code).
3957 #
3958 # You should have received a copy of the GNU General Public License version
3959 # 2 along with this work; if not, write to the Free Software Foundation,
3960 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3961 #
3962 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3963 # or visit www.oracle.com if you need additional information or have any
3964 # questions.
3965 #
3966 
3967 
3968 
3969 
3970 
3971 
3972 
3973 
3974 
3975 
3976 
3977 
3978 
3979 
3980 
3981 
3982 
3983 
3984 
3985 
3986 
3987 #
3988 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3989 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3990 #
3991 # This code is free software; you can redistribute it and/or modify it
3992 # under the terms of the GNU General Public License version 2 only, as
3993 # published by the Free Software Foundation.  Oracle designates this
3994 # particular file as subject to the "Classpath" exception as provided
3995 # by Oracle in the LICENSE file that accompanied this code.
3996 #
3997 # This code is distributed in the hope that it will be useful, but WITHOUT
3998 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3999 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4000 # version 2 for more details (a copy is included in the LICENSE file that
4001 # accompanied this code).
4002 #
4003 # You should have received a copy of the GNU General Public License version
4004 # 2 along with this work; if not, write to the Free Software Foundation,
4005 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4006 #
4007 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4008 # or visit www.oracle.com if you need additional information or have any
4009 # questions.
4010 #
4011 
4012 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4013 # Converts autoconf style CPU name to OpenJDK style, into
4014 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4015 
4016 
4017 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4018 # Converts autoconf style OS name to OpenJDK style, into
4019 # VAR_OS and VAR_OS_API.
4020 
4021 
4022 # Expects $host_os $host_cpu $build_os and $build_cpu
4023 # and $with_target_bits to have been setup!
4024 #
4025 # Translate the standard triplet(quadruplet) definition
4026 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4027 # OPENJDK_BUILD_OS, etc.
4028 
4029 
4030 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4031 # accordingly. Must be done after setting up build and target system, but before
4032 # doing anything else with these values.
4033 
4034 
4035 # Setup the legacy variables, for controlling the old makefiles.
4036 #
4037 
4038 
4039 
4040 
4041 #%%% Build and target systems %%%
4042 
4043 
4044 
4045 
4046 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4047 # Add -mX to various FLAGS variables.
4048 
4049 
4050 
4051 
4052 
4053 
4054 #
4055 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4056 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4057 #
4058 # This code is free software; you can redistribute it and/or modify it
4059 # under the terms of the GNU General Public License version 2 only, as
4060 # published by the Free Software Foundation.  Oracle designates this
4061 # particular file as subject to the "Classpath" exception as provided
4062 # by Oracle in the LICENSE file that accompanied this code.
4063 #
4064 # This code is distributed in the hope that it will be useful, but WITHOUT
4065 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4066 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4067 # version 2 for more details (a copy is included in the LICENSE file that
4068 # accompanied this code).
4069 #
4070 # You should have received a copy of the GNU General Public License version
4071 # 2 along with this work; if not, write to the Free Software Foundation,
4072 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4073 #
4074 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4075 # or visit www.oracle.com if you need additional information or have any
4076 # questions.
4077 #
4078 
4079 
4080 
4081 
4082 
4083 
4084 
4085 
4086 #
4087 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
4088 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4089 #
4090 # This code is free software; you can redistribute it and/or modify it
4091 # under the terms of the GNU General Public License version 2 only, as
4092 # published by the Free Software Foundation.  Oracle designates this
4093 # particular file as subject to the "Classpath" exception as provided
4094 # by Oracle in the LICENSE file that accompanied this code.
4095 #
4096 # This code is distributed in the hope that it will be useful, but WITHOUT
4097 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4098 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4099 # version 2 for more details (a copy is included in the LICENSE file that
4100 # accompanied this code).
4101 #
4102 # You should have received a copy of the GNU General Public License version
4103 # 2 along with this work; if not, write to the Free Software Foundation,
4104 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4105 #
4106 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4107 # or visit www.oracle.com if you need additional information or have any
4108 # questions.
4109 #
4110 
4111 ########################################################################
4112 # This file is responsible for detecting, verifying and setting up the
4113 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4114 # proper paths to the binaries, but it will not setup any flags.
4115 #
4116 # The binaries used is determined by the toolchain type, which is the family of
4117 # compilers and related tools that are used.
4118 ########################################################################
4119 
4120 
4121 # All valid toolchains, regardless of platform (used by help.m4)
4122 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4123 
4124 # These toolchains are valid on different platforms
4125 VALID_TOOLCHAINS_linux="gcc clang"
4126 VALID_TOOLCHAINS_solaris="solstudio"
4127 VALID_TOOLCHAINS_macosx="gcc clang"
4128 VALID_TOOLCHAINS_aix="xlc"
4129 VALID_TOOLCHAINS_windows="microsoft"
4130 
4131 # Toolchain descriptions
4132 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4133 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4134 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4135 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4136 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4137 
4138 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4139 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4140 # $1 - optional variable prefix for compiler and version variables (BUILD_)
4141 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4142 
4143 
4144 # Check if the configured compiler (C and C++) is of a specific version or
4145 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4146 #
4147 # Arguments:
4148 #   $1:   The version string to check against the found version
4149 #   $2:   block to run if the compiler is at least this version (>=)
4150 #   $3:   block to run if the compiler is older than this version (<)
4151 
4152 
4153 
4154 # Setup a number of variables describing how native output files are
4155 # named on this platform/toolchain.
4156 
4157 
4158 # Determine which toolchain type to use, and make sure it is valid for this
4159 # platform. Setup various information about the selected toolchain.
4160 
4161 
4162 # Before we start detecting the toolchain executables, we might need some
4163 # special setup, e.g. additional paths etc.
4164 
4165 
4166 # Restore path, etc
4167 
4168 
4169 # Check if a compiler is of the toolchain type we expect, and save the version
4170 # information from it. If the compiler does not match the expected type,
4171 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4172 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4173 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4174 #
4175 # $1 = compiler to test (CC or CXX)
4176 # $2 = human readable name of compiler (C or C++)
4177 
4178 
4179 
4180 # Try to locate the given C or C++ compiler in the path, or otherwise.
4181 #
4182 # $1 = compiler to test (CC or CXX)
4183 # $2 = human readable name of compiler (C or C++)
4184 # $3 = list of compiler names to search for
4185 
4186 
4187 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4188 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4189 # archiver (AR). Verify that the compilers are correct according to the
4190 # toolchain type.
4191 
4192 
4193 # Setup additional tools that is considered a part of the toolchain, but not the
4194 # core part. Many of these are highly platform-specific and do not exist,
4195 # and/or are not needed on all platforms.
4196 
4197 
4198 # Setup the build tools (i.e, the compiler and linker used to build programs
4199 # that should be run on the build platform, not the target platform, as a build
4200 # helper). Since the non-cross-compile case uses the normal, target compilers
4201 # for this, we can only do this after these have been setup.
4202 
4203 
4204 # Setup legacy variables that are still needed as alternative ways to refer to
4205 # parts of the toolchain.
4206 
4207 
4208 # Do some additional checks on the detected tools.
4209 
4210 
4211 # Setup the JTReg Regression Test Harness.
4212 
4213 
4214 
4215 #
4216 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
4217 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4218 #
4219 # This code is free software; you can redistribute it and/or modify it
4220 # under the terms of the GNU General Public License version 2 only, as
4221 # published by the Free Software Foundation.  Oracle designates this
4222 # particular file as subject to the "Classpath" exception as provided
4223 # by Oracle in the LICENSE file that accompanied this code.
4224 #
4225 # This code is distributed in the hope that it will be useful, but WITHOUT
4226 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4227 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4228 # version 2 for more details (a copy is included in the LICENSE file that
4229 # accompanied this code).
4230 #
4231 # You should have received a copy of the GNU General Public License version
4232 # 2 along with this work; if not, write to the Free Software Foundation,
4233 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4234 #
4235 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4236 # or visit www.oracle.com if you need additional information or have any
4237 # questions.
4238 #
4239 
4240 ################################################################################
4241 # The order of these defines the priority by which we try to find them.
4242 VALID_VS_VERSIONS="2010 2012 2013 2015 2017"
4243 
4244 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4245 VS_VERSION_INTERNAL_2010=100
4246 VS_MSVCR_2010=msvcr100.dll
4247 # We don't use msvcp on Visual Studio 2010
4248 #VS_MSVCP_2010=msvcp100.dll
4249 VS_ENVVAR_2010="VS100COMNTOOLS"
4250 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4251 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4252 VS_VS_PLATFORM_NAME_2010="v100"
4253 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4254 
4255 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4256 VS_VERSION_INTERNAL_2012=110
4257 VS_MSVCR_2012=msvcr110.dll
4258 VS_MSVCP_2012=msvcp110.dll
4259 VS_ENVVAR_2012="VS110COMNTOOLS"
4260 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4261 VS_SDK_INSTALLDIR_2012=
4262 VS_VS_PLATFORM_NAME_2012="v110"
4263 VS_SDK_PLATFORM_NAME_2012=
4264 
4265 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4266 VS_VERSION_INTERNAL_2013=120
4267 VS_MSVCR_2013=msvcr120.dll
4268 VS_MSVCP_2013=msvcp120.dll
4269 VS_ENVVAR_2013="VS120COMNTOOLS"
4270 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4271 VS_SDK_INSTALLDIR_2013=
4272 VS_VS_PLATFORM_NAME_2013="v120"
4273 VS_SDK_PLATFORM_NAME_2013=
4274 
4275 VS_DESCRIPTION_2015="Microsoft Visual Studio 2015 - CURRENTLY NOT WORKING"
4276 VS_VERSION_INTERNAL_2015=140
4277 VS_MSVCR_2015=vcruntime140.dll
4278 VS_MSVCP_2015=msvcp140.dll
4279 VS_ENVVAR_2015="VS140COMNTOOLS"
4280 VS_VS_INSTALLDIR_2015="Microsoft Visual Studio 14.0"
4281 VS_SDK_INSTALLDIR_2015=
4282 VS_VS_PLATFORM_NAME_2015="v140"
4283 VS_SDK_PLATFORM_NAME_2015=
4284 # The vcvars of 2015 breaks if 2017 is also installed. Work around this by
4285 # explicitly specifying Windows Kit 8.1 to be used.
4286 VS_ENV_ARGS_2015="8.1"
4287 
4288 VS_DESCRIPTION_2017="Microsoft Visual Studio 2017 - CURRENTLY NOT WORKING"
4289 VS_VERSION_INTERNAL_2017=141
4290 VS_MSVCR_2017=vcruntime140.dll
4291 VS_MSVCP_2017=msvcp140.dll
4292 VS_ENVVAR_2017="VS150COMNTOOLS"
4293 VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017"
4294 VS_EDITIONS_2017="Community Professional Enterprise"
4295 VS_SDK_INSTALLDIR_2017=
4296 VS_VS_PLATFORM_NAME_2017="v141"
4297 VS_SDK_PLATFORM_NAME_2017=
4298 
4299 ################################################################################
4300 
4301 
4302 
4303 ################################################################################
4304 
4305 
4306 
4307 ################################################################################
4308 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4309 # build environment and assigns it to VS_ENV_CMD
4310 
4311 
4312 ################################################################################
4313 
4314 
4315 
4316 ################################################################################
4317 # Check if the VS env variables were setup prior to running configure.
4318 # If not, then find vcvarsall.bat and run it automatically, and integrate
4319 # the set env variables into the spec file.
4320 
4321 
4322 
4323 
4324 
4325 
4326 
4327 
4328 
4329 
4330 
4331 
4332 
4333 
4334 # This line needs to be here, verbatim, after all includes and the dummy hook
4335 # definitions. It is replaced with custom functionality when building
4336 # custom sources.
4337 #CUSTOM_AUTOCONF_INCLUDE
4338 
4339 # Do not change or remove the following line, it is needed for consistency checks:
4340 DATE_WHEN_GENERATED=1539613812
4341 
4342 ###############################################################################
4343 #
4344 # Initialization / Boot-strapping
4345 #
4346 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4347 # thus it jumps back and forth, each time gaining something needed later on.
4348 #
4349 ###############################################################################
4350 
4351 # If we are requested to print additional help, do that and then exit.
4352 # This must be the very first call.
4353 
4354   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4355     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4356     $PRINTF "Which are valid to use depends on the build platform.\n"
4357     for toolchain in $VALID_TOOLCHAINS_all; do
4358       # Use indirect variable referencing
4359       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4360       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4361       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4362     done
4363 
4364     # And now exit directly
4365     exit 0
4366   fi
4367 
4368 
4369 # Basic initialization that must happen first of all in the normal process.
4370 
4371   # Save the original command line. This is passed to us by the wrapper configure script.
4372 
4373   DATE_WHEN_CONFIGURED=`LANG=C date`
4374 
4375   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4376 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4377   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4378 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4379 
4380 
4381   # Start with tools that do not need have cross compilation support
4382   # and can be expected to be found in the default PATH. These tools are
4383   # used by configure. Nor are these tools expected to be found in the
4384   # devkit from the builddeps server either, since they are
4385   # needed to download the devkit.
4386 
4387   # First are all the simple required tools.
4388 
4389 
4390 
4391   # Publish this variable in the help.
4392 
4393 
4394   if test "x$BASENAME" = x; then
4395     # The variable is not set by user, try to locate tool using the code snippet
4396     for ac_prog in basename
4397 do
4398   # Extract the first word of "$ac_prog", so it can be a program name with args.
4399 set dummy $ac_prog; ac_word=$2
4400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4401 $as_echo_n "checking for $ac_word... " >&6; }
4402 if ${ac_cv_path_BASENAME+:} false; then :
4403   $as_echo_n "(cached) " >&6
4404 else
4405   case $BASENAME in
4406   [\\/]* | ?:[\\/]*)
4407   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4408   ;;
4409   *)
4410   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4411 for as_dir in $PATH
4412 do
4413   IFS=$as_save_IFS
4414   test -z "$as_dir" && as_dir=.
4415     for ac_exec_ext in '' $ac_executable_extensions; do
4416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4417     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4419     break 2
4420   fi
4421 done
4422   done
4423 IFS=$as_save_IFS
4424 
4425   ;;
4426 esac
4427 fi
4428 BASENAME=$ac_cv_path_BASENAME
4429 if test -n "$BASENAME"; then
4430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4431 $as_echo "$BASENAME" >&6; }
4432 else
4433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4434 $as_echo "no" >&6; }
4435 fi
4436 
4437 
4438   test -n "$BASENAME" && break
4439 done
4440 
4441   else
4442     # The variable is set, but is it from the command line or the environment?
4443 
4444     # Try to remove the string !BASENAME! from our list.
4445     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4446     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4447       # If it failed, the variable was not from the command line. Ignore it,
4448       # but warn the user (except for BASH, which is always set by the calling BASH).
4449       if test "xBASENAME" != xBASH; then
4450         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4451 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4452       fi
4453       # Try to locate tool using the code snippet
4454       for ac_prog in basename
4455 do
4456   # Extract the first word of "$ac_prog", so it can be a program name with args.
4457 set dummy $ac_prog; ac_word=$2
4458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4459 $as_echo_n "checking for $ac_word... " >&6; }
4460 if ${ac_cv_path_BASENAME+:} false; then :
4461   $as_echo_n "(cached) " >&6
4462 else
4463   case $BASENAME in
4464   [\\/]* | ?:[\\/]*)
4465   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4466   ;;
4467   *)
4468   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4469 for as_dir in $PATH
4470 do
4471   IFS=$as_save_IFS
4472   test -z "$as_dir" && as_dir=.
4473     for ac_exec_ext in '' $ac_executable_extensions; do
4474   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4475     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4476     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4477     break 2
4478   fi
4479 done
4480   done
4481 IFS=$as_save_IFS
4482 
4483   ;;
4484 esac
4485 fi
4486 BASENAME=$ac_cv_path_BASENAME
4487 if test -n "$BASENAME"; then
4488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4489 $as_echo "$BASENAME" >&6; }
4490 else
4491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4492 $as_echo "no" >&6; }
4493 fi
4494 
4495 
4496   test -n "$BASENAME" && break
4497 done
4498 
4499     else
4500       # If it succeeded, then it was overridden by the user. We will use it
4501       # for the tool.
4502 
4503       # First remove it from the list of overridden variables, so we can test
4504       # for unknown variables in the end.
4505       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4506 
4507       # Check if the provided tool contains a complete path.
4508       tool_specified="$BASENAME"
4509       tool_basename="${tool_specified##*/}"
4510       if test "x$tool_basename" = "x$tool_specified"; then
4511         # A command without a complete path is provided, search $PATH.
4512         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4513 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4514         # Extract the first word of "$tool_basename", so it can be a program name with args.
4515 set dummy $tool_basename; ac_word=$2
4516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4517 $as_echo_n "checking for $ac_word... " >&6; }
4518 if ${ac_cv_path_BASENAME+:} false; then :
4519   $as_echo_n "(cached) " >&6
4520 else
4521   case $BASENAME in
4522   [\\/]* | ?:[\\/]*)
4523   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4524   ;;
4525   *)
4526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4527 for as_dir in $PATH
4528 do
4529   IFS=$as_save_IFS
4530   test -z "$as_dir" && as_dir=.
4531     for ac_exec_ext in '' $ac_executable_extensions; do
4532   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4533     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4535     break 2
4536   fi
4537 done
4538   done
4539 IFS=$as_save_IFS
4540 
4541   ;;
4542 esac
4543 fi
4544 BASENAME=$ac_cv_path_BASENAME
4545 if test -n "$BASENAME"; then
4546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4547 $as_echo "$BASENAME" >&6; }
4548 else
4549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4550 $as_echo "no" >&6; }
4551 fi
4552 
4553 
4554         if test "x$BASENAME" = x; then
4555           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4556         fi
4557       else
4558         # Otherwise we believe it is a complete path. Use it as it is.
4559         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4560 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4561         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4562 $as_echo_n "checking for BASENAME... " >&6; }
4563         if test ! -x "$tool_specified"; then
4564           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4565 $as_echo "not found" >&6; }
4566           as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4567         fi
4568         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4569 $as_echo "$tool_specified" >&6; }
4570       fi
4571     fi
4572   fi
4573 
4574 
4575 
4576   if test "x$BASENAME" = x; then
4577     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4578   fi
4579 
4580 
4581 
4582 
4583 
4584   # Publish this variable in the help.
4585 
4586 
4587   if test "x$BASH" = x; then
4588     # The variable is not set by user, try to locate tool using the code snippet
4589     for ac_prog in bash
4590 do
4591   # Extract the first word of "$ac_prog", so it can be a program name with args.
4592 set dummy $ac_prog; ac_word=$2
4593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4594 $as_echo_n "checking for $ac_word... " >&6; }
4595 if ${ac_cv_path_BASH+:} false; then :
4596   $as_echo_n "(cached) " >&6
4597 else
4598   case $BASH in
4599   [\\/]* | ?:[\\/]*)
4600   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4601   ;;
4602   *)
4603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4604 for as_dir in $PATH
4605 do
4606   IFS=$as_save_IFS
4607   test -z "$as_dir" && as_dir=.
4608     for ac_exec_ext in '' $ac_executable_extensions; do
4609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4610     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4612     break 2
4613   fi
4614 done
4615   done
4616 IFS=$as_save_IFS
4617 
4618   ;;
4619 esac
4620 fi
4621 BASH=$ac_cv_path_BASH
4622 if test -n "$BASH"; then
4623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4624 $as_echo "$BASH" >&6; }
4625 else
4626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4627 $as_echo "no" >&6; }
4628 fi
4629 
4630 
4631   test -n "$BASH" && break
4632 done
4633 
4634   else
4635     # The variable is set, but is it from the command line or the environment?
4636 
4637     # Try to remove the string !BASH! from our list.
4638     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4639     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4640       # If it failed, the variable was not from the command line. Ignore it,
4641       # but warn the user (except for BASH, which is always set by the calling BASH).
4642       if test "xBASH" != xBASH; then
4643         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4644 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4645       fi
4646       # Try to locate tool using the code snippet
4647       for ac_prog in bash
4648 do
4649   # Extract the first word of "$ac_prog", so it can be a program name with args.
4650 set dummy $ac_prog; ac_word=$2
4651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4652 $as_echo_n "checking for $ac_word... " >&6; }
4653 if ${ac_cv_path_BASH+:} false; then :
4654   $as_echo_n "(cached) " >&6
4655 else
4656   case $BASH in
4657   [\\/]* | ?:[\\/]*)
4658   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4659   ;;
4660   *)
4661   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4662 for as_dir in $PATH
4663 do
4664   IFS=$as_save_IFS
4665   test -z "$as_dir" && as_dir=.
4666     for ac_exec_ext in '' $ac_executable_extensions; do
4667   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4668     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4669     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4670     break 2
4671   fi
4672 done
4673   done
4674 IFS=$as_save_IFS
4675 
4676   ;;
4677 esac
4678 fi
4679 BASH=$ac_cv_path_BASH
4680 if test -n "$BASH"; then
4681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4682 $as_echo "$BASH" >&6; }
4683 else
4684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4685 $as_echo "no" >&6; }
4686 fi
4687 
4688 
4689   test -n "$BASH" && break
4690 done
4691 
4692     else
4693       # If it succeeded, then it was overridden by the user. We will use it
4694       # for the tool.
4695 
4696       # First remove it from the list of overridden variables, so we can test
4697       # for unknown variables in the end.
4698       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4699 
4700       # Check if the provided tool contains a complete path.
4701       tool_specified="$BASH"
4702       tool_basename="${tool_specified##*/}"
4703       if test "x$tool_basename" = "x$tool_specified"; then
4704         # A command without a complete path is provided, search $PATH.
4705         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4706 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4707         # Extract the first word of "$tool_basename", so it can be a program name with args.
4708 set dummy $tool_basename; ac_word=$2
4709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4710 $as_echo_n "checking for $ac_word... " >&6; }
4711 if ${ac_cv_path_BASH+:} false; then :
4712   $as_echo_n "(cached) " >&6
4713 else
4714   case $BASH in
4715   [\\/]* | ?:[\\/]*)
4716   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4717   ;;
4718   *)
4719   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4720 for as_dir in $PATH
4721 do
4722   IFS=$as_save_IFS
4723   test -z "$as_dir" && as_dir=.
4724     for ac_exec_ext in '' $ac_executable_extensions; do
4725   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4726     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4728     break 2
4729   fi
4730 done
4731   done
4732 IFS=$as_save_IFS
4733 
4734   ;;
4735 esac
4736 fi
4737 BASH=$ac_cv_path_BASH
4738 if test -n "$BASH"; then
4739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4740 $as_echo "$BASH" >&6; }
4741 else
4742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4743 $as_echo "no" >&6; }
4744 fi
4745 
4746 
4747         if test "x$BASH" = x; then
4748           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4749         fi
4750       else
4751         # Otherwise we believe it is a complete path. Use it as it is.
4752         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4753 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4754         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4755 $as_echo_n "checking for BASH... " >&6; }
4756         if test ! -x "$tool_specified"; then
4757           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4758 $as_echo "not found" >&6; }
4759           as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4760         fi
4761         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4762 $as_echo "$tool_specified" >&6; }
4763       fi
4764     fi
4765   fi
4766 
4767 
4768 
4769   if test "x$BASH" = x; then
4770     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4771   fi
4772 
4773 
4774 
4775 
4776 
4777   # Publish this variable in the help.
4778 
4779 
4780   if test "x$CAT" = x; then
4781     # The variable is not set by user, try to locate tool using the code snippet
4782     for ac_prog in cat
4783 do
4784   # Extract the first word of "$ac_prog", so it can be a program name with args.
4785 set dummy $ac_prog; ac_word=$2
4786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4787 $as_echo_n "checking for $ac_word... " >&6; }
4788 if ${ac_cv_path_CAT+:} false; then :
4789   $as_echo_n "(cached) " >&6
4790 else
4791   case $CAT in
4792   [\\/]* | ?:[\\/]*)
4793   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4794   ;;
4795   *)
4796   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4797 for as_dir in $PATH
4798 do
4799   IFS=$as_save_IFS
4800   test -z "$as_dir" && as_dir=.
4801     for ac_exec_ext in '' $ac_executable_extensions; do
4802   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4803     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4804     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4805     break 2
4806   fi
4807 done
4808   done
4809 IFS=$as_save_IFS
4810 
4811   ;;
4812 esac
4813 fi
4814 CAT=$ac_cv_path_CAT
4815 if test -n "$CAT"; then
4816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4817 $as_echo "$CAT" >&6; }
4818 else
4819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4820 $as_echo "no" >&6; }
4821 fi
4822 
4823 
4824   test -n "$CAT" && break
4825 done
4826 
4827   else
4828     # The variable is set, but is it from the command line or the environment?
4829 
4830     # Try to remove the string !CAT! from our list.
4831     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4832     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4833       # If it failed, the variable was not from the command line. Ignore it,
4834       # but warn the user (except for BASH, which is always set by the calling BASH).
4835       if test "xCAT" != xBASH; then
4836         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4837 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4838       fi
4839       # Try to locate tool using the code snippet
4840       for ac_prog in cat
4841 do
4842   # Extract the first word of "$ac_prog", so it can be a program name with args.
4843 set dummy $ac_prog; ac_word=$2
4844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4845 $as_echo_n "checking for $ac_word... " >&6; }
4846 if ${ac_cv_path_CAT+:} false; then :
4847   $as_echo_n "(cached) " >&6
4848 else
4849   case $CAT in
4850   [\\/]* | ?:[\\/]*)
4851   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4852   ;;
4853   *)
4854   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4855 for as_dir in $PATH
4856 do
4857   IFS=$as_save_IFS
4858   test -z "$as_dir" && as_dir=.
4859     for ac_exec_ext in '' $ac_executable_extensions; do
4860   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4861     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4862     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4863     break 2
4864   fi
4865 done
4866   done
4867 IFS=$as_save_IFS
4868 
4869   ;;
4870 esac
4871 fi
4872 CAT=$ac_cv_path_CAT
4873 if test -n "$CAT"; then
4874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4875 $as_echo "$CAT" >&6; }
4876 else
4877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4878 $as_echo "no" >&6; }
4879 fi
4880 
4881 
4882   test -n "$CAT" && break
4883 done
4884 
4885     else
4886       # If it succeeded, then it was overridden by the user. We will use it
4887       # for the tool.
4888 
4889       # First remove it from the list of overridden variables, so we can test
4890       # for unknown variables in the end.
4891       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4892 
4893       # Check if the provided tool contains a complete path.
4894       tool_specified="$CAT"
4895       tool_basename="${tool_specified##*/}"
4896       if test "x$tool_basename" = "x$tool_specified"; then
4897         # A command without a complete path is provided, search $PATH.
4898         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4899 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4900         # Extract the first word of "$tool_basename", so it can be a program name with args.
4901 set dummy $tool_basename; ac_word=$2
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4903 $as_echo_n "checking for $ac_word... " >&6; }
4904 if ${ac_cv_path_CAT+:} false; then :
4905   $as_echo_n "(cached) " >&6
4906 else
4907   case $CAT in
4908   [\\/]* | ?:[\\/]*)
4909   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4910   ;;
4911   *)
4912   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4913 for as_dir in $PATH
4914 do
4915   IFS=$as_save_IFS
4916   test -z "$as_dir" && as_dir=.
4917     for ac_exec_ext in '' $ac_executable_extensions; do
4918   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4919     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4920     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4921     break 2
4922   fi
4923 done
4924   done
4925 IFS=$as_save_IFS
4926 
4927   ;;
4928 esac
4929 fi
4930 CAT=$ac_cv_path_CAT
4931 if test -n "$CAT"; then
4932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4933 $as_echo "$CAT" >&6; }
4934 else
4935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4936 $as_echo "no" >&6; }
4937 fi
4938 
4939 
4940         if test "x$CAT" = x; then
4941           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4942         fi
4943       else
4944         # Otherwise we believe it is a complete path. Use it as it is.
4945         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4946 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4947         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4948 $as_echo_n "checking for CAT... " >&6; }
4949         if test ! -x "$tool_specified"; then
4950           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4951 $as_echo "not found" >&6; }
4952           as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4953         fi
4954         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4955 $as_echo "$tool_specified" >&6; }
4956       fi
4957     fi
4958   fi
4959 
4960 
4961 
4962   if test "x$CAT" = x; then
4963     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4964   fi
4965 
4966 
4967 
4968 
4969 
4970   # Publish this variable in the help.
4971 
4972 
4973   if test "x$CHMOD" = x; then
4974     # The variable is not set by user, try to locate tool using the code snippet
4975     for ac_prog in chmod
4976 do
4977   # Extract the first word of "$ac_prog", so it can be a program name with args.
4978 set dummy $ac_prog; ac_word=$2
4979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4980 $as_echo_n "checking for $ac_word... " >&6; }
4981 if ${ac_cv_path_CHMOD+:} false; then :
4982   $as_echo_n "(cached) " >&6
4983 else
4984   case $CHMOD in
4985   [\\/]* | ?:[\\/]*)
4986   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4987   ;;
4988   *)
4989   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4990 for as_dir in $PATH
4991 do
4992   IFS=$as_save_IFS
4993   test -z "$as_dir" && as_dir=.
4994     for ac_exec_ext in '' $ac_executable_extensions; do
4995   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4996     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4997     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4998     break 2
4999   fi
5000 done
5001   done
5002 IFS=$as_save_IFS
5003 
5004   ;;
5005 esac
5006 fi
5007 CHMOD=$ac_cv_path_CHMOD
5008 if test -n "$CHMOD"; then
5009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5010 $as_echo "$CHMOD" >&6; }
5011 else
5012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013 $as_echo "no" >&6; }
5014 fi
5015 
5016 
5017   test -n "$CHMOD" && break
5018 done
5019 
5020   else
5021     # The variable is set, but is it from the command line or the environment?
5022 
5023     # Try to remove the string !CHMOD! from our list.
5024     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5025     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5026       # If it failed, the variable was not from the command line. Ignore it,
5027       # but warn the user (except for BASH, which is always set by the calling BASH).
5028       if test "xCHMOD" != xBASH; then
5029         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5030 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5031       fi
5032       # Try to locate tool using the code snippet
5033       for ac_prog in chmod
5034 do
5035   # Extract the first word of "$ac_prog", so it can be a program name with args.
5036 set dummy $ac_prog; ac_word=$2
5037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5038 $as_echo_n "checking for $ac_word... " >&6; }
5039 if ${ac_cv_path_CHMOD+:} false; then :
5040   $as_echo_n "(cached) " >&6
5041 else
5042   case $CHMOD in
5043   [\\/]* | ?:[\\/]*)
5044   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5045   ;;
5046   *)
5047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5048 for as_dir in $PATH
5049 do
5050   IFS=$as_save_IFS
5051   test -z "$as_dir" && as_dir=.
5052     for ac_exec_ext in '' $ac_executable_extensions; do
5053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5054     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5056     break 2
5057   fi
5058 done
5059   done
5060 IFS=$as_save_IFS
5061 
5062   ;;
5063 esac
5064 fi
5065 CHMOD=$ac_cv_path_CHMOD
5066 if test -n "$CHMOD"; then
5067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5068 $as_echo "$CHMOD" >&6; }
5069 else
5070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071 $as_echo "no" >&6; }
5072 fi
5073 
5074 
5075   test -n "$CHMOD" && break
5076 done
5077 
5078     else
5079       # If it succeeded, then it was overridden by the user. We will use it
5080       # for the tool.
5081 
5082       # First remove it from the list of overridden variables, so we can test
5083       # for unknown variables in the end.
5084       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5085 
5086       # Check if the provided tool contains a complete path.
5087       tool_specified="$CHMOD"
5088       tool_basename="${tool_specified##*/}"
5089       if test "x$tool_basename" = "x$tool_specified"; then
5090         # A command without a complete path is provided, search $PATH.
5091         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5092 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5093         # Extract the first word of "$tool_basename", so it can be a program name with args.
5094 set dummy $tool_basename; ac_word=$2
5095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5096 $as_echo_n "checking for $ac_word... " >&6; }
5097 if ${ac_cv_path_CHMOD+:} false; then :
5098   $as_echo_n "(cached) " >&6
5099 else
5100   case $CHMOD in
5101   [\\/]* | ?:[\\/]*)
5102   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5103   ;;
5104   *)
5105   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5106 for as_dir in $PATH
5107 do
5108   IFS=$as_save_IFS
5109   test -z "$as_dir" && as_dir=.
5110     for ac_exec_ext in '' $ac_executable_extensions; do
5111   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5112     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5113     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5114     break 2
5115   fi
5116 done
5117   done
5118 IFS=$as_save_IFS
5119 
5120   ;;
5121 esac
5122 fi
5123 CHMOD=$ac_cv_path_CHMOD
5124 if test -n "$CHMOD"; then
5125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5126 $as_echo "$CHMOD" >&6; }
5127 else
5128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5129 $as_echo "no" >&6; }
5130 fi
5131 
5132 
5133         if test "x$CHMOD" = x; then
5134           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5135         fi
5136       else
5137         # Otherwise we believe it is a complete path. Use it as it is.
5138         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5139 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5140         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5141 $as_echo_n "checking for CHMOD... " >&6; }
5142         if test ! -x "$tool_specified"; then
5143           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5144 $as_echo "not found" >&6; }
5145           as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5146         fi
5147         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5148 $as_echo "$tool_specified" >&6; }
5149       fi
5150     fi
5151   fi
5152 
5153 
5154 
5155   if test "x$CHMOD" = x; then
5156     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5157   fi
5158 
5159 
5160 
5161 
5162 
5163   # Publish this variable in the help.
5164 
5165 
5166   if test "x$CMP" = x; then
5167     # The variable is not set by user, try to locate tool using the code snippet
5168     for ac_prog in cmp
5169 do
5170   # Extract the first word of "$ac_prog", so it can be a program name with args.
5171 set dummy $ac_prog; ac_word=$2
5172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5173 $as_echo_n "checking for $ac_word... " >&6; }
5174 if ${ac_cv_path_CMP+:} false; then :
5175   $as_echo_n "(cached) " >&6
5176 else
5177   case $CMP in
5178   [\\/]* | ?:[\\/]*)
5179   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5180   ;;
5181   *)
5182   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5183 for as_dir in $PATH
5184 do
5185   IFS=$as_save_IFS
5186   test -z "$as_dir" && as_dir=.
5187     for ac_exec_ext in '' $ac_executable_extensions; do
5188   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5189     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5190     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5191     break 2
5192   fi
5193 done
5194   done
5195 IFS=$as_save_IFS
5196 
5197   ;;
5198 esac
5199 fi
5200 CMP=$ac_cv_path_CMP
5201 if test -n "$CMP"; then
5202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5203 $as_echo "$CMP" >&6; }
5204 else
5205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5206 $as_echo "no" >&6; }
5207 fi
5208 
5209 
5210   test -n "$CMP" && break
5211 done
5212 
5213   else
5214     # The variable is set, but is it from the command line or the environment?
5215 
5216     # Try to remove the string !CMP! from our list.
5217     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5218     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5219       # If it failed, the variable was not from the command line. Ignore it,
5220       # but warn the user (except for BASH, which is always set by the calling BASH).
5221       if test "xCMP" != xBASH; then
5222         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5223 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5224       fi
5225       # Try to locate tool using the code snippet
5226       for ac_prog in cmp
5227 do
5228   # Extract the first word of "$ac_prog", so it can be a program name with args.
5229 set dummy $ac_prog; ac_word=$2
5230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5231 $as_echo_n "checking for $ac_word... " >&6; }
5232 if ${ac_cv_path_CMP+:} false; then :
5233   $as_echo_n "(cached) " >&6
5234 else
5235   case $CMP in
5236   [\\/]* | ?:[\\/]*)
5237   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5238   ;;
5239   *)
5240   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5241 for as_dir in $PATH
5242 do
5243   IFS=$as_save_IFS
5244   test -z "$as_dir" && as_dir=.
5245     for ac_exec_ext in '' $ac_executable_extensions; do
5246   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5247     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5249     break 2
5250   fi
5251 done
5252   done
5253 IFS=$as_save_IFS
5254 
5255   ;;
5256 esac
5257 fi
5258 CMP=$ac_cv_path_CMP
5259 if test -n "$CMP"; then
5260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5261 $as_echo "$CMP" >&6; }
5262 else
5263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5264 $as_echo "no" >&6; }
5265 fi
5266 
5267 
5268   test -n "$CMP" && break
5269 done
5270 
5271     else
5272       # If it succeeded, then it was overridden by the user. We will use it
5273       # for the tool.
5274 
5275       # First remove it from the list of overridden variables, so we can test
5276       # for unknown variables in the end.
5277       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5278 
5279       # Check if the provided tool contains a complete path.
5280       tool_specified="$CMP"
5281       tool_basename="${tool_specified##*/}"
5282       if test "x$tool_basename" = "x$tool_specified"; then
5283         # A command without a complete path is provided, search $PATH.
5284         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5285 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5286         # Extract the first word of "$tool_basename", so it can be a program name with args.
5287 set dummy $tool_basename; ac_word=$2
5288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5289 $as_echo_n "checking for $ac_word... " >&6; }
5290 if ${ac_cv_path_CMP+:} false; then :
5291   $as_echo_n "(cached) " >&6
5292 else
5293   case $CMP in
5294   [\\/]* | ?:[\\/]*)
5295   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5296   ;;
5297   *)
5298   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5299 for as_dir in $PATH
5300 do
5301   IFS=$as_save_IFS
5302   test -z "$as_dir" && as_dir=.
5303     for ac_exec_ext in '' $ac_executable_extensions; do
5304   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5305     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5306     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5307     break 2
5308   fi
5309 done
5310   done
5311 IFS=$as_save_IFS
5312 
5313   ;;
5314 esac
5315 fi
5316 CMP=$ac_cv_path_CMP
5317 if test -n "$CMP"; then
5318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5319 $as_echo "$CMP" >&6; }
5320 else
5321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5322 $as_echo "no" >&6; }
5323 fi
5324 
5325 
5326         if test "x$CMP" = x; then
5327           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5328         fi
5329       else
5330         # Otherwise we believe it is a complete path. Use it as it is.
5331         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5332 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5333         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5334 $as_echo_n "checking for CMP... " >&6; }
5335         if test ! -x "$tool_specified"; then
5336           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5337 $as_echo "not found" >&6; }
5338           as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5339         fi
5340         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5341 $as_echo "$tool_specified" >&6; }
5342       fi
5343     fi
5344   fi
5345 
5346 
5347 
5348   if test "x$CMP" = x; then
5349     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5350   fi
5351 
5352 
5353 
5354 
5355 
5356   # Publish this variable in the help.
5357 
5358 
5359   if test "x$COMM" = x; then
5360     # The variable is not set by user, try to locate tool using the code snippet
5361     for ac_prog in comm
5362 do
5363   # Extract the first word of "$ac_prog", so it can be a program name with args.
5364 set dummy $ac_prog; ac_word=$2
5365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5366 $as_echo_n "checking for $ac_word... " >&6; }
5367 if ${ac_cv_path_COMM+:} false; then :
5368   $as_echo_n "(cached) " >&6
5369 else
5370   case $COMM in
5371   [\\/]* | ?:[\\/]*)
5372   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5373   ;;
5374   *)
5375   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5376 for as_dir in $PATH
5377 do
5378   IFS=$as_save_IFS
5379   test -z "$as_dir" && as_dir=.
5380     for ac_exec_ext in '' $ac_executable_extensions; do
5381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5382     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5384     break 2
5385   fi
5386 done
5387   done
5388 IFS=$as_save_IFS
5389 
5390   ;;
5391 esac
5392 fi
5393 COMM=$ac_cv_path_COMM
5394 if test -n "$COMM"; then
5395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5396 $as_echo "$COMM" >&6; }
5397 else
5398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5399 $as_echo "no" >&6; }
5400 fi
5401 
5402 
5403   test -n "$COMM" && break
5404 done
5405 
5406   else
5407     # The variable is set, but is it from the command line or the environment?
5408 
5409     # Try to remove the string !COMM! from our list.
5410     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5411     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5412       # If it failed, the variable was not from the command line. Ignore it,
5413       # but warn the user (except for BASH, which is always set by the calling BASH).
5414       if test "xCOMM" != xBASH; then
5415         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5416 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5417       fi
5418       # Try to locate tool using the code snippet
5419       for ac_prog in comm
5420 do
5421   # Extract the first word of "$ac_prog", so it can be a program name with args.
5422 set dummy $ac_prog; ac_word=$2
5423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5424 $as_echo_n "checking for $ac_word... " >&6; }
5425 if ${ac_cv_path_COMM+:} false; then :
5426   $as_echo_n "(cached) " >&6
5427 else
5428   case $COMM in
5429   [\\/]* | ?:[\\/]*)
5430   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5431   ;;
5432   *)
5433   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5434 for as_dir in $PATH
5435 do
5436   IFS=$as_save_IFS
5437   test -z "$as_dir" && as_dir=.
5438     for ac_exec_ext in '' $ac_executable_extensions; do
5439   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5440     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5441     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5442     break 2
5443   fi
5444 done
5445   done
5446 IFS=$as_save_IFS
5447 
5448   ;;
5449 esac
5450 fi
5451 COMM=$ac_cv_path_COMM
5452 if test -n "$COMM"; then
5453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5454 $as_echo "$COMM" >&6; }
5455 else
5456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5457 $as_echo "no" >&6; }
5458 fi
5459 
5460 
5461   test -n "$COMM" && break
5462 done
5463 
5464     else
5465       # If it succeeded, then it was overridden by the user. We will use it
5466       # for the tool.
5467 
5468       # First remove it from the list of overridden variables, so we can test
5469       # for unknown variables in the end.
5470       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5471 
5472       # Check if the provided tool contains a complete path.
5473       tool_specified="$COMM"
5474       tool_basename="${tool_specified##*/}"
5475       if test "x$tool_basename" = "x$tool_specified"; then
5476         # A command without a complete path is provided, search $PATH.
5477         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5478 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5479         # Extract the first word of "$tool_basename", so it can be a program name with args.
5480 set dummy $tool_basename; ac_word=$2
5481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5482 $as_echo_n "checking for $ac_word... " >&6; }
5483 if ${ac_cv_path_COMM+:} false; then :
5484   $as_echo_n "(cached) " >&6
5485 else
5486   case $COMM in
5487   [\\/]* | ?:[\\/]*)
5488   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5489   ;;
5490   *)
5491   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5492 for as_dir in $PATH
5493 do
5494   IFS=$as_save_IFS
5495   test -z "$as_dir" && as_dir=.
5496     for ac_exec_ext in '' $ac_executable_extensions; do
5497   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5498     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5499     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5500     break 2
5501   fi
5502 done
5503   done
5504 IFS=$as_save_IFS
5505 
5506   ;;
5507 esac
5508 fi
5509 COMM=$ac_cv_path_COMM
5510 if test -n "$COMM"; then
5511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5512 $as_echo "$COMM" >&6; }
5513 else
5514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5515 $as_echo "no" >&6; }
5516 fi
5517 
5518 
5519         if test "x$COMM" = x; then
5520           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5521         fi
5522       else
5523         # Otherwise we believe it is a complete path. Use it as it is.
5524         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5525 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5526         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5527 $as_echo_n "checking for COMM... " >&6; }
5528         if test ! -x "$tool_specified"; then
5529           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5530 $as_echo "not found" >&6; }
5531           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5532         fi
5533         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5534 $as_echo "$tool_specified" >&6; }
5535       fi
5536     fi
5537   fi
5538 
5539 
5540 
5541   if test "x$COMM" = x; then
5542     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5543   fi
5544 
5545 
5546 
5547 
5548 
5549   # Publish this variable in the help.
5550 
5551 
5552   if test "x$CP" = x; then
5553     # The variable is not set by user, try to locate tool using the code snippet
5554     for ac_prog in cp
5555 do
5556   # Extract the first word of "$ac_prog", so it can be a program name with args.
5557 set dummy $ac_prog; ac_word=$2
5558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5559 $as_echo_n "checking for $ac_word... " >&6; }
5560 if ${ac_cv_path_CP+:} false; then :
5561   $as_echo_n "(cached) " >&6
5562 else
5563   case $CP in
5564   [\\/]* | ?:[\\/]*)
5565   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5566   ;;
5567   *)
5568   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5569 for as_dir in $PATH
5570 do
5571   IFS=$as_save_IFS
5572   test -z "$as_dir" && as_dir=.
5573     for ac_exec_ext in '' $ac_executable_extensions; do
5574   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5575     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5576     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5577     break 2
5578   fi
5579 done
5580   done
5581 IFS=$as_save_IFS
5582 
5583   ;;
5584 esac
5585 fi
5586 CP=$ac_cv_path_CP
5587 if test -n "$CP"; then
5588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5589 $as_echo "$CP" >&6; }
5590 else
5591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5592 $as_echo "no" >&6; }
5593 fi
5594 
5595 
5596   test -n "$CP" && break
5597 done
5598 
5599   else
5600     # The variable is set, but is it from the command line or the environment?
5601 
5602     # Try to remove the string !CP! from our list.
5603     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5604     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5605       # If it failed, the variable was not from the command line. Ignore it,
5606       # but warn the user (except for BASH, which is always set by the calling BASH).
5607       if test "xCP" != xBASH; then
5608         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5609 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5610       fi
5611       # Try to locate tool using the code snippet
5612       for ac_prog in cp
5613 do
5614   # Extract the first word of "$ac_prog", so it can be a program name with args.
5615 set dummy $ac_prog; ac_word=$2
5616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5617 $as_echo_n "checking for $ac_word... " >&6; }
5618 if ${ac_cv_path_CP+:} false; then :
5619   $as_echo_n "(cached) " >&6
5620 else
5621   case $CP in
5622   [\\/]* | ?:[\\/]*)
5623   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5624   ;;
5625   *)
5626   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5627 for as_dir in $PATH
5628 do
5629   IFS=$as_save_IFS
5630   test -z "$as_dir" && as_dir=.
5631     for ac_exec_ext in '' $ac_executable_extensions; do
5632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5633     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5635     break 2
5636   fi
5637 done
5638   done
5639 IFS=$as_save_IFS
5640 
5641   ;;
5642 esac
5643 fi
5644 CP=$ac_cv_path_CP
5645 if test -n "$CP"; then
5646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5647 $as_echo "$CP" >&6; }
5648 else
5649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5650 $as_echo "no" >&6; }
5651 fi
5652 
5653 
5654   test -n "$CP" && break
5655 done
5656 
5657     else
5658       # If it succeeded, then it was overridden by the user. We will use it
5659       # for the tool.
5660 
5661       # First remove it from the list of overridden variables, so we can test
5662       # for unknown variables in the end.
5663       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5664 
5665       # Check if the provided tool contains a complete path.
5666       tool_specified="$CP"
5667       tool_basename="${tool_specified##*/}"
5668       if test "x$tool_basename" = "x$tool_specified"; then
5669         # A command without a complete path is provided, search $PATH.
5670         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5671 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5672         # Extract the first word of "$tool_basename", so it can be a program name with args.
5673 set dummy $tool_basename; ac_word=$2
5674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5675 $as_echo_n "checking for $ac_word... " >&6; }
5676 if ${ac_cv_path_CP+:} false; then :
5677   $as_echo_n "(cached) " >&6
5678 else
5679   case $CP in
5680   [\\/]* | ?:[\\/]*)
5681   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5682   ;;
5683   *)
5684   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5685 for as_dir in $PATH
5686 do
5687   IFS=$as_save_IFS
5688   test -z "$as_dir" && as_dir=.
5689     for ac_exec_ext in '' $ac_executable_extensions; do
5690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5691     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5693     break 2
5694   fi
5695 done
5696   done
5697 IFS=$as_save_IFS
5698 
5699   ;;
5700 esac
5701 fi
5702 CP=$ac_cv_path_CP
5703 if test -n "$CP"; then
5704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5705 $as_echo "$CP" >&6; }
5706 else
5707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5708 $as_echo "no" >&6; }
5709 fi
5710 
5711 
5712         if test "x$CP" = x; then
5713           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5714         fi
5715       else
5716         # Otherwise we believe it is a complete path. Use it as it is.
5717         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5718 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5719         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5720 $as_echo_n "checking for CP... " >&6; }
5721         if test ! -x "$tool_specified"; then
5722           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5723 $as_echo "not found" >&6; }
5724           as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5725         fi
5726         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5727 $as_echo "$tool_specified" >&6; }
5728       fi
5729     fi
5730   fi
5731 
5732 
5733 
5734   if test "x$CP" = x; then
5735     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5736   fi
5737 
5738 
5739 
5740 
5741 
5742   # Publish this variable in the help.
5743 
5744 
5745   if test "x$CUT" = x; then
5746     # The variable is not set by user, try to locate tool using the code snippet
5747     for ac_prog in cut
5748 do
5749   # Extract the first word of "$ac_prog", so it can be a program name with args.
5750 set dummy $ac_prog; ac_word=$2
5751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5752 $as_echo_n "checking for $ac_word... " >&6; }
5753 if ${ac_cv_path_CUT+:} false; then :
5754   $as_echo_n "(cached) " >&6
5755 else
5756   case $CUT in
5757   [\\/]* | ?:[\\/]*)
5758   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5759   ;;
5760   *)
5761   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5762 for as_dir in $PATH
5763 do
5764   IFS=$as_save_IFS
5765   test -z "$as_dir" && as_dir=.
5766     for ac_exec_ext in '' $ac_executable_extensions; do
5767   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5768     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5769     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5770     break 2
5771   fi
5772 done
5773   done
5774 IFS=$as_save_IFS
5775 
5776   ;;
5777 esac
5778 fi
5779 CUT=$ac_cv_path_CUT
5780 if test -n "$CUT"; then
5781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5782 $as_echo "$CUT" >&6; }
5783 else
5784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5785 $as_echo "no" >&6; }
5786 fi
5787 
5788 
5789   test -n "$CUT" && break
5790 done
5791 
5792   else
5793     # The variable is set, but is it from the command line or the environment?
5794 
5795     # Try to remove the string !CUT! from our list.
5796     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5797     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5798       # If it failed, the variable was not from the command line. Ignore it,
5799       # but warn the user (except for BASH, which is always set by the calling BASH).
5800       if test "xCUT" != xBASH; then
5801         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5802 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5803       fi
5804       # Try to locate tool using the code snippet
5805       for ac_prog in cut
5806 do
5807   # Extract the first word of "$ac_prog", so it can be a program name with args.
5808 set dummy $ac_prog; ac_word=$2
5809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5810 $as_echo_n "checking for $ac_word... " >&6; }
5811 if ${ac_cv_path_CUT+:} false; then :
5812   $as_echo_n "(cached) " >&6
5813 else
5814   case $CUT in
5815   [\\/]* | ?:[\\/]*)
5816   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5817   ;;
5818   *)
5819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5820 for as_dir in $PATH
5821 do
5822   IFS=$as_save_IFS
5823   test -z "$as_dir" && as_dir=.
5824     for ac_exec_ext in '' $ac_executable_extensions; do
5825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5826     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5828     break 2
5829   fi
5830 done
5831   done
5832 IFS=$as_save_IFS
5833 
5834   ;;
5835 esac
5836 fi
5837 CUT=$ac_cv_path_CUT
5838 if test -n "$CUT"; then
5839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5840 $as_echo "$CUT" >&6; }
5841 else
5842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5843 $as_echo "no" >&6; }
5844 fi
5845 
5846 
5847   test -n "$CUT" && break
5848 done
5849 
5850     else
5851       # If it succeeded, then it was overridden by the user. We will use it
5852       # for the tool.
5853 
5854       # First remove it from the list of overridden variables, so we can test
5855       # for unknown variables in the end.
5856       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5857 
5858       # Check if the provided tool contains a complete path.
5859       tool_specified="$CUT"
5860       tool_basename="${tool_specified##*/}"
5861       if test "x$tool_basename" = "x$tool_specified"; then
5862         # A command without a complete path is provided, search $PATH.
5863         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5864 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5865         # Extract the first word of "$tool_basename", so it can be a program name with args.
5866 set dummy $tool_basename; ac_word=$2
5867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5868 $as_echo_n "checking for $ac_word... " >&6; }
5869 if ${ac_cv_path_CUT+:} false; then :
5870   $as_echo_n "(cached) " >&6
5871 else
5872   case $CUT in
5873   [\\/]* | ?:[\\/]*)
5874   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5875   ;;
5876   *)
5877   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5878 for as_dir in $PATH
5879 do
5880   IFS=$as_save_IFS
5881   test -z "$as_dir" && as_dir=.
5882     for ac_exec_ext in '' $ac_executable_extensions; do
5883   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5884     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5885     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5886     break 2
5887   fi
5888 done
5889   done
5890 IFS=$as_save_IFS
5891 
5892   ;;
5893 esac
5894 fi
5895 CUT=$ac_cv_path_CUT
5896 if test -n "$CUT"; then
5897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5898 $as_echo "$CUT" >&6; }
5899 else
5900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5901 $as_echo "no" >&6; }
5902 fi
5903 
5904 
5905         if test "x$CUT" = x; then
5906           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5907         fi
5908       else
5909         # Otherwise we believe it is a complete path. Use it as it is.
5910         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5911 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5912         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5913 $as_echo_n "checking for CUT... " >&6; }
5914         if test ! -x "$tool_specified"; then
5915           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5916 $as_echo "not found" >&6; }
5917           as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5918         fi
5919         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5920 $as_echo "$tool_specified" >&6; }
5921       fi
5922     fi
5923   fi
5924 
5925 
5926 
5927   if test "x$CUT" = x; then
5928     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5929   fi
5930 
5931 
5932 
5933 
5934 
5935   # Publish this variable in the help.
5936 
5937 
5938   if test "x$DATE" = x; then
5939     # The variable is not set by user, try to locate tool using the code snippet
5940     for ac_prog in date
5941 do
5942   # Extract the first word of "$ac_prog", so it can be a program name with args.
5943 set dummy $ac_prog; ac_word=$2
5944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5945 $as_echo_n "checking for $ac_word... " >&6; }
5946 if ${ac_cv_path_DATE+:} false; then :
5947   $as_echo_n "(cached) " >&6
5948 else
5949   case $DATE in
5950   [\\/]* | ?:[\\/]*)
5951   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5952   ;;
5953   *)
5954   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955 for as_dir in $PATH
5956 do
5957   IFS=$as_save_IFS
5958   test -z "$as_dir" && as_dir=.
5959     for ac_exec_ext in '' $ac_executable_extensions; do
5960   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5961     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5963     break 2
5964   fi
5965 done
5966   done
5967 IFS=$as_save_IFS
5968 
5969   ;;
5970 esac
5971 fi
5972 DATE=$ac_cv_path_DATE
5973 if test -n "$DATE"; then
5974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5975 $as_echo "$DATE" >&6; }
5976 else
5977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5978 $as_echo "no" >&6; }
5979 fi
5980 
5981 
5982   test -n "$DATE" && break
5983 done
5984 
5985   else
5986     # The variable is set, but is it from the command line or the environment?
5987 
5988     # Try to remove the string !DATE! from our list.
5989     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5990     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5991       # If it failed, the variable was not from the command line. Ignore it,
5992       # but warn the user (except for BASH, which is always set by the calling BASH).
5993       if test "xDATE" != xBASH; then
5994         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5995 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5996       fi
5997       # Try to locate tool using the code snippet
5998       for ac_prog in date
5999 do
6000   # Extract the first word of "$ac_prog", so it can be a program name with args.
6001 set dummy $ac_prog; ac_word=$2
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6003 $as_echo_n "checking for $ac_word... " >&6; }
6004 if ${ac_cv_path_DATE+:} false; then :
6005   $as_echo_n "(cached) " >&6
6006 else
6007   case $DATE in
6008   [\\/]* | ?:[\\/]*)
6009   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6010   ;;
6011   *)
6012   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6013 for as_dir in $PATH
6014 do
6015   IFS=$as_save_IFS
6016   test -z "$as_dir" && as_dir=.
6017     for ac_exec_ext in '' $ac_executable_extensions; do
6018   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6019     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6020     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6021     break 2
6022   fi
6023 done
6024   done
6025 IFS=$as_save_IFS
6026 
6027   ;;
6028 esac
6029 fi
6030 DATE=$ac_cv_path_DATE
6031 if test -n "$DATE"; then
6032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6033 $as_echo "$DATE" >&6; }
6034 else
6035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6036 $as_echo "no" >&6; }
6037 fi
6038 
6039 
6040   test -n "$DATE" && break
6041 done
6042 
6043     else
6044       # If it succeeded, then it was overridden by the user. We will use it
6045       # for the tool.
6046 
6047       # First remove it from the list of overridden variables, so we can test
6048       # for unknown variables in the end.
6049       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6050 
6051       # Check if the provided tool contains a complete path.
6052       tool_specified="$DATE"
6053       tool_basename="${tool_specified##*/}"
6054       if test "x$tool_basename" = "x$tool_specified"; then
6055         # A command without a complete path is provided, search $PATH.
6056         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6057 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6058         # Extract the first word of "$tool_basename", so it can be a program name with args.
6059 set dummy $tool_basename; ac_word=$2
6060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6061 $as_echo_n "checking for $ac_word... " >&6; }
6062 if ${ac_cv_path_DATE+:} false; then :
6063   $as_echo_n "(cached) " >&6
6064 else
6065   case $DATE in
6066   [\\/]* | ?:[\\/]*)
6067   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6068   ;;
6069   *)
6070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6071 for as_dir in $PATH
6072 do
6073   IFS=$as_save_IFS
6074   test -z "$as_dir" && as_dir=.
6075     for ac_exec_ext in '' $ac_executable_extensions; do
6076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6077     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6079     break 2
6080   fi
6081 done
6082   done
6083 IFS=$as_save_IFS
6084 
6085   ;;
6086 esac
6087 fi
6088 DATE=$ac_cv_path_DATE
6089 if test -n "$DATE"; then
6090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6091 $as_echo "$DATE" >&6; }
6092 else
6093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6094 $as_echo "no" >&6; }
6095 fi
6096 
6097 
6098         if test "x$DATE" = x; then
6099           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6100         fi
6101       else
6102         # Otherwise we believe it is a complete path. Use it as it is.
6103         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6104 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6105         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6106 $as_echo_n "checking for DATE... " >&6; }
6107         if test ! -x "$tool_specified"; then
6108           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6109 $as_echo "not found" >&6; }
6110           as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6111         fi
6112         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6113 $as_echo "$tool_specified" >&6; }
6114       fi
6115     fi
6116   fi
6117 
6118 
6119 
6120   if test "x$DATE" = x; then
6121     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6122   fi
6123 
6124 
6125 
6126 
6127 
6128   # Publish this variable in the help.
6129 
6130 
6131   if test "x$DIFF" = x; then
6132     # The variable is not set by user, try to locate tool using the code snippet
6133     for ac_prog in gdiff diff
6134 do
6135   # Extract the first word of "$ac_prog", so it can be a program name with args.
6136 set dummy $ac_prog; ac_word=$2
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6138 $as_echo_n "checking for $ac_word... " >&6; }
6139 if ${ac_cv_path_DIFF+:} false; then :
6140   $as_echo_n "(cached) " >&6
6141 else
6142   case $DIFF in
6143   [\\/]* | ?:[\\/]*)
6144   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6145   ;;
6146   *)
6147   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6148 for as_dir in $PATH
6149 do
6150   IFS=$as_save_IFS
6151   test -z "$as_dir" && as_dir=.
6152     for ac_exec_ext in '' $ac_executable_extensions; do
6153   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6154     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6155     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6156     break 2
6157   fi
6158 done
6159   done
6160 IFS=$as_save_IFS
6161 
6162   ;;
6163 esac
6164 fi
6165 DIFF=$ac_cv_path_DIFF
6166 if test -n "$DIFF"; then
6167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6168 $as_echo "$DIFF" >&6; }
6169 else
6170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6171 $as_echo "no" >&6; }
6172 fi
6173 
6174 
6175   test -n "$DIFF" && break
6176 done
6177 
6178   else
6179     # The variable is set, but is it from the command line or the environment?
6180 
6181     # Try to remove the string !DIFF! from our list.
6182     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6183     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6184       # If it failed, the variable was not from the command line. Ignore it,
6185       # but warn the user (except for BASH, which is always set by the calling BASH).
6186       if test "xDIFF" != xBASH; then
6187         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6188 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6189       fi
6190       # Try to locate tool using the code snippet
6191       for ac_prog in gdiff diff
6192 do
6193   # Extract the first word of "$ac_prog", so it can be a program name with args.
6194 set dummy $ac_prog; ac_word=$2
6195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6196 $as_echo_n "checking for $ac_word... " >&6; }
6197 if ${ac_cv_path_DIFF+:} false; then :
6198   $as_echo_n "(cached) " >&6
6199 else
6200   case $DIFF in
6201   [\\/]* | ?:[\\/]*)
6202   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6203   ;;
6204   *)
6205   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6206 for as_dir in $PATH
6207 do
6208   IFS=$as_save_IFS
6209   test -z "$as_dir" && as_dir=.
6210     for ac_exec_ext in '' $ac_executable_extensions; do
6211   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6212     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6213     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6214     break 2
6215   fi
6216 done
6217   done
6218 IFS=$as_save_IFS
6219 
6220   ;;
6221 esac
6222 fi
6223 DIFF=$ac_cv_path_DIFF
6224 if test -n "$DIFF"; then
6225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6226 $as_echo "$DIFF" >&6; }
6227 else
6228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6229 $as_echo "no" >&6; }
6230 fi
6231 
6232 
6233   test -n "$DIFF" && break
6234 done
6235 
6236     else
6237       # If it succeeded, then it was overridden by the user. We will use it
6238       # for the tool.
6239 
6240       # First remove it from the list of overridden variables, so we can test
6241       # for unknown variables in the end.
6242       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6243 
6244       # Check if the provided tool contains a complete path.
6245       tool_specified="$DIFF"
6246       tool_basename="${tool_specified##*/}"
6247       if test "x$tool_basename" = "x$tool_specified"; then
6248         # A command without a complete path is provided, search $PATH.
6249         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6250 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6251         # Extract the first word of "$tool_basename", so it can be a program name with args.
6252 set dummy $tool_basename; ac_word=$2
6253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6254 $as_echo_n "checking for $ac_word... " >&6; }
6255 if ${ac_cv_path_DIFF+:} false; then :
6256   $as_echo_n "(cached) " >&6
6257 else
6258   case $DIFF in
6259   [\\/]* | ?:[\\/]*)
6260   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6261   ;;
6262   *)
6263   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6264 for as_dir in $PATH
6265 do
6266   IFS=$as_save_IFS
6267   test -z "$as_dir" && as_dir=.
6268     for ac_exec_ext in '' $ac_executable_extensions; do
6269   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6270     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6271     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6272     break 2
6273   fi
6274 done
6275   done
6276 IFS=$as_save_IFS
6277 
6278   ;;
6279 esac
6280 fi
6281 DIFF=$ac_cv_path_DIFF
6282 if test -n "$DIFF"; then
6283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6284 $as_echo "$DIFF" >&6; }
6285 else
6286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6287 $as_echo "no" >&6; }
6288 fi
6289 
6290 
6291         if test "x$DIFF" = x; then
6292           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6293         fi
6294       else
6295         # Otherwise we believe it is a complete path. Use it as it is.
6296         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6297 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6298         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6299 $as_echo_n "checking for DIFF... " >&6; }
6300         if test ! -x "$tool_specified"; then
6301           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6302 $as_echo "not found" >&6; }
6303           as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6304         fi
6305         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6306 $as_echo "$tool_specified" >&6; }
6307       fi
6308     fi
6309   fi
6310 
6311 
6312 
6313   if test "x$DIFF" = x; then
6314     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6315   fi
6316 
6317 
6318 
6319 
6320 
6321   # Publish this variable in the help.
6322 
6323 
6324   if test "x$DIRNAME" = x; then
6325     # The variable is not set by user, try to locate tool using the code snippet
6326     for ac_prog in dirname
6327 do
6328   # Extract the first word of "$ac_prog", so it can be a program name with args.
6329 set dummy $ac_prog; ac_word=$2
6330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6331 $as_echo_n "checking for $ac_word... " >&6; }
6332 if ${ac_cv_path_DIRNAME+:} false; then :
6333   $as_echo_n "(cached) " >&6
6334 else
6335   case $DIRNAME in
6336   [\\/]* | ?:[\\/]*)
6337   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6338   ;;
6339   *)
6340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6341 for as_dir in $PATH
6342 do
6343   IFS=$as_save_IFS
6344   test -z "$as_dir" && as_dir=.
6345     for ac_exec_ext in '' $ac_executable_extensions; do
6346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6347     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6349     break 2
6350   fi
6351 done
6352   done
6353 IFS=$as_save_IFS
6354 
6355   ;;
6356 esac
6357 fi
6358 DIRNAME=$ac_cv_path_DIRNAME
6359 if test -n "$DIRNAME"; then
6360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6361 $as_echo "$DIRNAME" >&6; }
6362 else
6363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6364 $as_echo "no" >&6; }
6365 fi
6366 
6367 
6368   test -n "$DIRNAME" && break
6369 done
6370 
6371   else
6372     # The variable is set, but is it from the command line or the environment?
6373 
6374     # Try to remove the string !DIRNAME! from our list.
6375     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6376     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6377       # If it failed, the variable was not from the command line. Ignore it,
6378       # but warn the user (except for BASH, which is always set by the calling BASH).
6379       if test "xDIRNAME" != xBASH; then
6380         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6381 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6382       fi
6383       # Try to locate tool using the code snippet
6384       for ac_prog in dirname
6385 do
6386   # Extract the first word of "$ac_prog", so it can be a program name with args.
6387 set dummy $ac_prog; ac_word=$2
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6389 $as_echo_n "checking for $ac_word... " >&6; }
6390 if ${ac_cv_path_DIRNAME+:} false; then :
6391   $as_echo_n "(cached) " >&6
6392 else
6393   case $DIRNAME in
6394   [\\/]* | ?:[\\/]*)
6395   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6396   ;;
6397   *)
6398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6399 for as_dir in $PATH
6400 do
6401   IFS=$as_save_IFS
6402   test -z "$as_dir" && as_dir=.
6403     for ac_exec_ext in '' $ac_executable_extensions; do
6404   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6405     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6407     break 2
6408   fi
6409 done
6410   done
6411 IFS=$as_save_IFS
6412 
6413   ;;
6414 esac
6415 fi
6416 DIRNAME=$ac_cv_path_DIRNAME
6417 if test -n "$DIRNAME"; then
6418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6419 $as_echo "$DIRNAME" >&6; }
6420 else
6421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422 $as_echo "no" >&6; }
6423 fi
6424 
6425 
6426   test -n "$DIRNAME" && break
6427 done
6428 
6429     else
6430       # If it succeeded, then it was overridden by the user. We will use it
6431       # for the tool.
6432 
6433       # First remove it from the list of overridden variables, so we can test
6434       # for unknown variables in the end.
6435       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6436 
6437       # Check if the provided tool contains a complete path.
6438       tool_specified="$DIRNAME"
6439       tool_basename="${tool_specified##*/}"
6440       if test "x$tool_basename" = "x$tool_specified"; then
6441         # A command without a complete path is provided, search $PATH.
6442         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6443 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6444         # Extract the first word of "$tool_basename", so it can be a program name with args.
6445 set dummy $tool_basename; ac_word=$2
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6447 $as_echo_n "checking for $ac_word... " >&6; }
6448 if ${ac_cv_path_DIRNAME+:} false; then :
6449   $as_echo_n "(cached) " >&6
6450 else
6451   case $DIRNAME in
6452   [\\/]* | ?:[\\/]*)
6453   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6454   ;;
6455   *)
6456   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6457 for as_dir in $PATH
6458 do
6459   IFS=$as_save_IFS
6460   test -z "$as_dir" && as_dir=.
6461     for ac_exec_ext in '' $ac_executable_extensions; do
6462   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6463     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6464     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6465     break 2
6466   fi
6467 done
6468   done
6469 IFS=$as_save_IFS
6470 
6471   ;;
6472 esac
6473 fi
6474 DIRNAME=$ac_cv_path_DIRNAME
6475 if test -n "$DIRNAME"; then
6476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6477 $as_echo "$DIRNAME" >&6; }
6478 else
6479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6480 $as_echo "no" >&6; }
6481 fi
6482 
6483 
6484         if test "x$DIRNAME" = x; then
6485           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6486         fi
6487       else
6488         # Otherwise we believe it is a complete path. Use it as it is.
6489         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6490 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6491         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6492 $as_echo_n "checking for DIRNAME... " >&6; }
6493         if test ! -x "$tool_specified"; then
6494           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6495 $as_echo "not found" >&6; }
6496           as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6497         fi
6498         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6499 $as_echo "$tool_specified" >&6; }
6500       fi
6501     fi
6502   fi
6503 
6504 
6505 
6506   if test "x$DIRNAME" = x; then
6507     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6508   fi
6509 
6510 
6511 
6512 
6513 
6514   # Publish this variable in the help.
6515 
6516 
6517   if test "x$ECHO" = x; then
6518     # The variable is not set by user, try to locate tool using the code snippet
6519     for ac_prog in echo
6520 do
6521   # Extract the first word of "$ac_prog", so it can be a program name with args.
6522 set dummy $ac_prog; ac_word=$2
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6524 $as_echo_n "checking for $ac_word... " >&6; }
6525 if ${ac_cv_path_ECHO+:} false; then :
6526   $as_echo_n "(cached) " >&6
6527 else
6528   case $ECHO in
6529   [\\/]* | ?:[\\/]*)
6530   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6531   ;;
6532   *)
6533   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6534 for as_dir in $PATH
6535 do
6536   IFS=$as_save_IFS
6537   test -z "$as_dir" && as_dir=.
6538     for ac_exec_ext in '' $ac_executable_extensions; do
6539   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6540     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6541     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6542     break 2
6543   fi
6544 done
6545   done
6546 IFS=$as_save_IFS
6547 
6548   ;;
6549 esac
6550 fi
6551 ECHO=$ac_cv_path_ECHO
6552 if test -n "$ECHO"; then
6553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6554 $as_echo "$ECHO" >&6; }
6555 else
6556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6557 $as_echo "no" >&6; }
6558 fi
6559 
6560 
6561   test -n "$ECHO" && break
6562 done
6563 
6564   else
6565     # The variable is set, but is it from the command line or the environment?
6566 
6567     # Try to remove the string !ECHO! from our list.
6568     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6569     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6570       # If it failed, the variable was not from the command line. Ignore it,
6571       # but warn the user (except for BASH, which is always set by the calling BASH).
6572       if test "xECHO" != xBASH; then
6573         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6574 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6575       fi
6576       # Try to locate tool using the code snippet
6577       for ac_prog in echo
6578 do
6579   # Extract the first word of "$ac_prog", so it can be a program name with args.
6580 set dummy $ac_prog; ac_word=$2
6581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6582 $as_echo_n "checking for $ac_word... " >&6; }
6583 if ${ac_cv_path_ECHO+:} false; then :
6584   $as_echo_n "(cached) " >&6
6585 else
6586   case $ECHO in
6587   [\\/]* | ?:[\\/]*)
6588   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6589   ;;
6590   *)
6591   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6592 for as_dir in $PATH
6593 do
6594   IFS=$as_save_IFS
6595   test -z "$as_dir" && as_dir=.
6596     for ac_exec_ext in '' $ac_executable_extensions; do
6597   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6598     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6599     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6600     break 2
6601   fi
6602 done
6603   done
6604 IFS=$as_save_IFS
6605 
6606   ;;
6607 esac
6608 fi
6609 ECHO=$ac_cv_path_ECHO
6610 if test -n "$ECHO"; then
6611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6612 $as_echo "$ECHO" >&6; }
6613 else
6614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6615 $as_echo "no" >&6; }
6616 fi
6617 
6618 
6619   test -n "$ECHO" && break
6620 done
6621 
6622     else
6623       # If it succeeded, then it was overridden by the user. We will use it
6624       # for the tool.
6625 
6626       # First remove it from the list of overridden variables, so we can test
6627       # for unknown variables in the end.
6628       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6629 
6630       # Check if the provided tool contains a complete path.
6631       tool_specified="$ECHO"
6632       tool_basename="${tool_specified##*/}"
6633       if test "x$tool_basename" = "x$tool_specified"; then
6634         # A command without a complete path is provided, search $PATH.
6635         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6636 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6637         # Extract the first word of "$tool_basename", so it can be a program name with args.
6638 set dummy $tool_basename; ac_word=$2
6639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6640 $as_echo_n "checking for $ac_word... " >&6; }
6641 if ${ac_cv_path_ECHO+:} false; then :
6642   $as_echo_n "(cached) " >&6
6643 else
6644   case $ECHO in
6645   [\\/]* | ?:[\\/]*)
6646   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6647   ;;
6648   *)
6649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6650 for as_dir in $PATH
6651 do
6652   IFS=$as_save_IFS
6653   test -z "$as_dir" && as_dir=.
6654     for ac_exec_ext in '' $ac_executable_extensions; do
6655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6656     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6658     break 2
6659   fi
6660 done
6661   done
6662 IFS=$as_save_IFS
6663 
6664   ;;
6665 esac
6666 fi
6667 ECHO=$ac_cv_path_ECHO
6668 if test -n "$ECHO"; then
6669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6670 $as_echo "$ECHO" >&6; }
6671 else
6672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6673 $as_echo "no" >&6; }
6674 fi
6675 
6676 
6677         if test "x$ECHO" = x; then
6678           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6679         fi
6680       else
6681         # Otherwise we believe it is a complete path. Use it as it is.
6682         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6683 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6684         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6685 $as_echo_n "checking for ECHO... " >&6; }
6686         if test ! -x "$tool_specified"; then
6687           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6688 $as_echo "not found" >&6; }
6689           as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6690         fi
6691         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6692 $as_echo "$tool_specified" >&6; }
6693       fi
6694     fi
6695   fi
6696 
6697 
6698 
6699   if test "x$ECHO" = x; then
6700     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6701   fi
6702 
6703 
6704 
6705 
6706 
6707   # Publish this variable in the help.
6708 
6709 
6710   if test "x$EXPR" = x; then
6711     # The variable is not set by user, try to locate tool using the code snippet
6712     for ac_prog in expr
6713 do
6714   # Extract the first word of "$ac_prog", so it can be a program name with args.
6715 set dummy $ac_prog; ac_word=$2
6716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6717 $as_echo_n "checking for $ac_word... " >&6; }
6718 if ${ac_cv_path_EXPR+:} false; then :
6719   $as_echo_n "(cached) " >&6
6720 else
6721   case $EXPR in
6722   [\\/]* | ?:[\\/]*)
6723   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6724   ;;
6725   *)
6726   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6727 for as_dir in $PATH
6728 do
6729   IFS=$as_save_IFS
6730   test -z "$as_dir" && as_dir=.
6731     for ac_exec_ext in '' $ac_executable_extensions; do
6732   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6733     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6734     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6735     break 2
6736   fi
6737 done
6738   done
6739 IFS=$as_save_IFS
6740 
6741   ;;
6742 esac
6743 fi
6744 EXPR=$ac_cv_path_EXPR
6745 if test -n "$EXPR"; then
6746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6747 $as_echo "$EXPR" >&6; }
6748 else
6749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6750 $as_echo "no" >&6; }
6751 fi
6752 
6753 
6754   test -n "$EXPR" && break
6755 done
6756 
6757   else
6758     # The variable is set, but is it from the command line or the environment?
6759 
6760     # Try to remove the string !EXPR! from our list.
6761     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6762     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6763       # If it failed, the variable was not from the command line. Ignore it,
6764       # but warn the user (except for BASH, which is always set by the calling BASH).
6765       if test "xEXPR" != xBASH; then
6766         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6767 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6768       fi
6769       # Try to locate tool using the code snippet
6770       for ac_prog in expr
6771 do
6772   # Extract the first word of "$ac_prog", so it can be a program name with args.
6773 set dummy $ac_prog; ac_word=$2
6774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6775 $as_echo_n "checking for $ac_word... " >&6; }
6776 if ${ac_cv_path_EXPR+:} false; then :
6777   $as_echo_n "(cached) " >&6
6778 else
6779   case $EXPR in
6780   [\\/]* | ?:[\\/]*)
6781   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6782   ;;
6783   *)
6784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6785 for as_dir in $PATH
6786 do
6787   IFS=$as_save_IFS
6788   test -z "$as_dir" && as_dir=.
6789     for ac_exec_ext in '' $ac_executable_extensions; do
6790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6791     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6793     break 2
6794   fi
6795 done
6796   done
6797 IFS=$as_save_IFS
6798 
6799   ;;
6800 esac
6801 fi
6802 EXPR=$ac_cv_path_EXPR
6803 if test -n "$EXPR"; then
6804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6805 $as_echo "$EXPR" >&6; }
6806 else
6807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6808 $as_echo "no" >&6; }
6809 fi
6810 
6811 
6812   test -n "$EXPR" && break
6813 done
6814 
6815     else
6816       # If it succeeded, then it was overridden by the user. We will use it
6817       # for the tool.
6818 
6819       # First remove it from the list of overridden variables, so we can test
6820       # for unknown variables in the end.
6821       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6822 
6823       # Check if the provided tool contains a complete path.
6824       tool_specified="$EXPR"
6825       tool_basename="${tool_specified##*/}"
6826       if test "x$tool_basename" = "x$tool_specified"; then
6827         # A command without a complete path is provided, search $PATH.
6828         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6829 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6830         # Extract the first word of "$tool_basename", so it can be a program name with args.
6831 set dummy $tool_basename; ac_word=$2
6832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6833 $as_echo_n "checking for $ac_word... " >&6; }
6834 if ${ac_cv_path_EXPR+:} false; then :
6835   $as_echo_n "(cached) " >&6
6836 else
6837   case $EXPR in
6838   [\\/]* | ?:[\\/]*)
6839   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6840   ;;
6841   *)
6842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6843 for as_dir in $PATH
6844 do
6845   IFS=$as_save_IFS
6846   test -z "$as_dir" && as_dir=.
6847     for ac_exec_ext in '' $ac_executable_extensions; do
6848   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6849     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6850     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6851     break 2
6852   fi
6853 done
6854   done
6855 IFS=$as_save_IFS
6856 
6857   ;;
6858 esac
6859 fi
6860 EXPR=$ac_cv_path_EXPR
6861 if test -n "$EXPR"; then
6862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6863 $as_echo "$EXPR" >&6; }
6864 else
6865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6866 $as_echo "no" >&6; }
6867 fi
6868 
6869 
6870         if test "x$EXPR" = x; then
6871           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6872         fi
6873       else
6874         # Otherwise we believe it is a complete path. Use it as it is.
6875         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6876 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6877         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6878 $as_echo_n "checking for EXPR... " >&6; }
6879         if test ! -x "$tool_specified"; then
6880           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6881 $as_echo "not found" >&6; }
6882           as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6883         fi
6884         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6885 $as_echo "$tool_specified" >&6; }
6886       fi
6887     fi
6888   fi
6889 
6890 
6891 
6892   if test "x$EXPR" = x; then
6893     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6894   fi
6895 
6896 
6897 
6898 
6899 
6900   # Publish this variable in the help.
6901 
6902 
6903   if test "x$FILE" = x; then
6904     # The variable is not set by user, try to locate tool using the code snippet
6905     for ac_prog in file
6906 do
6907   # Extract the first word of "$ac_prog", so it can be a program name with args.
6908 set dummy $ac_prog; ac_word=$2
6909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6910 $as_echo_n "checking for $ac_word... " >&6; }
6911 if ${ac_cv_path_FILE+:} false; then :
6912   $as_echo_n "(cached) " >&6
6913 else
6914   case $FILE in
6915   [\\/]* | ?:[\\/]*)
6916   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6917   ;;
6918   *)
6919   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6920 for as_dir in $PATH
6921 do
6922   IFS=$as_save_IFS
6923   test -z "$as_dir" && as_dir=.
6924     for ac_exec_ext in '' $ac_executable_extensions; do
6925   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6926     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6927     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6928     break 2
6929   fi
6930 done
6931   done
6932 IFS=$as_save_IFS
6933 
6934   ;;
6935 esac
6936 fi
6937 FILE=$ac_cv_path_FILE
6938 if test -n "$FILE"; then
6939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6940 $as_echo "$FILE" >&6; }
6941 else
6942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6943 $as_echo "no" >&6; }
6944 fi
6945 
6946 
6947   test -n "$FILE" && break
6948 done
6949 
6950   else
6951     # The variable is set, but is it from the command line or the environment?
6952 
6953     # Try to remove the string !FILE! from our list.
6954     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6955     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6956       # If it failed, the variable was not from the command line. Ignore it,
6957       # but warn the user (except for BASH, which is always set by the calling BASH).
6958       if test "xFILE" != xBASH; then
6959         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6960 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6961       fi
6962       # Try to locate tool using the code snippet
6963       for ac_prog in file
6964 do
6965   # Extract the first word of "$ac_prog", so it can be a program name with args.
6966 set dummy $ac_prog; ac_word=$2
6967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6968 $as_echo_n "checking for $ac_word... " >&6; }
6969 if ${ac_cv_path_FILE+:} false; then :
6970   $as_echo_n "(cached) " >&6
6971 else
6972   case $FILE in
6973   [\\/]* | ?:[\\/]*)
6974   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6975   ;;
6976   *)
6977   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6978 for as_dir in $PATH
6979 do
6980   IFS=$as_save_IFS
6981   test -z "$as_dir" && as_dir=.
6982     for ac_exec_ext in '' $ac_executable_extensions; do
6983   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6984     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6986     break 2
6987   fi
6988 done
6989   done
6990 IFS=$as_save_IFS
6991 
6992   ;;
6993 esac
6994 fi
6995 FILE=$ac_cv_path_FILE
6996 if test -n "$FILE"; then
6997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6998 $as_echo "$FILE" >&6; }
6999 else
7000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7001 $as_echo "no" >&6; }
7002 fi
7003 
7004 
7005   test -n "$FILE" && break
7006 done
7007 
7008     else
7009       # If it succeeded, then it was overridden by the user. We will use it
7010       # for the tool.
7011 
7012       # First remove it from the list of overridden variables, so we can test
7013       # for unknown variables in the end.
7014       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7015 
7016       # Check if the provided tool contains a complete path.
7017       tool_specified="$FILE"
7018       tool_basename="${tool_specified##*/}"
7019       if test "x$tool_basename" = "x$tool_specified"; then
7020         # A command without a complete path is provided, search $PATH.
7021         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7022 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7023         # Extract the first word of "$tool_basename", so it can be a program name with args.
7024 set dummy $tool_basename; ac_word=$2
7025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7026 $as_echo_n "checking for $ac_word... " >&6; }
7027 if ${ac_cv_path_FILE+:} false; then :
7028   $as_echo_n "(cached) " >&6
7029 else
7030   case $FILE in
7031   [\\/]* | ?:[\\/]*)
7032   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7033   ;;
7034   *)
7035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7036 for as_dir in $PATH
7037 do
7038   IFS=$as_save_IFS
7039   test -z "$as_dir" && as_dir=.
7040     for ac_exec_ext in '' $ac_executable_extensions; do
7041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7042     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7044     break 2
7045   fi
7046 done
7047   done
7048 IFS=$as_save_IFS
7049 
7050   ;;
7051 esac
7052 fi
7053 FILE=$ac_cv_path_FILE
7054 if test -n "$FILE"; then
7055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7056 $as_echo "$FILE" >&6; }
7057 else
7058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7059 $as_echo "no" >&6; }
7060 fi
7061 
7062 
7063         if test "x$FILE" = x; then
7064           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7065         fi
7066       else
7067         # Otherwise we believe it is a complete path. Use it as it is.
7068         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7069 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7070         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7071 $as_echo_n "checking for FILE... " >&6; }
7072         if test ! -x "$tool_specified"; then
7073           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7074 $as_echo "not found" >&6; }
7075           as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7076         fi
7077         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7078 $as_echo "$tool_specified" >&6; }
7079       fi
7080     fi
7081   fi
7082 
7083 
7084 
7085   if test "x$FILE" = x; then
7086     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7087   fi
7088 
7089 
7090 
7091 
7092 
7093   # Publish this variable in the help.
7094 
7095 
7096   if test "x$FIND" = x; then
7097     # The variable is not set by user, try to locate tool using the code snippet
7098     for ac_prog in find
7099 do
7100   # Extract the first word of "$ac_prog", so it can be a program name with args.
7101 set dummy $ac_prog; ac_word=$2
7102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7103 $as_echo_n "checking for $ac_word... " >&6; }
7104 if ${ac_cv_path_FIND+:} false; then :
7105   $as_echo_n "(cached) " >&6
7106 else
7107   case $FIND in
7108   [\\/]* | ?:[\\/]*)
7109   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7110   ;;
7111   *)
7112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7113 for as_dir in $PATH
7114 do
7115   IFS=$as_save_IFS
7116   test -z "$as_dir" && as_dir=.
7117     for ac_exec_ext in '' $ac_executable_extensions; do
7118   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7119     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7120     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7121     break 2
7122   fi
7123 done
7124   done
7125 IFS=$as_save_IFS
7126 
7127   ;;
7128 esac
7129 fi
7130 FIND=$ac_cv_path_FIND
7131 if test -n "$FIND"; then
7132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7133 $as_echo "$FIND" >&6; }
7134 else
7135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7136 $as_echo "no" >&6; }
7137 fi
7138 
7139 
7140   test -n "$FIND" && break
7141 done
7142 
7143   else
7144     # The variable is set, but is it from the command line or the environment?
7145 
7146     # Try to remove the string !FIND! from our list.
7147     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7148     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7149       # If it failed, the variable was not from the command line. Ignore it,
7150       # but warn the user (except for BASH, which is always set by the calling BASH).
7151       if test "xFIND" != xBASH; then
7152         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7153 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7154       fi
7155       # Try to locate tool using the code snippet
7156       for ac_prog in find
7157 do
7158   # Extract the first word of "$ac_prog", so it can be a program name with args.
7159 set dummy $ac_prog; ac_word=$2
7160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7161 $as_echo_n "checking for $ac_word... " >&6; }
7162 if ${ac_cv_path_FIND+:} false; then :
7163   $as_echo_n "(cached) " >&6
7164 else
7165   case $FIND in
7166   [\\/]* | ?:[\\/]*)
7167   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7168   ;;
7169   *)
7170   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7171 for as_dir in $PATH
7172 do
7173   IFS=$as_save_IFS
7174   test -z "$as_dir" && as_dir=.
7175     for ac_exec_ext in '' $ac_executable_extensions; do
7176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7177     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7179     break 2
7180   fi
7181 done
7182   done
7183 IFS=$as_save_IFS
7184 
7185   ;;
7186 esac
7187 fi
7188 FIND=$ac_cv_path_FIND
7189 if test -n "$FIND"; then
7190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7191 $as_echo "$FIND" >&6; }
7192 else
7193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7194 $as_echo "no" >&6; }
7195 fi
7196 
7197 
7198   test -n "$FIND" && break
7199 done
7200 
7201     else
7202       # If it succeeded, then it was overridden by the user. We will use it
7203       # for the tool.
7204 
7205       # First remove it from the list of overridden variables, so we can test
7206       # for unknown variables in the end.
7207       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7208 
7209       # Check if the provided tool contains a complete path.
7210       tool_specified="$FIND"
7211       tool_basename="${tool_specified##*/}"
7212       if test "x$tool_basename" = "x$tool_specified"; then
7213         # A command without a complete path is provided, search $PATH.
7214         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7215 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7216         # Extract the first word of "$tool_basename", so it can be a program name with args.
7217 set dummy $tool_basename; ac_word=$2
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7219 $as_echo_n "checking for $ac_word... " >&6; }
7220 if ${ac_cv_path_FIND+:} false; then :
7221   $as_echo_n "(cached) " >&6
7222 else
7223   case $FIND in
7224   [\\/]* | ?:[\\/]*)
7225   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7226   ;;
7227   *)
7228   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7229 for as_dir in $PATH
7230 do
7231   IFS=$as_save_IFS
7232   test -z "$as_dir" && as_dir=.
7233     for ac_exec_ext in '' $ac_executable_extensions; do
7234   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7235     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7236     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7237     break 2
7238   fi
7239 done
7240   done
7241 IFS=$as_save_IFS
7242 
7243   ;;
7244 esac
7245 fi
7246 FIND=$ac_cv_path_FIND
7247 if test -n "$FIND"; then
7248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7249 $as_echo "$FIND" >&6; }
7250 else
7251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7252 $as_echo "no" >&6; }
7253 fi
7254 
7255 
7256         if test "x$FIND" = x; then
7257           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7258         fi
7259       else
7260         # Otherwise we believe it is a complete path. Use it as it is.
7261         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7262 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7263         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7264 $as_echo_n "checking for FIND... " >&6; }
7265         if test ! -x "$tool_specified"; then
7266           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7267 $as_echo "not found" >&6; }
7268           as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7269         fi
7270         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7271 $as_echo "$tool_specified" >&6; }
7272       fi
7273     fi
7274   fi
7275 
7276 
7277 
7278   if test "x$FIND" = x; then
7279     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7280   fi
7281 
7282 
7283 
7284 
7285 
7286   # Publish this variable in the help.
7287 
7288 
7289   if test "x$HEAD" = x; then
7290     # The variable is not set by user, try to locate tool using the code snippet
7291     for ac_prog in head
7292 do
7293   # Extract the first word of "$ac_prog", so it can be a program name with args.
7294 set dummy $ac_prog; ac_word=$2
7295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7296 $as_echo_n "checking for $ac_word... " >&6; }
7297 if ${ac_cv_path_HEAD+:} false; then :
7298   $as_echo_n "(cached) " >&6
7299 else
7300   case $HEAD in
7301   [\\/]* | ?:[\\/]*)
7302   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7303   ;;
7304   *)
7305   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7306 for as_dir in $PATH
7307 do
7308   IFS=$as_save_IFS
7309   test -z "$as_dir" && as_dir=.
7310     for ac_exec_ext in '' $ac_executable_extensions; do
7311   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7312     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7313     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7314     break 2
7315   fi
7316 done
7317   done
7318 IFS=$as_save_IFS
7319 
7320   ;;
7321 esac
7322 fi
7323 HEAD=$ac_cv_path_HEAD
7324 if test -n "$HEAD"; then
7325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7326 $as_echo "$HEAD" >&6; }
7327 else
7328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7329 $as_echo "no" >&6; }
7330 fi
7331 
7332 
7333   test -n "$HEAD" && break
7334 done
7335 
7336   else
7337     # The variable is set, but is it from the command line or the environment?
7338 
7339     # Try to remove the string !HEAD! from our list.
7340     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7341     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7342       # If it failed, the variable was not from the command line. Ignore it,
7343       # but warn the user (except for BASH, which is always set by the calling BASH).
7344       if test "xHEAD" != xBASH; then
7345         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7346 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7347       fi
7348       # Try to locate tool using the code snippet
7349       for ac_prog in head
7350 do
7351   # Extract the first word of "$ac_prog", so it can be a program name with args.
7352 set dummy $ac_prog; ac_word=$2
7353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7354 $as_echo_n "checking for $ac_word... " >&6; }
7355 if ${ac_cv_path_HEAD+:} false; then :
7356   $as_echo_n "(cached) " >&6
7357 else
7358   case $HEAD in
7359   [\\/]* | ?:[\\/]*)
7360   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7361   ;;
7362   *)
7363   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7364 for as_dir in $PATH
7365 do
7366   IFS=$as_save_IFS
7367   test -z "$as_dir" && as_dir=.
7368     for ac_exec_ext in '' $ac_executable_extensions; do
7369   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7370     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7371     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7372     break 2
7373   fi
7374 done
7375   done
7376 IFS=$as_save_IFS
7377 
7378   ;;
7379 esac
7380 fi
7381 HEAD=$ac_cv_path_HEAD
7382 if test -n "$HEAD"; then
7383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7384 $as_echo "$HEAD" >&6; }
7385 else
7386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7387 $as_echo "no" >&6; }
7388 fi
7389 
7390 
7391   test -n "$HEAD" && break
7392 done
7393 
7394     else
7395       # If it succeeded, then it was overridden by the user. We will use it
7396       # for the tool.
7397 
7398       # First remove it from the list of overridden variables, so we can test
7399       # for unknown variables in the end.
7400       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7401 
7402       # Check if the provided tool contains a complete path.
7403       tool_specified="$HEAD"
7404       tool_basename="${tool_specified##*/}"
7405       if test "x$tool_basename" = "x$tool_specified"; then
7406         # A command without a complete path is provided, search $PATH.
7407         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7408 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7409         # Extract the first word of "$tool_basename", so it can be a program name with args.
7410 set dummy $tool_basename; ac_word=$2
7411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7412 $as_echo_n "checking for $ac_word... " >&6; }
7413 if ${ac_cv_path_HEAD+:} false; then :
7414   $as_echo_n "(cached) " >&6
7415 else
7416   case $HEAD in
7417   [\\/]* | ?:[\\/]*)
7418   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7419   ;;
7420   *)
7421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7422 for as_dir in $PATH
7423 do
7424   IFS=$as_save_IFS
7425   test -z "$as_dir" && as_dir=.
7426     for ac_exec_ext in '' $ac_executable_extensions; do
7427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7428     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7430     break 2
7431   fi
7432 done
7433   done
7434 IFS=$as_save_IFS
7435 
7436   ;;
7437 esac
7438 fi
7439 HEAD=$ac_cv_path_HEAD
7440 if test -n "$HEAD"; then
7441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7442 $as_echo "$HEAD" >&6; }
7443 else
7444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7445 $as_echo "no" >&6; }
7446 fi
7447 
7448 
7449         if test "x$HEAD" = x; then
7450           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7451         fi
7452       else
7453         # Otherwise we believe it is a complete path. Use it as it is.
7454         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7455 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7456         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7457 $as_echo_n "checking for HEAD... " >&6; }
7458         if test ! -x "$tool_specified"; then
7459           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7460 $as_echo "not found" >&6; }
7461           as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7462         fi
7463         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7464 $as_echo "$tool_specified" >&6; }
7465       fi
7466     fi
7467   fi
7468 
7469 
7470 
7471   if test "x$HEAD" = x; then
7472     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7473   fi
7474 
7475 
7476 
7477 
7478 
7479   # Publish this variable in the help.
7480 
7481 
7482   if test "x$LN" = x; then
7483     # The variable is not set by user, try to locate tool using the code snippet
7484     for ac_prog in ln
7485 do
7486   # Extract the first word of "$ac_prog", so it can be a program name with args.
7487 set dummy $ac_prog; ac_word=$2
7488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7489 $as_echo_n "checking for $ac_word... " >&6; }
7490 if ${ac_cv_path_LN+:} false; then :
7491   $as_echo_n "(cached) " >&6
7492 else
7493   case $LN in
7494   [\\/]* | ?:[\\/]*)
7495   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7496   ;;
7497   *)
7498   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7499 for as_dir in $PATH
7500 do
7501   IFS=$as_save_IFS
7502   test -z "$as_dir" && as_dir=.
7503     for ac_exec_ext in '' $ac_executable_extensions; do
7504   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7505     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7506     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7507     break 2
7508   fi
7509 done
7510   done
7511 IFS=$as_save_IFS
7512 
7513   ;;
7514 esac
7515 fi
7516 LN=$ac_cv_path_LN
7517 if test -n "$LN"; then
7518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7519 $as_echo "$LN" >&6; }
7520 else
7521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7522 $as_echo "no" >&6; }
7523 fi
7524 
7525 
7526   test -n "$LN" && break
7527 done
7528 
7529   else
7530     # The variable is set, but is it from the command line or the environment?
7531 
7532     # Try to remove the string !LN! from our list.
7533     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7534     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7535       # If it failed, the variable was not from the command line. Ignore it,
7536       # but warn the user (except for BASH, which is always set by the calling BASH).
7537       if test "xLN" != xBASH; then
7538         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7539 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7540       fi
7541       # Try to locate tool using the code snippet
7542       for ac_prog in ln
7543 do
7544   # Extract the first word of "$ac_prog", so it can be a program name with args.
7545 set dummy $ac_prog; ac_word=$2
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7547 $as_echo_n "checking for $ac_word... " >&6; }
7548 if ${ac_cv_path_LN+:} false; then :
7549   $as_echo_n "(cached) " >&6
7550 else
7551   case $LN in
7552   [\\/]* | ?:[\\/]*)
7553   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7554   ;;
7555   *)
7556   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7557 for as_dir in $PATH
7558 do
7559   IFS=$as_save_IFS
7560   test -z "$as_dir" && as_dir=.
7561     for ac_exec_ext in '' $ac_executable_extensions; do
7562   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7563     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7564     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7565     break 2
7566   fi
7567 done
7568   done
7569 IFS=$as_save_IFS
7570 
7571   ;;
7572 esac
7573 fi
7574 LN=$ac_cv_path_LN
7575 if test -n "$LN"; then
7576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7577 $as_echo "$LN" >&6; }
7578 else
7579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7580 $as_echo "no" >&6; }
7581 fi
7582 
7583 
7584   test -n "$LN" && break
7585 done
7586 
7587     else
7588       # If it succeeded, then it was overridden by the user. We will use it
7589       # for the tool.
7590 
7591       # First remove it from the list of overridden variables, so we can test
7592       # for unknown variables in the end.
7593       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7594 
7595       # Check if the provided tool contains a complete path.
7596       tool_specified="$LN"
7597       tool_basename="${tool_specified##*/}"
7598       if test "x$tool_basename" = "x$tool_specified"; then
7599         # A command without a complete path is provided, search $PATH.
7600         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7601 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7602         # Extract the first word of "$tool_basename", so it can be a program name with args.
7603 set dummy $tool_basename; ac_word=$2
7604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7605 $as_echo_n "checking for $ac_word... " >&6; }
7606 if ${ac_cv_path_LN+:} false; then :
7607   $as_echo_n "(cached) " >&6
7608 else
7609   case $LN in
7610   [\\/]* | ?:[\\/]*)
7611   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7612   ;;
7613   *)
7614   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7615 for as_dir in $PATH
7616 do
7617   IFS=$as_save_IFS
7618   test -z "$as_dir" && as_dir=.
7619     for ac_exec_ext in '' $ac_executable_extensions; do
7620   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7621     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7622     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7623     break 2
7624   fi
7625 done
7626   done
7627 IFS=$as_save_IFS
7628 
7629   ;;
7630 esac
7631 fi
7632 LN=$ac_cv_path_LN
7633 if test -n "$LN"; then
7634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7635 $as_echo "$LN" >&6; }
7636 else
7637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7638 $as_echo "no" >&6; }
7639 fi
7640 
7641 
7642         if test "x$LN" = x; then
7643           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7644         fi
7645       else
7646         # Otherwise we believe it is a complete path. Use it as it is.
7647         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7648 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7649         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7650 $as_echo_n "checking for LN... " >&6; }
7651         if test ! -x "$tool_specified"; then
7652           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7653 $as_echo "not found" >&6; }
7654           as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7655         fi
7656         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7657 $as_echo "$tool_specified" >&6; }
7658       fi
7659     fi
7660   fi
7661 
7662 
7663 
7664   if test "x$LN" = x; then
7665     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7666   fi
7667 
7668 
7669 
7670 
7671 
7672   # Publish this variable in the help.
7673 
7674 
7675   if test "x$LS" = x; then
7676     # The variable is not set by user, try to locate tool using the code snippet
7677     for ac_prog in ls
7678 do
7679   # Extract the first word of "$ac_prog", so it can be a program name with args.
7680 set dummy $ac_prog; ac_word=$2
7681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7682 $as_echo_n "checking for $ac_word... " >&6; }
7683 if ${ac_cv_path_LS+:} false; then :
7684   $as_echo_n "(cached) " >&6
7685 else
7686   case $LS in
7687   [\\/]* | ?:[\\/]*)
7688   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7689   ;;
7690   *)
7691   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7692 for as_dir in $PATH
7693 do
7694   IFS=$as_save_IFS
7695   test -z "$as_dir" && as_dir=.
7696     for ac_exec_ext in '' $ac_executable_extensions; do
7697   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7698     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7699     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7700     break 2
7701   fi
7702 done
7703   done
7704 IFS=$as_save_IFS
7705 
7706   ;;
7707 esac
7708 fi
7709 LS=$ac_cv_path_LS
7710 if test -n "$LS"; then
7711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7712 $as_echo "$LS" >&6; }
7713 else
7714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7715 $as_echo "no" >&6; }
7716 fi
7717 
7718 
7719   test -n "$LS" && break
7720 done
7721 
7722   else
7723     # The variable is set, but is it from the command line or the environment?
7724 
7725     # Try to remove the string !LS! from our list.
7726     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7727     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7728       # If it failed, the variable was not from the command line. Ignore it,
7729       # but warn the user (except for BASH, which is always set by the calling BASH).
7730       if test "xLS" != xBASH; then
7731         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7732 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7733       fi
7734       # Try to locate tool using the code snippet
7735       for ac_prog in ls
7736 do
7737   # Extract the first word of "$ac_prog", so it can be a program name with args.
7738 set dummy $ac_prog; ac_word=$2
7739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7740 $as_echo_n "checking for $ac_word... " >&6; }
7741 if ${ac_cv_path_LS+:} false; then :
7742   $as_echo_n "(cached) " >&6
7743 else
7744   case $LS in
7745   [\\/]* | ?:[\\/]*)
7746   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7747   ;;
7748   *)
7749   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7750 for as_dir in $PATH
7751 do
7752   IFS=$as_save_IFS
7753   test -z "$as_dir" && as_dir=.
7754     for ac_exec_ext in '' $ac_executable_extensions; do
7755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7756     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7758     break 2
7759   fi
7760 done
7761   done
7762 IFS=$as_save_IFS
7763 
7764   ;;
7765 esac
7766 fi
7767 LS=$ac_cv_path_LS
7768 if test -n "$LS"; then
7769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7770 $as_echo "$LS" >&6; }
7771 else
7772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7773 $as_echo "no" >&6; }
7774 fi
7775 
7776 
7777   test -n "$LS" && break
7778 done
7779 
7780     else
7781       # If it succeeded, then it was overridden by the user. We will use it
7782       # for the tool.
7783 
7784       # First remove it from the list of overridden variables, so we can test
7785       # for unknown variables in the end.
7786       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7787 
7788       # Check if the provided tool contains a complete path.
7789       tool_specified="$LS"
7790       tool_basename="${tool_specified##*/}"
7791       if test "x$tool_basename" = "x$tool_specified"; then
7792         # A command without a complete path is provided, search $PATH.
7793         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7794 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7795         # Extract the first word of "$tool_basename", so it can be a program name with args.
7796 set dummy $tool_basename; ac_word=$2
7797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7798 $as_echo_n "checking for $ac_word... " >&6; }
7799 if ${ac_cv_path_LS+:} false; then :
7800   $as_echo_n "(cached) " >&6
7801 else
7802   case $LS in
7803   [\\/]* | ?:[\\/]*)
7804   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7805   ;;
7806   *)
7807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7808 for as_dir in $PATH
7809 do
7810   IFS=$as_save_IFS
7811   test -z "$as_dir" && as_dir=.
7812     for ac_exec_ext in '' $ac_executable_extensions; do
7813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7814     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7816     break 2
7817   fi
7818 done
7819   done
7820 IFS=$as_save_IFS
7821 
7822   ;;
7823 esac
7824 fi
7825 LS=$ac_cv_path_LS
7826 if test -n "$LS"; then
7827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7828 $as_echo "$LS" >&6; }
7829 else
7830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7831 $as_echo "no" >&6; }
7832 fi
7833 
7834 
7835         if test "x$LS" = x; then
7836           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7837         fi
7838       else
7839         # Otherwise we believe it is a complete path. Use it as it is.
7840         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7841 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7842         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7843 $as_echo_n "checking for LS... " >&6; }
7844         if test ! -x "$tool_specified"; then
7845           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7846 $as_echo "not found" >&6; }
7847           as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7848         fi
7849         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7850 $as_echo "$tool_specified" >&6; }
7851       fi
7852     fi
7853   fi
7854 
7855 
7856 
7857   if test "x$LS" = x; then
7858     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7859   fi
7860 
7861 
7862 
7863 
7864 
7865   # Publish this variable in the help.
7866 
7867 
7868   if test "x$MKDIR" = x; then
7869     # The variable is not set by user, try to locate tool using the code snippet
7870     for ac_prog in mkdir
7871 do
7872   # Extract the first word of "$ac_prog", so it can be a program name with args.
7873 set dummy $ac_prog; ac_word=$2
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7875 $as_echo_n "checking for $ac_word... " >&6; }
7876 if ${ac_cv_path_MKDIR+:} false; then :
7877   $as_echo_n "(cached) " >&6
7878 else
7879   case $MKDIR in
7880   [\\/]* | ?:[\\/]*)
7881   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7882   ;;
7883   *)
7884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7885 for as_dir in $PATH
7886 do
7887   IFS=$as_save_IFS
7888   test -z "$as_dir" && as_dir=.
7889     for ac_exec_ext in '' $ac_executable_extensions; do
7890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7891     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7893     break 2
7894   fi
7895 done
7896   done
7897 IFS=$as_save_IFS
7898 
7899   ;;
7900 esac
7901 fi
7902 MKDIR=$ac_cv_path_MKDIR
7903 if test -n "$MKDIR"; then
7904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7905 $as_echo "$MKDIR" >&6; }
7906 else
7907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7908 $as_echo "no" >&6; }
7909 fi
7910 
7911 
7912   test -n "$MKDIR" && break
7913 done
7914 
7915   else
7916     # The variable is set, but is it from the command line or the environment?
7917 
7918     # Try to remove the string !MKDIR! from our list.
7919     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7920     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7921       # If it failed, the variable was not from the command line. Ignore it,
7922       # but warn the user (except for BASH, which is always set by the calling BASH).
7923       if test "xMKDIR" != xBASH; then
7924         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7925 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7926       fi
7927       # Try to locate tool using the code snippet
7928       for ac_prog in mkdir
7929 do
7930   # Extract the first word of "$ac_prog", so it can be a program name with args.
7931 set dummy $ac_prog; ac_word=$2
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7933 $as_echo_n "checking for $ac_word... " >&6; }
7934 if ${ac_cv_path_MKDIR+:} false; then :
7935   $as_echo_n "(cached) " >&6
7936 else
7937   case $MKDIR in
7938   [\\/]* | ?:[\\/]*)
7939   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7940   ;;
7941   *)
7942   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7943 for as_dir in $PATH
7944 do
7945   IFS=$as_save_IFS
7946   test -z "$as_dir" && as_dir=.
7947     for ac_exec_ext in '' $ac_executable_extensions; do
7948   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7949     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7950     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7951     break 2
7952   fi
7953 done
7954   done
7955 IFS=$as_save_IFS
7956 
7957   ;;
7958 esac
7959 fi
7960 MKDIR=$ac_cv_path_MKDIR
7961 if test -n "$MKDIR"; then
7962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7963 $as_echo "$MKDIR" >&6; }
7964 else
7965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7966 $as_echo "no" >&6; }
7967 fi
7968 
7969 
7970   test -n "$MKDIR" && break
7971 done
7972 
7973     else
7974       # If it succeeded, then it was overridden by the user. We will use it
7975       # for the tool.
7976 
7977       # First remove it from the list of overridden variables, so we can test
7978       # for unknown variables in the end.
7979       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7980 
7981       # Check if the provided tool contains a complete path.
7982       tool_specified="$MKDIR"
7983       tool_basename="${tool_specified##*/}"
7984       if test "x$tool_basename" = "x$tool_specified"; then
7985         # A command without a complete path is provided, search $PATH.
7986         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7987 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7988         # Extract the first word of "$tool_basename", so it can be a program name with args.
7989 set dummy $tool_basename; ac_word=$2
7990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7991 $as_echo_n "checking for $ac_word... " >&6; }
7992 if ${ac_cv_path_MKDIR+:} false; then :
7993   $as_echo_n "(cached) " >&6
7994 else
7995   case $MKDIR in
7996   [\\/]* | ?:[\\/]*)
7997   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7998   ;;
7999   *)
8000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8001 for as_dir in $PATH
8002 do
8003   IFS=$as_save_IFS
8004   test -z "$as_dir" && as_dir=.
8005     for ac_exec_ext in '' $ac_executable_extensions; do
8006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8007     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8009     break 2
8010   fi
8011 done
8012   done
8013 IFS=$as_save_IFS
8014 
8015   ;;
8016 esac
8017 fi
8018 MKDIR=$ac_cv_path_MKDIR
8019 if test -n "$MKDIR"; then
8020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8021 $as_echo "$MKDIR" >&6; }
8022 else
8023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8024 $as_echo "no" >&6; }
8025 fi
8026 
8027 
8028         if test "x$MKDIR" = x; then
8029           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8030         fi
8031       else
8032         # Otherwise we believe it is a complete path. Use it as it is.
8033         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8034 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8035         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8036 $as_echo_n "checking for MKDIR... " >&6; }
8037         if test ! -x "$tool_specified"; then
8038           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8039 $as_echo "not found" >&6; }
8040           as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8041         fi
8042         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8043 $as_echo "$tool_specified" >&6; }
8044       fi
8045     fi
8046   fi
8047 
8048 
8049 
8050   if test "x$MKDIR" = x; then
8051     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8052   fi
8053 
8054 
8055 
8056 
8057 
8058   # Publish this variable in the help.
8059 
8060 
8061   if test "x$MKTEMP" = x; then
8062     # The variable is not set by user, try to locate tool using the code snippet
8063     for ac_prog in mktemp
8064 do
8065   # Extract the first word of "$ac_prog", so it can be a program name with args.
8066 set dummy $ac_prog; ac_word=$2
8067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8068 $as_echo_n "checking for $ac_word... " >&6; }
8069 if ${ac_cv_path_MKTEMP+:} false; then :
8070   $as_echo_n "(cached) " >&6
8071 else
8072   case $MKTEMP in
8073   [\\/]* | ?:[\\/]*)
8074   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8075   ;;
8076   *)
8077   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8078 for as_dir in $PATH
8079 do
8080   IFS=$as_save_IFS
8081   test -z "$as_dir" && as_dir=.
8082     for ac_exec_ext in '' $ac_executable_extensions; do
8083   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8084     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8086     break 2
8087   fi
8088 done
8089   done
8090 IFS=$as_save_IFS
8091 
8092   ;;
8093 esac
8094 fi
8095 MKTEMP=$ac_cv_path_MKTEMP
8096 if test -n "$MKTEMP"; then
8097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8098 $as_echo "$MKTEMP" >&6; }
8099 else
8100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8101 $as_echo "no" >&6; }
8102 fi
8103 
8104 
8105   test -n "$MKTEMP" && break
8106 done
8107 
8108   else
8109     # The variable is set, but is it from the command line or the environment?
8110 
8111     # Try to remove the string !MKTEMP! from our list.
8112     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8113     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8114       # If it failed, the variable was not from the command line. Ignore it,
8115       # but warn the user (except for BASH, which is always set by the calling BASH).
8116       if test "xMKTEMP" != xBASH; then
8117         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8118 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8119       fi
8120       # Try to locate tool using the code snippet
8121       for ac_prog in mktemp
8122 do
8123   # Extract the first word of "$ac_prog", so it can be a program name with args.
8124 set dummy $ac_prog; ac_word=$2
8125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8126 $as_echo_n "checking for $ac_word... " >&6; }
8127 if ${ac_cv_path_MKTEMP+:} false; then :
8128   $as_echo_n "(cached) " >&6
8129 else
8130   case $MKTEMP in
8131   [\\/]* | ?:[\\/]*)
8132   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8133   ;;
8134   *)
8135   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8136 for as_dir in $PATH
8137 do
8138   IFS=$as_save_IFS
8139   test -z "$as_dir" && as_dir=.
8140     for ac_exec_ext in '' $ac_executable_extensions; do
8141   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8142     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8143     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8144     break 2
8145   fi
8146 done
8147   done
8148 IFS=$as_save_IFS
8149 
8150   ;;
8151 esac
8152 fi
8153 MKTEMP=$ac_cv_path_MKTEMP
8154 if test -n "$MKTEMP"; then
8155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8156 $as_echo "$MKTEMP" >&6; }
8157 else
8158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8159 $as_echo "no" >&6; }
8160 fi
8161 
8162 
8163   test -n "$MKTEMP" && break
8164 done
8165 
8166     else
8167       # If it succeeded, then it was overridden by the user. We will use it
8168       # for the tool.
8169 
8170       # First remove it from the list of overridden variables, so we can test
8171       # for unknown variables in the end.
8172       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8173 
8174       # Check if the provided tool contains a complete path.
8175       tool_specified="$MKTEMP"
8176       tool_basename="${tool_specified##*/}"
8177       if test "x$tool_basename" = "x$tool_specified"; then
8178         # A command without a complete path is provided, search $PATH.
8179         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8180 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8181         # Extract the first word of "$tool_basename", so it can be a program name with args.
8182 set dummy $tool_basename; ac_word=$2
8183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8184 $as_echo_n "checking for $ac_word... " >&6; }
8185 if ${ac_cv_path_MKTEMP+:} false; then :
8186   $as_echo_n "(cached) " >&6
8187 else
8188   case $MKTEMP in
8189   [\\/]* | ?:[\\/]*)
8190   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8191   ;;
8192   *)
8193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8194 for as_dir in $PATH
8195 do
8196   IFS=$as_save_IFS
8197   test -z "$as_dir" && as_dir=.
8198     for ac_exec_ext in '' $ac_executable_extensions; do
8199   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8200     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8202     break 2
8203   fi
8204 done
8205   done
8206 IFS=$as_save_IFS
8207 
8208   ;;
8209 esac
8210 fi
8211 MKTEMP=$ac_cv_path_MKTEMP
8212 if test -n "$MKTEMP"; then
8213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8214 $as_echo "$MKTEMP" >&6; }
8215 else
8216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8217 $as_echo "no" >&6; }
8218 fi
8219 
8220 
8221         if test "x$MKTEMP" = x; then
8222           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8223         fi
8224       else
8225         # Otherwise we believe it is a complete path. Use it as it is.
8226         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8227 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8228         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8229 $as_echo_n "checking for MKTEMP... " >&6; }
8230         if test ! -x "$tool_specified"; then
8231           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8232 $as_echo "not found" >&6; }
8233           as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8234         fi
8235         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8236 $as_echo "$tool_specified" >&6; }
8237       fi
8238     fi
8239   fi
8240 
8241 
8242 
8243   if test "x$MKTEMP" = x; then
8244     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8245   fi
8246 
8247 
8248 
8249 
8250 
8251   # Publish this variable in the help.
8252 
8253 
8254   if test "x$MV" = x; then
8255     # The variable is not set by user, try to locate tool using the code snippet
8256     for ac_prog in mv
8257 do
8258   # Extract the first word of "$ac_prog", so it can be a program name with args.
8259 set dummy $ac_prog; ac_word=$2
8260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8261 $as_echo_n "checking for $ac_word... " >&6; }
8262 if ${ac_cv_path_MV+:} false; then :
8263   $as_echo_n "(cached) " >&6
8264 else
8265   case $MV in
8266   [\\/]* | ?:[\\/]*)
8267   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8268   ;;
8269   *)
8270   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8271 for as_dir in $PATH
8272 do
8273   IFS=$as_save_IFS
8274   test -z "$as_dir" && as_dir=.
8275     for ac_exec_ext in '' $ac_executable_extensions; do
8276   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8277     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8278     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8279     break 2
8280   fi
8281 done
8282   done
8283 IFS=$as_save_IFS
8284 
8285   ;;
8286 esac
8287 fi
8288 MV=$ac_cv_path_MV
8289 if test -n "$MV"; then
8290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8291 $as_echo "$MV" >&6; }
8292 else
8293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8294 $as_echo "no" >&6; }
8295 fi
8296 
8297 
8298   test -n "$MV" && break
8299 done
8300 
8301   else
8302     # The variable is set, but is it from the command line or the environment?
8303 
8304     # Try to remove the string !MV! from our list.
8305     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8306     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8307       # If it failed, the variable was not from the command line. Ignore it,
8308       # but warn the user (except for BASH, which is always set by the calling BASH).
8309       if test "xMV" != xBASH; then
8310         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8311 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8312       fi
8313       # Try to locate tool using the code snippet
8314       for ac_prog in mv
8315 do
8316   # Extract the first word of "$ac_prog", so it can be a program name with args.
8317 set dummy $ac_prog; ac_word=$2
8318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8319 $as_echo_n "checking for $ac_word... " >&6; }
8320 if ${ac_cv_path_MV+:} false; then :
8321   $as_echo_n "(cached) " >&6
8322 else
8323   case $MV in
8324   [\\/]* | ?:[\\/]*)
8325   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8326   ;;
8327   *)
8328   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8329 for as_dir in $PATH
8330 do
8331   IFS=$as_save_IFS
8332   test -z "$as_dir" && as_dir=.
8333     for ac_exec_ext in '' $ac_executable_extensions; do
8334   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8335     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8336     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8337     break 2
8338   fi
8339 done
8340   done
8341 IFS=$as_save_IFS
8342 
8343   ;;
8344 esac
8345 fi
8346 MV=$ac_cv_path_MV
8347 if test -n "$MV"; then
8348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8349 $as_echo "$MV" >&6; }
8350 else
8351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8352 $as_echo "no" >&6; }
8353 fi
8354 
8355 
8356   test -n "$MV" && break
8357 done
8358 
8359     else
8360       # If it succeeded, then it was overridden by the user. We will use it
8361       # for the tool.
8362 
8363       # First remove it from the list of overridden variables, so we can test
8364       # for unknown variables in the end.
8365       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8366 
8367       # Check if the provided tool contains a complete path.
8368       tool_specified="$MV"
8369       tool_basename="${tool_specified##*/}"
8370       if test "x$tool_basename" = "x$tool_specified"; then
8371         # A command without a complete path is provided, search $PATH.
8372         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8373 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8374         # Extract the first word of "$tool_basename", so it can be a program name with args.
8375 set dummy $tool_basename; ac_word=$2
8376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8377 $as_echo_n "checking for $ac_word... " >&6; }
8378 if ${ac_cv_path_MV+:} false; then :
8379   $as_echo_n "(cached) " >&6
8380 else
8381   case $MV in
8382   [\\/]* | ?:[\\/]*)
8383   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8384   ;;
8385   *)
8386   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8387 for as_dir in $PATH
8388 do
8389   IFS=$as_save_IFS
8390   test -z "$as_dir" && as_dir=.
8391     for ac_exec_ext in '' $ac_executable_extensions; do
8392   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8393     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8394     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8395     break 2
8396   fi
8397 done
8398   done
8399 IFS=$as_save_IFS
8400 
8401   ;;
8402 esac
8403 fi
8404 MV=$ac_cv_path_MV
8405 if test -n "$MV"; then
8406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8407 $as_echo "$MV" >&6; }
8408 else
8409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8410 $as_echo "no" >&6; }
8411 fi
8412 
8413 
8414         if test "x$MV" = x; then
8415           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8416         fi
8417       else
8418         # Otherwise we believe it is a complete path. Use it as it is.
8419         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8420 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8421         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8422 $as_echo_n "checking for MV... " >&6; }
8423         if test ! -x "$tool_specified"; then
8424           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8425 $as_echo "not found" >&6; }
8426           as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8427         fi
8428         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8429 $as_echo "$tool_specified" >&6; }
8430       fi
8431     fi
8432   fi
8433 
8434 
8435 
8436   if test "x$MV" = x; then
8437     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8438   fi
8439 
8440 
8441 
8442 
8443 
8444   # Publish this variable in the help.
8445 
8446 
8447   if test "x$NAWK" = x; then
8448     # The variable is not set by user, try to locate tool using the code snippet
8449     for ac_prog in nawk gawk awk
8450 do
8451   # Extract the first word of "$ac_prog", so it can be a program name with args.
8452 set dummy $ac_prog; ac_word=$2
8453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8454 $as_echo_n "checking for $ac_word... " >&6; }
8455 if ${ac_cv_path_NAWK+:} false; then :
8456   $as_echo_n "(cached) " >&6
8457 else
8458   case $NAWK in
8459   [\\/]* | ?:[\\/]*)
8460   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8461   ;;
8462   *)
8463   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8464 for as_dir in $PATH
8465 do
8466   IFS=$as_save_IFS
8467   test -z "$as_dir" && as_dir=.
8468     for ac_exec_ext in '' $ac_executable_extensions; do
8469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8470     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8472     break 2
8473   fi
8474 done
8475   done
8476 IFS=$as_save_IFS
8477 
8478   ;;
8479 esac
8480 fi
8481 NAWK=$ac_cv_path_NAWK
8482 if test -n "$NAWK"; then
8483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8484 $as_echo "$NAWK" >&6; }
8485 else
8486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8487 $as_echo "no" >&6; }
8488 fi
8489 
8490 
8491   test -n "$NAWK" && break
8492 done
8493 
8494   else
8495     # The variable is set, but is it from the command line or the environment?
8496 
8497     # Try to remove the string !NAWK! from our list.
8498     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8499     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8500       # If it failed, the variable was not from the command line. Ignore it,
8501       # but warn the user (except for BASH, which is always set by the calling BASH).
8502       if test "xNAWK" != xBASH; then
8503         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8504 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8505       fi
8506       # Try to locate tool using the code snippet
8507       for ac_prog in nawk gawk awk
8508 do
8509   # Extract the first word of "$ac_prog", so it can be a program name with args.
8510 set dummy $ac_prog; ac_word=$2
8511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8512 $as_echo_n "checking for $ac_word... " >&6; }
8513 if ${ac_cv_path_NAWK+:} false; then :
8514   $as_echo_n "(cached) " >&6
8515 else
8516   case $NAWK in
8517   [\\/]* | ?:[\\/]*)
8518   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8519   ;;
8520   *)
8521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8522 for as_dir in $PATH
8523 do
8524   IFS=$as_save_IFS
8525   test -z "$as_dir" && as_dir=.
8526     for ac_exec_ext in '' $ac_executable_extensions; do
8527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8528     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8530     break 2
8531   fi
8532 done
8533   done
8534 IFS=$as_save_IFS
8535 
8536   ;;
8537 esac
8538 fi
8539 NAWK=$ac_cv_path_NAWK
8540 if test -n "$NAWK"; then
8541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8542 $as_echo "$NAWK" >&6; }
8543 else
8544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8545 $as_echo "no" >&6; }
8546 fi
8547 
8548 
8549   test -n "$NAWK" && break
8550 done
8551 
8552     else
8553       # If it succeeded, then it was overridden by the user. We will use it
8554       # for the tool.
8555 
8556       # First remove it from the list of overridden variables, so we can test
8557       # for unknown variables in the end.
8558       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8559 
8560       # Check if the provided tool contains a complete path.
8561       tool_specified="$NAWK"
8562       tool_basename="${tool_specified##*/}"
8563       if test "x$tool_basename" = "x$tool_specified"; then
8564         # A command without a complete path is provided, search $PATH.
8565         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8566 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8567         # Extract the first word of "$tool_basename", so it can be a program name with args.
8568 set dummy $tool_basename; ac_word=$2
8569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8570 $as_echo_n "checking for $ac_word... " >&6; }
8571 if ${ac_cv_path_NAWK+:} false; then :
8572   $as_echo_n "(cached) " >&6
8573 else
8574   case $NAWK in
8575   [\\/]* | ?:[\\/]*)
8576   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8577   ;;
8578   *)
8579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8580 for as_dir in $PATH
8581 do
8582   IFS=$as_save_IFS
8583   test -z "$as_dir" && as_dir=.
8584     for ac_exec_ext in '' $ac_executable_extensions; do
8585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8586     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8588     break 2
8589   fi
8590 done
8591   done
8592 IFS=$as_save_IFS
8593 
8594   ;;
8595 esac
8596 fi
8597 NAWK=$ac_cv_path_NAWK
8598 if test -n "$NAWK"; then
8599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8600 $as_echo "$NAWK" >&6; }
8601 else
8602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8603 $as_echo "no" >&6; }
8604 fi
8605 
8606 
8607         if test "x$NAWK" = x; then
8608           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8609         fi
8610       else
8611         # Otherwise we believe it is a complete path. Use it as it is.
8612         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8613 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8614         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8615 $as_echo_n "checking for NAWK... " >&6; }
8616         if test ! -x "$tool_specified"; then
8617           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8618 $as_echo "not found" >&6; }
8619           as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8620         fi
8621         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8622 $as_echo "$tool_specified" >&6; }
8623       fi
8624     fi
8625   fi
8626 
8627 
8628 
8629   if test "x$NAWK" = x; then
8630     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8631   fi
8632 
8633 
8634 
8635 
8636 
8637   # Publish this variable in the help.
8638 
8639 
8640   if test "x$PRINTF" = x; then
8641     # The variable is not set by user, try to locate tool using the code snippet
8642     for ac_prog in printf
8643 do
8644   # Extract the first word of "$ac_prog", so it can be a program name with args.
8645 set dummy $ac_prog; ac_word=$2
8646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8647 $as_echo_n "checking for $ac_word... " >&6; }
8648 if ${ac_cv_path_PRINTF+:} false; then :
8649   $as_echo_n "(cached) " >&6
8650 else
8651   case $PRINTF in
8652   [\\/]* | ?:[\\/]*)
8653   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8654   ;;
8655   *)
8656   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8657 for as_dir in $PATH
8658 do
8659   IFS=$as_save_IFS
8660   test -z "$as_dir" && as_dir=.
8661     for ac_exec_ext in '' $ac_executable_extensions; do
8662   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8663     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8664     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8665     break 2
8666   fi
8667 done
8668   done
8669 IFS=$as_save_IFS
8670 
8671   ;;
8672 esac
8673 fi
8674 PRINTF=$ac_cv_path_PRINTF
8675 if test -n "$PRINTF"; then
8676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8677 $as_echo "$PRINTF" >&6; }
8678 else
8679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8680 $as_echo "no" >&6; }
8681 fi
8682 
8683 
8684   test -n "$PRINTF" && break
8685 done
8686 
8687   else
8688     # The variable is set, but is it from the command line or the environment?
8689 
8690     # Try to remove the string !PRINTF! from our list.
8691     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8692     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8693       # If it failed, the variable was not from the command line. Ignore it,
8694       # but warn the user (except for BASH, which is always set by the calling BASH).
8695       if test "xPRINTF" != xBASH; then
8696         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8697 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8698       fi
8699       # Try to locate tool using the code snippet
8700       for ac_prog in printf
8701 do
8702   # Extract the first word of "$ac_prog", so it can be a program name with args.
8703 set dummy $ac_prog; ac_word=$2
8704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8705 $as_echo_n "checking for $ac_word... " >&6; }
8706 if ${ac_cv_path_PRINTF+:} false; then :
8707   $as_echo_n "(cached) " >&6
8708 else
8709   case $PRINTF in
8710   [\\/]* | ?:[\\/]*)
8711   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8712   ;;
8713   *)
8714   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8715 for as_dir in $PATH
8716 do
8717   IFS=$as_save_IFS
8718   test -z "$as_dir" && as_dir=.
8719     for ac_exec_ext in '' $ac_executable_extensions; do
8720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8721     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8723     break 2
8724   fi
8725 done
8726   done
8727 IFS=$as_save_IFS
8728 
8729   ;;
8730 esac
8731 fi
8732 PRINTF=$ac_cv_path_PRINTF
8733 if test -n "$PRINTF"; then
8734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8735 $as_echo "$PRINTF" >&6; }
8736 else
8737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8738 $as_echo "no" >&6; }
8739 fi
8740 
8741 
8742   test -n "$PRINTF" && break
8743 done
8744 
8745     else
8746       # If it succeeded, then it was overridden by the user. We will use it
8747       # for the tool.
8748 
8749       # First remove it from the list of overridden variables, so we can test
8750       # for unknown variables in the end.
8751       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8752 
8753       # Check if the provided tool contains a complete path.
8754       tool_specified="$PRINTF"
8755       tool_basename="${tool_specified##*/}"
8756       if test "x$tool_basename" = "x$tool_specified"; then
8757         # A command without a complete path is provided, search $PATH.
8758         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8759 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8760         # Extract the first word of "$tool_basename", so it can be a program name with args.
8761 set dummy $tool_basename; ac_word=$2
8762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8763 $as_echo_n "checking for $ac_word... " >&6; }
8764 if ${ac_cv_path_PRINTF+:} false; then :
8765   $as_echo_n "(cached) " >&6
8766 else
8767   case $PRINTF in
8768   [\\/]* | ?:[\\/]*)
8769   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8770   ;;
8771   *)
8772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8773 for as_dir in $PATH
8774 do
8775   IFS=$as_save_IFS
8776   test -z "$as_dir" && as_dir=.
8777     for ac_exec_ext in '' $ac_executable_extensions; do
8778   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8779     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8780     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8781     break 2
8782   fi
8783 done
8784   done
8785 IFS=$as_save_IFS
8786 
8787   ;;
8788 esac
8789 fi
8790 PRINTF=$ac_cv_path_PRINTF
8791 if test -n "$PRINTF"; then
8792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8793 $as_echo "$PRINTF" >&6; }
8794 else
8795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8796 $as_echo "no" >&6; }
8797 fi
8798 
8799 
8800         if test "x$PRINTF" = x; then
8801           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8802         fi
8803       else
8804         # Otherwise we believe it is a complete path. Use it as it is.
8805         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8806 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8807         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8808 $as_echo_n "checking for PRINTF... " >&6; }
8809         if test ! -x "$tool_specified"; then
8810           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8811 $as_echo "not found" >&6; }
8812           as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8813         fi
8814         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8815 $as_echo "$tool_specified" >&6; }
8816       fi
8817     fi
8818   fi
8819 
8820 
8821 
8822   if test "x$PRINTF" = x; then
8823     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8824   fi
8825 
8826 
8827 
8828 
8829 
8830   # Publish this variable in the help.
8831 
8832 
8833   if test "x$RM" = x; then
8834     # The variable is not set by user, try to locate tool using the code snippet
8835     for ac_prog in rm
8836 do
8837   # Extract the first word of "$ac_prog", so it can be a program name with args.
8838 set dummy $ac_prog; ac_word=$2
8839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8840 $as_echo_n "checking for $ac_word... " >&6; }
8841 if ${ac_cv_path_RM+:} false; then :
8842   $as_echo_n "(cached) " >&6
8843 else
8844   case $RM in
8845   [\\/]* | ?:[\\/]*)
8846   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8847   ;;
8848   *)
8849   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8850 for as_dir in $PATH
8851 do
8852   IFS=$as_save_IFS
8853   test -z "$as_dir" && as_dir=.
8854     for ac_exec_ext in '' $ac_executable_extensions; do
8855   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8856     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8857     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8858     break 2
8859   fi
8860 done
8861   done
8862 IFS=$as_save_IFS
8863 
8864   ;;
8865 esac
8866 fi
8867 RM=$ac_cv_path_RM
8868 if test -n "$RM"; then
8869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8870 $as_echo "$RM" >&6; }
8871 else
8872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8873 $as_echo "no" >&6; }
8874 fi
8875 
8876 
8877   test -n "$RM" && break
8878 done
8879 
8880   else
8881     # The variable is set, but is it from the command line or the environment?
8882 
8883     # Try to remove the string !RM! from our list.
8884     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8885     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8886       # If it failed, the variable was not from the command line. Ignore it,
8887       # but warn the user (except for BASH, which is always set by the calling BASH).
8888       if test "xRM" != xBASH; then
8889         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8890 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8891       fi
8892       # Try to locate tool using the code snippet
8893       for ac_prog in rm
8894 do
8895   # Extract the first word of "$ac_prog", so it can be a program name with args.
8896 set dummy $ac_prog; ac_word=$2
8897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8898 $as_echo_n "checking for $ac_word... " >&6; }
8899 if ${ac_cv_path_RM+:} false; then :
8900   $as_echo_n "(cached) " >&6
8901 else
8902   case $RM in
8903   [\\/]* | ?:[\\/]*)
8904   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8905   ;;
8906   *)
8907   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8908 for as_dir in $PATH
8909 do
8910   IFS=$as_save_IFS
8911   test -z "$as_dir" && as_dir=.
8912     for ac_exec_ext in '' $ac_executable_extensions; do
8913   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8914     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8915     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8916     break 2
8917   fi
8918 done
8919   done
8920 IFS=$as_save_IFS
8921 
8922   ;;
8923 esac
8924 fi
8925 RM=$ac_cv_path_RM
8926 if test -n "$RM"; then
8927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8928 $as_echo "$RM" >&6; }
8929 else
8930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8931 $as_echo "no" >&6; }
8932 fi
8933 
8934 
8935   test -n "$RM" && break
8936 done
8937 
8938     else
8939       # If it succeeded, then it was overridden by the user. We will use it
8940       # for the tool.
8941 
8942       # First remove it from the list of overridden variables, so we can test
8943       # for unknown variables in the end.
8944       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8945 
8946       # Check if the provided tool contains a complete path.
8947       tool_specified="$RM"
8948       tool_basename="${tool_specified##*/}"
8949       if test "x$tool_basename" = "x$tool_specified"; then
8950         # A command without a complete path is provided, search $PATH.
8951         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8952 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8953         # Extract the first word of "$tool_basename", so it can be a program name with args.
8954 set dummy $tool_basename; ac_word=$2
8955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8956 $as_echo_n "checking for $ac_word... " >&6; }
8957 if ${ac_cv_path_RM+:} false; then :
8958   $as_echo_n "(cached) " >&6
8959 else
8960   case $RM in
8961   [\\/]* | ?:[\\/]*)
8962   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8963   ;;
8964   *)
8965   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8966 for as_dir in $PATH
8967 do
8968   IFS=$as_save_IFS
8969   test -z "$as_dir" && as_dir=.
8970     for ac_exec_ext in '' $ac_executable_extensions; do
8971   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8972     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8974     break 2
8975   fi
8976 done
8977   done
8978 IFS=$as_save_IFS
8979 
8980   ;;
8981 esac
8982 fi
8983 RM=$ac_cv_path_RM
8984 if test -n "$RM"; then
8985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8986 $as_echo "$RM" >&6; }
8987 else
8988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8989 $as_echo "no" >&6; }
8990 fi
8991 
8992 
8993         if test "x$RM" = x; then
8994           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8995         fi
8996       else
8997         # Otherwise we believe it is a complete path. Use it as it is.
8998         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8999 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9000         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9001 $as_echo_n "checking for RM... " >&6; }
9002         if test ! -x "$tool_specified"; then
9003           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9004 $as_echo "not found" >&6; }
9005           as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9006         fi
9007         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9008 $as_echo "$tool_specified" >&6; }
9009       fi
9010     fi
9011   fi
9012 
9013 
9014 
9015   if test "x$RM" = x; then
9016     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9017   fi
9018 
9019 
9020 
9021 
9022 
9023   # Publish this variable in the help.
9024 
9025 
9026   if test "x$SH" = x; then
9027     # The variable is not set by user, try to locate tool using the code snippet
9028     for ac_prog in sh
9029 do
9030   # Extract the first word of "$ac_prog", so it can be a program name with args.
9031 set dummy $ac_prog; ac_word=$2
9032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9033 $as_echo_n "checking for $ac_word... " >&6; }
9034 if ${ac_cv_path_SH+:} false; then :
9035   $as_echo_n "(cached) " >&6
9036 else
9037   case $SH in
9038   [\\/]* | ?:[\\/]*)
9039   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9040   ;;
9041   *)
9042   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9043 for as_dir in $PATH
9044 do
9045   IFS=$as_save_IFS
9046   test -z "$as_dir" && as_dir=.
9047     for ac_exec_ext in '' $ac_executable_extensions; do
9048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9049     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9051     break 2
9052   fi
9053 done
9054   done
9055 IFS=$as_save_IFS
9056 
9057   ;;
9058 esac
9059 fi
9060 SH=$ac_cv_path_SH
9061 if test -n "$SH"; then
9062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9063 $as_echo "$SH" >&6; }
9064 else
9065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9066 $as_echo "no" >&6; }
9067 fi
9068 
9069 
9070   test -n "$SH" && break
9071 done
9072 
9073   else
9074     # The variable is set, but is it from the command line or the environment?
9075 
9076     # Try to remove the string !SH! from our list.
9077     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9078     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9079       # If it failed, the variable was not from the command line. Ignore it,
9080       # but warn the user (except for BASH, which is always set by the calling BASH).
9081       if test "xSH" != xBASH; then
9082         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9083 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9084       fi
9085       # Try to locate tool using the code snippet
9086       for ac_prog in sh
9087 do
9088   # Extract the first word of "$ac_prog", so it can be a program name with args.
9089 set dummy $ac_prog; ac_word=$2
9090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9091 $as_echo_n "checking for $ac_word... " >&6; }
9092 if ${ac_cv_path_SH+:} false; then :
9093   $as_echo_n "(cached) " >&6
9094 else
9095   case $SH in
9096   [\\/]* | ?:[\\/]*)
9097   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9098   ;;
9099   *)
9100   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9101 for as_dir in $PATH
9102 do
9103   IFS=$as_save_IFS
9104   test -z "$as_dir" && as_dir=.
9105     for ac_exec_ext in '' $ac_executable_extensions; do
9106   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9107     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9108     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9109     break 2
9110   fi
9111 done
9112   done
9113 IFS=$as_save_IFS
9114 
9115   ;;
9116 esac
9117 fi
9118 SH=$ac_cv_path_SH
9119 if test -n "$SH"; then
9120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9121 $as_echo "$SH" >&6; }
9122 else
9123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9124 $as_echo "no" >&6; }
9125 fi
9126 
9127 
9128   test -n "$SH" && break
9129 done
9130 
9131     else
9132       # If it succeeded, then it was overridden by the user. We will use it
9133       # for the tool.
9134 
9135       # First remove it from the list of overridden variables, so we can test
9136       # for unknown variables in the end.
9137       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9138 
9139       # Check if the provided tool contains a complete path.
9140       tool_specified="$SH"
9141       tool_basename="${tool_specified##*/}"
9142       if test "x$tool_basename" = "x$tool_specified"; then
9143         # A command without a complete path is provided, search $PATH.
9144         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9145 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9146         # Extract the first word of "$tool_basename", so it can be a program name with args.
9147 set dummy $tool_basename; ac_word=$2
9148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9149 $as_echo_n "checking for $ac_word... " >&6; }
9150 if ${ac_cv_path_SH+:} false; then :
9151   $as_echo_n "(cached) " >&6
9152 else
9153   case $SH in
9154   [\\/]* | ?:[\\/]*)
9155   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9156   ;;
9157   *)
9158   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9159 for as_dir in $PATH
9160 do
9161   IFS=$as_save_IFS
9162   test -z "$as_dir" && as_dir=.
9163     for ac_exec_ext in '' $ac_executable_extensions; do
9164   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9165     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9166     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9167     break 2
9168   fi
9169 done
9170   done
9171 IFS=$as_save_IFS
9172 
9173   ;;
9174 esac
9175 fi
9176 SH=$ac_cv_path_SH
9177 if test -n "$SH"; then
9178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9179 $as_echo "$SH" >&6; }
9180 else
9181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9182 $as_echo "no" >&6; }
9183 fi
9184 
9185 
9186         if test "x$SH" = x; then
9187           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9188         fi
9189       else
9190         # Otherwise we believe it is a complete path. Use it as it is.
9191         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9192 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9193         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9194 $as_echo_n "checking for SH... " >&6; }
9195         if test ! -x "$tool_specified"; then
9196           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9197 $as_echo "not found" >&6; }
9198           as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9199         fi
9200         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9201 $as_echo "$tool_specified" >&6; }
9202       fi
9203     fi
9204   fi
9205 
9206 
9207 
9208   if test "x$SH" = x; then
9209     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9210   fi
9211 
9212 
9213 
9214 
9215 
9216   # Publish this variable in the help.
9217 
9218 
9219   if test "x$SORT" = x; then
9220     # The variable is not set by user, try to locate tool using the code snippet
9221     for ac_prog in sort
9222 do
9223   # Extract the first word of "$ac_prog", so it can be a program name with args.
9224 set dummy $ac_prog; ac_word=$2
9225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9226 $as_echo_n "checking for $ac_word... " >&6; }
9227 if ${ac_cv_path_SORT+:} false; then :
9228   $as_echo_n "(cached) " >&6
9229 else
9230   case $SORT in
9231   [\\/]* | ?:[\\/]*)
9232   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9233   ;;
9234   *)
9235   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9236 for as_dir in $PATH
9237 do
9238   IFS=$as_save_IFS
9239   test -z "$as_dir" && as_dir=.
9240     for ac_exec_ext in '' $ac_executable_extensions; do
9241   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9242     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9244     break 2
9245   fi
9246 done
9247   done
9248 IFS=$as_save_IFS
9249 
9250   ;;
9251 esac
9252 fi
9253 SORT=$ac_cv_path_SORT
9254 if test -n "$SORT"; then
9255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9256 $as_echo "$SORT" >&6; }
9257 else
9258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9259 $as_echo "no" >&6; }
9260 fi
9261 
9262 
9263   test -n "$SORT" && break
9264 done
9265 
9266   else
9267     # The variable is set, but is it from the command line or the environment?
9268 
9269     # Try to remove the string !SORT! from our list.
9270     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9271     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9272       # If it failed, the variable was not from the command line. Ignore it,
9273       # but warn the user (except for BASH, which is always set by the calling BASH).
9274       if test "xSORT" != xBASH; then
9275         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9276 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9277       fi
9278       # Try to locate tool using the code snippet
9279       for ac_prog in sort
9280 do
9281   # Extract the first word of "$ac_prog", so it can be a program name with args.
9282 set dummy $ac_prog; ac_word=$2
9283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9284 $as_echo_n "checking for $ac_word... " >&6; }
9285 if ${ac_cv_path_SORT+:} false; then :
9286   $as_echo_n "(cached) " >&6
9287 else
9288   case $SORT in
9289   [\\/]* | ?:[\\/]*)
9290   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9291   ;;
9292   *)
9293   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9294 for as_dir in $PATH
9295 do
9296   IFS=$as_save_IFS
9297   test -z "$as_dir" && as_dir=.
9298     for ac_exec_ext in '' $ac_executable_extensions; do
9299   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9300     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9301     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9302     break 2
9303   fi
9304 done
9305   done
9306 IFS=$as_save_IFS
9307 
9308   ;;
9309 esac
9310 fi
9311 SORT=$ac_cv_path_SORT
9312 if test -n "$SORT"; then
9313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9314 $as_echo "$SORT" >&6; }
9315 else
9316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9317 $as_echo "no" >&6; }
9318 fi
9319 
9320 
9321   test -n "$SORT" && break
9322 done
9323 
9324     else
9325       # If it succeeded, then it was overridden by the user. We will use it
9326       # for the tool.
9327 
9328       # First remove it from the list of overridden variables, so we can test
9329       # for unknown variables in the end.
9330       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9331 
9332       # Check if the provided tool contains a complete path.
9333       tool_specified="$SORT"
9334       tool_basename="${tool_specified##*/}"
9335       if test "x$tool_basename" = "x$tool_specified"; then
9336         # A command without a complete path is provided, search $PATH.
9337         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9338 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9339         # Extract the first word of "$tool_basename", so it can be a program name with args.
9340 set dummy $tool_basename; ac_word=$2
9341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9342 $as_echo_n "checking for $ac_word... " >&6; }
9343 if ${ac_cv_path_SORT+:} false; then :
9344   $as_echo_n "(cached) " >&6
9345 else
9346   case $SORT in
9347   [\\/]* | ?:[\\/]*)
9348   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9349   ;;
9350   *)
9351   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9352 for as_dir in $PATH
9353 do
9354   IFS=$as_save_IFS
9355   test -z "$as_dir" && as_dir=.
9356     for ac_exec_ext in '' $ac_executable_extensions; do
9357   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9358     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9359     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9360     break 2
9361   fi
9362 done
9363   done
9364 IFS=$as_save_IFS
9365 
9366   ;;
9367 esac
9368 fi
9369 SORT=$ac_cv_path_SORT
9370 if test -n "$SORT"; then
9371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9372 $as_echo "$SORT" >&6; }
9373 else
9374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9375 $as_echo "no" >&6; }
9376 fi
9377 
9378 
9379         if test "x$SORT" = x; then
9380           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9381         fi
9382       else
9383         # Otherwise we believe it is a complete path. Use it as it is.
9384         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9385 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9386         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9387 $as_echo_n "checking for SORT... " >&6; }
9388         if test ! -x "$tool_specified"; then
9389           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9390 $as_echo "not found" >&6; }
9391           as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9392         fi
9393         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9394 $as_echo "$tool_specified" >&6; }
9395       fi
9396     fi
9397   fi
9398 
9399 
9400 
9401   if test "x$SORT" = x; then
9402     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9403   fi
9404 
9405 
9406 
9407 
9408 
9409   # Publish this variable in the help.
9410 
9411 
9412   if test "x$TAIL" = x; then
9413     # The variable is not set by user, try to locate tool using the code snippet
9414     for ac_prog in tail
9415 do
9416   # Extract the first word of "$ac_prog", so it can be a program name with args.
9417 set dummy $ac_prog; ac_word=$2
9418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9419 $as_echo_n "checking for $ac_word... " >&6; }
9420 if ${ac_cv_path_TAIL+:} false; then :
9421   $as_echo_n "(cached) " >&6
9422 else
9423   case $TAIL in
9424   [\\/]* | ?:[\\/]*)
9425   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9426   ;;
9427   *)
9428   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9429 for as_dir in $PATH
9430 do
9431   IFS=$as_save_IFS
9432   test -z "$as_dir" && as_dir=.
9433     for ac_exec_ext in '' $ac_executable_extensions; do
9434   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9435     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9436     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9437     break 2
9438   fi
9439 done
9440   done
9441 IFS=$as_save_IFS
9442 
9443   ;;
9444 esac
9445 fi
9446 TAIL=$ac_cv_path_TAIL
9447 if test -n "$TAIL"; then
9448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9449 $as_echo "$TAIL" >&6; }
9450 else
9451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9452 $as_echo "no" >&6; }
9453 fi
9454 
9455 
9456   test -n "$TAIL" && break
9457 done
9458 
9459   else
9460     # The variable is set, but is it from the command line or the environment?
9461 
9462     # Try to remove the string !TAIL! from our list.
9463     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9464     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9465       # If it failed, the variable was not from the command line. Ignore it,
9466       # but warn the user (except for BASH, which is always set by the calling BASH).
9467       if test "xTAIL" != xBASH; then
9468         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9469 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9470       fi
9471       # Try to locate tool using the code snippet
9472       for ac_prog in tail
9473 do
9474   # Extract the first word of "$ac_prog", so it can be a program name with args.
9475 set dummy $ac_prog; ac_word=$2
9476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9477 $as_echo_n "checking for $ac_word... " >&6; }
9478 if ${ac_cv_path_TAIL+:} false; then :
9479   $as_echo_n "(cached) " >&6
9480 else
9481   case $TAIL in
9482   [\\/]* | ?:[\\/]*)
9483   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9484   ;;
9485   *)
9486   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9487 for as_dir in $PATH
9488 do
9489   IFS=$as_save_IFS
9490   test -z "$as_dir" && as_dir=.
9491     for ac_exec_ext in '' $ac_executable_extensions; do
9492   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9493     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9494     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9495     break 2
9496   fi
9497 done
9498   done
9499 IFS=$as_save_IFS
9500 
9501   ;;
9502 esac
9503 fi
9504 TAIL=$ac_cv_path_TAIL
9505 if test -n "$TAIL"; then
9506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9507 $as_echo "$TAIL" >&6; }
9508 else
9509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9510 $as_echo "no" >&6; }
9511 fi
9512 
9513 
9514   test -n "$TAIL" && break
9515 done
9516 
9517     else
9518       # If it succeeded, then it was overridden by the user. We will use it
9519       # for the tool.
9520 
9521       # First remove it from the list of overridden variables, so we can test
9522       # for unknown variables in the end.
9523       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9524 
9525       # Check if the provided tool contains a complete path.
9526       tool_specified="$TAIL"
9527       tool_basename="${tool_specified##*/}"
9528       if test "x$tool_basename" = "x$tool_specified"; then
9529         # A command without a complete path is provided, search $PATH.
9530         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9531 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9532         # Extract the first word of "$tool_basename", so it can be a program name with args.
9533 set dummy $tool_basename; ac_word=$2
9534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9535 $as_echo_n "checking for $ac_word... " >&6; }
9536 if ${ac_cv_path_TAIL+:} false; then :
9537   $as_echo_n "(cached) " >&6
9538 else
9539   case $TAIL in
9540   [\\/]* | ?:[\\/]*)
9541   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9542   ;;
9543   *)
9544   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9545 for as_dir in $PATH
9546 do
9547   IFS=$as_save_IFS
9548   test -z "$as_dir" && as_dir=.
9549     for ac_exec_ext in '' $ac_executable_extensions; do
9550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9551     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9553     break 2
9554   fi
9555 done
9556   done
9557 IFS=$as_save_IFS
9558 
9559   ;;
9560 esac
9561 fi
9562 TAIL=$ac_cv_path_TAIL
9563 if test -n "$TAIL"; then
9564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9565 $as_echo "$TAIL" >&6; }
9566 else
9567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9568 $as_echo "no" >&6; }
9569 fi
9570 
9571 
9572         if test "x$TAIL" = x; then
9573           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9574         fi
9575       else
9576         # Otherwise we believe it is a complete path. Use it as it is.
9577         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9578 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9579         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9580 $as_echo_n "checking for TAIL... " >&6; }
9581         if test ! -x "$tool_specified"; then
9582           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9583 $as_echo "not found" >&6; }
9584           as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9585         fi
9586         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9587 $as_echo "$tool_specified" >&6; }
9588       fi
9589     fi
9590   fi
9591 
9592 
9593 
9594   if test "x$TAIL" = x; then
9595     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9596   fi
9597 
9598 
9599 
9600 
9601 
9602   # Publish this variable in the help.
9603 
9604 
9605   if test "x$TAR" = x; then
9606     # The variable is not set by user, try to locate tool using the code snippet
9607     for ac_prog in tar
9608 do
9609   # Extract the first word of "$ac_prog", so it can be a program name with args.
9610 set dummy $ac_prog; ac_word=$2
9611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9612 $as_echo_n "checking for $ac_word... " >&6; }
9613 if ${ac_cv_path_TAR+:} false; then :
9614   $as_echo_n "(cached) " >&6
9615 else
9616   case $TAR in
9617   [\\/]* | ?:[\\/]*)
9618   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9619   ;;
9620   *)
9621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9622 for as_dir in $PATH
9623 do
9624   IFS=$as_save_IFS
9625   test -z "$as_dir" && as_dir=.
9626     for ac_exec_ext in '' $ac_executable_extensions; do
9627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9628     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9630     break 2
9631   fi
9632 done
9633   done
9634 IFS=$as_save_IFS
9635 
9636   ;;
9637 esac
9638 fi
9639 TAR=$ac_cv_path_TAR
9640 if test -n "$TAR"; then
9641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9642 $as_echo "$TAR" >&6; }
9643 else
9644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9645 $as_echo "no" >&6; }
9646 fi
9647 
9648 
9649   test -n "$TAR" && break
9650 done
9651 
9652   else
9653     # The variable is set, but is it from the command line or the environment?
9654 
9655     # Try to remove the string !TAR! from our list.
9656     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9657     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9658       # If it failed, the variable was not from the command line. Ignore it,
9659       # but warn the user (except for BASH, which is always set by the calling BASH).
9660       if test "xTAR" != xBASH; then
9661         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9662 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9663       fi
9664       # Try to locate tool using the code snippet
9665       for ac_prog in tar
9666 do
9667   # Extract the first word of "$ac_prog", so it can be a program name with args.
9668 set dummy $ac_prog; ac_word=$2
9669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9670 $as_echo_n "checking for $ac_word... " >&6; }
9671 if ${ac_cv_path_TAR+:} false; then :
9672   $as_echo_n "(cached) " >&6
9673 else
9674   case $TAR in
9675   [\\/]* | ?:[\\/]*)
9676   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9677   ;;
9678   *)
9679   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9680 for as_dir in $PATH
9681 do
9682   IFS=$as_save_IFS
9683   test -z "$as_dir" && as_dir=.
9684     for ac_exec_ext in '' $ac_executable_extensions; do
9685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9686     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9688     break 2
9689   fi
9690 done
9691   done
9692 IFS=$as_save_IFS
9693 
9694   ;;
9695 esac
9696 fi
9697 TAR=$ac_cv_path_TAR
9698 if test -n "$TAR"; then
9699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9700 $as_echo "$TAR" >&6; }
9701 else
9702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9703 $as_echo "no" >&6; }
9704 fi
9705 
9706 
9707   test -n "$TAR" && break
9708 done
9709 
9710     else
9711       # If it succeeded, then it was overridden by the user. We will use it
9712       # for the tool.
9713 
9714       # First remove it from the list of overridden variables, so we can test
9715       # for unknown variables in the end.
9716       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9717 
9718       # Check if the provided tool contains a complete path.
9719       tool_specified="$TAR"
9720       tool_basename="${tool_specified##*/}"
9721       if test "x$tool_basename" = "x$tool_specified"; then
9722         # A command without a complete path is provided, search $PATH.
9723         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9724 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9725         # Extract the first word of "$tool_basename", so it can be a program name with args.
9726 set dummy $tool_basename; ac_word=$2
9727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9728 $as_echo_n "checking for $ac_word... " >&6; }
9729 if ${ac_cv_path_TAR+:} false; then :
9730   $as_echo_n "(cached) " >&6
9731 else
9732   case $TAR in
9733   [\\/]* | ?:[\\/]*)
9734   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9735   ;;
9736   *)
9737   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9738 for as_dir in $PATH
9739 do
9740   IFS=$as_save_IFS
9741   test -z "$as_dir" && as_dir=.
9742     for ac_exec_ext in '' $ac_executable_extensions; do
9743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9744     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9746     break 2
9747   fi
9748 done
9749   done
9750 IFS=$as_save_IFS
9751 
9752   ;;
9753 esac
9754 fi
9755 TAR=$ac_cv_path_TAR
9756 if test -n "$TAR"; then
9757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9758 $as_echo "$TAR" >&6; }
9759 else
9760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9761 $as_echo "no" >&6; }
9762 fi
9763 
9764 
9765         if test "x$TAR" = x; then
9766           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9767         fi
9768       else
9769         # Otherwise we believe it is a complete path. Use it as it is.
9770         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9771 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9772         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9773 $as_echo_n "checking for TAR... " >&6; }
9774         if test ! -x "$tool_specified"; then
9775           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9776 $as_echo "not found" >&6; }
9777           as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9778         fi
9779         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9780 $as_echo "$tool_specified" >&6; }
9781       fi
9782     fi
9783   fi
9784 
9785 
9786 
9787   if test "x$TAR" = x; then
9788     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9789   fi
9790 
9791 
9792 
9793 
9794 
9795   # Publish this variable in the help.
9796 
9797 
9798   if test "x$TEE" = x; then
9799     # The variable is not set by user, try to locate tool using the code snippet
9800     for ac_prog in tee
9801 do
9802   # Extract the first word of "$ac_prog", so it can be a program name with args.
9803 set dummy $ac_prog; ac_word=$2
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9805 $as_echo_n "checking for $ac_word... " >&6; }
9806 if ${ac_cv_path_TEE+:} false; then :
9807   $as_echo_n "(cached) " >&6
9808 else
9809   case $TEE in
9810   [\\/]* | ?:[\\/]*)
9811   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9812   ;;
9813   *)
9814   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9815 for as_dir in $PATH
9816 do
9817   IFS=$as_save_IFS
9818   test -z "$as_dir" && as_dir=.
9819     for ac_exec_ext in '' $ac_executable_extensions; do
9820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9821     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9823     break 2
9824   fi
9825 done
9826   done
9827 IFS=$as_save_IFS
9828 
9829   ;;
9830 esac
9831 fi
9832 TEE=$ac_cv_path_TEE
9833 if test -n "$TEE"; then
9834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9835 $as_echo "$TEE" >&6; }
9836 else
9837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9838 $as_echo "no" >&6; }
9839 fi
9840 
9841 
9842   test -n "$TEE" && break
9843 done
9844 
9845   else
9846     # The variable is set, but is it from the command line or the environment?
9847 
9848     # Try to remove the string !TEE! from our list.
9849     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9850     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9851       # If it failed, the variable was not from the command line. Ignore it,
9852       # but warn the user (except for BASH, which is always set by the calling BASH).
9853       if test "xTEE" != xBASH; then
9854         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9855 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9856       fi
9857       # Try to locate tool using the code snippet
9858       for ac_prog in tee
9859 do
9860   # Extract the first word of "$ac_prog", so it can be a program name with args.
9861 set dummy $ac_prog; ac_word=$2
9862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9863 $as_echo_n "checking for $ac_word... " >&6; }
9864 if ${ac_cv_path_TEE+:} false; then :
9865   $as_echo_n "(cached) " >&6
9866 else
9867   case $TEE in
9868   [\\/]* | ?:[\\/]*)
9869   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9870   ;;
9871   *)
9872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9873 for as_dir in $PATH
9874 do
9875   IFS=$as_save_IFS
9876   test -z "$as_dir" && as_dir=.
9877     for ac_exec_ext in '' $ac_executable_extensions; do
9878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9879     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9881     break 2
9882   fi
9883 done
9884   done
9885 IFS=$as_save_IFS
9886 
9887   ;;
9888 esac
9889 fi
9890 TEE=$ac_cv_path_TEE
9891 if test -n "$TEE"; then
9892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9893 $as_echo "$TEE" >&6; }
9894 else
9895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9896 $as_echo "no" >&6; }
9897 fi
9898 
9899 
9900   test -n "$TEE" && break
9901 done
9902 
9903     else
9904       # If it succeeded, then it was overridden by the user. We will use it
9905       # for the tool.
9906 
9907       # First remove it from the list of overridden variables, so we can test
9908       # for unknown variables in the end.
9909       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9910 
9911       # Check if the provided tool contains a complete path.
9912       tool_specified="$TEE"
9913       tool_basename="${tool_specified##*/}"
9914       if test "x$tool_basename" = "x$tool_specified"; then
9915         # A command without a complete path is provided, search $PATH.
9916         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9917 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9918         # Extract the first word of "$tool_basename", so it can be a program name with args.
9919 set dummy $tool_basename; ac_word=$2
9920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9921 $as_echo_n "checking for $ac_word... " >&6; }
9922 if ${ac_cv_path_TEE+:} false; then :
9923   $as_echo_n "(cached) " >&6
9924 else
9925   case $TEE in
9926   [\\/]* | ?:[\\/]*)
9927   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9928   ;;
9929   *)
9930   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9931 for as_dir in $PATH
9932 do
9933   IFS=$as_save_IFS
9934   test -z "$as_dir" && as_dir=.
9935     for ac_exec_ext in '' $ac_executable_extensions; do
9936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9937     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9939     break 2
9940   fi
9941 done
9942   done
9943 IFS=$as_save_IFS
9944 
9945   ;;
9946 esac
9947 fi
9948 TEE=$ac_cv_path_TEE
9949 if test -n "$TEE"; then
9950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9951 $as_echo "$TEE" >&6; }
9952 else
9953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9954 $as_echo "no" >&6; }
9955 fi
9956 
9957 
9958         if test "x$TEE" = x; then
9959           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9960         fi
9961       else
9962         # Otherwise we believe it is a complete path. Use it as it is.
9963         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9964 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9965         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9966 $as_echo_n "checking for TEE... " >&6; }
9967         if test ! -x "$tool_specified"; then
9968           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9969 $as_echo "not found" >&6; }
9970           as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9971         fi
9972         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9973 $as_echo "$tool_specified" >&6; }
9974       fi
9975     fi
9976   fi
9977 
9978 
9979 
9980   if test "x$TEE" = x; then
9981     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9982   fi
9983 
9984 
9985 
9986 
9987 
9988   # Publish this variable in the help.
9989 
9990 
9991   if test "x$TOUCH" = x; then
9992     # The variable is not set by user, try to locate tool using the code snippet
9993     for ac_prog in touch
9994 do
9995   # Extract the first word of "$ac_prog", so it can be a program name with args.
9996 set dummy $ac_prog; ac_word=$2
9997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9998 $as_echo_n "checking for $ac_word... " >&6; }
9999 if ${ac_cv_path_TOUCH+:} false; then :
10000   $as_echo_n "(cached) " >&6
10001 else
10002   case $TOUCH in
10003   [\\/]* | ?:[\\/]*)
10004   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10005   ;;
10006   *)
10007   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10008 for as_dir in $PATH
10009 do
10010   IFS=$as_save_IFS
10011   test -z "$as_dir" && as_dir=.
10012     for ac_exec_ext in '' $ac_executable_extensions; do
10013   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10014     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10016     break 2
10017   fi
10018 done
10019   done
10020 IFS=$as_save_IFS
10021 
10022   ;;
10023 esac
10024 fi
10025 TOUCH=$ac_cv_path_TOUCH
10026 if test -n "$TOUCH"; then
10027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10028 $as_echo "$TOUCH" >&6; }
10029 else
10030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10031 $as_echo "no" >&6; }
10032 fi
10033 
10034 
10035   test -n "$TOUCH" && break
10036 done
10037 
10038   else
10039     # The variable is set, but is it from the command line or the environment?
10040 
10041     # Try to remove the string !TOUCH! from our list.
10042     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10043     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10044       # If it failed, the variable was not from the command line. Ignore it,
10045       # but warn the user (except for BASH, which is always set by the calling BASH).
10046       if test "xTOUCH" != xBASH; then
10047         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10048 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10049       fi
10050       # Try to locate tool using the code snippet
10051       for ac_prog in touch
10052 do
10053   # Extract the first word of "$ac_prog", so it can be a program name with args.
10054 set dummy $ac_prog; ac_word=$2
10055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10056 $as_echo_n "checking for $ac_word... " >&6; }
10057 if ${ac_cv_path_TOUCH+:} false; then :
10058   $as_echo_n "(cached) " >&6
10059 else
10060   case $TOUCH in
10061   [\\/]* | ?:[\\/]*)
10062   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10063   ;;
10064   *)
10065   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10066 for as_dir in $PATH
10067 do
10068   IFS=$as_save_IFS
10069   test -z "$as_dir" && as_dir=.
10070     for ac_exec_ext in '' $ac_executable_extensions; do
10071   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10072     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10073     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10074     break 2
10075   fi
10076 done
10077   done
10078 IFS=$as_save_IFS
10079 
10080   ;;
10081 esac
10082 fi
10083 TOUCH=$ac_cv_path_TOUCH
10084 if test -n "$TOUCH"; then
10085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10086 $as_echo "$TOUCH" >&6; }
10087 else
10088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10089 $as_echo "no" >&6; }
10090 fi
10091 
10092 
10093   test -n "$TOUCH" && break
10094 done
10095 
10096     else
10097       # If it succeeded, then it was overridden by the user. We will use it
10098       # for the tool.
10099 
10100       # First remove it from the list of overridden variables, so we can test
10101       # for unknown variables in the end.
10102       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10103 
10104       # Check if the provided tool contains a complete path.
10105       tool_specified="$TOUCH"
10106       tool_basename="${tool_specified##*/}"
10107       if test "x$tool_basename" = "x$tool_specified"; then
10108         # A command without a complete path is provided, search $PATH.
10109         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10110 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10111         # Extract the first word of "$tool_basename", so it can be a program name with args.
10112 set dummy $tool_basename; ac_word=$2
10113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10114 $as_echo_n "checking for $ac_word... " >&6; }
10115 if ${ac_cv_path_TOUCH+:} false; then :
10116   $as_echo_n "(cached) " >&6
10117 else
10118   case $TOUCH in
10119   [\\/]* | ?:[\\/]*)
10120   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10121   ;;
10122   *)
10123   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10124 for as_dir in $PATH
10125 do
10126   IFS=$as_save_IFS
10127   test -z "$as_dir" && as_dir=.
10128     for ac_exec_ext in '' $ac_executable_extensions; do
10129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10130     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10132     break 2
10133   fi
10134 done
10135   done
10136 IFS=$as_save_IFS
10137 
10138   ;;
10139 esac
10140 fi
10141 TOUCH=$ac_cv_path_TOUCH
10142 if test -n "$TOUCH"; then
10143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10144 $as_echo "$TOUCH" >&6; }
10145 else
10146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10147 $as_echo "no" >&6; }
10148 fi
10149 
10150 
10151         if test "x$TOUCH" = x; then
10152           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10153         fi
10154       else
10155         # Otherwise we believe it is a complete path. Use it as it is.
10156         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10157 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10158         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10159 $as_echo_n "checking for TOUCH... " >&6; }
10160         if test ! -x "$tool_specified"; then
10161           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10162 $as_echo "not found" >&6; }
10163           as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10164         fi
10165         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10166 $as_echo "$tool_specified" >&6; }
10167       fi
10168     fi
10169   fi
10170 
10171 
10172 
10173   if test "x$TOUCH" = x; then
10174     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10175   fi
10176 
10177 
10178 
10179 
10180 
10181   # Publish this variable in the help.
10182 
10183 
10184   if test "x$TR" = x; then
10185     # The variable is not set by user, try to locate tool using the code snippet
10186     for ac_prog in tr
10187 do
10188   # Extract the first word of "$ac_prog", so it can be a program name with args.
10189 set dummy $ac_prog; ac_word=$2
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10191 $as_echo_n "checking for $ac_word... " >&6; }
10192 if ${ac_cv_path_TR+:} false; then :
10193   $as_echo_n "(cached) " >&6
10194 else
10195   case $TR in
10196   [\\/]* | ?:[\\/]*)
10197   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10198   ;;
10199   *)
10200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10201 for as_dir in $PATH
10202 do
10203   IFS=$as_save_IFS
10204   test -z "$as_dir" && as_dir=.
10205     for ac_exec_ext in '' $ac_executable_extensions; do
10206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10207     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10209     break 2
10210   fi
10211 done
10212   done
10213 IFS=$as_save_IFS
10214 
10215   ;;
10216 esac
10217 fi
10218 TR=$ac_cv_path_TR
10219 if test -n "$TR"; then
10220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10221 $as_echo "$TR" >&6; }
10222 else
10223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10224 $as_echo "no" >&6; }
10225 fi
10226 
10227 
10228   test -n "$TR" && break
10229 done
10230 
10231   else
10232     # The variable is set, but is it from the command line or the environment?
10233 
10234     # Try to remove the string !TR! from our list.
10235     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10236     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10237       # If it failed, the variable was not from the command line. Ignore it,
10238       # but warn the user (except for BASH, which is always set by the calling BASH).
10239       if test "xTR" != xBASH; then
10240         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10241 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10242       fi
10243       # Try to locate tool using the code snippet
10244       for ac_prog in tr
10245 do
10246   # Extract the first word of "$ac_prog", so it can be a program name with args.
10247 set dummy $ac_prog; ac_word=$2
10248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10249 $as_echo_n "checking for $ac_word... " >&6; }
10250 if ${ac_cv_path_TR+:} false; then :
10251   $as_echo_n "(cached) " >&6
10252 else
10253   case $TR in
10254   [\\/]* | ?:[\\/]*)
10255   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10256   ;;
10257   *)
10258   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10259 for as_dir in $PATH
10260 do
10261   IFS=$as_save_IFS
10262   test -z "$as_dir" && as_dir=.
10263     for ac_exec_ext in '' $ac_executable_extensions; do
10264   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10265     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10267     break 2
10268   fi
10269 done
10270   done
10271 IFS=$as_save_IFS
10272 
10273   ;;
10274 esac
10275 fi
10276 TR=$ac_cv_path_TR
10277 if test -n "$TR"; then
10278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10279 $as_echo "$TR" >&6; }
10280 else
10281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10282 $as_echo "no" >&6; }
10283 fi
10284 
10285 
10286   test -n "$TR" && break
10287 done
10288 
10289     else
10290       # If it succeeded, then it was overridden by the user. We will use it
10291       # for the tool.
10292 
10293       # First remove it from the list of overridden variables, so we can test
10294       # for unknown variables in the end.
10295       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10296 
10297       # Check if the provided tool contains a complete path.
10298       tool_specified="$TR"
10299       tool_basename="${tool_specified##*/}"
10300       if test "x$tool_basename" = "x$tool_specified"; then
10301         # A command without a complete path is provided, search $PATH.
10302         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10303 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10304         # Extract the first word of "$tool_basename", so it can be a program name with args.
10305 set dummy $tool_basename; ac_word=$2
10306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10307 $as_echo_n "checking for $ac_word... " >&6; }
10308 if ${ac_cv_path_TR+:} false; then :
10309   $as_echo_n "(cached) " >&6
10310 else
10311   case $TR in
10312   [\\/]* | ?:[\\/]*)
10313   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10314   ;;
10315   *)
10316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10317 for as_dir in $PATH
10318 do
10319   IFS=$as_save_IFS
10320   test -z "$as_dir" && as_dir=.
10321     for ac_exec_ext in '' $ac_executable_extensions; do
10322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10323     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10325     break 2
10326   fi
10327 done
10328   done
10329 IFS=$as_save_IFS
10330 
10331   ;;
10332 esac
10333 fi
10334 TR=$ac_cv_path_TR
10335 if test -n "$TR"; then
10336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10337 $as_echo "$TR" >&6; }
10338 else
10339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10340 $as_echo "no" >&6; }
10341 fi
10342 
10343 
10344         if test "x$TR" = x; then
10345           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10346         fi
10347       else
10348         # Otherwise we believe it is a complete path. Use it as it is.
10349         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10350 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10351         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10352 $as_echo_n "checking for TR... " >&6; }
10353         if test ! -x "$tool_specified"; then
10354           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10355 $as_echo "not found" >&6; }
10356           as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10357         fi
10358         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10359 $as_echo "$tool_specified" >&6; }
10360       fi
10361     fi
10362   fi
10363 
10364 
10365 
10366   if test "x$TR" = x; then
10367     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10368   fi
10369 
10370 
10371 
10372 
10373 
10374   # Publish this variable in the help.
10375 
10376 
10377   if test "x$UNAME" = x; then
10378     # The variable is not set by user, try to locate tool using the code snippet
10379     for ac_prog in uname
10380 do
10381   # Extract the first word of "$ac_prog", so it can be a program name with args.
10382 set dummy $ac_prog; ac_word=$2
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10384 $as_echo_n "checking for $ac_word... " >&6; }
10385 if ${ac_cv_path_UNAME+:} false; then :
10386   $as_echo_n "(cached) " >&6
10387 else
10388   case $UNAME in
10389   [\\/]* | ?:[\\/]*)
10390   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10391   ;;
10392   *)
10393   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10394 for as_dir in $PATH
10395 do
10396   IFS=$as_save_IFS
10397   test -z "$as_dir" && as_dir=.
10398     for ac_exec_ext in '' $ac_executable_extensions; do
10399   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10400     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10401     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10402     break 2
10403   fi
10404 done
10405   done
10406 IFS=$as_save_IFS
10407 
10408   ;;
10409 esac
10410 fi
10411 UNAME=$ac_cv_path_UNAME
10412 if test -n "$UNAME"; then
10413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10414 $as_echo "$UNAME" >&6; }
10415 else
10416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10417 $as_echo "no" >&6; }
10418 fi
10419 
10420 
10421   test -n "$UNAME" && break
10422 done
10423 
10424   else
10425     # The variable is set, but is it from the command line or the environment?
10426 
10427     # Try to remove the string !UNAME! from our list.
10428     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10429     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10430       # If it failed, the variable was not from the command line. Ignore it,
10431       # but warn the user (except for BASH, which is always set by the calling BASH).
10432       if test "xUNAME" != xBASH; then
10433         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10434 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10435       fi
10436       # Try to locate tool using the code snippet
10437       for ac_prog in uname
10438 do
10439   # Extract the first word of "$ac_prog", so it can be a program name with args.
10440 set dummy $ac_prog; ac_word=$2
10441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10442 $as_echo_n "checking for $ac_word... " >&6; }
10443 if ${ac_cv_path_UNAME+:} false; then :
10444   $as_echo_n "(cached) " >&6
10445 else
10446   case $UNAME in
10447   [\\/]* | ?:[\\/]*)
10448   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10449   ;;
10450   *)
10451   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10452 for as_dir in $PATH
10453 do
10454   IFS=$as_save_IFS
10455   test -z "$as_dir" && as_dir=.
10456     for ac_exec_ext in '' $ac_executable_extensions; do
10457   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10458     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10459     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10460     break 2
10461   fi
10462 done
10463   done
10464 IFS=$as_save_IFS
10465 
10466   ;;
10467 esac
10468 fi
10469 UNAME=$ac_cv_path_UNAME
10470 if test -n "$UNAME"; then
10471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10472 $as_echo "$UNAME" >&6; }
10473 else
10474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10475 $as_echo "no" >&6; }
10476 fi
10477 
10478 
10479   test -n "$UNAME" && break
10480 done
10481 
10482     else
10483       # If it succeeded, then it was overridden by the user. We will use it
10484       # for the tool.
10485 
10486       # First remove it from the list of overridden variables, so we can test
10487       # for unknown variables in the end.
10488       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10489 
10490       # Check if the provided tool contains a complete path.
10491       tool_specified="$UNAME"
10492       tool_basename="${tool_specified##*/}"
10493       if test "x$tool_basename" = "x$tool_specified"; then
10494         # A command without a complete path is provided, search $PATH.
10495         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10496 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10497         # Extract the first word of "$tool_basename", so it can be a program name with args.
10498 set dummy $tool_basename; ac_word=$2
10499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10500 $as_echo_n "checking for $ac_word... " >&6; }
10501 if ${ac_cv_path_UNAME+:} false; then :
10502   $as_echo_n "(cached) " >&6
10503 else
10504   case $UNAME in
10505   [\\/]* | ?:[\\/]*)
10506   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10507   ;;
10508   *)
10509   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10510 for as_dir in $PATH
10511 do
10512   IFS=$as_save_IFS
10513   test -z "$as_dir" && as_dir=.
10514     for ac_exec_ext in '' $ac_executable_extensions; do
10515   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10516     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10518     break 2
10519   fi
10520 done
10521   done
10522 IFS=$as_save_IFS
10523 
10524   ;;
10525 esac
10526 fi
10527 UNAME=$ac_cv_path_UNAME
10528 if test -n "$UNAME"; then
10529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10530 $as_echo "$UNAME" >&6; }
10531 else
10532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10533 $as_echo "no" >&6; }
10534 fi
10535 
10536 
10537         if test "x$UNAME" = x; then
10538           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10539         fi
10540       else
10541         # Otherwise we believe it is a complete path. Use it as it is.
10542         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10543 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10544         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10545 $as_echo_n "checking for UNAME... " >&6; }
10546         if test ! -x "$tool_specified"; then
10547           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10548 $as_echo "not found" >&6; }
10549           as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10550         fi
10551         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10552 $as_echo "$tool_specified" >&6; }
10553       fi
10554     fi
10555   fi
10556 
10557 
10558 
10559   if test "x$UNAME" = x; then
10560     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10561   fi
10562 
10563 
10564 
10565 
10566 
10567   # Publish this variable in the help.
10568 
10569 
10570   if test "x$UNIQ" = x; then
10571     # The variable is not set by user, try to locate tool using the code snippet
10572     for ac_prog in uniq
10573 do
10574   # Extract the first word of "$ac_prog", so it can be a program name with args.
10575 set dummy $ac_prog; ac_word=$2
10576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10577 $as_echo_n "checking for $ac_word... " >&6; }
10578 if ${ac_cv_path_UNIQ+:} false; then :
10579   $as_echo_n "(cached) " >&6
10580 else
10581   case $UNIQ in
10582   [\\/]* | ?:[\\/]*)
10583   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10584   ;;
10585   *)
10586   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10587 for as_dir in $PATH
10588 do
10589   IFS=$as_save_IFS
10590   test -z "$as_dir" && as_dir=.
10591     for ac_exec_ext in '' $ac_executable_extensions; do
10592   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10593     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10594     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10595     break 2
10596   fi
10597 done
10598   done
10599 IFS=$as_save_IFS
10600 
10601   ;;
10602 esac
10603 fi
10604 UNIQ=$ac_cv_path_UNIQ
10605 if test -n "$UNIQ"; then
10606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10607 $as_echo "$UNIQ" >&6; }
10608 else
10609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10610 $as_echo "no" >&6; }
10611 fi
10612 
10613 
10614   test -n "$UNIQ" && break
10615 done
10616 
10617   else
10618     # The variable is set, but is it from the command line or the environment?
10619 
10620     # Try to remove the string !UNIQ! from our list.
10621     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10622     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10623       # If it failed, the variable was not from the command line. Ignore it,
10624       # but warn the user (except for BASH, which is always set by the calling BASH).
10625       if test "xUNIQ" != xBASH; then
10626         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10627 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10628       fi
10629       # Try to locate tool using the code snippet
10630       for ac_prog in uniq
10631 do
10632   # Extract the first word of "$ac_prog", so it can be a program name with args.
10633 set dummy $ac_prog; ac_word=$2
10634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10635 $as_echo_n "checking for $ac_word... " >&6; }
10636 if ${ac_cv_path_UNIQ+:} false; then :
10637   $as_echo_n "(cached) " >&6
10638 else
10639   case $UNIQ in
10640   [\\/]* | ?:[\\/]*)
10641   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10642   ;;
10643   *)
10644   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10645 for as_dir in $PATH
10646 do
10647   IFS=$as_save_IFS
10648   test -z "$as_dir" && as_dir=.
10649     for ac_exec_ext in '' $ac_executable_extensions; do
10650   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10651     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10652     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10653     break 2
10654   fi
10655 done
10656   done
10657 IFS=$as_save_IFS
10658 
10659   ;;
10660 esac
10661 fi
10662 UNIQ=$ac_cv_path_UNIQ
10663 if test -n "$UNIQ"; then
10664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10665 $as_echo "$UNIQ" >&6; }
10666 else
10667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10668 $as_echo "no" >&6; }
10669 fi
10670 
10671 
10672   test -n "$UNIQ" && break
10673 done
10674 
10675     else
10676       # If it succeeded, then it was overridden by the user. We will use it
10677       # for the tool.
10678 
10679       # First remove it from the list of overridden variables, so we can test
10680       # for unknown variables in the end.
10681       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10682 
10683       # Check if the provided tool contains a complete path.
10684       tool_specified="$UNIQ"
10685       tool_basename="${tool_specified##*/}"
10686       if test "x$tool_basename" = "x$tool_specified"; then
10687         # A command without a complete path is provided, search $PATH.
10688         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10689 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10690         # Extract the first word of "$tool_basename", so it can be a program name with args.
10691 set dummy $tool_basename; ac_word=$2
10692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10693 $as_echo_n "checking for $ac_word... " >&6; }
10694 if ${ac_cv_path_UNIQ+:} false; then :
10695   $as_echo_n "(cached) " >&6
10696 else
10697   case $UNIQ in
10698   [\\/]* | ?:[\\/]*)
10699   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10700   ;;
10701   *)
10702   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10703 for as_dir in $PATH
10704 do
10705   IFS=$as_save_IFS
10706   test -z "$as_dir" && as_dir=.
10707     for ac_exec_ext in '' $ac_executable_extensions; do
10708   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10709     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10711     break 2
10712   fi
10713 done
10714   done
10715 IFS=$as_save_IFS
10716 
10717   ;;
10718 esac
10719 fi
10720 UNIQ=$ac_cv_path_UNIQ
10721 if test -n "$UNIQ"; then
10722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10723 $as_echo "$UNIQ" >&6; }
10724 else
10725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10726 $as_echo "no" >&6; }
10727 fi
10728 
10729 
10730         if test "x$UNIQ" = x; then
10731           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10732         fi
10733       else
10734         # Otherwise we believe it is a complete path. Use it as it is.
10735         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10736 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10737         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10738 $as_echo_n "checking for UNIQ... " >&6; }
10739         if test ! -x "$tool_specified"; then
10740           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10741 $as_echo "not found" >&6; }
10742           as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10743         fi
10744         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10745 $as_echo "$tool_specified" >&6; }
10746       fi
10747     fi
10748   fi
10749 
10750 
10751 
10752   if test "x$UNIQ" = x; then
10753     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10754   fi
10755 
10756 
10757 
10758 
10759 
10760   # Publish this variable in the help.
10761 
10762 
10763   if test "x$WC" = x; then
10764     # The variable is not set by user, try to locate tool using the code snippet
10765     for ac_prog in wc
10766 do
10767   # Extract the first word of "$ac_prog", so it can be a program name with args.
10768 set dummy $ac_prog; ac_word=$2
10769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10770 $as_echo_n "checking for $ac_word... " >&6; }
10771 if ${ac_cv_path_WC+:} false; then :
10772   $as_echo_n "(cached) " >&6
10773 else
10774   case $WC in
10775   [\\/]* | ?:[\\/]*)
10776   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10777   ;;
10778   *)
10779   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10780 for as_dir in $PATH
10781 do
10782   IFS=$as_save_IFS
10783   test -z "$as_dir" && as_dir=.
10784     for ac_exec_ext in '' $ac_executable_extensions; do
10785   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10786     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10787     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10788     break 2
10789   fi
10790 done
10791   done
10792 IFS=$as_save_IFS
10793 
10794   ;;
10795 esac
10796 fi
10797 WC=$ac_cv_path_WC
10798 if test -n "$WC"; then
10799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10800 $as_echo "$WC" >&6; }
10801 else
10802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10803 $as_echo "no" >&6; }
10804 fi
10805 
10806 
10807   test -n "$WC" && break
10808 done
10809 
10810   else
10811     # The variable is set, but is it from the command line or the environment?
10812 
10813     # Try to remove the string !WC! from our list.
10814     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10815     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10816       # If it failed, the variable was not from the command line. Ignore it,
10817       # but warn the user (except for BASH, which is always set by the calling BASH).
10818       if test "xWC" != xBASH; then
10819         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10820 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10821       fi
10822       # Try to locate tool using the code snippet
10823       for ac_prog in wc
10824 do
10825   # Extract the first word of "$ac_prog", so it can be a program name with args.
10826 set dummy $ac_prog; ac_word=$2
10827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10828 $as_echo_n "checking for $ac_word... " >&6; }
10829 if ${ac_cv_path_WC+:} false; then :
10830   $as_echo_n "(cached) " >&6
10831 else
10832   case $WC in
10833   [\\/]* | ?:[\\/]*)
10834   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10835   ;;
10836   *)
10837   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10838 for as_dir in $PATH
10839 do
10840   IFS=$as_save_IFS
10841   test -z "$as_dir" && as_dir=.
10842     for ac_exec_ext in '' $ac_executable_extensions; do
10843   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10844     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10846     break 2
10847   fi
10848 done
10849   done
10850 IFS=$as_save_IFS
10851 
10852   ;;
10853 esac
10854 fi
10855 WC=$ac_cv_path_WC
10856 if test -n "$WC"; then
10857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10858 $as_echo "$WC" >&6; }
10859 else
10860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10861 $as_echo "no" >&6; }
10862 fi
10863 
10864 
10865   test -n "$WC" && break
10866 done
10867 
10868     else
10869       # If it succeeded, then it was overridden by the user. We will use it
10870       # for the tool.
10871 
10872       # First remove it from the list of overridden variables, so we can test
10873       # for unknown variables in the end.
10874       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10875 
10876       # Check if the provided tool contains a complete path.
10877       tool_specified="$WC"
10878       tool_basename="${tool_specified##*/}"
10879       if test "x$tool_basename" = "x$tool_specified"; then
10880         # A command without a complete path is provided, search $PATH.
10881         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10882 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10883         # Extract the first word of "$tool_basename", so it can be a program name with args.
10884 set dummy $tool_basename; ac_word=$2
10885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10886 $as_echo_n "checking for $ac_word... " >&6; }
10887 if ${ac_cv_path_WC+:} false; then :
10888   $as_echo_n "(cached) " >&6
10889 else
10890   case $WC in
10891   [\\/]* | ?:[\\/]*)
10892   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10893   ;;
10894   *)
10895   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10896 for as_dir in $PATH
10897 do
10898   IFS=$as_save_IFS
10899   test -z "$as_dir" && as_dir=.
10900     for ac_exec_ext in '' $ac_executable_extensions; do
10901   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10902     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10903     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10904     break 2
10905   fi
10906 done
10907   done
10908 IFS=$as_save_IFS
10909 
10910   ;;
10911 esac
10912 fi
10913 WC=$ac_cv_path_WC
10914 if test -n "$WC"; then
10915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10916 $as_echo "$WC" >&6; }
10917 else
10918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10919 $as_echo "no" >&6; }
10920 fi
10921 
10922 
10923         if test "x$WC" = x; then
10924           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10925         fi
10926       else
10927         # Otherwise we believe it is a complete path. Use it as it is.
10928         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10929 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10930         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10931 $as_echo_n "checking for WC... " >&6; }
10932         if test ! -x "$tool_specified"; then
10933           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10934 $as_echo "not found" >&6; }
10935           as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10936         fi
10937         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10938 $as_echo "$tool_specified" >&6; }
10939       fi
10940     fi
10941   fi
10942 
10943 
10944 
10945   if test "x$WC" = x; then
10946     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10947   fi
10948 
10949 
10950 
10951 
10952 
10953   # Publish this variable in the help.
10954 
10955 
10956   if test "x$WHICH" = x; then
10957     # The variable is not set by user, try to locate tool using the code snippet
10958     for ac_prog in which
10959 do
10960   # Extract the first word of "$ac_prog", so it can be a program name with args.
10961 set dummy $ac_prog; ac_word=$2
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10963 $as_echo_n "checking for $ac_word... " >&6; }
10964 if ${ac_cv_path_WHICH+:} false; then :
10965   $as_echo_n "(cached) " >&6
10966 else
10967   case $WHICH in
10968   [\\/]* | ?:[\\/]*)
10969   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10970   ;;
10971   *)
10972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10973 for as_dir in $PATH
10974 do
10975   IFS=$as_save_IFS
10976   test -z "$as_dir" && as_dir=.
10977     for ac_exec_ext in '' $ac_executable_extensions; do
10978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10979     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10981     break 2
10982   fi
10983 done
10984   done
10985 IFS=$as_save_IFS
10986 
10987   ;;
10988 esac
10989 fi
10990 WHICH=$ac_cv_path_WHICH
10991 if test -n "$WHICH"; then
10992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10993 $as_echo "$WHICH" >&6; }
10994 else
10995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10996 $as_echo "no" >&6; }
10997 fi
10998 
10999 
11000   test -n "$WHICH" && break
11001 done
11002 
11003   else
11004     # The variable is set, but is it from the command line or the environment?
11005 
11006     # Try to remove the string !WHICH! from our list.
11007     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11008     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11009       # If it failed, the variable was not from the command line. Ignore it,
11010       # but warn the user (except for BASH, which is always set by the calling BASH).
11011       if test "xWHICH" != xBASH; then
11012         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11013 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11014       fi
11015       # Try to locate tool using the code snippet
11016       for ac_prog in which
11017 do
11018   # Extract the first word of "$ac_prog", so it can be a program name with args.
11019 set dummy $ac_prog; ac_word=$2
11020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11021 $as_echo_n "checking for $ac_word... " >&6; }
11022 if ${ac_cv_path_WHICH+:} false; then :
11023   $as_echo_n "(cached) " >&6
11024 else
11025   case $WHICH in
11026   [\\/]* | ?:[\\/]*)
11027   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11028   ;;
11029   *)
11030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11031 for as_dir in $PATH
11032 do
11033   IFS=$as_save_IFS
11034   test -z "$as_dir" && as_dir=.
11035     for ac_exec_ext in '' $ac_executable_extensions; do
11036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11037     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11039     break 2
11040   fi
11041 done
11042   done
11043 IFS=$as_save_IFS
11044 
11045   ;;
11046 esac
11047 fi
11048 WHICH=$ac_cv_path_WHICH
11049 if test -n "$WHICH"; then
11050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11051 $as_echo "$WHICH" >&6; }
11052 else
11053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11054 $as_echo "no" >&6; }
11055 fi
11056 
11057 
11058   test -n "$WHICH" && break
11059 done
11060 
11061     else
11062       # If it succeeded, then it was overridden by the user. We will use it
11063       # for the tool.
11064 
11065       # First remove it from the list of overridden variables, so we can test
11066       # for unknown variables in the end.
11067       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11068 
11069       # Check if the provided tool contains a complete path.
11070       tool_specified="$WHICH"
11071       tool_basename="${tool_specified##*/}"
11072       if test "x$tool_basename" = "x$tool_specified"; then
11073         # A command without a complete path is provided, search $PATH.
11074         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11075 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11076         # Extract the first word of "$tool_basename", so it can be a program name with args.
11077 set dummy $tool_basename; ac_word=$2
11078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11079 $as_echo_n "checking for $ac_word... " >&6; }
11080 if ${ac_cv_path_WHICH+:} false; then :
11081   $as_echo_n "(cached) " >&6
11082 else
11083   case $WHICH in
11084   [\\/]* | ?:[\\/]*)
11085   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11086   ;;
11087   *)
11088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11089 for as_dir in $PATH
11090 do
11091   IFS=$as_save_IFS
11092   test -z "$as_dir" && as_dir=.
11093     for ac_exec_ext in '' $ac_executable_extensions; do
11094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11095     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11097     break 2
11098   fi
11099 done
11100   done
11101 IFS=$as_save_IFS
11102 
11103   ;;
11104 esac
11105 fi
11106 WHICH=$ac_cv_path_WHICH
11107 if test -n "$WHICH"; then
11108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11109 $as_echo "$WHICH" >&6; }
11110 else
11111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11112 $as_echo "no" >&6; }
11113 fi
11114 
11115 
11116         if test "x$WHICH" = x; then
11117           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11118         fi
11119       else
11120         # Otherwise we believe it is a complete path. Use it as it is.
11121         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11122 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11123         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11124 $as_echo_n "checking for WHICH... " >&6; }
11125         if test ! -x "$tool_specified"; then
11126           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11127 $as_echo "not found" >&6; }
11128           as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11129         fi
11130         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11131 $as_echo "$tool_specified" >&6; }
11132       fi
11133     fi
11134   fi
11135 
11136 
11137 
11138   if test "x$WHICH" = x; then
11139     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11140   fi
11141 
11142 
11143 
11144 
11145 
11146   # Publish this variable in the help.
11147 
11148 
11149   if test "x$XARGS" = x; then
11150     # The variable is not set by user, try to locate tool using the code snippet
11151     for ac_prog in xargs
11152 do
11153   # Extract the first word of "$ac_prog", so it can be a program name with args.
11154 set dummy $ac_prog; ac_word=$2
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11156 $as_echo_n "checking for $ac_word... " >&6; }
11157 if ${ac_cv_path_XARGS+:} false; then :
11158   $as_echo_n "(cached) " >&6
11159 else
11160   case $XARGS in
11161   [\\/]* | ?:[\\/]*)
11162   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11163   ;;
11164   *)
11165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11166 for as_dir in $PATH
11167 do
11168   IFS=$as_save_IFS
11169   test -z "$as_dir" && as_dir=.
11170     for ac_exec_ext in '' $ac_executable_extensions; do
11171   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11172     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11174     break 2
11175   fi
11176 done
11177   done
11178 IFS=$as_save_IFS
11179 
11180   ;;
11181 esac
11182 fi
11183 XARGS=$ac_cv_path_XARGS
11184 if test -n "$XARGS"; then
11185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11186 $as_echo "$XARGS" >&6; }
11187 else
11188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11189 $as_echo "no" >&6; }
11190 fi
11191 
11192 
11193   test -n "$XARGS" && break
11194 done
11195 
11196   else
11197     # The variable is set, but is it from the command line or the environment?
11198 
11199     # Try to remove the string !XARGS! from our list.
11200     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11201     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11202       # If it failed, the variable was not from the command line. Ignore it,
11203       # but warn the user (except for BASH, which is always set by the calling BASH).
11204       if test "xXARGS" != xBASH; then
11205         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11206 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11207       fi
11208       # Try to locate tool using the code snippet
11209       for ac_prog in xargs
11210 do
11211   # Extract the first word of "$ac_prog", so it can be a program name with args.
11212 set dummy $ac_prog; ac_word=$2
11213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11214 $as_echo_n "checking for $ac_word... " >&6; }
11215 if ${ac_cv_path_XARGS+:} false; then :
11216   $as_echo_n "(cached) " >&6
11217 else
11218   case $XARGS in
11219   [\\/]* | ?:[\\/]*)
11220   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11221   ;;
11222   *)
11223   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11224 for as_dir in $PATH
11225 do
11226   IFS=$as_save_IFS
11227   test -z "$as_dir" && as_dir=.
11228     for ac_exec_ext in '' $ac_executable_extensions; do
11229   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11230     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11231     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11232     break 2
11233   fi
11234 done
11235   done
11236 IFS=$as_save_IFS
11237 
11238   ;;
11239 esac
11240 fi
11241 XARGS=$ac_cv_path_XARGS
11242 if test -n "$XARGS"; then
11243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11244 $as_echo "$XARGS" >&6; }
11245 else
11246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11247 $as_echo "no" >&6; }
11248 fi
11249 
11250 
11251   test -n "$XARGS" && break
11252 done
11253 
11254     else
11255       # If it succeeded, then it was overridden by the user. We will use it
11256       # for the tool.
11257 
11258       # First remove it from the list of overridden variables, so we can test
11259       # for unknown variables in the end.
11260       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11261 
11262       # Check if the provided tool contains a complete path.
11263       tool_specified="$XARGS"
11264       tool_basename="${tool_specified##*/}"
11265       if test "x$tool_basename" = "x$tool_specified"; then
11266         # A command without a complete path is provided, search $PATH.
11267         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11268 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11269         # Extract the first word of "$tool_basename", so it can be a program name with args.
11270 set dummy $tool_basename; ac_word=$2
11271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11272 $as_echo_n "checking for $ac_word... " >&6; }
11273 if ${ac_cv_path_XARGS+:} false; then :
11274   $as_echo_n "(cached) " >&6
11275 else
11276   case $XARGS in
11277   [\\/]* | ?:[\\/]*)
11278   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11279   ;;
11280   *)
11281   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11282 for as_dir in $PATH
11283 do
11284   IFS=$as_save_IFS
11285   test -z "$as_dir" && as_dir=.
11286     for ac_exec_ext in '' $ac_executable_extensions; do
11287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11288     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11290     break 2
11291   fi
11292 done
11293   done
11294 IFS=$as_save_IFS
11295 
11296   ;;
11297 esac
11298 fi
11299 XARGS=$ac_cv_path_XARGS
11300 if test -n "$XARGS"; then
11301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11302 $as_echo "$XARGS" >&6; }
11303 else
11304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11305 $as_echo "no" >&6; }
11306 fi
11307 
11308 
11309         if test "x$XARGS" = x; then
11310           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11311         fi
11312       else
11313         # Otherwise we believe it is a complete path. Use it as it is.
11314         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11315 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11316         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11317 $as_echo_n "checking for XARGS... " >&6; }
11318         if test ! -x "$tool_specified"; then
11319           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11320 $as_echo "not found" >&6; }
11321           as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11322         fi
11323         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11324 $as_echo "$tool_specified" >&6; }
11325       fi
11326     fi
11327   fi
11328 
11329 
11330 
11331   if test "x$XARGS" = x; then
11332     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11333   fi
11334 
11335 
11336 
11337   # Then required tools that require some special treatment.
11338 
11339 
11340   # Publish this variable in the help.
11341 
11342 
11343   if test "x$AWK" = x; then
11344     # The variable is not set by user, try to locate tool using the code snippet
11345     for ac_prog in gawk mawk nawk awk
11346 do
11347   # Extract the first word of "$ac_prog", so it can be a program name with args.
11348 set dummy $ac_prog; ac_word=$2
11349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11350 $as_echo_n "checking for $ac_word... " >&6; }
11351 if ${ac_cv_prog_AWK+:} false; then :
11352   $as_echo_n "(cached) " >&6
11353 else
11354   if test -n "$AWK"; then
11355   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11356 else
11357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11358 for as_dir in $PATH
11359 do
11360   IFS=$as_save_IFS
11361   test -z "$as_dir" && as_dir=.
11362     for ac_exec_ext in '' $ac_executable_extensions; do
11363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11364     ac_cv_prog_AWK="$ac_prog"
11365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11366     break 2
11367   fi
11368 done
11369   done
11370 IFS=$as_save_IFS
11371 
11372 fi
11373 fi
11374 AWK=$ac_cv_prog_AWK
11375 if test -n "$AWK"; then
11376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11377 $as_echo "$AWK" >&6; }
11378 else
11379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11380 $as_echo "no" >&6; }
11381 fi
11382 
11383 
11384   test -n "$AWK" && break
11385 done
11386 
11387   else
11388     # The variable is set, but is it from the command line or the environment?
11389 
11390     # Try to remove the string !AWK! from our list.
11391     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11392     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11393       # If it failed, the variable was not from the command line. Ignore it,
11394       # but warn the user (except for BASH, which is always set by the calling BASH).
11395       if test "xAWK" != xBASH; then
11396         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11397 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11398       fi
11399       # Try to locate tool using the code snippet
11400       for ac_prog in gawk mawk nawk awk
11401 do
11402   # Extract the first word of "$ac_prog", so it can be a program name with args.
11403 set dummy $ac_prog; ac_word=$2
11404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11405 $as_echo_n "checking for $ac_word... " >&6; }
11406 if ${ac_cv_prog_AWK+:} false; then :
11407   $as_echo_n "(cached) " >&6
11408 else
11409   if test -n "$AWK"; then
11410   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11411 else
11412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11413 for as_dir in $PATH
11414 do
11415   IFS=$as_save_IFS
11416   test -z "$as_dir" && as_dir=.
11417     for ac_exec_ext in '' $ac_executable_extensions; do
11418   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11419     ac_cv_prog_AWK="$ac_prog"
11420     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11421     break 2
11422   fi
11423 done
11424   done
11425 IFS=$as_save_IFS
11426 
11427 fi
11428 fi
11429 AWK=$ac_cv_prog_AWK
11430 if test -n "$AWK"; then
11431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11432 $as_echo "$AWK" >&6; }
11433 else
11434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11435 $as_echo "no" >&6; }
11436 fi
11437 
11438 
11439   test -n "$AWK" && break
11440 done
11441 
11442     else
11443       # If it succeeded, then it was overridden by the user. We will use it
11444       # for the tool.
11445 
11446       # First remove it from the list of overridden variables, so we can test
11447       # for unknown variables in the end.
11448       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11449 
11450       # Check if the provided tool contains a complete path.
11451       tool_specified="$AWK"
11452       tool_basename="${tool_specified##*/}"
11453       if test "x$tool_basename" = "x$tool_specified"; then
11454         # A command without a complete path is provided, search $PATH.
11455         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11456 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11457         # Extract the first word of "$tool_basename", so it can be a program name with args.
11458 set dummy $tool_basename; ac_word=$2
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11460 $as_echo_n "checking for $ac_word... " >&6; }
11461 if ${ac_cv_path_AWK+:} false; then :
11462   $as_echo_n "(cached) " >&6
11463 else
11464   case $AWK in
11465   [\\/]* | ?:[\\/]*)
11466   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11467   ;;
11468   *)
11469   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11470 for as_dir in $PATH
11471 do
11472   IFS=$as_save_IFS
11473   test -z "$as_dir" && as_dir=.
11474     for ac_exec_ext in '' $ac_executable_extensions; do
11475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11476     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11478     break 2
11479   fi
11480 done
11481   done
11482 IFS=$as_save_IFS
11483 
11484   ;;
11485 esac
11486 fi
11487 AWK=$ac_cv_path_AWK
11488 if test -n "$AWK"; then
11489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11490 $as_echo "$AWK" >&6; }
11491 else
11492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11493 $as_echo "no" >&6; }
11494 fi
11495 
11496 
11497         if test "x$AWK" = x; then
11498           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11499         fi
11500       else
11501         # Otherwise we believe it is a complete path. Use it as it is.
11502         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11503 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11504         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11505 $as_echo_n "checking for AWK... " >&6; }
11506         if test ! -x "$tool_specified"; then
11507           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11508 $as_echo "not found" >&6; }
11509           as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11510         fi
11511         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11512 $as_echo "$tool_specified" >&6; }
11513       fi
11514     fi
11515   fi
11516 
11517 
11518   if test "x$AWK" = x; then
11519     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11520   fi
11521 
11522 
11523 
11524 
11525   # Publish this variable in the help.
11526 
11527 
11528   if test "x$GREP" = x; then
11529     # The variable is not set by user, try to locate tool using the code snippet
11530     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11531 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11532 if ${ac_cv_path_GREP+:} false; then :
11533   $as_echo_n "(cached) " >&6
11534 else
11535   if test -z "$GREP"; then
11536   ac_path_GREP_found=false
11537   # Loop through the user's path and test for each of PROGNAME-LIST
11538   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11539 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11540 do
11541   IFS=$as_save_IFS
11542   test -z "$as_dir" && as_dir=.
11543     for ac_prog in grep ggrep; do
11544     for ac_exec_ext in '' $ac_executable_extensions; do
11545       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11546       as_fn_executable_p "$ac_path_GREP" || continue
11547 # Check for GNU ac_path_GREP and select it if it is found.
11548   # Check for GNU $ac_path_GREP
11549 case `"$ac_path_GREP" --version 2>&1` in
11550 *GNU*)
11551   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11552 *)
11553   ac_count=0
11554   $as_echo_n 0123456789 >"conftest.in"
11555   while :
11556   do
11557     cat "conftest.in" "conftest.in" >"conftest.tmp"
11558     mv "conftest.tmp" "conftest.in"
11559     cp "conftest.in" "conftest.nl"
11560     $as_echo 'GREP' >> "conftest.nl"
11561     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11562     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11563     as_fn_arith $ac_count + 1 && ac_count=$as_val
11564     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11565       # Best one so far, save it but keep looking for a better one
11566       ac_cv_path_GREP="$ac_path_GREP"
11567       ac_path_GREP_max=$ac_count
11568     fi
11569     # 10*(2^10) chars as input seems more than enough
11570     test $ac_count -gt 10 && break
11571   done
11572   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11573 esac
11574 
11575       $ac_path_GREP_found && break 3
11576     done
11577   done
11578   done
11579 IFS=$as_save_IFS
11580   if test -z "$ac_cv_path_GREP"; then
11581     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11582   fi
11583 else
11584   ac_cv_path_GREP=$GREP
11585 fi
11586 
11587 fi
11588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11589 $as_echo "$ac_cv_path_GREP" >&6; }
11590  GREP="$ac_cv_path_GREP"
11591 
11592 
11593   else
11594     # The variable is set, but is it from the command line or the environment?
11595 
11596     # Try to remove the string !GREP! from our list.
11597     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11598     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11599       # If it failed, the variable was not from the command line. Ignore it,
11600       # but warn the user (except for BASH, which is always set by the calling BASH).
11601       if test "xGREP" != xBASH; then
11602         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11603 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11604       fi
11605       # Try to locate tool using the code snippet
11606       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11607 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11608 if ${ac_cv_path_GREP+:} false; then :
11609   $as_echo_n "(cached) " >&6
11610 else
11611   if test -z "$GREP"; then
11612   ac_path_GREP_found=false
11613   # Loop through the user's path and test for each of PROGNAME-LIST
11614   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11615 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11616 do
11617   IFS=$as_save_IFS
11618   test -z "$as_dir" && as_dir=.
11619     for ac_prog in grep ggrep; do
11620     for ac_exec_ext in '' $ac_executable_extensions; do
11621       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11622       as_fn_executable_p "$ac_path_GREP" || continue
11623 # Check for GNU ac_path_GREP and select it if it is found.
11624   # Check for GNU $ac_path_GREP
11625 case `"$ac_path_GREP" --version 2>&1` in
11626 *GNU*)
11627   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11628 *)
11629   ac_count=0
11630   $as_echo_n 0123456789 >"conftest.in"
11631   while :
11632   do
11633     cat "conftest.in" "conftest.in" >"conftest.tmp"
11634     mv "conftest.tmp" "conftest.in"
11635     cp "conftest.in" "conftest.nl"
11636     $as_echo 'GREP' >> "conftest.nl"
11637     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11638     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11639     as_fn_arith $ac_count + 1 && ac_count=$as_val
11640     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11641       # Best one so far, save it but keep looking for a better one
11642       ac_cv_path_GREP="$ac_path_GREP"
11643       ac_path_GREP_max=$ac_count
11644     fi
11645     # 10*(2^10) chars as input seems more than enough
11646     test $ac_count -gt 10 && break
11647   done
11648   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11649 esac
11650 
11651       $ac_path_GREP_found && break 3
11652     done
11653   done
11654   done
11655 IFS=$as_save_IFS
11656   if test -z "$ac_cv_path_GREP"; then
11657     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11658   fi
11659 else
11660   ac_cv_path_GREP=$GREP
11661 fi
11662 
11663 fi
11664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11665 $as_echo "$ac_cv_path_GREP" >&6; }
11666  GREP="$ac_cv_path_GREP"
11667 
11668 
11669     else
11670       # If it succeeded, then it was overridden by the user. We will use it
11671       # for the tool.
11672 
11673       # First remove it from the list of overridden variables, so we can test
11674       # for unknown variables in the end.
11675       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11676 
11677       # Check if the provided tool contains a complete path.
11678       tool_specified="$GREP"
11679       tool_basename="${tool_specified##*/}"
11680       if test "x$tool_basename" = "x$tool_specified"; then
11681         # A command without a complete path is provided, search $PATH.
11682         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11683 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11684         # Extract the first word of "$tool_basename", so it can be a program name with args.
11685 set dummy $tool_basename; ac_word=$2
11686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11687 $as_echo_n "checking for $ac_word... " >&6; }
11688 if ${ac_cv_path_GREP+:} false; then :
11689   $as_echo_n "(cached) " >&6
11690 else
11691   case $GREP in
11692   [\\/]* | ?:[\\/]*)
11693   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11694   ;;
11695   *)
11696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11697 for as_dir in $PATH
11698 do
11699   IFS=$as_save_IFS
11700   test -z "$as_dir" && as_dir=.
11701     for ac_exec_ext in '' $ac_executable_extensions; do
11702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11703     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11705     break 2
11706   fi
11707 done
11708   done
11709 IFS=$as_save_IFS
11710 
11711   ;;
11712 esac
11713 fi
11714 GREP=$ac_cv_path_GREP
11715 if test -n "$GREP"; then
11716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11717 $as_echo "$GREP" >&6; }
11718 else
11719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11720 $as_echo "no" >&6; }
11721 fi
11722 
11723 
11724         if test "x$GREP" = x; then
11725           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11726         fi
11727       else
11728         # Otherwise we believe it is a complete path. Use it as it is.
11729         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11730 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11731         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11732 $as_echo_n "checking for GREP... " >&6; }
11733         if test ! -x "$tool_specified"; then
11734           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11735 $as_echo "not found" >&6; }
11736           as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11737         fi
11738         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11739 $as_echo "$tool_specified" >&6; }
11740       fi
11741     fi
11742   fi
11743 
11744 
11745   if test "x$GREP" = x; then
11746     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11747   fi
11748 
11749 
11750 
11751 
11752   # Publish this variable in the help.
11753 
11754 
11755   if test "x$EGREP" = x; then
11756     # The variable is not set by user, try to locate tool using the code snippet
11757     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11758 $as_echo_n "checking for egrep... " >&6; }
11759 if ${ac_cv_path_EGREP+:} false; then :
11760   $as_echo_n "(cached) " >&6
11761 else
11762   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11763    then ac_cv_path_EGREP="$GREP -E"
11764    else
11765      if test -z "$EGREP"; then
11766   ac_path_EGREP_found=false
11767   # Loop through the user's path and test for each of PROGNAME-LIST
11768   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11769 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11770 do
11771   IFS=$as_save_IFS
11772   test -z "$as_dir" && as_dir=.
11773     for ac_prog in egrep; do
11774     for ac_exec_ext in '' $ac_executable_extensions; do
11775       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11776       as_fn_executable_p "$ac_path_EGREP" || continue
11777 # Check for GNU ac_path_EGREP and select it if it is found.
11778   # Check for GNU $ac_path_EGREP
11779 case `"$ac_path_EGREP" --version 2>&1` in
11780 *GNU*)
11781   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11782 *)
11783   ac_count=0
11784   $as_echo_n 0123456789 >"conftest.in"
11785   while :
11786   do
11787     cat "conftest.in" "conftest.in" >"conftest.tmp"
11788     mv "conftest.tmp" "conftest.in"
11789     cp "conftest.in" "conftest.nl"
11790     $as_echo 'EGREP' >> "conftest.nl"
11791     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11792     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11793     as_fn_arith $ac_count + 1 && ac_count=$as_val
11794     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11795       # Best one so far, save it but keep looking for a better one
11796       ac_cv_path_EGREP="$ac_path_EGREP"
11797       ac_path_EGREP_max=$ac_count
11798     fi
11799     # 10*(2^10) chars as input seems more than enough
11800     test $ac_count -gt 10 && break
11801   done
11802   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11803 esac
11804 
11805       $ac_path_EGREP_found && break 3
11806     done
11807   done
11808   done
11809 IFS=$as_save_IFS
11810   if test -z "$ac_cv_path_EGREP"; then
11811     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11812   fi
11813 else
11814   ac_cv_path_EGREP=$EGREP
11815 fi
11816 
11817    fi
11818 fi
11819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11820 $as_echo "$ac_cv_path_EGREP" >&6; }
11821  EGREP="$ac_cv_path_EGREP"
11822 
11823 
11824   else
11825     # The variable is set, but is it from the command line or the environment?
11826 
11827     # Try to remove the string !EGREP! from our list.
11828     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11829     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11830       # If it failed, the variable was not from the command line. Ignore it,
11831       # but warn the user (except for BASH, which is always set by the calling BASH).
11832       if test "xEGREP" != xBASH; then
11833         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11834 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11835       fi
11836       # Try to locate tool using the code snippet
11837       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11838 $as_echo_n "checking for egrep... " >&6; }
11839 if ${ac_cv_path_EGREP+:} false; then :
11840   $as_echo_n "(cached) " >&6
11841 else
11842   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11843    then ac_cv_path_EGREP="$GREP -E"
11844    else
11845      if test -z "$EGREP"; then
11846   ac_path_EGREP_found=false
11847   # Loop through the user's path and test for each of PROGNAME-LIST
11848   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11849 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11850 do
11851   IFS=$as_save_IFS
11852   test -z "$as_dir" && as_dir=.
11853     for ac_prog in egrep; do
11854     for ac_exec_ext in '' $ac_executable_extensions; do
11855       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11856       as_fn_executable_p "$ac_path_EGREP" || continue
11857 # Check for GNU ac_path_EGREP and select it if it is found.
11858   # Check for GNU $ac_path_EGREP
11859 case `"$ac_path_EGREP" --version 2>&1` in
11860 *GNU*)
11861   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11862 *)
11863   ac_count=0
11864   $as_echo_n 0123456789 >"conftest.in"
11865   while :
11866   do
11867     cat "conftest.in" "conftest.in" >"conftest.tmp"
11868     mv "conftest.tmp" "conftest.in"
11869     cp "conftest.in" "conftest.nl"
11870     $as_echo 'EGREP' >> "conftest.nl"
11871     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11872     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11873     as_fn_arith $ac_count + 1 && ac_count=$as_val
11874     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11875       # Best one so far, save it but keep looking for a better one
11876       ac_cv_path_EGREP="$ac_path_EGREP"
11877       ac_path_EGREP_max=$ac_count
11878     fi
11879     # 10*(2^10) chars as input seems more than enough
11880     test $ac_count -gt 10 && break
11881   done
11882   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11883 esac
11884 
11885       $ac_path_EGREP_found && break 3
11886     done
11887   done
11888   done
11889 IFS=$as_save_IFS
11890   if test -z "$ac_cv_path_EGREP"; then
11891     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11892   fi
11893 else
11894   ac_cv_path_EGREP=$EGREP
11895 fi
11896 
11897    fi
11898 fi
11899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11900 $as_echo "$ac_cv_path_EGREP" >&6; }
11901  EGREP="$ac_cv_path_EGREP"
11902 
11903 
11904     else
11905       # If it succeeded, then it was overridden by the user. We will use it
11906       # for the tool.
11907 
11908       # First remove it from the list of overridden variables, so we can test
11909       # for unknown variables in the end.
11910       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11911 
11912       # Check if the provided tool contains a complete path.
11913       tool_specified="$EGREP"
11914       tool_basename="${tool_specified##*/}"
11915       if test "x$tool_basename" = "x$tool_specified"; then
11916         # A command without a complete path is provided, search $PATH.
11917         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11918 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11919         # Extract the first word of "$tool_basename", so it can be a program name with args.
11920 set dummy $tool_basename; ac_word=$2
11921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11922 $as_echo_n "checking for $ac_word... " >&6; }
11923 if ${ac_cv_path_EGREP+:} false; then :
11924   $as_echo_n "(cached) " >&6
11925 else
11926   case $EGREP in
11927   [\\/]* | ?:[\\/]*)
11928   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11929   ;;
11930   *)
11931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11932 for as_dir in $PATH
11933 do
11934   IFS=$as_save_IFS
11935   test -z "$as_dir" && as_dir=.
11936     for ac_exec_ext in '' $ac_executable_extensions; do
11937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11938     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11940     break 2
11941   fi
11942 done
11943   done
11944 IFS=$as_save_IFS
11945 
11946   ;;
11947 esac
11948 fi
11949 EGREP=$ac_cv_path_EGREP
11950 if test -n "$EGREP"; then
11951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11952 $as_echo "$EGREP" >&6; }
11953 else
11954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11955 $as_echo "no" >&6; }
11956 fi
11957 
11958 
11959         if test "x$EGREP" = x; then
11960           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11961         fi
11962       else
11963         # Otherwise we believe it is a complete path. Use it as it is.
11964         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11965 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11966         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11967 $as_echo_n "checking for EGREP... " >&6; }
11968         if test ! -x "$tool_specified"; then
11969           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11970 $as_echo "not found" >&6; }
11971           as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11972         fi
11973         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11974 $as_echo "$tool_specified" >&6; }
11975       fi
11976     fi
11977   fi
11978 
11979 
11980   if test "x$EGREP" = x; then
11981     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11982   fi
11983 
11984 
11985 
11986 
11987   # Publish this variable in the help.
11988 
11989 
11990   if test "x$FGREP" = x; then
11991     # The variable is not set by user, try to locate tool using the code snippet
11992     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11993 $as_echo_n "checking for fgrep... " >&6; }
11994 if ${ac_cv_path_FGREP+:} false; then :
11995   $as_echo_n "(cached) " >&6
11996 else
11997   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11998    then ac_cv_path_FGREP="$GREP -F"
11999    else
12000      if test -z "$FGREP"; then
12001   ac_path_FGREP_found=false
12002   # Loop through the user's path and test for each of PROGNAME-LIST
12003   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12004 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12005 do
12006   IFS=$as_save_IFS
12007   test -z "$as_dir" && as_dir=.
12008     for ac_prog in fgrep; do
12009     for ac_exec_ext in '' $ac_executable_extensions; do
12010       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12011       as_fn_executable_p "$ac_path_FGREP" || continue
12012 # Check for GNU ac_path_FGREP and select it if it is found.
12013   # Check for GNU $ac_path_FGREP
12014 case `"$ac_path_FGREP" --version 2>&1` in
12015 *GNU*)
12016   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12017 *)
12018   ac_count=0
12019   $as_echo_n 0123456789 >"conftest.in"
12020   while :
12021   do
12022     cat "conftest.in" "conftest.in" >"conftest.tmp"
12023     mv "conftest.tmp" "conftest.in"
12024     cp "conftest.in" "conftest.nl"
12025     $as_echo 'FGREP' >> "conftest.nl"
12026     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12027     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12028     as_fn_arith $ac_count + 1 && ac_count=$as_val
12029     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12030       # Best one so far, save it but keep looking for a better one
12031       ac_cv_path_FGREP="$ac_path_FGREP"
12032       ac_path_FGREP_max=$ac_count
12033     fi
12034     # 10*(2^10) chars as input seems more than enough
12035     test $ac_count -gt 10 && break
12036   done
12037   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12038 esac
12039 
12040       $ac_path_FGREP_found && break 3
12041     done
12042   done
12043   done
12044 IFS=$as_save_IFS
12045   if test -z "$ac_cv_path_FGREP"; then
12046     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12047   fi
12048 else
12049   ac_cv_path_FGREP=$FGREP
12050 fi
12051 
12052    fi
12053 fi
12054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12055 $as_echo "$ac_cv_path_FGREP" >&6; }
12056  FGREP="$ac_cv_path_FGREP"
12057 
12058 
12059   else
12060     # The variable is set, but is it from the command line or the environment?
12061 
12062     # Try to remove the string !FGREP! from our list.
12063     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12064     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12065       # If it failed, the variable was not from the command line. Ignore it,
12066       # but warn the user (except for BASH, which is always set by the calling BASH).
12067       if test "xFGREP" != xBASH; then
12068         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12069 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12070       fi
12071       # Try to locate tool using the code snippet
12072       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12073 $as_echo_n "checking for fgrep... " >&6; }
12074 if ${ac_cv_path_FGREP+:} false; then :
12075   $as_echo_n "(cached) " >&6
12076 else
12077   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12078    then ac_cv_path_FGREP="$GREP -F"
12079    else
12080      if test -z "$FGREP"; then
12081   ac_path_FGREP_found=false
12082   # Loop through the user's path and test for each of PROGNAME-LIST
12083   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12084 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12085 do
12086   IFS=$as_save_IFS
12087   test -z "$as_dir" && as_dir=.
12088     for ac_prog in fgrep; do
12089     for ac_exec_ext in '' $ac_executable_extensions; do
12090       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12091       as_fn_executable_p "$ac_path_FGREP" || continue
12092 # Check for GNU ac_path_FGREP and select it if it is found.
12093   # Check for GNU $ac_path_FGREP
12094 case `"$ac_path_FGREP" --version 2>&1` in
12095 *GNU*)
12096   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12097 *)
12098   ac_count=0
12099   $as_echo_n 0123456789 >"conftest.in"
12100   while :
12101   do
12102     cat "conftest.in" "conftest.in" >"conftest.tmp"
12103     mv "conftest.tmp" "conftest.in"
12104     cp "conftest.in" "conftest.nl"
12105     $as_echo 'FGREP' >> "conftest.nl"
12106     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12107     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12108     as_fn_arith $ac_count + 1 && ac_count=$as_val
12109     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12110       # Best one so far, save it but keep looking for a better one
12111       ac_cv_path_FGREP="$ac_path_FGREP"
12112       ac_path_FGREP_max=$ac_count
12113     fi
12114     # 10*(2^10) chars as input seems more than enough
12115     test $ac_count -gt 10 && break
12116   done
12117   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12118 esac
12119 
12120       $ac_path_FGREP_found && break 3
12121     done
12122   done
12123   done
12124 IFS=$as_save_IFS
12125   if test -z "$ac_cv_path_FGREP"; then
12126     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12127   fi
12128 else
12129   ac_cv_path_FGREP=$FGREP
12130 fi
12131 
12132    fi
12133 fi
12134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12135 $as_echo "$ac_cv_path_FGREP" >&6; }
12136  FGREP="$ac_cv_path_FGREP"
12137 
12138 
12139     else
12140       # If it succeeded, then it was overridden by the user. We will use it
12141       # for the tool.
12142 
12143       # First remove it from the list of overridden variables, so we can test
12144       # for unknown variables in the end.
12145       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12146 
12147       # Check if the provided tool contains a complete path.
12148       tool_specified="$FGREP"
12149       tool_basename="${tool_specified##*/}"
12150       if test "x$tool_basename" = "x$tool_specified"; then
12151         # A command without a complete path is provided, search $PATH.
12152         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12153 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12154         # Extract the first word of "$tool_basename", so it can be a program name with args.
12155 set dummy $tool_basename; ac_word=$2
12156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12157 $as_echo_n "checking for $ac_word... " >&6; }
12158 if ${ac_cv_path_FGREP+:} false; then :
12159   $as_echo_n "(cached) " >&6
12160 else
12161   case $FGREP in
12162   [\\/]* | ?:[\\/]*)
12163   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12164   ;;
12165   *)
12166   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12167 for as_dir in $PATH
12168 do
12169   IFS=$as_save_IFS
12170   test -z "$as_dir" && as_dir=.
12171     for ac_exec_ext in '' $ac_executable_extensions; do
12172   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12173     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12175     break 2
12176   fi
12177 done
12178   done
12179 IFS=$as_save_IFS
12180 
12181   ;;
12182 esac
12183 fi
12184 FGREP=$ac_cv_path_FGREP
12185 if test -n "$FGREP"; then
12186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12187 $as_echo "$FGREP" >&6; }
12188 else
12189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12190 $as_echo "no" >&6; }
12191 fi
12192 
12193 
12194         if test "x$FGREP" = x; then
12195           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12196         fi
12197       else
12198         # Otherwise we believe it is a complete path. Use it as it is.
12199         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12200 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12201         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12202 $as_echo_n "checking for FGREP... " >&6; }
12203         if test ! -x "$tool_specified"; then
12204           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12205 $as_echo "not found" >&6; }
12206           as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12207         fi
12208         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12209 $as_echo "$tool_specified" >&6; }
12210       fi
12211     fi
12212   fi
12213 
12214 
12215   if test "x$FGREP" = x; then
12216     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12217   fi
12218 
12219 
12220 
12221 
12222   # Publish this variable in the help.
12223 
12224 
12225   if test "x$SED" = x; then
12226     # The variable is not set by user, try to locate tool using the code snippet
12227     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12228 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12229 if ${ac_cv_path_SED+:} false; then :
12230   $as_echo_n "(cached) " >&6
12231 else
12232             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12233      for ac_i in 1 2 3 4 5 6 7; do
12234        ac_script="$ac_script$as_nl$ac_script"
12235      done
12236      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12237      { ac_script=; unset ac_script;}
12238      if test -z "$SED"; then
12239   ac_path_SED_found=false
12240   # Loop through the user's path and test for each of PROGNAME-LIST
12241   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12242 for as_dir in $PATH
12243 do
12244   IFS=$as_save_IFS
12245   test -z "$as_dir" && as_dir=.
12246     for ac_prog in sed gsed; do
12247     for ac_exec_ext in '' $ac_executable_extensions; do
12248       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12249       as_fn_executable_p "$ac_path_SED" || continue
12250 # Check for GNU ac_path_SED and select it if it is found.
12251   # Check for GNU $ac_path_SED
12252 case `"$ac_path_SED" --version 2>&1` in
12253 *GNU*)
12254   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12255 *)
12256   ac_count=0
12257   $as_echo_n 0123456789 >"conftest.in"
12258   while :
12259   do
12260     cat "conftest.in" "conftest.in" >"conftest.tmp"
12261     mv "conftest.tmp" "conftest.in"
12262     cp "conftest.in" "conftest.nl"
12263     $as_echo '' >> "conftest.nl"
12264     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12265     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12266     as_fn_arith $ac_count + 1 && ac_count=$as_val
12267     if test $ac_count -gt ${ac_path_SED_max-0}; then
12268       # Best one so far, save it but keep looking for a better one
12269       ac_cv_path_SED="$ac_path_SED"
12270       ac_path_SED_max=$ac_count
12271     fi
12272     # 10*(2^10) chars as input seems more than enough
12273     test $ac_count -gt 10 && break
12274   done
12275   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12276 esac
12277 
12278       $ac_path_SED_found && break 3
12279     done
12280   done
12281   done
12282 IFS=$as_save_IFS
12283   if test -z "$ac_cv_path_SED"; then
12284     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12285   fi
12286 else
12287   ac_cv_path_SED=$SED
12288 fi
12289 
12290 fi
12291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12292 $as_echo "$ac_cv_path_SED" >&6; }
12293  SED="$ac_cv_path_SED"
12294   rm -f conftest.sed
12295 
12296   else
12297     # The variable is set, but is it from the command line or the environment?
12298 
12299     # Try to remove the string !SED! from our list.
12300     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12301     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12302       # If it failed, the variable was not from the command line. Ignore it,
12303       # but warn the user (except for BASH, which is always set by the calling BASH).
12304       if test "xSED" != xBASH; then
12305         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12306 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12307       fi
12308       # Try to locate tool using the code snippet
12309       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12310 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12311 if ${ac_cv_path_SED+:} false; then :
12312   $as_echo_n "(cached) " >&6
12313 else
12314             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12315      for ac_i in 1 2 3 4 5 6 7; do
12316        ac_script="$ac_script$as_nl$ac_script"
12317      done
12318      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12319      { ac_script=; unset ac_script;}
12320      if test -z "$SED"; then
12321   ac_path_SED_found=false
12322   # Loop through the user's path and test for each of PROGNAME-LIST
12323   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12324 for as_dir in $PATH
12325 do
12326   IFS=$as_save_IFS
12327   test -z "$as_dir" && as_dir=.
12328     for ac_prog in sed gsed; do
12329     for ac_exec_ext in '' $ac_executable_extensions; do
12330       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12331       as_fn_executable_p "$ac_path_SED" || continue
12332 # Check for GNU ac_path_SED and select it if it is found.
12333   # Check for GNU $ac_path_SED
12334 case `"$ac_path_SED" --version 2>&1` in
12335 *GNU*)
12336   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12337 *)
12338   ac_count=0
12339   $as_echo_n 0123456789 >"conftest.in"
12340   while :
12341   do
12342     cat "conftest.in" "conftest.in" >"conftest.tmp"
12343     mv "conftest.tmp" "conftest.in"
12344     cp "conftest.in" "conftest.nl"
12345     $as_echo '' >> "conftest.nl"
12346     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12347     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12348     as_fn_arith $ac_count + 1 && ac_count=$as_val
12349     if test $ac_count -gt ${ac_path_SED_max-0}; then
12350       # Best one so far, save it but keep looking for a better one
12351       ac_cv_path_SED="$ac_path_SED"
12352       ac_path_SED_max=$ac_count
12353     fi
12354     # 10*(2^10) chars as input seems more than enough
12355     test $ac_count -gt 10 && break
12356   done
12357   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12358 esac
12359 
12360       $ac_path_SED_found && break 3
12361     done
12362   done
12363   done
12364 IFS=$as_save_IFS
12365   if test -z "$ac_cv_path_SED"; then
12366     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12367   fi
12368 else
12369   ac_cv_path_SED=$SED
12370 fi
12371 
12372 fi
12373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12374 $as_echo "$ac_cv_path_SED" >&6; }
12375  SED="$ac_cv_path_SED"
12376   rm -f conftest.sed
12377 
12378     else
12379       # If it succeeded, then it was overridden by the user. We will use it
12380       # for the tool.
12381 
12382       # First remove it from the list of overridden variables, so we can test
12383       # for unknown variables in the end.
12384       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12385 
12386       # Check if the provided tool contains a complete path.
12387       tool_specified="$SED"
12388       tool_basename="${tool_specified##*/}"
12389       if test "x$tool_basename" = "x$tool_specified"; then
12390         # A command without a complete path is provided, search $PATH.
12391         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12392 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12393         # Extract the first word of "$tool_basename", so it can be a program name with args.
12394 set dummy $tool_basename; ac_word=$2
12395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12396 $as_echo_n "checking for $ac_word... " >&6; }
12397 if ${ac_cv_path_SED+:} false; then :
12398   $as_echo_n "(cached) " >&6
12399 else
12400   case $SED in
12401   [\\/]* | ?:[\\/]*)
12402   ac_cv_path_SED="$SED" # Let the user override the test with a path.
12403   ;;
12404   *)
12405   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12406 for as_dir in $PATH
12407 do
12408   IFS=$as_save_IFS
12409   test -z "$as_dir" && as_dir=.
12410     for ac_exec_ext in '' $ac_executable_extensions; do
12411   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12412     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12414     break 2
12415   fi
12416 done
12417   done
12418 IFS=$as_save_IFS
12419 
12420   ;;
12421 esac
12422 fi
12423 SED=$ac_cv_path_SED
12424 if test -n "$SED"; then
12425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12426 $as_echo "$SED" >&6; }
12427 else
12428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12429 $as_echo "no" >&6; }
12430 fi
12431 
12432 
12433         if test "x$SED" = x; then
12434           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12435         fi
12436       else
12437         # Otherwise we believe it is a complete path. Use it as it is.
12438         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12439 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12440         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12441 $as_echo_n "checking for SED... " >&6; }
12442         if test ! -x "$tool_specified"; then
12443           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12444 $as_echo "not found" >&6; }
12445           as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12446         fi
12447         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12448 $as_echo "$tool_specified" >&6; }
12449       fi
12450     fi
12451   fi
12452 
12453 
12454   if test "x$SED" = x; then
12455     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12456   fi
12457 
12458 
12459 
12460   # Always force rm.
12461   RM="$RM -f"
12462 
12463   # pwd behaves differently on various platforms and some don't support the -L flag.
12464   # Always use the bash builtin pwd to get uniform behavior.
12465   THEPWDCMD=pwd
12466 
12467   # These are not required on all platforms
12468 
12469 
12470   # Publish this variable in the help.
12471 
12472 
12473   if test "x$CYGPATH" = x; then
12474     # The variable is not set by user, try to locate tool using the code snippet
12475     for ac_prog in cygpath
12476 do
12477   # Extract the first word of "$ac_prog", so it can be a program name with args.
12478 set dummy $ac_prog; ac_word=$2
12479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12480 $as_echo_n "checking for $ac_word... " >&6; }
12481 if ${ac_cv_path_CYGPATH+:} false; then :
12482   $as_echo_n "(cached) " >&6
12483 else
12484   case $CYGPATH in
12485   [\\/]* | ?:[\\/]*)
12486   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12487   ;;
12488   *)
12489   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12490 for as_dir in $PATH
12491 do
12492   IFS=$as_save_IFS
12493   test -z "$as_dir" && as_dir=.
12494     for ac_exec_ext in '' $ac_executable_extensions; do
12495   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12496     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12498     break 2
12499   fi
12500 done
12501   done
12502 IFS=$as_save_IFS
12503 
12504   ;;
12505 esac
12506 fi
12507 CYGPATH=$ac_cv_path_CYGPATH
12508 if test -n "$CYGPATH"; then
12509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12510 $as_echo "$CYGPATH" >&6; }
12511 else
12512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12513 $as_echo "no" >&6; }
12514 fi
12515 
12516 
12517   test -n "$CYGPATH" && break
12518 done
12519 
12520   else
12521     # The variable is set, but is it from the command line or the environment?
12522 
12523     # Try to remove the string !CYGPATH! from our list.
12524     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12525     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12526       # If it failed, the variable was not from the command line. Ignore it,
12527       # but warn the user (except for BASH, which is always set by the calling BASH).
12528       if test "xCYGPATH" != xBASH; then
12529         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12530 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12531       fi
12532       # Try to locate tool using the code snippet
12533       for ac_prog in cygpath
12534 do
12535   # Extract the first word of "$ac_prog", so it can be a program name with args.
12536 set dummy $ac_prog; ac_word=$2
12537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12538 $as_echo_n "checking for $ac_word... " >&6; }
12539 if ${ac_cv_path_CYGPATH+:} false; then :
12540   $as_echo_n "(cached) " >&6
12541 else
12542   case $CYGPATH in
12543   [\\/]* | ?:[\\/]*)
12544   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12545   ;;
12546   *)
12547   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12548 for as_dir in $PATH
12549 do
12550   IFS=$as_save_IFS
12551   test -z "$as_dir" && as_dir=.
12552     for ac_exec_ext in '' $ac_executable_extensions; do
12553   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12554     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12555     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12556     break 2
12557   fi
12558 done
12559   done
12560 IFS=$as_save_IFS
12561 
12562   ;;
12563 esac
12564 fi
12565 CYGPATH=$ac_cv_path_CYGPATH
12566 if test -n "$CYGPATH"; then
12567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12568 $as_echo "$CYGPATH" >&6; }
12569 else
12570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12571 $as_echo "no" >&6; }
12572 fi
12573 
12574 
12575   test -n "$CYGPATH" && break
12576 done
12577 
12578     else
12579       # If it succeeded, then it was overridden by the user. We will use it
12580       # for the tool.
12581 
12582       # First remove it from the list of overridden variables, so we can test
12583       # for unknown variables in the end.
12584       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12585 
12586       # Check if the provided tool contains a complete path.
12587       tool_specified="$CYGPATH"
12588       tool_basename="${tool_specified##*/}"
12589       if test "x$tool_basename" = "x$tool_specified"; then
12590         # A command without a complete path is provided, search $PATH.
12591         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12592 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12593         # Extract the first word of "$tool_basename", so it can be a program name with args.
12594 set dummy $tool_basename; ac_word=$2
12595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12596 $as_echo_n "checking for $ac_word... " >&6; }
12597 if ${ac_cv_path_CYGPATH+:} false; then :
12598   $as_echo_n "(cached) " >&6
12599 else
12600   case $CYGPATH in
12601   [\\/]* | ?:[\\/]*)
12602   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12603   ;;
12604   *)
12605   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12606 for as_dir in $PATH
12607 do
12608   IFS=$as_save_IFS
12609   test -z "$as_dir" && as_dir=.
12610     for ac_exec_ext in '' $ac_executable_extensions; do
12611   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12612     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12613     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12614     break 2
12615   fi
12616 done
12617   done
12618 IFS=$as_save_IFS
12619 
12620   ;;
12621 esac
12622 fi
12623 CYGPATH=$ac_cv_path_CYGPATH
12624 if test -n "$CYGPATH"; then
12625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12626 $as_echo "$CYGPATH" >&6; }
12627 else
12628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12629 $as_echo "no" >&6; }
12630 fi
12631 
12632 
12633         if test "x$CYGPATH" = x; then
12634           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12635         fi
12636       else
12637         # Otherwise we believe it is a complete path. Use it as it is.
12638         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12639 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12640         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12641 $as_echo_n "checking for CYGPATH... " >&6; }
12642         if test ! -x "$tool_specified"; then
12643           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12644 $as_echo "not found" >&6; }
12645           as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12646         fi
12647         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12648 $as_echo "$tool_specified" >&6; }
12649       fi
12650     fi
12651   fi
12652 
12653 
12654 
12655 
12656   # Publish this variable in the help.
12657 
12658 
12659   if test "x$READLINK" = x; then
12660     # The variable is not set by user, try to locate tool using the code snippet
12661     for ac_prog in greadlink readlink
12662 do
12663   # Extract the first word of "$ac_prog", so it can be a program name with args.
12664 set dummy $ac_prog; ac_word=$2
12665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12666 $as_echo_n "checking for $ac_word... " >&6; }
12667 if ${ac_cv_path_READLINK+:} false; then :
12668   $as_echo_n "(cached) " >&6
12669 else
12670   case $READLINK in
12671   [\\/]* | ?:[\\/]*)
12672   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12673   ;;
12674   *)
12675   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12676 for as_dir in $PATH
12677 do
12678   IFS=$as_save_IFS
12679   test -z "$as_dir" && as_dir=.
12680     for ac_exec_ext in '' $ac_executable_extensions; do
12681   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12682     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12683     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12684     break 2
12685   fi
12686 done
12687   done
12688 IFS=$as_save_IFS
12689 
12690   ;;
12691 esac
12692 fi
12693 READLINK=$ac_cv_path_READLINK
12694 if test -n "$READLINK"; then
12695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12696 $as_echo "$READLINK" >&6; }
12697 else
12698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12699 $as_echo "no" >&6; }
12700 fi
12701 
12702 
12703   test -n "$READLINK" && break
12704 done
12705 
12706   else
12707     # The variable is set, but is it from the command line or the environment?
12708 
12709     # Try to remove the string !READLINK! from our list.
12710     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12711     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12712       # If it failed, the variable was not from the command line. Ignore it,
12713       # but warn the user (except for BASH, which is always set by the calling BASH).
12714       if test "xREADLINK" != xBASH; then
12715         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12716 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12717       fi
12718       # Try to locate tool using the code snippet
12719       for ac_prog in greadlink readlink
12720 do
12721   # Extract the first word of "$ac_prog", so it can be a program name with args.
12722 set dummy $ac_prog; ac_word=$2
12723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12724 $as_echo_n "checking for $ac_word... " >&6; }
12725 if ${ac_cv_path_READLINK+:} false; then :
12726   $as_echo_n "(cached) " >&6
12727 else
12728   case $READLINK in
12729   [\\/]* | ?:[\\/]*)
12730   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12731   ;;
12732   *)
12733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12734 for as_dir in $PATH
12735 do
12736   IFS=$as_save_IFS
12737   test -z "$as_dir" && as_dir=.
12738     for ac_exec_ext in '' $ac_executable_extensions; do
12739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12740     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12742     break 2
12743   fi
12744 done
12745   done
12746 IFS=$as_save_IFS
12747 
12748   ;;
12749 esac
12750 fi
12751 READLINK=$ac_cv_path_READLINK
12752 if test -n "$READLINK"; then
12753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12754 $as_echo "$READLINK" >&6; }
12755 else
12756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12757 $as_echo "no" >&6; }
12758 fi
12759 
12760 
12761   test -n "$READLINK" && break
12762 done
12763 
12764     else
12765       # If it succeeded, then it was overridden by the user. We will use it
12766       # for the tool.
12767 
12768       # First remove it from the list of overridden variables, so we can test
12769       # for unknown variables in the end.
12770       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12771 
12772       # Check if the provided tool contains a complete path.
12773       tool_specified="$READLINK"
12774       tool_basename="${tool_specified##*/}"
12775       if test "x$tool_basename" = "x$tool_specified"; then
12776         # A command without a complete path is provided, search $PATH.
12777         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12778 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12779         # Extract the first word of "$tool_basename", so it can be a program name with args.
12780 set dummy $tool_basename; ac_word=$2
12781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12782 $as_echo_n "checking for $ac_word... " >&6; }
12783 if ${ac_cv_path_READLINK+:} false; then :
12784   $as_echo_n "(cached) " >&6
12785 else
12786   case $READLINK in
12787   [\\/]* | ?:[\\/]*)
12788   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12789   ;;
12790   *)
12791   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12792 for as_dir in $PATH
12793 do
12794   IFS=$as_save_IFS
12795   test -z "$as_dir" && as_dir=.
12796     for ac_exec_ext in '' $ac_executable_extensions; do
12797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12798     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12800     break 2
12801   fi
12802 done
12803   done
12804 IFS=$as_save_IFS
12805 
12806   ;;
12807 esac
12808 fi
12809 READLINK=$ac_cv_path_READLINK
12810 if test -n "$READLINK"; then
12811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12812 $as_echo "$READLINK" >&6; }
12813 else
12814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12815 $as_echo "no" >&6; }
12816 fi
12817 
12818 
12819         if test "x$READLINK" = x; then
12820           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12821         fi
12822       else
12823         # Otherwise we believe it is a complete path. Use it as it is.
12824         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12825 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12826         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12827 $as_echo_n "checking for READLINK... " >&6; }
12828         if test ! -x "$tool_specified"; then
12829           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12830 $as_echo "not found" >&6; }
12831           as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12832         fi
12833         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12834 $as_echo "$tool_specified" >&6; }
12835       fi
12836     fi
12837   fi
12838 
12839 
12840 
12841 
12842   # Publish this variable in the help.
12843 
12844 
12845   if test "x$DF" = x; then
12846     # The variable is not set by user, try to locate tool using the code snippet
12847     for ac_prog in df
12848 do
12849   # Extract the first word of "$ac_prog", so it can be a program name with args.
12850 set dummy $ac_prog; ac_word=$2
12851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12852 $as_echo_n "checking for $ac_word... " >&6; }
12853 if ${ac_cv_path_DF+:} false; then :
12854   $as_echo_n "(cached) " >&6
12855 else
12856   case $DF in
12857   [\\/]* | ?:[\\/]*)
12858   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12859   ;;
12860   *)
12861   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12862 for as_dir in $PATH
12863 do
12864   IFS=$as_save_IFS
12865   test -z "$as_dir" && as_dir=.
12866     for ac_exec_ext in '' $ac_executable_extensions; do
12867   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12868     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12869     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12870     break 2
12871   fi
12872 done
12873   done
12874 IFS=$as_save_IFS
12875 
12876   ;;
12877 esac
12878 fi
12879 DF=$ac_cv_path_DF
12880 if test -n "$DF"; then
12881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12882 $as_echo "$DF" >&6; }
12883 else
12884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12885 $as_echo "no" >&6; }
12886 fi
12887 
12888 
12889   test -n "$DF" && break
12890 done
12891 
12892   else
12893     # The variable is set, but is it from the command line or the environment?
12894 
12895     # Try to remove the string !DF! from our list.
12896     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12897     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12898       # If it failed, the variable was not from the command line. Ignore it,
12899       # but warn the user (except for BASH, which is always set by the calling BASH).
12900       if test "xDF" != xBASH; then
12901         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12902 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12903       fi
12904       # Try to locate tool using the code snippet
12905       for ac_prog in df
12906 do
12907   # Extract the first word of "$ac_prog", so it can be a program name with args.
12908 set dummy $ac_prog; ac_word=$2
12909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12910 $as_echo_n "checking for $ac_word... " >&6; }
12911 if ${ac_cv_path_DF+:} false; then :
12912   $as_echo_n "(cached) " >&6
12913 else
12914   case $DF in
12915   [\\/]* | ?:[\\/]*)
12916   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12917   ;;
12918   *)
12919   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12920 for as_dir in $PATH
12921 do
12922   IFS=$as_save_IFS
12923   test -z "$as_dir" && as_dir=.
12924     for ac_exec_ext in '' $ac_executable_extensions; do
12925   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12926     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12927     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12928     break 2
12929   fi
12930 done
12931   done
12932 IFS=$as_save_IFS
12933 
12934   ;;
12935 esac
12936 fi
12937 DF=$ac_cv_path_DF
12938 if test -n "$DF"; then
12939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12940 $as_echo "$DF" >&6; }
12941 else
12942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12943 $as_echo "no" >&6; }
12944 fi
12945 
12946 
12947   test -n "$DF" && break
12948 done
12949 
12950     else
12951       # If it succeeded, then it was overridden by the user. We will use it
12952       # for the tool.
12953 
12954       # First remove it from the list of overridden variables, so we can test
12955       # for unknown variables in the end.
12956       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12957 
12958       # Check if the provided tool contains a complete path.
12959       tool_specified="$DF"
12960       tool_basename="${tool_specified##*/}"
12961       if test "x$tool_basename" = "x$tool_specified"; then
12962         # A command without a complete path is provided, search $PATH.
12963         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12964 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12965         # Extract the first word of "$tool_basename", so it can be a program name with args.
12966 set dummy $tool_basename; ac_word=$2
12967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12968 $as_echo_n "checking for $ac_word... " >&6; }
12969 if ${ac_cv_path_DF+:} false; then :
12970   $as_echo_n "(cached) " >&6
12971 else
12972   case $DF in
12973   [\\/]* | ?:[\\/]*)
12974   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12975   ;;
12976   *)
12977   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12978 for as_dir in $PATH
12979 do
12980   IFS=$as_save_IFS
12981   test -z "$as_dir" && as_dir=.
12982     for ac_exec_ext in '' $ac_executable_extensions; do
12983   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12984     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12986     break 2
12987   fi
12988 done
12989   done
12990 IFS=$as_save_IFS
12991 
12992   ;;
12993 esac
12994 fi
12995 DF=$ac_cv_path_DF
12996 if test -n "$DF"; then
12997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12998 $as_echo "$DF" >&6; }
12999 else
13000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13001 $as_echo "no" >&6; }
13002 fi
13003 
13004 
13005         if test "x$DF" = x; then
13006           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13007         fi
13008       else
13009         # Otherwise we believe it is a complete path. Use it as it is.
13010         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13011 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13012         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13013 $as_echo_n "checking for DF... " >&6; }
13014         if test ! -x "$tool_specified"; then
13015           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13016 $as_echo "not found" >&6; }
13017           as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13018         fi
13019         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13020 $as_echo "$tool_specified" >&6; }
13021       fi
13022     fi
13023   fi
13024 
13025 
13026 
13027 
13028   # Publish this variable in the help.
13029 
13030 
13031   if test "x$SETFILE" = x; then
13032     # The variable is not set by user, try to locate tool using the code snippet
13033     for ac_prog in SetFile
13034 do
13035   # Extract the first word of "$ac_prog", so it can be a program name with args.
13036 set dummy $ac_prog; ac_word=$2
13037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13038 $as_echo_n "checking for $ac_word... " >&6; }
13039 if ${ac_cv_path_SETFILE+:} false; then :
13040   $as_echo_n "(cached) " >&6
13041 else
13042   case $SETFILE in
13043   [\\/]* | ?:[\\/]*)
13044   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13045   ;;
13046   *)
13047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13048 for as_dir in $PATH
13049 do
13050   IFS=$as_save_IFS
13051   test -z "$as_dir" && as_dir=.
13052     for ac_exec_ext in '' $ac_executable_extensions; do
13053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13054     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13056     break 2
13057   fi
13058 done
13059   done
13060 IFS=$as_save_IFS
13061 
13062   ;;
13063 esac
13064 fi
13065 SETFILE=$ac_cv_path_SETFILE
13066 if test -n "$SETFILE"; then
13067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13068 $as_echo "$SETFILE" >&6; }
13069 else
13070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13071 $as_echo "no" >&6; }
13072 fi
13073 
13074 
13075   test -n "$SETFILE" && break
13076 done
13077 
13078   else
13079     # The variable is set, but is it from the command line or the environment?
13080 
13081     # Try to remove the string !SETFILE! from our list.
13082     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13083     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13084       # If it failed, the variable was not from the command line. Ignore it,
13085       # but warn the user (except for BASH, which is always set by the calling BASH).
13086       if test "xSETFILE" != xBASH; then
13087         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13088 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13089       fi
13090       # Try to locate tool using the code snippet
13091       for ac_prog in SetFile
13092 do
13093   # Extract the first word of "$ac_prog", so it can be a program name with args.
13094 set dummy $ac_prog; ac_word=$2
13095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13096 $as_echo_n "checking for $ac_word... " >&6; }
13097 if ${ac_cv_path_SETFILE+:} false; then :
13098   $as_echo_n "(cached) " >&6
13099 else
13100   case $SETFILE in
13101   [\\/]* | ?:[\\/]*)
13102   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13103   ;;
13104   *)
13105   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13106 for as_dir in $PATH
13107 do
13108   IFS=$as_save_IFS
13109   test -z "$as_dir" && as_dir=.
13110     for ac_exec_ext in '' $ac_executable_extensions; do
13111   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13112     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13113     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13114     break 2
13115   fi
13116 done
13117   done
13118 IFS=$as_save_IFS
13119 
13120   ;;
13121 esac
13122 fi
13123 SETFILE=$ac_cv_path_SETFILE
13124 if test -n "$SETFILE"; then
13125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13126 $as_echo "$SETFILE" >&6; }
13127 else
13128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13129 $as_echo "no" >&6; }
13130 fi
13131 
13132 
13133   test -n "$SETFILE" && break
13134 done
13135 
13136     else
13137       # If it succeeded, then it was overridden by the user. We will use it
13138       # for the tool.
13139 
13140       # First remove it from the list of overridden variables, so we can test
13141       # for unknown variables in the end.
13142       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13143 
13144       # Check if the provided tool contains a complete path.
13145       tool_specified="$SETFILE"
13146       tool_basename="${tool_specified##*/}"
13147       if test "x$tool_basename" = "x$tool_specified"; then
13148         # A command without a complete path is provided, search $PATH.
13149         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13150 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13151         # Extract the first word of "$tool_basename", so it can be a program name with args.
13152 set dummy $tool_basename; ac_word=$2
13153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13154 $as_echo_n "checking for $ac_word... " >&6; }
13155 if ${ac_cv_path_SETFILE+:} false; then :
13156   $as_echo_n "(cached) " >&6
13157 else
13158   case $SETFILE in
13159   [\\/]* | ?:[\\/]*)
13160   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13161   ;;
13162   *)
13163   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13164 for as_dir in $PATH
13165 do
13166   IFS=$as_save_IFS
13167   test -z "$as_dir" && as_dir=.
13168     for ac_exec_ext in '' $ac_executable_extensions; do
13169   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13170     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13172     break 2
13173   fi
13174 done
13175   done
13176 IFS=$as_save_IFS
13177 
13178   ;;
13179 esac
13180 fi
13181 SETFILE=$ac_cv_path_SETFILE
13182 if test -n "$SETFILE"; then
13183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13184 $as_echo "$SETFILE" >&6; }
13185 else
13186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13187 $as_echo "no" >&6; }
13188 fi
13189 
13190 
13191         if test "x$SETFILE" = x; then
13192           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13193         fi
13194       else
13195         # Otherwise we believe it is a complete path. Use it as it is.
13196         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13197 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13198         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13199 $as_echo_n "checking for SETFILE... " >&6; }
13200         if test ! -x "$tool_specified"; then
13201           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13202 $as_echo "not found" >&6; }
13203           as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13204         fi
13205         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13206 $as_echo "$tool_specified" >&6; }
13207       fi
13208     fi
13209   fi
13210 
13211 
13212 
13213 
13214   # Publish this variable in the help.
13215 
13216 
13217   if test "x$CPIO" = x; then
13218     # The variable is not set by user, try to locate tool using the code snippet
13219     for ac_prog in cpio bsdcpio
13220 do
13221   # Extract the first word of "$ac_prog", so it can be a program name with args.
13222 set dummy $ac_prog; ac_word=$2
13223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13224 $as_echo_n "checking for $ac_word... " >&6; }
13225 if ${ac_cv_path_CPIO+:} false; then :
13226   $as_echo_n "(cached) " >&6
13227 else
13228   case $CPIO in
13229   [\\/]* | ?:[\\/]*)
13230   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13231   ;;
13232   *)
13233   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13234 for as_dir in $PATH
13235 do
13236   IFS=$as_save_IFS
13237   test -z "$as_dir" && as_dir=.
13238     for ac_exec_ext in '' $ac_executable_extensions; do
13239   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13240     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13242     break 2
13243   fi
13244 done
13245   done
13246 IFS=$as_save_IFS
13247 
13248   ;;
13249 esac
13250 fi
13251 CPIO=$ac_cv_path_CPIO
13252 if test -n "$CPIO"; then
13253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13254 $as_echo "$CPIO" >&6; }
13255 else
13256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13257 $as_echo "no" >&6; }
13258 fi
13259 
13260 
13261   test -n "$CPIO" && break
13262 done
13263 
13264   else
13265     # The variable is set, but is it from the command line or the environment?
13266 
13267     # Try to remove the string !CPIO! from our list.
13268     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13269     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13270       # If it failed, the variable was not from the command line. Ignore it,
13271       # but warn the user (except for BASH, which is always set by the calling BASH).
13272       if test "xCPIO" != xBASH; then
13273         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13274 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13275       fi
13276       # Try to locate tool using the code snippet
13277       for ac_prog in cpio bsdcpio
13278 do
13279   # Extract the first word of "$ac_prog", so it can be a program name with args.
13280 set dummy $ac_prog; ac_word=$2
13281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13282 $as_echo_n "checking for $ac_word... " >&6; }
13283 if ${ac_cv_path_CPIO+:} false; then :
13284   $as_echo_n "(cached) " >&6
13285 else
13286   case $CPIO in
13287   [\\/]* | ?:[\\/]*)
13288   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13289   ;;
13290   *)
13291   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13292 for as_dir in $PATH
13293 do
13294   IFS=$as_save_IFS
13295   test -z "$as_dir" && as_dir=.
13296     for ac_exec_ext in '' $ac_executable_extensions; do
13297   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13298     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13300     break 2
13301   fi
13302 done
13303   done
13304 IFS=$as_save_IFS
13305 
13306   ;;
13307 esac
13308 fi
13309 CPIO=$ac_cv_path_CPIO
13310 if test -n "$CPIO"; then
13311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13312 $as_echo "$CPIO" >&6; }
13313 else
13314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13315 $as_echo "no" >&6; }
13316 fi
13317 
13318 
13319   test -n "$CPIO" && break
13320 done
13321 
13322     else
13323       # If it succeeded, then it was overridden by the user. We will use it
13324       # for the tool.
13325 
13326       # First remove it from the list of overridden variables, so we can test
13327       # for unknown variables in the end.
13328       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13329 
13330       # Check if the provided tool contains a complete path.
13331       tool_specified="$CPIO"
13332       tool_basename="${tool_specified##*/}"
13333       if test "x$tool_basename" = "x$tool_specified"; then
13334         # A command without a complete path is provided, search $PATH.
13335         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13336 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13337         # Extract the first word of "$tool_basename", so it can be a program name with args.
13338 set dummy $tool_basename; ac_word=$2
13339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13340 $as_echo_n "checking for $ac_word... " >&6; }
13341 if ${ac_cv_path_CPIO+:} false; then :
13342   $as_echo_n "(cached) " >&6
13343 else
13344   case $CPIO in
13345   [\\/]* | ?:[\\/]*)
13346   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13347   ;;
13348   *)
13349   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13350 for as_dir in $PATH
13351 do
13352   IFS=$as_save_IFS
13353   test -z "$as_dir" && as_dir=.
13354     for ac_exec_ext in '' $ac_executable_extensions; do
13355   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13356     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13357     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13358     break 2
13359   fi
13360 done
13361   done
13362 IFS=$as_save_IFS
13363 
13364   ;;
13365 esac
13366 fi
13367 CPIO=$ac_cv_path_CPIO
13368 if test -n "$CPIO"; then
13369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13370 $as_echo "$CPIO" >&6; }
13371 else
13372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13373 $as_echo "no" >&6; }
13374 fi
13375 
13376 
13377         if test "x$CPIO" = x; then
13378           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13379         fi
13380       else
13381         # Otherwise we believe it is a complete path. Use it as it is.
13382         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13383 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13384         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13385 $as_echo_n "checking for CPIO... " >&6; }
13386         if test ! -x "$tool_specified"; then
13387           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13388 $as_echo "not found" >&6; }
13389           as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13390         fi
13391         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13392 $as_echo "$tool_specified" >&6; }
13393       fi
13394     fi
13395   fi
13396 
13397 
13398 
13399 
13400 # Now we can determine OpenJDK build and target platforms. This is required to
13401 # have early on.
13402 # Make sure we can run config.sub.
13403 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13404   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13405 
13406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13407 $as_echo_n "checking build system type... " >&6; }
13408 if ${ac_cv_build+:} false; then :
13409   $as_echo_n "(cached) " >&6
13410 else
13411   ac_build_alias=$build_alias
13412 test "x$ac_build_alias" = x &&
13413   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13414 test "x$ac_build_alias" = x &&
13415   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13416 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13417   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13418 
13419 fi
13420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13421 $as_echo "$ac_cv_build" >&6; }
13422 case $ac_cv_build in
13423 *-*-*) ;;
13424 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13425 esac
13426 build=$ac_cv_build
13427 ac_save_IFS=$IFS; IFS='-'
13428 set x $ac_cv_build
13429 shift
13430 build_cpu=$1
13431 build_vendor=$2
13432 shift; shift
13433 # Remember, the first character of IFS is used to create $*,
13434 # except with old shells:
13435 build_os=$*
13436 IFS=$ac_save_IFS
13437 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13438 
13439 
13440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13441 $as_echo_n "checking host system type... " >&6; }
13442 if ${ac_cv_host+:} false; then :
13443   $as_echo_n "(cached) " >&6
13444 else
13445   if test "x$host_alias" = x; then
13446   ac_cv_host=$ac_cv_build
13447 else
13448   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13449     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13450 fi
13451 
13452 fi
13453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13454 $as_echo "$ac_cv_host" >&6; }
13455 case $ac_cv_host in
13456 *-*-*) ;;
13457 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13458 esac
13459 host=$ac_cv_host
13460 ac_save_IFS=$IFS; IFS='-'
13461 set x $ac_cv_host
13462 shift
13463 host_cpu=$1
13464 host_vendor=$2
13465 shift; shift
13466 # Remember, the first character of IFS is used to create $*,
13467 # except with old shells:
13468 host_os=$*
13469 IFS=$ac_save_IFS
13470 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13471 
13472 
13473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13474 $as_echo_n "checking target system type... " >&6; }
13475 if ${ac_cv_target+:} false; then :
13476   $as_echo_n "(cached) " >&6
13477 else
13478   if test "x$target_alias" = x; then
13479   ac_cv_target=$ac_cv_host
13480 else
13481   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13482     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13483 fi
13484 
13485 fi
13486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13487 $as_echo "$ac_cv_target" >&6; }
13488 case $ac_cv_target in
13489 *-*-*) ;;
13490 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13491 esac
13492 target=$ac_cv_target
13493 ac_save_IFS=$IFS; IFS='-'
13494 set x $ac_cv_target
13495 shift
13496 target_cpu=$1
13497 target_vendor=$2
13498 shift; shift
13499 # Remember, the first character of IFS is used to create $*,
13500 # except with old shells:
13501 target_os=$*
13502 IFS=$ac_save_IFS
13503 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13504 
13505 
13506 # The aliases save the names the user supplied, while $host etc.
13507 # will get canonicalized.
13508 test -n "$target_alias" &&
13509   test "$program_prefix$program_suffix$program_transform_name" = \
13510     NONENONEs,x,x, &&
13511   program_prefix=${target_alias}-
13512 
13513   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13514   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13515   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13516   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13517   # to use the configure naming style.
13518 
13519 
13520 
13521 
13522 
13523   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13524   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13525   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13526   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13527   OPENJDK_TARGET_AUTOCONF_NAME="$host"
13528   OPENJDK_BUILD_AUTOCONF_NAME="$build"
13529 
13530 
13531 
13532   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13533 
13534   case "$build_os" in
13535     *linux*)
13536       VAR_OS=linux
13537       VAR_OS_API=posix
13538       VAR_OS_ENV=linux
13539       ;;
13540     *solaris*)
13541       VAR_OS=solaris
13542       VAR_OS_API=posix
13543       VAR_OS_ENV=solaris
13544       ;;
13545     *darwin*)
13546       VAR_OS=macosx
13547       VAR_OS_API=posix
13548       VAR_OS_ENV=macosx
13549       ;;
13550     *bsd*)
13551       VAR_OS=bsd
13552       VAR_OS_API=posix
13553       VAR_OS_ENV=bsd
13554       ;;
13555     *cygwin*)
13556       VAR_OS=windows
13557       VAR_OS_API=winapi
13558       VAR_OS_ENV=windows.cygwin
13559       ;;
13560     *mingw*)
13561       VAR_OS=windows
13562       VAR_OS_API=winapi
13563       VAR_OS_ENV=windows.msys
13564       ;;
13565     *aix*)
13566       VAR_OS=aix
13567       VAR_OS_API=posix
13568       VAR_OS_ENV=aix
13569       ;;
13570     *)
13571       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13572       ;;
13573   esac
13574 
13575 
13576   # First argument is the cpu name from the trip/quad
13577   case "$build_cpu" in
13578     x86_64)
13579       VAR_CPU=x86_64
13580       VAR_CPU_ARCH=x86
13581       VAR_CPU_BITS=64
13582       VAR_CPU_ENDIAN=little
13583       ;;
13584     i?86)
13585       VAR_CPU=x86
13586       VAR_CPU_ARCH=x86
13587       VAR_CPU_BITS=32
13588       VAR_CPU_ENDIAN=little
13589       ;;
13590     arm*)
13591       VAR_CPU=arm
13592       VAR_CPU_ARCH=arm
13593       VAR_CPU_BITS=32
13594       VAR_CPU_ENDIAN=little
13595       ;;
13596     aarch64)
13597       VAR_CPU=aarch64
13598       VAR_CPU_ARCH=aarch64
13599       VAR_CPU_BITS=64
13600       VAR_CPU_ENDIAN=little
13601       ;;
13602     powerpc)
13603       VAR_CPU=ppc
13604       VAR_CPU_ARCH=ppc
13605       VAR_CPU_BITS=32
13606       VAR_CPU_ENDIAN=big
13607       ;;
13608     powerpc64)
13609       VAR_CPU=ppc64
13610       VAR_CPU_ARCH=ppc
13611       VAR_CPU_BITS=64
13612       VAR_CPU_ENDIAN=big
13613       ;;
13614     powerpc64le)
13615       VAR_CPU=ppc64le
13616       VAR_CPU_ARCH=ppc
13617       VAR_CPU_BITS=64
13618       VAR_CPU_ENDIAN=little
13619       ;;
13620     s390)
13621       VAR_CPU=s390
13622       VAR_CPU_ARCH=s390
13623       VAR_CPU_BITS=32
13624       VAR_CPU_ENDIAN=big
13625       ;;
13626     s390x)
13627       VAR_CPU=s390x
13628       VAR_CPU_ARCH=s390
13629       VAR_CPU_BITS=64
13630       VAR_CPU_ENDIAN=big
13631       ;;
13632     sparc)
13633       VAR_CPU=sparc
13634       VAR_CPU_ARCH=sparc
13635       VAR_CPU_BITS=32
13636       VAR_CPU_ENDIAN=big
13637       ;;
13638     sparcv9|sparc64)
13639       VAR_CPU=sparcv9
13640       VAR_CPU_ARCH=sparc
13641       VAR_CPU_BITS=64
13642       VAR_CPU_ENDIAN=big
13643       ;;
13644     *)
13645       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13646       ;;
13647   esac
13648 
13649   # ..and setup our own variables. (Do this explicitely to facilitate searching)
13650   OPENJDK_BUILD_OS="$VAR_OS"
13651   OPENJDK_BUILD_OS_API="$VAR_OS_API"
13652   OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13653   OPENJDK_BUILD_CPU="$VAR_CPU"
13654   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13655   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13656   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13657 
13658 
13659 
13660 
13661 
13662 
13663 
13664 
13665   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13666 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
13667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13668 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13669 
13670   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13671 
13672   case "$host_os" in
13673     *linux*)
13674       VAR_OS=linux
13675       VAR_OS_API=posix
13676       VAR_OS_ENV=linux
13677       ;;
13678     *solaris*)
13679       VAR_OS=solaris
13680       VAR_OS_API=posix
13681       VAR_OS_ENV=solaris
13682       ;;
13683     *darwin*)
13684       VAR_OS=macosx
13685       VAR_OS_API=posix
13686       VAR_OS_ENV=macosx
13687       ;;
13688     *bsd*)
13689       VAR_OS=bsd
13690       VAR_OS_API=posix
13691       VAR_OS_ENV=bsd
13692       ;;
13693     *cygwin*)
13694       VAR_OS=windows
13695       VAR_OS_API=winapi
13696       VAR_OS_ENV=windows.cygwin
13697       ;;
13698     *mingw*)
13699       VAR_OS=windows
13700       VAR_OS_API=winapi
13701       VAR_OS_ENV=windows.msys
13702       ;;
13703     *aix*)
13704       VAR_OS=aix
13705       VAR_OS_API=posix
13706       VAR_OS_ENV=aix
13707       ;;
13708     *)
13709       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13710       ;;
13711   esac
13712 
13713 
13714   # First argument is the cpu name from the trip/quad
13715   case "$host_cpu" in
13716     x86_64)
13717       VAR_CPU=x86_64
13718       VAR_CPU_ARCH=x86
13719       VAR_CPU_BITS=64
13720       VAR_CPU_ENDIAN=little
13721       ;;
13722     i?86)
13723       VAR_CPU=x86
13724       VAR_CPU_ARCH=x86
13725       VAR_CPU_BITS=32
13726       VAR_CPU_ENDIAN=little
13727       ;;
13728     arm*)
13729       VAR_CPU=arm
13730       VAR_CPU_ARCH=arm
13731       VAR_CPU_BITS=32
13732       VAR_CPU_ENDIAN=little
13733       ;;
13734     aarch64)
13735       VAR_CPU=aarch64
13736       VAR_CPU_ARCH=aarch64
13737       VAR_CPU_BITS=64
13738       VAR_CPU_ENDIAN=little
13739       ;;
13740     powerpc)
13741       VAR_CPU=ppc
13742       VAR_CPU_ARCH=ppc
13743       VAR_CPU_BITS=32
13744       VAR_CPU_ENDIAN=big
13745       ;;
13746     powerpc64)
13747       VAR_CPU=ppc64
13748       VAR_CPU_ARCH=ppc
13749       VAR_CPU_BITS=64
13750       VAR_CPU_ENDIAN=big
13751       ;;
13752     powerpc64le)
13753       VAR_CPU=ppc64le
13754       VAR_CPU_ARCH=ppc
13755       VAR_CPU_BITS=64
13756       VAR_CPU_ENDIAN=little
13757       ;;
13758     s390)
13759       VAR_CPU=s390
13760       VAR_CPU_ARCH=s390
13761       VAR_CPU_BITS=32
13762       VAR_CPU_ENDIAN=big
13763       ;;
13764     s390x)
13765       VAR_CPU=s390x
13766       VAR_CPU_ARCH=s390
13767       VAR_CPU_BITS=64
13768       VAR_CPU_ENDIAN=big
13769       ;;
13770     sparc)
13771       VAR_CPU=sparc
13772       VAR_CPU_ARCH=sparc
13773       VAR_CPU_BITS=32
13774       VAR_CPU_ENDIAN=big
13775       ;;
13776     sparcv9|sparc64)
13777       VAR_CPU=sparcv9
13778       VAR_CPU_ARCH=sparc
13779       VAR_CPU_BITS=64
13780       VAR_CPU_ENDIAN=big
13781       ;;
13782     *)
13783       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13784       ;;
13785   esac
13786 
13787   # ... and setup our own variables. (Do this explicitely to facilitate searching)
13788   OPENJDK_TARGET_OS="$VAR_OS"
13789   OPENJDK_TARGET_OS_API="$VAR_OS_API"
13790   OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13791   OPENJDK_TARGET_CPU="$VAR_CPU"
13792   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13793   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13794   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13795 
13796 
13797 
13798 
13799 
13800 
13801 
13802 
13803   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13804 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
13805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13806 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13807 
13808 
13809 
13810 # Check whether --with-target-bits was given.
13811 if test "${with_target_bits+set}" = set; then :
13812   withval=$with_target_bits;
13813 fi
13814 
13815 
13816   # We have three types of compiles:
13817   # native  == normal compilation, target system == build system
13818   # cross   == traditional cross compilation, target system != build system; special toolchain needed
13819   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13820   #
13821   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13822     # We're doing a proper cross-compilation
13823     COMPILE_TYPE="cross"
13824   else
13825     COMPILE_TYPE="native"
13826   fi
13827 
13828   if test "x$with_target_bits" != x; then
13829     if test "x$COMPILE_TYPE" = "xcross"; then
13830       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13831     fi
13832 
13833     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13834       # A reduced build is requested
13835       COMPILE_TYPE="reduced"
13836       OPENJDK_TARGET_CPU_BITS=32
13837       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13838         OPENJDK_TARGET_CPU=x86
13839       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13840         OPENJDK_TARGET_CPU=sparc
13841       else
13842         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13843       fi
13844     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13845       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
13846     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13847       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13848 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13849     else
13850       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13851     fi
13852   fi
13853 
13854 
13855   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13856 $as_echo_n "checking compilation type... " >&6; }
13857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13858 $as_echo "$COMPILE_TYPE" >&6; }
13859 
13860 
13861   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13862     REQUIRED_OS_NAME=SunOS
13863     REQUIRED_OS_VERSION=5.10
13864   fi
13865   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13866     REQUIRED_OS_NAME=Linux
13867     REQUIRED_OS_VERSION=2.6
13868   fi
13869   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13870     REQUIRED_OS_NAME=Windows
13871     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13872       REQUIRED_OS_VERSION=5.2
13873     else
13874       REQUIRED_OS_VERSION=5.1
13875     fi
13876   fi
13877   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13878     REQUIRED_OS_NAME=Darwin
13879     REQUIRED_OS_VERSION=11.2
13880   fi
13881 
13882 
13883 
13884 
13885 
13886   # Also store the legacy naming of the cpu.
13887   # Ie i586 and amd64 instead of x86 and x86_64
13888   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13889   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13890     OPENJDK_TARGET_CPU_LEGACY="i586"
13891   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13892     # On all platforms except MacOSX replace x86_64 with amd64.
13893     OPENJDK_TARGET_CPU_LEGACY="amd64"
13894   fi
13895 
13896 
13897   # And the second legacy naming of the cpu.
13898   # Ie i386 and amd64 instead of x86 and x86_64.
13899   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13900   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13901     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13902   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13903     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13904   fi
13905 
13906 
13907   # This is the name of the cpu (but using i386 and amd64 instead of
13908   # x86 and x86_64, respectively), preceeded by a /, to be used when
13909   # locating libraries. On macosx, it's empty, though.
13910   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13911   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13912     OPENJDK_TARGET_CPU_LIBDIR=""
13913   fi
13914 
13915 
13916   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13917   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13918   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13919   OPENJDK_TARGET_CPU_ISADIR=""
13920   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13921     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13922       OPENJDK_TARGET_CPU_ISADIR="/amd64"
13923     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13924       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13925     fi
13926   fi
13927 
13928 
13929   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13930   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13931   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13932     # On linux only, we replace x86 with i386.
13933     OPENJDK_TARGET_CPU_OSARCH="i386"
13934   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13935     # On all platforms except macosx, we replace x86_64 with amd64.
13936     OPENJDK_TARGET_CPU_OSARCH="amd64"
13937   fi
13938 
13939 
13940   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13941   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13942     OPENJDK_TARGET_CPU_JLI="i386"
13943   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13944     # On all platforms except macosx, we replace x86_64 with amd64.
13945     OPENJDK_TARGET_CPU_JLI="amd64"
13946   fi
13947   # Now setup the -D flags for building libjli.
13948   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13949   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13950     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13951       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13952     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13953       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13954     fi
13955   fi
13956 
13957 
13958   # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13959   if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13960     OPENJDK_TARGET_OS_API_DIR="solaris"
13961   fi
13962   if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13963     OPENJDK_TARGET_OS_API_DIR="windows"
13964   fi
13965 
13966 
13967   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13968       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13969   else
13970       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13971   fi
13972 
13973 
13974   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13975     A_LP64="LP64:="
13976     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13977     # unpack200.exe
13978     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13979       ADD_LP64="-D_LP64=1"
13980     fi
13981   fi
13982   LP64=$A_LP64
13983 
13984 
13985   if test "x$COMPILE_TYPE" = "xcross"; then
13986     # FIXME: ... or should this include reduced builds..?
13987     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13988   else
13989     DEFINE_CROSS_COMPILE_ARCH=""
13990   fi
13991 
13992 
13993   # ZERO_ARCHDEF is used to enable architecture-specific code
13994   case "${OPENJDK_TARGET_CPU}" in
13995     ppc)     ZERO_ARCHDEF=PPC32 ;;
13996     ppc64)   ZERO_ARCHDEF=PPC64 ;;
13997     s390*)   ZERO_ARCHDEF=S390  ;;
13998     sparc*)  ZERO_ARCHDEF=SPARC ;;
13999     x86_64*) ZERO_ARCHDEF=AMD64 ;;
14000     x86)     ZERO_ARCHDEF=IA32  ;;
14001     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14002   esac
14003 
14004 
14005 
14006 
14007 # Continue setting up basic stuff. Most remaining code require fundamental tools.
14008 
14009   # Save the current directory this script was started from
14010   CURDIR="$PWD"
14011 
14012   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14013     PATH_SEP=";"
14014 
14015   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14016   if test $SRC_ROOT_LENGTH -gt 100; then
14017     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14018   fi
14019 
14020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14021     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14022 $as_echo_n "checking cygwin release... " >&6; }
14023     CYGWIN_VERSION=`$UNAME -r`
14024     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14025 $as_echo "$CYGWIN_VERSION" >&6; }
14026     WINDOWS_ENV_VENDOR='cygwin'
14027     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14028 
14029     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14030     if test "x$CYGWIN_VERSION_OLD" != x; then
14031       { $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
14032 $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;}
14033       as_fn_error $? "Cannot continue" "$LINENO" 5
14034     fi
14035     if test "x$CYGPATH" = x; then
14036       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14037     fi
14038     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14039 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14040     # The cmd output ends with Windows line endings (CR/LF)
14041     cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
14042     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14043     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14044     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14045 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
14046     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14047     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14048     if test "x$test_cygdrive_prefix" = x; then
14049       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14050     fi
14051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14052     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14053 $as_echo_n "checking msys release... " >&6; }
14054     MSYS_VERSION=`$UNAME -r`
14055     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14056 $as_echo "$MSYS_VERSION" >&6; }
14057 
14058     WINDOWS_ENV_VENDOR='msys'
14059     WINDOWS_ENV_VERSION="$MSYS_VERSION"
14060 
14061     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14062 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
14063     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14064     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14065 
14066   windows_path="$MSYS_ROOT_PATH"
14067   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14068     unix_path=`$CYGPATH -u "$windows_path"`
14069     MSYS_ROOT_PATH="$unix_path"
14070   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14071     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14072     MSYS_ROOT_PATH="$unix_path"
14073   fi
14074 
14075     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14076 $as_echo "$MSYS_ROOT_PATH" >&6; }
14077     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14078   else
14079     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14080   fi
14081 
14082   # Test if windows or unix (cygwin/msys) find is first in path.
14083   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14084 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14085   FIND_BINARY_OUTPUT=`find --version 2>&1`
14086   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14087     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14088 $as_echo "unix style" >&6; }
14089   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14090     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14091 $as_echo "Windows" >&6; }
14092     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14093 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14094     { $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
14095 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14096     as_fn_error $? "Cannot continue" "$LINENO" 5
14097   else
14098     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14099 $as_echo "unknown" >&6; }
14100     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14101 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14102   fi
14103 
14104   else
14105     PATH_SEP=":"
14106   fi
14107 
14108 
14109   # We get the top-level directory from the supporting wrappers.
14110   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14111 $as_echo_n "checking for top-level directory... " >&6; }
14112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14113 $as_echo "$TOPDIR" >&6; }
14114 
14115 
14116   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14117 
14118   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14119 
14120   # Input might be given as Windows format, start by converting to
14121   # unix format.
14122   path="$CURDIR"
14123   new_path=`$CYGPATH -u "$path"`
14124 
14125   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14126   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14127   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14128   # "foo.exe" is OK but "foo" is an error.
14129   #
14130   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14131   # It is also a way to make sure we got the proper file name for the real test later on.
14132   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14133   if test "x$test_shortpath" = x; then
14134     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14135 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14136     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14137   fi
14138 
14139   # Call helper function which possibly converts this using DOS-style short mode.
14140   # If so, the updated path is stored in $new_path.
14141 
14142   input_path="$new_path"
14143   # Check if we need to convert this using DOS-style short mode. If the path
14144   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14145   # take no chances and rewrite it.
14146   # Note: m4 eats our [], so we need to use [ and ] instead.
14147   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14148   if test "x$has_forbidden_chars" != x; then
14149     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14150     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14151     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14152     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14153       # Going to short mode and back again did indeed matter. Since short mode is
14154       # case insensitive, let's make it lowercase to improve readability.
14155       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14156       # Now convert it back to Unix-style (cygpath)
14157       input_path=`$CYGPATH -u "$shortmode_path"`
14158       new_path="$input_path"
14159     fi
14160   fi
14161 
14162   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14163   if test "x$test_cygdrive_prefix" = x; then
14164     # As a simple fix, exclude /usr/bin since it's not a real path.
14165     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14166       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14167       # a path prefixed by /cygdrive for fixpath to work.
14168       new_path="$CYGWIN_ROOT_PATH$input_path"
14169     fi
14170   fi
14171 
14172 
14173   if test "x$path" != "x$new_path"; then
14174     CURDIR="$new_path"
14175     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14176 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14177   fi
14178 
14179   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14180 
14181   path="$CURDIR"
14182   has_colon=`$ECHO $path | $GREP ^.:`
14183   new_path="$path"
14184   if test "x$has_colon" = x; then
14185     # Not in mixed or Windows style, start by that.
14186     new_path=`cmd //c echo $path`
14187   fi
14188 
14189 
14190   input_path="$new_path"
14191   # Check if we need to convert this using DOS-style short mode. If the path
14192   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14193   # take no chances and rewrite it.
14194   # Note: m4 eats our [], so we need to use [ and ] instead.
14195   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14196   if test "x$has_forbidden_chars" != x; then
14197     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14198     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14199   fi
14200 
14201 
14202   windows_path="$new_path"
14203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14204     unix_path=`$CYGPATH -u "$windows_path"`
14205     new_path="$unix_path"
14206   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14207     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14208     new_path="$unix_path"
14209   fi
14210 
14211   if test "x$path" != "x$new_path"; then
14212     CURDIR="$new_path"
14213     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14214 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14215   fi
14216 
14217   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14218   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14219 
14220   else
14221     # We're on a posix platform. Hooray! :)
14222     path="$CURDIR"
14223     has_space=`$ECHO "$path" | $GREP " "`
14224     if test "x$has_space" != x; then
14225       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14226 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14227       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14228     fi
14229 
14230     # Use eval to expand a potential ~
14231     eval path="$path"
14232     if test ! -f "$path" && test ! -d "$path"; then
14233       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14234     fi
14235 
14236     CURDIR="`cd "$path"; $THEPWDCMD -L`"
14237   fi
14238 
14239 
14240   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14241 
14242   # Input might be given as Windows format, start by converting to
14243   # unix format.
14244   path="$TOPDIR"
14245   new_path=`$CYGPATH -u "$path"`
14246 
14247   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14248   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14249   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14250   # "foo.exe" is OK but "foo" is an error.
14251   #
14252   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14253   # It is also a way to make sure we got the proper file name for the real test later on.
14254   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14255   if test "x$test_shortpath" = x; then
14256     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14257 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14258     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14259   fi
14260 
14261   # Call helper function which possibly converts this using DOS-style short mode.
14262   # If so, the updated path is stored in $new_path.
14263 
14264   input_path="$new_path"
14265   # Check if we need to convert this using DOS-style short mode. If the path
14266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14267   # take no chances and rewrite it.
14268   # Note: m4 eats our [], so we need to use [ and ] instead.
14269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14270   if test "x$has_forbidden_chars" != x; then
14271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14272     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14273     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14274     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14275       # Going to short mode and back again did indeed matter. Since short mode is
14276       # case insensitive, let's make it lowercase to improve readability.
14277       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14278       # Now convert it back to Unix-style (cygpath)
14279       input_path=`$CYGPATH -u "$shortmode_path"`
14280       new_path="$input_path"
14281     fi
14282   fi
14283 
14284   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14285   if test "x$test_cygdrive_prefix" = x; then
14286     # As a simple fix, exclude /usr/bin since it's not a real path.
14287     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14288       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14289       # a path prefixed by /cygdrive for fixpath to work.
14290       new_path="$CYGWIN_ROOT_PATH$input_path"
14291     fi
14292   fi
14293 
14294 
14295   if test "x$path" != "x$new_path"; then
14296     TOPDIR="$new_path"
14297     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14298 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14299   fi
14300 
14301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14302 
14303   path="$TOPDIR"
14304   has_colon=`$ECHO $path | $GREP ^.:`
14305   new_path="$path"
14306   if test "x$has_colon" = x; then
14307     # Not in mixed or Windows style, start by that.
14308     new_path=`cmd //c echo $path`
14309   fi
14310 
14311 
14312   input_path="$new_path"
14313   # Check if we need to convert this using DOS-style short mode. If the path
14314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14315   # take no chances and rewrite it.
14316   # Note: m4 eats our [], so we need to use [ and ] instead.
14317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14318   if test "x$has_forbidden_chars" != x; then
14319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14320     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14321   fi
14322 
14323 
14324   windows_path="$new_path"
14325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14326     unix_path=`$CYGPATH -u "$windows_path"`
14327     new_path="$unix_path"
14328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14330     new_path="$unix_path"
14331   fi
14332 
14333   if test "x$path" != "x$new_path"; then
14334     TOPDIR="$new_path"
14335     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14336 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14337   fi
14338 
14339   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14340   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14341 
14342   else
14343     # We're on a posix platform. Hooray! :)
14344     path="$TOPDIR"
14345     has_space=`$ECHO "$path" | $GREP " "`
14346     if test "x$has_space" != x; then
14347       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14348 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14349       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14350     fi
14351 
14352     # Use eval to expand a potential ~
14353     eval path="$path"
14354     if test ! -f "$path" && test ! -d "$path"; then
14355       as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14356     fi
14357 
14358     TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14359   fi
14360 
14361   # SRC_ROOT is a traditional alias for TOPDIR.
14362   SRC_ROOT=$TOPDIR
14363 
14364   # Locate the directory of this script.
14365   AUTOCONF_DIR=$TOPDIR/common/autoconf
14366 
14367 
14368   # Setup default logging of stdout and stderr to build.log in the output root.
14369   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14370   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14371   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14372 
14373 
14374 
14375 
14376 
14377 # Check if it's a pure open build or if custom sources are to be used.
14378 
14379   # Check whether --enable-openjdk-only was given.
14380 if test "${enable_openjdk_only+set}" = set; then :
14381   enableval=$enable_openjdk_only;
14382 else
14383   enable_openjdk_only="no"
14384 fi
14385 
14386 
14387   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14388 $as_echo_n "checking for presence of closed sources... " >&6; }
14389   if test -d "$SRC_ROOT/jdk/src/closed"; then
14390     CLOSED_SOURCE_PRESENT=yes
14391   else
14392     CLOSED_SOURCE_PRESENT=no
14393   fi
14394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14395 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14396 
14397   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14398 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14399   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14401 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14402 
14403   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14404     OPENJDK=true
14405     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14406       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14407 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14408     fi
14409   else
14410     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14411       OPENJDK=true
14412     else
14413       OPENJDK=false
14414     fi
14415   fi
14416 
14417   if test "x$OPENJDK" = "xtrue"; then
14418     SET_OPENJDK="OPENJDK=true"
14419   fi
14420 
14421 
14422 
14423 
14424 # These are needed to be able to create a configuration name (and thus the output directory)
14425 
14426   ###############################################################################
14427   #
14428   # Check which variant of the JDK that we want to build.
14429   # Currently we have:
14430   #    normal:   standard edition
14431   # but the custom make system may add other variants
14432   #
14433   # Effectively the JDK variant gives a name to a specific set of
14434   # modules to compile into the JDK. In the future, these modules
14435   # might even be Jigsaw modules.
14436   #
14437   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14438 $as_echo_n "checking which variant of the JDK to build... " >&6; }
14439 
14440 # Check whether --with-jdk-variant was given.
14441 if test "${with_jdk_variant+set}" = set; then :
14442   withval=$with_jdk_variant;
14443 fi
14444 
14445 
14446   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14447     JDK_VARIANT="normal"
14448   else
14449     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14450   fi
14451 
14452 
14453 
14454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14455 $as_echo "$JDK_VARIANT" >&6; }
14456 
14457 
14458 ###############################################################################
14459 #
14460 # Check which interpreter of the JVM we want to build.
14461 # Currently we have:
14462 #    template: Template interpreter (the default)
14463 #    cpp     : C++ interpreter
14464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14465 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14466 
14467 # Check whether --with-jvm-interpreter was given.
14468 if test "${with_jvm_interpreter+set}" = set; then :
14469   withval=$with_jvm_interpreter;
14470 fi
14471 
14472 
14473 if test "x$with_jvm_interpreter" = x; then
14474      with_jvm_interpreter="template"
14475 fi
14476 
14477 JVM_INTERPRETER="$with_jvm_interpreter"
14478 
14479 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14480    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14481 fi
14482 
14483 
14484 
14485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14486 $as_echo "$with_jvm_interpreter" >&6; }
14487 
14488 
14489 
14490   ###############################################################################
14491   #
14492   # Check which variants of the JVM that we want to build.
14493   # Currently we have:
14494   #    server: normal interpreter and a tiered C1/C2 compiler
14495   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14496   #    minimal1: reduced form of client with optional VM services and features stripped out
14497   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14498   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14499   #    zero: no machine code interpreter, no compiler
14500   #    zeroshark: zero interpreter and shark/llvm compiler backend
14501 #    core: interpreter only, no compiler (only works on some platforms)
14502   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14503 $as_echo_n "checking which variants of the JVM to build... " >&6; }
14504 
14505 # Check whether --with-jvm-variants was given.
14506 if test "${with_jvm_variants+set}" = set; then :
14507   withval=$with_jvm_variants;
14508 fi
14509 
14510 
14511   if test "x$with_jvm_variants" = x; then
14512     with_jvm_variants="server"
14513   fi
14514 
14515   JVM_VARIANTS=",$with_jvm_variants,"
14516   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,//'`
14517 
14518   if test "x$TEST_VARIANTS" != "x,"; then
14519      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14520   fi
14521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14522 $as_echo "$with_jvm_variants" >&6; }
14523 
14524   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14525   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14526   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14527   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14528   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14529   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14530   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14531 
14532   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14533     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14534       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14535     fi
14536   fi
14537   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14538     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14539       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14540     fi
14541   fi
14542   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14543     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14544       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14545     fi
14546   fi
14547 
14548   # Replace the commas with AND for use in the build directory name.
14549   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14550   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/'`
14551   if test "x$COUNT_VARIANTS" != "x,1"; then
14552     BUILDING_MULTIPLE_JVM_VARIANTS=yes
14553   else
14554     BUILDING_MULTIPLE_JVM_VARIANTS=no
14555   fi
14556 
14557 
14558 
14559 
14560 
14561 
14562 
14563 
14564 
14565 
14566   INCLUDE_SA=true
14567   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14568     INCLUDE_SA=false
14569   fi
14570   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14571     INCLUDE_SA=false
14572   fi
14573   if test "x$VAR_CPU" = xppc64 -o "x$VAR_CPU" = xppc64le ; then
14574     INCLUDE_SA=false
14575   fi
14576   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14577     INCLUDE_SA=false
14578   fi
14579 
14580 
14581   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14582     MACOSX_UNIVERSAL="false"
14583   fi
14584 
14585 
14586 
14587 
14588   ###############################################################################
14589   #
14590   # Set the debug level
14591   #    release: no debug information, all optimizations, no asserts.
14592   #    fastdebug: debug information (-g), all optimizations, all asserts
14593   #    slowdebug: debug information (-g), no optimizations, all asserts
14594   #
14595   DEBUG_LEVEL="release"
14596   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14597 $as_echo_n "checking which debug level to use... " >&6; }
14598   # Check whether --enable-debug was given.
14599 if test "${enable_debug+set}" = set; then :
14600   enableval=$enable_debug;
14601         ENABLE_DEBUG="${enableval}"
14602         DEBUG_LEVEL="fastdebug"
14603 
14604 else
14605   ENABLE_DEBUG="no"
14606 fi
14607 
14608 
14609 
14610 # Check whether --with-debug-level was given.
14611 if test "${with_debug_level+set}" = set; then :
14612   withval=$with_debug_level;
14613         DEBUG_LEVEL="${withval}"
14614         if test "x$ENABLE_DEBUG" = xyes; then
14615           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14616         fi
14617 
14618 fi
14619 
14620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14621 $as_echo "$DEBUG_LEVEL" >&6; }
14622 
14623   if test "x$DEBUG_LEVEL" != xrelease && \
14624       test "x$DEBUG_LEVEL" != xfastdebug && \
14625       test "x$DEBUG_LEVEL" != xslowdebug; then
14626     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14627   fi
14628 
14629 
14630   ###############################################################################
14631   #
14632   # Setup legacy vars/targets and new vars to deal with different debug levels.
14633   #
14634 
14635   case $DEBUG_LEVEL in
14636     release )
14637       VARIANT="OPT"
14638       FASTDEBUG="false"
14639       DEBUG_CLASSFILES="false"
14640       BUILD_VARIANT_RELEASE=""
14641       HOTSPOT_DEBUG_LEVEL="product"
14642       HOTSPOT_EXPORT="product"
14643       ;;
14644     fastdebug )
14645       VARIANT="DBG"
14646       FASTDEBUG="true"
14647       DEBUG_CLASSFILES="true"
14648       BUILD_VARIANT_RELEASE="-fastdebug"
14649       HOTSPOT_DEBUG_LEVEL="fastdebug"
14650       HOTSPOT_EXPORT="fastdebug"
14651       ;;
14652     slowdebug )
14653       VARIANT="DBG"
14654       FASTDEBUG="false"
14655       DEBUG_CLASSFILES="true"
14656       BUILD_VARIANT_RELEASE="-debug"
14657       HOTSPOT_DEBUG_LEVEL="jvmg"
14658       HOTSPOT_EXPORT="debug"
14659       ;;
14660   esac
14661 
14662   #####
14663   # Generate the legacy makefile targets for hotspot.
14664   # The hotspot api for selecting the build artifacts, really, needs to be improved.
14665   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14666   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14667   # But until then ...
14668   HOTSPOT_TARGET=""
14669 
14670   if test "x$JVM_VARIANT_SERVER" = xtrue; then
14671     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14672   fi
14673 
14674   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14675     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14676   fi
14677 
14678   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14679     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14680   fi
14681 
14682   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14683     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14684   fi
14685 
14686   if test "x$JVM_VARIANT_ZERO" = xtrue; then
14687     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14688   fi
14689 
14690   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14691     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14692   fi
14693 
14694   if test "x$JVM_VARIANT_CORE" = xtrue; then
14695     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14696   fi
14697 
14698   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14699 
14700   # On Macosx universal binaries are produced, but they only contain
14701   # 64 bit intel. This invalidates control of which jvms are built
14702   # from configure, but only server is valid anyway. Fix this
14703   # when hotspot makefiles are rewritten.
14704   if test "x$MACOSX_UNIVERSAL" = xtrue; then
14705     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14706   fi
14707 
14708   #####
14709 
14710 
14711 
14712 
14713 
14714 
14715 
14716 
14717 # With basic setup done, call the custom early hook.
14718 
14719 
14720 # Check if we have devkits, extra paths or sysroot set.
14721 
14722 
14723 # Check whether --with-devkit was given.
14724 if test "${with_devkit+set}" = set; then :
14725   withval=$with_devkit;
14726 fi
14727 
14728 
14729   if test "x$with_devkit" = xyes; then
14730     as_fn_error $? "--with-devkit must have a value" "$LINENO" 5
14731   elif test "x$with_devkit" != x && test "x$with_devkit" != xno; then
14732 
14733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14734 
14735   # Input might be given as Windows format, start by converting to
14736   # unix format.
14737   path="$with_devkit"
14738   new_path=`$CYGPATH -u "$path"`
14739 
14740   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14741   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14742   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14743   # "foo.exe" is OK but "foo" is an error.
14744   #
14745   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14746   # It is also a way to make sure we got the proper file name for the real test later on.
14747   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14748   if test "x$test_shortpath" = x; then
14749     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14750 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14751     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14752   fi
14753 
14754   # Call helper function which possibly converts this using DOS-style short mode.
14755   # If so, the updated path is stored in $new_path.
14756 
14757   input_path="$new_path"
14758   # Check if we need to convert this using DOS-style short mode. If the path
14759   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14760   # take no chances and rewrite it.
14761   # Note: m4 eats our [], so we need to use [ and ] instead.
14762   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14763   if test "x$has_forbidden_chars" != x; then
14764     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14765     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14766     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14767     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14768       # Going to short mode and back again did indeed matter. Since short mode is
14769       # case insensitive, let's make it lowercase to improve readability.
14770       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14771       # Now convert it back to Unix-style (cygpath)
14772       input_path=`$CYGPATH -u "$shortmode_path"`
14773       new_path="$input_path"
14774     fi
14775   fi
14776 
14777   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14778   if test "x$test_cygdrive_prefix" = x; then
14779     # As a simple fix, exclude /usr/bin since it's not a real path.
14780     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14781       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14782       # a path prefixed by /cygdrive for fixpath to work.
14783       new_path="$CYGWIN_ROOT_PATH$input_path"
14784     fi
14785   fi
14786 
14787 
14788   if test "x$path" != "x$new_path"; then
14789     with_devkit="$new_path"
14790     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14791 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14792   fi
14793 
14794   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14795 
14796   path="$with_devkit"
14797   has_colon=`$ECHO $path | $GREP ^.:`
14798   new_path="$path"
14799   if test "x$has_colon" = x; then
14800     # Not in mixed or Windows style, start by that.
14801     new_path=`cmd //c echo $path`
14802   fi
14803 
14804 
14805   input_path="$new_path"
14806   # Check if we need to convert this using DOS-style short mode. If the path
14807   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14808   # take no chances and rewrite it.
14809   # Note: m4 eats our [], so we need to use [ and ] instead.
14810   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14811   if test "x$has_forbidden_chars" != x; then
14812     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14813     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14814   fi
14815 
14816 
14817   windows_path="$new_path"
14818   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14819     unix_path=`$CYGPATH -u "$windows_path"`
14820     new_path="$unix_path"
14821   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14822     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14823     new_path="$unix_path"
14824   fi
14825 
14826   if test "x$path" != "x$new_path"; then
14827     with_devkit="$new_path"
14828     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14829 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14830   fi
14831 
14832   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14833   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14834 
14835   else
14836     # We're on a posix platform. Hooray! :)
14837     path="$with_devkit"
14838     has_space=`$ECHO "$path" | $GREP " "`
14839     if test "x$has_space" != x; then
14840       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14841 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14842       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14843     fi
14844 
14845     # Use eval to expand a potential ~
14846     eval path="$path"
14847     if test ! -f "$path" && test ! -d "$path"; then
14848       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14849     fi
14850 
14851     with_devkit="`cd "$path"; $THEPWDCMD -L`"
14852   fi
14853 
14854     DEVKIT_ROOT="$with_devkit"
14855     # Check for a meta data info file in the root of the devkit
14856     if test -f "$DEVKIT_ROOT/devkit.info"; then
14857       . $DEVKIT_ROOT/devkit.info
14858       # This potentially sets the following:
14859       # A descriptive name of the devkit
14860 
14861   if test "x$DEVKIT_NAME" = x; then
14862     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14863   fi
14864 
14865       # Corresponds to --with-extra-path
14866 
14867   if test "x$DEVKIT_EXTRA_PATH" = x; then
14868     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14869   fi
14870 
14871       # Corresponds to --with-toolchain-path
14872 
14873   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14874     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14875   fi
14876 
14877       # Corresponds to --with-sysroot
14878 
14879   if test "x$DEVKIT_SYSROOT" = x; then
14880     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14881   fi
14882 
14883 
14884       # Identifies the Visual Studio version in the devkit
14885 
14886   if test "x$DEVKIT_VS_VERSION" = x; then
14887     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14888   fi
14889 
14890       # The Visual Studio include environment variable
14891 
14892   if test "x$DEVKIT_VS_INCLUDE" = x; then
14893     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14894   fi
14895 
14896       # The Visual Studio lib environment variable
14897 
14898   if test "x$DEVKIT_VS_LIB" = x; then
14899     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14900   fi
14901 
14902       # Corresponds to --with-msvcr-dll
14903 
14904   if test "x$DEVKIT_MSVCR_DLL" = x; then
14905     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14906   fi
14907 
14908       # Corresponds to --with-msvcp-dll
14909 
14910   if test "x$DEVKIT_MSVCP_DLL" = x; then
14911     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14912   fi
14913 
14914     fi
14915 
14916     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14917 $as_echo_n "checking for devkit... " >&6; }
14918     if test "x$DEVKIT_NAME" != x; then
14919       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14920 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14921     else
14922       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14923 $as_echo "$DEVKIT_ROOT" >&6; }
14924     fi
14925 
14926 
14927   if test "x$DEVKIT_EXTRA_PATH" != x; then
14928     if test "x$EXTRA_PATH" = x; then
14929       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14930     else
14931       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14932     fi
14933   fi
14934 
14935 
14936     # Fallback default of just /bin if DEVKIT_PATH is not defined
14937     if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14938       DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14939     fi
14940 
14941   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14942     if test "x$TOOLCHAIN_PATH" = x; then
14943       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14944     else
14945       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14946     fi
14947   fi
14948 
14949 
14950     # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14951     # places for backwards compatiblity.
14952     if test "x$DEVKIT_SYSROOT" != x; then
14953       SYSROOT="$DEVKIT_SYSROOT"
14954     elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14955       SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14956     elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14957       SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14958     fi
14959 
14960     if test "x$DEVKIT_ROOT" != x; then
14961       DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
14962       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14963         DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
14964       fi
14965 
14966     fi
14967   fi
14968 
14969   # You can force the sysroot if the sysroot encoded into the compiler tools
14970   # is not correct.
14971 
14972 # Check whether --with-sys-root was given.
14973 if test "${with_sys_root+set}" = set; then :
14974   withval=$with_sys_root; SYSROOT=$with_sys_root
14975 
14976 fi
14977 
14978 
14979 
14980 # Check whether --with-sysroot was given.
14981 if test "${with_sysroot+set}" = set; then :
14982   withval=$with_sysroot; SYSROOT=$with_sysroot
14983 
14984 fi
14985 
14986 
14987 
14988 # Check whether --with-tools-dir was given.
14989 if test "${with_tools_dir+set}" = set; then :
14990   withval=$with_tools_dir;
14991   if test "x$with_tools_dir" != x; then
14992     if test "x$TOOLCHAIN_PATH" = x; then
14993       TOOLCHAIN_PATH="$with_tools_dir"
14994     else
14995       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14996     fi
14997   fi
14998 
14999 
15000 fi
15001 
15002 
15003 
15004 # Check whether --with-toolchain-path was given.
15005 if test "${with_toolchain_path+set}" = set; then :
15006   withval=$with_toolchain_path;
15007   if test "x$with_toolchain_path" != x; then
15008     if test "x$TOOLCHAIN_PATH" = x; then
15009       TOOLCHAIN_PATH="$with_toolchain_path"
15010     else
15011       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15012     fi
15013   fi
15014 
15015 
15016 fi
15017 
15018 
15019 
15020 # Check whether --with-extra-path was given.
15021 if test "${with_extra_path+set}" = set; then :
15022   withval=$with_extra_path;
15023   if test "x$with_extra_path" != x; then
15024     if test "x$EXTRA_PATH" = x; then
15025       EXTRA_PATH="$with_extra_path"
15026     else
15027       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15028     fi
15029   fi
15030 
15031 
15032 fi
15033 
15034 
15035   # Prepend the extra path to the global path
15036 
15037   if test "x$EXTRA_PATH" != x; then
15038     if test "x$PATH" = x; then
15039       PATH="$EXTRA_PATH"
15040     else
15041       PATH="$EXTRA_PATH:$PATH"
15042     fi
15043   fi
15044 
15045 
15046   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15047     # Add extra search paths on solaris for utilities like ar and as etc...
15048     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15049   fi
15050 
15051   # Xcode version will be validated later
15052 
15053 # Check whether --with-xcode-path was given.
15054 if test "${with_xcode_path+set}" = set; then :
15055   withval=$with_xcode_path; XCODE_PATH=$with_xcode_path
15056 
15057 fi
15058 
15059 
15060   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15061 $as_echo_n "checking for sysroot... " >&6; }
15062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15063 $as_echo "$SYSROOT" >&6; }
15064   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15065 $as_echo_n "checking for toolchain path... " >&6; }
15066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15067 $as_echo "$TOOLCHAIN_PATH" >&6; }
15068   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15069 $as_echo_n "checking for extra path... " >&6; }
15070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15071 $as_echo "$EXTRA_PATH" >&6; }
15072 
15073 
15074 # To properly create a configuration name, we need to have the OpenJDK target
15075 # and options (variants and debug level) parsed.
15076 
15077 
15078 
15079 # Check whether --with-conf-name was given.
15080 if test "${with_conf_name+set}" = set; then :
15081   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15082 fi
15083 
15084 
15085   # Test from where we are running configure, in or outside of src root.
15086   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15087 $as_echo_n "checking where to store configuration... " >&6; }
15088   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15089       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15090       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15091     # We are running configure from the src root.
15092     # Create a default ./build/target-variant-debuglevel output root.
15093     if test "x${CONF_NAME}" = x; then
15094       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15095 $as_echo "in default location" >&6; }
15096       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15097     else
15098       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15099 $as_echo "in build directory with custom name" >&6; }
15100     fi
15101     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15102     $MKDIR -p "$OUTPUT_ROOT"
15103     if test ! -d "$OUTPUT_ROOT"; then
15104       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15105     fi
15106   else
15107     # We are running configure from outside of the src dir.
15108     # Then use the current directory as output dir!
15109     # If configuration is situated in normal build directory, just use the build
15110     # directory name as configuration name, otherwise use the complete path.
15111     if test "x${CONF_NAME}" = x; then
15112       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15113     fi
15114     OUTPUT_ROOT="$CURDIR"
15115     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15116 $as_echo "in current directory" >&6; }
15117 
15118     # WARNING: This might be a bad thing to do. You need to be sure you want to
15119     # have a configuration in this directory. Do some sanity checks!
15120 
15121     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15122       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15123       # other files
15124       files_present=`$LS $OUTPUT_ROOT`
15125       # Configure has already touched config.log and confdefs.h in the current dir when this check
15126       # is performed.
15127       filtered_files=`$ECHO "$files_present" \
15128           | $SED -e 's/config.log//g' \
15129               -e 's/confdefs.h//g' \
15130               -e 's/fixpath.exe//g' \
15131               -e 's/ //g' \
15132           | $TR -d '\n'`
15133       if test "x$filtered_files" != x; then
15134         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15135 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
15136         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15137 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15138         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15139 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15140         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15141 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15142         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15143 $as_echo "$as_me: seriously mess up just about everything." >&6;}
15144         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15145 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15146         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15147 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15148         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15149       fi
15150     fi
15151   fi
15152   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15153 $as_echo_n "checking what configuration name to use... " >&6; }
15154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15155 $as_echo "$CONF_NAME" >&6; }
15156 
15157 
15158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15159 
15160   # Input might be given as Windows format, start by converting to
15161   # unix format.
15162   path="$OUTPUT_ROOT"
15163   new_path=`$CYGPATH -u "$path"`
15164 
15165   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15166   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15167   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15168   # "foo.exe" is OK but "foo" is an error.
15169   #
15170   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15171   # It is also a way to make sure we got the proper file name for the real test later on.
15172   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15173   if test "x$test_shortpath" = x; then
15174     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15175 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15176     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15177   fi
15178 
15179   # Call helper function which possibly converts this using DOS-style short mode.
15180   # If so, the updated path is stored in $new_path.
15181 
15182   input_path="$new_path"
15183   # Check if we need to convert this using DOS-style short mode. If the path
15184   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15185   # take no chances and rewrite it.
15186   # Note: m4 eats our [], so we need to use [ and ] instead.
15187   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15188   if test "x$has_forbidden_chars" != x; then
15189     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15190     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15191     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15192     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15193       # Going to short mode and back again did indeed matter. Since short mode is
15194       # case insensitive, let's make it lowercase to improve readability.
15195       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15196       # Now convert it back to Unix-style (cygpath)
15197       input_path=`$CYGPATH -u "$shortmode_path"`
15198       new_path="$input_path"
15199     fi
15200   fi
15201 
15202   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15203   if test "x$test_cygdrive_prefix" = x; then
15204     # As a simple fix, exclude /usr/bin since it's not a real path.
15205     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15206       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15207       # a path prefixed by /cygdrive for fixpath to work.
15208       new_path="$CYGWIN_ROOT_PATH$input_path"
15209     fi
15210   fi
15211 
15212 
15213   if test "x$path" != "x$new_path"; then
15214     OUTPUT_ROOT="$new_path"
15215     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15216 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15217   fi
15218 
15219   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15220 
15221   path="$OUTPUT_ROOT"
15222   has_colon=`$ECHO $path | $GREP ^.:`
15223   new_path="$path"
15224   if test "x$has_colon" = x; then
15225     # Not in mixed or Windows style, start by that.
15226     new_path=`cmd //c echo $path`
15227   fi
15228 
15229 
15230   input_path="$new_path"
15231   # Check if we need to convert this using DOS-style short mode. If the path
15232   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15233   # take no chances and rewrite it.
15234   # Note: m4 eats our [], so we need to use [ and ] instead.
15235   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15236   if test "x$has_forbidden_chars" != x; then
15237     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15238     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15239   fi
15240 
15241 
15242   windows_path="$new_path"
15243   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15244     unix_path=`$CYGPATH -u "$windows_path"`
15245     new_path="$unix_path"
15246   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15247     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15248     new_path="$unix_path"
15249   fi
15250 
15251   if test "x$path" != "x$new_path"; then
15252     OUTPUT_ROOT="$new_path"
15253     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15254 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15255   fi
15256 
15257   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15258   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15259 
15260   else
15261     # We're on a posix platform. Hooray! :)
15262     path="$OUTPUT_ROOT"
15263     has_space=`$ECHO "$path" | $GREP " "`
15264     if test "x$has_space" != x; then
15265       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15266 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15267       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15268     fi
15269 
15270     # Use eval to expand a potential ~
15271     eval path="$path"
15272     if test ! -f "$path" && test ! -d "$path"; then
15273       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15274     fi
15275 
15276     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15277   fi
15278 
15279 
15280   SPEC=$OUTPUT_ROOT/spec.gmk
15281 
15282   CONF_NAME=$CONF_NAME
15283 
15284   OUTPUT_ROOT=$OUTPUT_ROOT
15285 
15286 
15287   # Most of the probed defines are put into config.h
15288   ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15289 
15290   # The spec.gmk file contains all variables for the make system.
15291   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15292 
15293   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15294   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15295 
15296   # The bootcycle-spec.gmk file contains support for boot cycle builds.
15297   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15298 
15299   # The compare.sh is used to compare the build output to other builds.
15300   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15301 
15302   # Spec.sh is currently used by compare-objects.sh
15303   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15304 
15305   # The generated Makefile knows where the spec.gmk is and where the source is.
15306   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15307   # which will look for generated configurations
15308   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15309 
15310 
15311 
15312 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15313 
15314   for ac_prog in apt-get yum port pkgutil pkgadd
15315 do
15316   # Extract the first word of "$ac_prog", so it can be a program name with args.
15317 set dummy $ac_prog; ac_word=$2
15318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15319 $as_echo_n "checking for $ac_word... " >&6; }
15320 if ${ac_cv_prog_PKGHANDLER+:} false; then :
15321   $as_echo_n "(cached) " >&6
15322 else
15323   if test -n "$PKGHANDLER"; then
15324   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15325 else
15326 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15327 for as_dir in $PATH
15328 do
15329   IFS=$as_save_IFS
15330   test -z "$as_dir" && as_dir=.
15331     for ac_exec_ext in '' $ac_executable_extensions; do
15332   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15333     ac_cv_prog_PKGHANDLER="$ac_prog"
15334     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15335     break 2
15336   fi
15337 done
15338   done
15339 IFS=$as_save_IFS
15340 
15341 fi
15342 fi
15343 PKGHANDLER=$ac_cv_prog_PKGHANDLER
15344 if test -n "$PKGHANDLER"; then
15345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15346 $as_echo "$PKGHANDLER" >&6; }
15347 else
15348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15349 $as_echo "no" >&6; }
15350 fi
15351 
15352 
15353   test -n "$PKGHANDLER" && break
15354 done
15355 
15356 
15357 
15358 # Setup tools that requires more complex handling, or that is not needed by the configure script.
15359 
15360 
15361   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15362   if test "x$MAKE" != x; then
15363     # User has supplied a make, test it.
15364     if test ! -f "$MAKE"; then
15365       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15366     fi
15367 
15368   MAKE_CANDIDATE=""$MAKE""
15369   DESCRIPTION="user supplied MAKE=$MAKE"
15370   if test "x$MAKE_CANDIDATE" != x; then
15371     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15372 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15373     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15374     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15375     if test "x$IS_GNU_MAKE" = x; then
15376       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15377 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15378     else
15379       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15380       if test "x$IS_MODERN_MAKE" = x; then
15381         { $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
15382 $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;}
15383       else
15384         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15385           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15386             MAKE_EXPECTED_ENV='cygwin'
15387           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15388             MAKE_EXPECTED_ENV='msys'
15389           else
15390             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15391           fi
15392           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15393           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15394         else
15395           # Not relevant for non-Windows
15396           IS_MAKE_CORRECT_ENV=true
15397         fi
15398         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15399           { $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
15400 $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;}
15401         else
15402           FOUND_MAKE=$MAKE_CANDIDATE
15403 
15404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15405 
15406   # First separate the path from the arguments. This will split at the first
15407   # space.
15408   complete="$FOUND_MAKE"
15409   path="${complete%% *}"
15410   tmp="$complete EOL"
15411   arguments="${tmp#* }"
15412 
15413   # Input might be given as Windows format, start by converting to
15414   # unix format.
15415   new_path=`$CYGPATH -u "$path"`
15416 
15417   # Now try to locate executable using which
15418   new_path=`$WHICH "$new_path" 2> /dev/null`
15419   # bat and cmd files are not always considered executable in cygwin causing which
15420   # to not find them
15421   if test "x$new_path" = x \
15422       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15423       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15424     new_path=`$CYGPATH -u "$path"`
15425   fi
15426   if test "x$new_path" = x; then
15427     # Oops. Which didn't find the executable.
15428     # The splitting of arguments from the executable at a space might have been incorrect,
15429     # since paths with space are more likely in Windows. Give it another try with the whole
15430     # argument.
15431     path="$complete"
15432     arguments="EOL"
15433     new_path=`$CYGPATH -u "$path"`
15434     new_path=`$WHICH "$new_path" 2> /dev/null`
15435     # bat and cmd files are not always considered executable in cygwin causing which
15436     # to not find them
15437     if test "x$new_path" = x \
15438         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15439         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15440       new_path=`$CYGPATH -u "$path"`
15441     fi
15442     if test "x$new_path" = x; then
15443       # It's still not found. Now this is an unrecoverable error.
15444       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15445 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15446       has_space=`$ECHO "$complete" | $GREP " "`
15447       if test "x$has_space" != x; then
15448         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15449 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15450       fi
15451       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15452     fi
15453   fi
15454 
15455   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15456   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15457   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15458   # "foo.exe" is OK but "foo" is an error.
15459   #
15460   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15461   # It is also a way to make sure we got the proper file name for the real test later on.
15462   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15463   if test "x$test_shortpath" = x; then
15464     # Short path failed, file does not exist as specified.
15465     # Try adding .exe or .cmd
15466     if test -f "${new_path}.exe"; then
15467       input_to_shortpath="${new_path}.exe"
15468     elif test -f "${new_path}.cmd"; then
15469       input_to_shortpath="${new_path}.cmd"
15470     else
15471       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15472 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15473       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15474 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15475       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15476     fi
15477   else
15478     input_to_shortpath="$new_path"
15479   fi
15480 
15481   # Call helper function which possibly converts this using DOS-style short mode.
15482   # If so, the updated path is stored in $new_path.
15483   new_path="$input_to_shortpath"
15484 
15485   input_path="$input_to_shortpath"
15486   # Check if we need to convert this using DOS-style short mode. If the path
15487   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15488   # take no chances and rewrite it.
15489   # Note: m4 eats our [], so we need to use [ and ] instead.
15490   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15491   if test "x$has_forbidden_chars" != x; then
15492     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15493     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15494     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15495     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15496       # Going to short mode and back again did indeed matter. Since short mode is
15497       # case insensitive, let's make it lowercase to improve readability.
15498       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15499       # Now convert it back to Unix-style (cygpath)
15500       input_path=`$CYGPATH -u "$shortmode_path"`
15501       new_path="$input_path"
15502     fi
15503   fi
15504 
15505   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15506   if test "x$test_cygdrive_prefix" = x; then
15507     # As a simple fix, exclude /usr/bin since it's not a real path.
15508     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15509       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15510       # a path prefixed by /cygdrive for fixpath to work.
15511       new_path="$CYGWIN_ROOT_PATH$input_path"
15512     fi
15513   fi
15514 
15515   # remove trailing .exe if any
15516   new_path="${new_path/%.exe/}"
15517 
15518   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15519 
15520   # First separate the path from the arguments. This will split at the first
15521   # space.
15522   complete="$FOUND_MAKE"
15523   path="${complete%% *}"
15524   tmp="$complete EOL"
15525   arguments="${tmp#* }"
15526 
15527   # Input might be given as Windows format, start by converting to
15528   # unix format.
15529   new_path="$path"
15530 
15531   windows_path="$new_path"
15532   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15533     unix_path=`$CYGPATH -u "$windows_path"`
15534     new_path="$unix_path"
15535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15536     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15537     new_path="$unix_path"
15538   fi
15539 
15540 
15541   # Now try to locate executable using which
15542   new_path=`$WHICH "$new_path" 2> /dev/null`
15543 
15544   if test "x$new_path" = x; then
15545     # Oops. Which didn't find the executable.
15546     # The splitting of arguments from the executable at a space might have been incorrect,
15547     # since paths with space are more likely in Windows. Give it another try with the whole
15548     # argument.
15549     path="$complete"
15550     arguments="EOL"
15551     new_path="$path"
15552 
15553   windows_path="$new_path"
15554   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15555     unix_path=`$CYGPATH -u "$windows_path"`
15556     new_path="$unix_path"
15557   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15558     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15559     new_path="$unix_path"
15560   fi
15561 
15562 
15563     new_path=`$WHICH "$new_path" 2> /dev/null`
15564     # bat and cmd files are not always considered executable in MSYS causing which
15565     # to not find them
15566     if test "x$new_path" = x \
15567         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15568         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15569       new_path="$path"
15570 
15571   windows_path="$new_path"
15572   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15573     unix_path=`$CYGPATH -u "$windows_path"`
15574     new_path="$unix_path"
15575   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15576     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15577     new_path="$unix_path"
15578   fi
15579 
15580     fi
15581 
15582     if test "x$new_path" = x; then
15583       # It's still not found. Now this is an unrecoverable error.
15584       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15585 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15586       has_space=`$ECHO "$complete" | $GREP " "`
15587       if test "x$has_space" != x; then
15588         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15589 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15590       fi
15591       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15592     fi
15593   fi
15594 
15595   # Now new_path has a complete unix path to the binary
15596   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15597     # Keep paths in /bin as-is, but remove trailing .exe if any
15598     new_path="${new_path/%.exe/}"
15599     # Do not save /bin paths to all_fixpath_prefixes!
15600   else
15601     # Not in mixed or Windows style, start by that.
15602     new_path=`cmd //c echo $new_path`
15603 
15604   input_path="$new_path"
15605   # Check if we need to convert this using DOS-style short mode. If the path
15606   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15607   # take no chances and rewrite it.
15608   # Note: m4 eats our [], so we need to use [ and ] instead.
15609   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15610   if test "x$has_forbidden_chars" != x; then
15611     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15612     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15613   fi
15614 
15615     # Output is in $new_path
15616 
15617   windows_path="$new_path"
15618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15619     unix_path=`$CYGPATH -u "$windows_path"`
15620     new_path="$unix_path"
15621   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15622     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15623     new_path="$unix_path"
15624   fi
15625 
15626     # remove trailing .exe if any
15627     new_path="${new_path/%.exe/}"
15628 
15629     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15630     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15631   fi
15632 
15633   else
15634     # We're on a posix platform. Hooray! :)
15635     # First separate the path from the arguments. This will split at the first
15636     # space.
15637     complete="$FOUND_MAKE"
15638     path="${complete%% *}"
15639     tmp="$complete EOL"
15640     arguments="${tmp#* }"
15641 
15642     # Cannot rely on the command "which" here since it doesn't always work.
15643     is_absolute_path=`$ECHO "$path" | $GREP ^/`
15644     if test -z "$is_absolute_path"; then
15645       # Path to executable is not absolute. Find it.
15646       IFS_save="$IFS"
15647       IFS=:
15648       for p in $PATH; do
15649         if test -f "$p/$path" && test -x "$p/$path"; then
15650           new_path="$p/$path"
15651           break
15652         fi
15653       done
15654       IFS="$IFS_save"
15655     else
15656       # This is an absolute path, we can use it without further modifications.
15657       new_path="$path"
15658     fi
15659 
15660     if test "x$new_path" = x; then
15661       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15662 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15663       has_space=`$ECHO "$complete" | $GREP " "`
15664       if test "x$has_space" != x; then
15665         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15666 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15667       fi
15668       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15669     fi
15670   fi
15671 
15672   # Now join together the path and the arguments once again
15673   if test "x$arguments" != xEOL; then
15674     new_complete="$new_path ${arguments% *}"
15675   else
15676     new_complete="$new_path"
15677   fi
15678 
15679   if test "x$complete" != "x$new_complete"; then
15680     FOUND_MAKE="$new_complete"
15681     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15682 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15683   fi
15684 
15685         fi
15686       fi
15687     fi
15688   fi
15689 
15690     if test "x$FOUND_MAKE" = x; then
15691       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15692     fi
15693   else
15694     # Try our hardest to locate a correct version of GNU make
15695     for ac_prog in gmake
15696 do
15697   # Extract the first word of "$ac_prog", so it can be a program name with args.
15698 set dummy $ac_prog; ac_word=$2
15699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15700 $as_echo_n "checking for $ac_word... " >&6; }
15701 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15702   $as_echo_n "(cached) " >&6
15703 else
15704   case $CHECK_GMAKE in
15705   [\\/]* | ?:[\\/]*)
15706   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15707   ;;
15708   *)
15709   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15710 for as_dir in $PATH
15711 do
15712   IFS=$as_save_IFS
15713   test -z "$as_dir" && as_dir=.
15714     for ac_exec_ext in '' $ac_executable_extensions; do
15715   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15716     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15717     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15718     break 2
15719   fi
15720 done
15721   done
15722 IFS=$as_save_IFS
15723 
15724   ;;
15725 esac
15726 fi
15727 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15728 if test -n "$CHECK_GMAKE"; then
15729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15730 $as_echo "$CHECK_GMAKE" >&6; }
15731 else
15732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15733 $as_echo "no" >&6; }
15734 fi
15735 
15736 
15737   test -n "$CHECK_GMAKE" && break
15738 done
15739 
15740 
15741   MAKE_CANDIDATE=""$CHECK_GMAKE""
15742   DESCRIPTION="gmake in PATH"
15743   if test "x$MAKE_CANDIDATE" != x; then
15744     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15745 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15746     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15747     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15748     if test "x$IS_GNU_MAKE" = x; then
15749       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15750 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15751     else
15752       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15753       if test "x$IS_MODERN_MAKE" = x; then
15754         { $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
15755 $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;}
15756       else
15757         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15758           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15759             MAKE_EXPECTED_ENV='cygwin'
15760           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15761             MAKE_EXPECTED_ENV='msys'
15762           else
15763             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15764           fi
15765           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15766           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15767         else
15768           # Not relevant for non-Windows
15769           IS_MAKE_CORRECT_ENV=true
15770         fi
15771         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15772           { $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
15773 $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;}
15774         else
15775           FOUND_MAKE=$MAKE_CANDIDATE
15776 
15777   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15778 
15779   # First separate the path from the arguments. This will split at the first
15780   # space.
15781   complete="$FOUND_MAKE"
15782   path="${complete%% *}"
15783   tmp="$complete EOL"
15784   arguments="${tmp#* }"
15785 
15786   # Input might be given as Windows format, start by converting to
15787   # unix format.
15788   new_path=`$CYGPATH -u "$path"`
15789 
15790   # Now try to locate executable using which
15791   new_path=`$WHICH "$new_path" 2> /dev/null`
15792   # bat and cmd files are not always considered executable in cygwin causing which
15793   # to not find them
15794   if test "x$new_path" = x \
15795       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15796       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15797     new_path=`$CYGPATH -u "$path"`
15798   fi
15799   if test "x$new_path" = x; then
15800     # Oops. Which didn't find the executable.
15801     # The splitting of arguments from the executable at a space might have been incorrect,
15802     # since paths with space are more likely in Windows. Give it another try with the whole
15803     # argument.
15804     path="$complete"
15805     arguments="EOL"
15806     new_path=`$CYGPATH -u "$path"`
15807     new_path=`$WHICH "$new_path" 2> /dev/null`
15808     # bat and cmd files are not always considered executable in cygwin causing which
15809     # to not find them
15810     if test "x$new_path" = x \
15811         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15812         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15813       new_path=`$CYGPATH -u "$path"`
15814     fi
15815     if test "x$new_path" = x; then
15816       # It's still not found. Now this is an unrecoverable error.
15817       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15818 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15819       has_space=`$ECHO "$complete" | $GREP " "`
15820       if test "x$has_space" != x; then
15821         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15822 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15823       fi
15824       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15825     fi
15826   fi
15827 
15828   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15829   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15830   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15831   # "foo.exe" is OK but "foo" is an error.
15832   #
15833   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15834   # It is also a way to make sure we got the proper file name for the real test later on.
15835   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15836   if test "x$test_shortpath" = x; then
15837     # Short path failed, file does not exist as specified.
15838     # Try adding .exe or .cmd
15839     if test -f "${new_path}.exe"; then
15840       input_to_shortpath="${new_path}.exe"
15841     elif test -f "${new_path}.cmd"; then
15842       input_to_shortpath="${new_path}.cmd"
15843     else
15844       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15845 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15846       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15847 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15848       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15849     fi
15850   else
15851     input_to_shortpath="$new_path"
15852   fi
15853 
15854   # Call helper function which possibly converts this using DOS-style short mode.
15855   # If so, the updated path is stored in $new_path.
15856   new_path="$input_to_shortpath"
15857 
15858   input_path="$input_to_shortpath"
15859   # Check if we need to convert this using DOS-style short mode. If the path
15860   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15861   # take no chances and rewrite it.
15862   # Note: m4 eats our [], so we need to use [ and ] instead.
15863   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15864   if test "x$has_forbidden_chars" != x; then
15865     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15866     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15867     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15868     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15869       # Going to short mode and back again did indeed matter. Since short mode is
15870       # case insensitive, let's make it lowercase to improve readability.
15871       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15872       # Now convert it back to Unix-style (cygpath)
15873       input_path=`$CYGPATH -u "$shortmode_path"`
15874       new_path="$input_path"
15875     fi
15876   fi
15877 
15878   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15879   if test "x$test_cygdrive_prefix" = x; then
15880     # As a simple fix, exclude /usr/bin since it's not a real path.
15881     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15882       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15883       # a path prefixed by /cygdrive for fixpath to work.
15884       new_path="$CYGWIN_ROOT_PATH$input_path"
15885     fi
15886   fi
15887 
15888   # remove trailing .exe if any
15889   new_path="${new_path/%.exe/}"
15890 
15891   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15892 
15893   # First separate the path from the arguments. This will split at the first
15894   # space.
15895   complete="$FOUND_MAKE"
15896   path="${complete%% *}"
15897   tmp="$complete EOL"
15898   arguments="${tmp#* }"
15899 
15900   # Input might be given as Windows format, start by converting to
15901   # unix format.
15902   new_path="$path"
15903 
15904   windows_path="$new_path"
15905   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15906     unix_path=`$CYGPATH -u "$windows_path"`
15907     new_path="$unix_path"
15908   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15909     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15910     new_path="$unix_path"
15911   fi
15912 
15913 
15914   # Now try to locate executable using which
15915   new_path=`$WHICH "$new_path" 2> /dev/null`
15916 
15917   if test "x$new_path" = x; then
15918     # Oops. Which didn't find the executable.
15919     # The splitting of arguments from the executable at a space might have been incorrect,
15920     # since paths with space are more likely in Windows. Give it another try with the whole
15921     # argument.
15922     path="$complete"
15923     arguments="EOL"
15924     new_path="$path"
15925 
15926   windows_path="$new_path"
15927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15928     unix_path=`$CYGPATH -u "$windows_path"`
15929     new_path="$unix_path"
15930   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15931     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15932     new_path="$unix_path"
15933   fi
15934 
15935 
15936     new_path=`$WHICH "$new_path" 2> /dev/null`
15937     # bat and cmd files are not always considered executable in MSYS causing which
15938     # to not find them
15939     if test "x$new_path" = x \
15940         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15941         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15942       new_path="$path"
15943 
15944   windows_path="$new_path"
15945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15946     unix_path=`$CYGPATH -u "$windows_path"`
15947     new_path="$unix_path"
15948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15949     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15950     new_path="$unix_path"
15951   fi
15952 
15953     fi
15954 
15955     if test "x$new_path" = x; then
15956       # It's still not found. Now this is an unrecoverable error.
15957       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15958 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15959       has_space=`$ECHO "$complete" | $GREP " "`
15960       if test "x$has_space" != x; then
15961         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15962 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15963       fi
15964       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15965     fi
15966   fi
15967 
15968   # Now new_path has a complete unix path to the binary
15969   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15970     # Keep paths in /bin as-is, but remove trailing .exe if any
15971     new_path="${new_path/%.exe/}"
15972     # Do not save /bin paths to all_fixpath_prefixes!
15973   else
15974     # Not in mixed or Windows style, start by that.
15975     new_path=`cmd //c echo $new_path`
15976 
15977   input_path="$new_path"
15978   # Check if we need to convert this using DOS-style short mode. If the path
15979   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15980   # take no chances and rewrite it.
15981   # Note: m4 eats our [], so we need to use [ and ] instead.
15982   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15983   if test "x$has_forbidden_chars" != x; then
15984     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15985     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15986   fi
15987 
15988     # Output is in $new_path
15989 
15990   windows_path="$new_path"
15991   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15992     unix_path=`$CYGPATH -u "$windows_path"`
15993     new_path="$unix_path"
15994   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15995     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15996     new_path="$unix_path"
15997   fi
15998 
15999     # remove trailing .exe if any
16000     new_path="${new_path/%.exe/}"
16001 
16002     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16003     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16004   fi
16005 
16006   else
16007     # We're on a posix platform. Hooray! :)
16008     # First separate the path from the arguments. This will split at the first
16009     # space.
16010     complete="$FOUND_MAKE"
16011     path="${complete%% *}"
16012     tmp="$complete EOL"
16013     arguments="${tmp#* }"
16014 
16015     # Cannot rely on the command "which" here since it doesn't always work.
16016     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16017     if test -z "$is_absolute_path"; then
16018       # Path to executable is not absolute. Find it.
16019       IFS_save="$IFS"
16020       IFS=:
16021       for p in $PATH; do
16022         if test -f "$p/$path" && test -x "$p/$path"; then
16023           new_path="$p/$path"
16024           break
16025         fi
16026       done
16027       IFS="$IFS_save"
16028     else
16029       # This is an absolute path, we can use it without further modifications.
16030       new_path="$path"
16031     fi
16032 
16033     if test "x$new_path" = x; then
16034       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16035 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16036       has_space=`$ECHO "$complete" | $GREP " "`
16037       if test "x$has_space" != x; then
16038         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16039 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16040       fi
16041       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16042     fi
16043   fi
16044 
16045   # Now join together the path and the arguments once again
16046   if test "x$arguments" != xEOL; then
16047     new_complete="$new_path ${arguments% *}"
16048   else
16049     new_complete="$new_path"
16050   fi
16051 
16052   if test "x$complete" != "x$new_complete"; then
16053     FOUND_MAKE="$new_complete"
16054     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16055 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16056   fi
16057 
16058         fi
16059       fi
16060     fi
16061   fi
16062 
16063 
16064     if test "x$FOUND_MAKE" = x; then
16065       for ac_prog in make
16066 do
16067   # Extract the first word of "$ac_prog", so it can be a program name with args.
16068 set dummy $ac_prog; ac_word=$2
16069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16070 $as_echo_n "checking for $ac_word... " >&6; }
16071 if ${ac_cv_path_CHECK_MAKE+:} false; then :
16072   $as_echo_n "(cached) " >&6
16073 else
16074   case $CHECK_MAKE in
16075   [\\/]* | ?:[\\/]*)
16076   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16077   ;;
16078   *)
16079   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16080 for as_dir in $PATH
16081 do
16082   IFS=$as_save_IFS
16083   test -z "$as_dir" && as_dir=.
16084     for ac_exec_ext in '' $ac_executable_extensions; do
16085   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16086     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16087     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16088     break 2
16089   fi
16090 done
16091   done
16092 IFS=$as_save_IFS
16093 
16094   ;;
16095 esac
16096 fi
16097 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16098 if test -n "$CHECK_MAKE"; then
16099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16100 $as_echo "$CHECK_MAKE" >&6; }
16101 else
16102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16103 $as_echo "no" >&6; }
16104 fi
16105 
16106 
16107   test -n "$CHECK_MAKE" && break
16108 done
16109 
16110 
16111   MAKE_CANDIDATE=""$CHECK_MAKE""
16112   DESCRIPTION="make in PATH"
16113   if test "x$MAKE_CANDIDATE" != x; then
16114     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16115 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16116     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16117     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16118     if test "x$IS_GNU_MAKE" = x; then
16119       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16120 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16121     else
16122       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16123       if test "x$IS_MODERN_MAKE" = x; then
16124         { $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
16125 $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;}
16126       else
16127         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16128           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16129             MAKE_EXPECTED_ENV='cygwin'
16130           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16131             MAKE_EXPECTED_ENV='msys'
16132           else
16133             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16134           fi
16135           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16136           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16137         else
16138           # Not relevant for non-Windows
16139           IS_MAKE_CORRECT_ENV=true
16140         fi
16141         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16142           { $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
16143 $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;}
16144         else
16145           FOUND_MAKE=$MAKE_CANDIDATE
16146 
16147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16148 
16149   # First separate the path from the arguments. This will split at the first
16150   # space.
16151   complete="$FOUND_MAKE"
16152   path="${complete%% *}"
16153   tmp="$complete EOL"
16154   arguments="${tmp#* }"
16155 
16156   # Input might be given as Windows format, start by converting to
16157   # unix format.
16158   new_path=`$CYGPATH -u "$path"`
16159 
16160   # Now try to locate executable using which
16161   new_path=`$WHICH "$new_path" 2> /dev/null`
16162   # bat and cmd files are not always considered executable in cygwin causing which
16163   # to not find them
16164   if test "x$new_path" = x \
16165       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16166       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16167     new_path=`$CYGPATH -u "$path"`
16168   fi
16169   if test "x$new_path" = x; then
16170     # Oops. Which didn't find the executable.
16171     # The splitting of arguments from the executable at a space might have been incorrect,
16172     # since paths with space are more likely in Windows. Give it another try with the whole
16173     # argument.
16174     path="$complete"
16175     arguments="EOL"
16176     new_path=`$CYGPATH -u "$path"`
16177     new_path=`$WHICH "$new_path" 2> /dev/null`
16178     # bat and cmd files are not always considered executable in cygwin causing which
16179     # to not find them
16180     if test "x$new_path" = x \
16181         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16182         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16183       new_path=`$CYGPATH -u "$path"`
16184     fi
16185     if test "x$new_path" = x; then
16186       # It's still not found. Now this is an unrecoverable error.
16187       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16188 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16189       has_space=`$ECHO "$complete" | $GREP " "`
16190       if test "x$has_space" != x; then
16191         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16192 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16193       fi
16194       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16195     fi
16196   fi
16197 
16198   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16199   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16200   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16201   # "foo.exe" is OK but "foo" is an error.
16202   #
16203   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16204   # It is also a way to make sure we got the proper file name for the real test later on.
16205   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16206   if test "x$test_shortpath" = x; then
16207     # Short path failed, file does not exist as specified.
16208     # Try adding .exe or .cmd
16209     if test -f "${new_path}.exe"; then
16210       input_to_shortpath="${new_path}.exe"
16211     elif test -f "${new_path}.cmd"; then
16212       input_to_shortpath="${new_path}.cmd"
16213     else
16214       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16215 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16216       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16217 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16218       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16219     fi
16220   else
16221     input_to_shortpath="$new_path"
16222   fi
16223 
16224   # Call helper function which possibly converts this using DOS-style short mode.
16225   # If so, the updated path is stored in $new_path.
16226   new_path="$input_to_shortpath"
16227 
16228   input_path="$input_to_shortpath"
16229   # Check if we need to convert this using DOS-style short mode. If the path
16230   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16231   # take no chances and rewrite it.
16232   # Note: m4 eats our [], so we need to use [ and ] instead.
16233   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16234   if test "x$has_forbidden_chars" != x; then
16235     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16236     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16237     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16238     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16239       # Going to short mode and back again did indeed matter. Since short mode is
16240       # case insensitive, let's make it lowercase to improve readability.
16241       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16242       # Now convert it back to Unix-style (cygpath)
16243       input_path=`$CYGPATH -u "$shortmode_path"`
16244       new_path="$input_path"
16245     fi
16246   fi
16247 
16248   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16249   if test "x$test_cygdrive_prefix" = x; then
16250     # As a simple fix, exclude /usr/bin since it's not a real path.
16251     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16252       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16253       # a path prefixed by /cygdrive for fixpath to work.
16254       new_path="$CYGWIN_ROOT_PATH$input_path"
16255     fi
16256   fi
16257 
16258   # remove trailing .exe if any
16259   new_path="${new_path/%.exe/}"
16260 
16261   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16262 
16263   # First separate the path from the arguments. This will split at the first
16264   # space.
16265   complete="$FOUND_MAKE"
16266   path="${complete%% *}"
16267   tmp="$complete EOL"
16268   arguments="${tmp#* }"
16269 
16270   # Input might be given as Windows format, start by converting to
16271   # unix format.
16272   new_path="$path"
16273 
16274   windows_path="$new_path"
16275   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16276     unix_path=`$CYGPATH -u "$windows_path"`
16277     new_path="$unix_path"
16278   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16279     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16280     new_path="$unix_path"
16281   fi
16282 
16283 
16284   # Now try to locate executable using which
16285   new_path=`$WHICH "$new_path" 2> /dev/null`
16286 
16287   if test "x$new_path" = x; then
16288     # Oops. Which didn't find the executable.
16289     # The splitting of arguments from the executable at a space might have been incorrect,
16290     # since paths with space are more likely in Windows. Give it another try with the whole
16291     # argument.
16292     path="$complete"
16293     arguments="EOL"
16294     new_path="$path"
16295 
16296   windows_path="$new_path"
16297   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16298     unix_path=`$CYGPATH -u "$windows_path"`
16299     new_path="$unix_path"
16300   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16301     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16302     new_path="$unix_path"
16303   fi
16304 
16305 
16306     new_path=`$WHICH "$new_path" 2> /dev/null`
16307     # bat and cmd files are not always considered executable in MSYS causing which
16308     # to not find them
16309     if test "x$new_path" = x \
16310         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16311         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16312       new_path="$path"
16313 
16314   windows_path="$new_path"
16315   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16316     unix_path=`$CYGPATH -u "$windows_path"`
16317     new_path="$unix_path"
16318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16319     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16320     new_path="$unix_path"
16321   fi
16322 
16323     fi
16324 
16325     if test "x$new_path" = x; then
16326       # It's still not found. Now this is an unrecoverable error.
16327       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16328 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16329       has_space=`$ECHO "$complete" | $GREP " "`
16330       if test "x$has_space" != x; then
16331         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16332 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16333       fi
16334       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16335     fi
16336   fi
16337 
16338   # Now new_path has a complete unix path to the binary
16339   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16340     # Keep paths in /bin as-is, but remove trailing .exe if any
16341     new_path="${new_path/%.exe/}"
16342     # Do not save /bin paths to all_fixpath_prefixes!
16343   else
16344     # Not in mixed or Windows style, start by that.
16345     new_path=`cmd //c echo $new_path`
16346 
16347   input_path="$new_path"
16348   # Check if we need to convert this using DOS-style short mode. If the path
16349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16350   # take no chances and rewrite it.
16351   # Note: m4 eats our [], so we need to use [ and ] instead.
16352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16353   if test "x$has_forbidden_chars" != x; then
16354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16355     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16356   fi
16357 
16358     # Output is in $new_path
16359 
16360   windows_path="$new_path"
16361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16362     unix_path=`$CYGPATH -u "$windows_path"`
16363     new_path="$unix_path"
16364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16366     new_path="$unix_path"
16367   fi
16368 
16369     # remove trailing .exe if any
16370     new_path="${new_path/%.exe/}"
16371 
16372     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16373     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16374   fi
16375 
16376   else
16377     # We're on a posix platform. Hooray! :)
16378     # First separate the path from the arguments. This will split at the first
16379     # space.
16380     complete="$FOUND_MAKE"
16381     path="${complete%% *}"
16382     tmp="$complete EOL"
16383     arguments="${tmp#* }"
16384 
16385     # Cannot rely on the command "which" here since it doesn't always work.
16386     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16387     if test -z "$is_absolute_path"; then
16388       # Path to executable is not absolute. Find it.
16389       IFS_save="$IFS"
16390       IFS=:
16391       for p in $PATH; do
16392         if test -f "$p/$path" && test -x "$p/$path"; then
16393           new_path="$p/$path"
16394           break
16395         fi
16396       done
16397       IFS="$IFS_save"
16398     else
16399       # This is an absolute path, we can use it without further modifications.
16400       new_path="$path"
16401     fi
16402 
16403     if test "x$new_path" = x; then
16404       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16405 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16406       has_space=`$ECHO "$complete" | $GREP " "`
16407       if test "x$has_space" != x; then
16408         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16409 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16410       fi
16411       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16412     fi
16413   fi
16414 
16415   # Now join together the path and the arguments once again
16416   if test "x$arguments" != xEOL; then
16417     new_complete="$new_path ${arguments% *}"
16418   else
16419     new_complete="$new_path"
16420   fi
16421 
16422   if test "x$complete" != "x$new_complete"; then
16423     FOUND_MAKE="$new_complete"
16424     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16425 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16426   fi
16427 
16428         fi
16429       fi
16430     fi
16431   fi
16432 
16433     fi
16434 
16435     if test "x$FOUND_MAKE" = x; then
16436       if test "x$TOOLCHAIN_PATH" != x; then
16437         # We have a toolchain path, check that as well before giving up.
16438         OLD_PATH=$PATH
16439         PATH=$TOOLCHAIN_PATH:$PATH
16440         for ac_prog in gmake
16441 do
16442   # Extract the first word of "$ac_prog", so it can be a program name with args.
16443 set dummy $ac_prog; ac_word=$2
16444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16445 $as_echo_n "checking for $ac_word... " >&6; }
16446 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16447   $as_echo_n "(cached) " >&6
16448 else
16449   case $CHECK_TOOLSDIR_GMAKE in
16450   [\\/]* | ?:[\\/]*)
16451   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16452   ;;
16453   *)
16454   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16455 for as_dir in $PATH
16456 do
16457   IFS=$as_save_IFS
16458   test -z "$as_dir" && as_dir=.
16459     for ac_exec_ext in '' $ac_executable_extensions; do
16460   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16461     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16462     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16463     break 2
16464   fi
16465 done
16466   done
16467 IFS=$as_save_IFS
16468 
16469   ;;
16470 esac
16471 fi
16472 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16473 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16475 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16476 else
16477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16478 $as_echo "no" >&6; }
16479 fi
16480 
16481 
16482   test -n "$CHECK_TOOLSDIR_GMAKE" && break
16483 done
16484 
16485 
16486   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16487   DESCRIPTION="gmake in tools-dir"
16488   if test "x$MAKE_CANDIDATE" != x; then
16489     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16490 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16491     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16492     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16493     if test "x$IS_GNU_MAKE" = x; then
16494       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16495 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16496     else
16497       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16498       if test "x$IS_MODERN_MAKE" = x; then
16499         { $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
16500 $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;}
16501       else
16502         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16503           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16504             MAKE_EXPECTED_ENV='cygwin'
16505           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16506             MAKE_EXPECTED_ENV='msys'
16507           else
16508             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16509           fi
16510           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16511           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16512         else
16513           # Not relevant for non-Windows
16514           IS_MAKE_CORRECT_ENV=true
16515         fi
16516         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16517           { $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
16518 $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;}
16519         else
16520           FOUND_MAKE=$MAKE_CANDIDATE
16521 
16522   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16523 
16524   # First separate the path from the arguments. This will split at the first
16525   # space.
16526   complete="$FOUND_MAKE"
16527   path="${complete%% *}"
16528   tmp="$complete EOL"
16529   arguments="${tmp#* }"
16530 
16531   # Input might be given as Windows format, start by converting to
16532   # unix format.
16533   new_path=`$CYGPATH -u "$path"`
16534 
16535   # Now try to locate executable using which
16536   new_path=`$WHICH "$new_path" 2> /dev/null`
16537   # bat and cmd files are not always considered executable in cygwin causing which
16538   # to not find them
16539   if test "x$new_path" = x \
16540       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16541       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16542     new_path=`$CYGPATH -u "$path"`
16543   fi
16544   if test "x$new_path" = x; then
16545     # Oops. Which didn't find the executable.
16546     # The splitting of arguments from the executable at a space might have been incorrect,
16547     # since paths with space are more likely in Windows. Give it another try with the whole
16548     # argument.
16549     path="$complete"
16550     arguments="EOL"
16551     new_path=`$CYGPATH -u "$path"`
16552     new_path=`$WHICH "$new_path" 2> /dev/null`
16553     # bat and cmd files are not always considered executable in cygwin causing which
16554     # to not find them
16555     if test "x$new_path" = x \
16556         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16557         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16558       new_path=`$CYGPATH -u "$path"`
16559     fi
16560     if test "x$new_path" = x; then
16561       # It's still not found. Now this is an unrecoverable error.
16562       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16563 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16564       has_space=`$ECHO "$complete" | $GREP " "`
16565       if test "x$has_space" != x; then
16566         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16567 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16568       fi
16569       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16570     fi
16571   fi
16572 
16573   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16574   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16575   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16576   # "foo.exe" is OK but "foo" is an error.
16577   #
16578   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16579   # It is also a way to make sure we got the proper file name for the real test later on.
16580   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16581   if test "x$test_shortpath" = x; then
16582     # Short path failed, file does not exist as specified.
16583     # Try adding .exe or .cmd
16584     if test -f "${new_path}.exe"; then
16585       input_to_shortpath="${new_path}.exe"
16586     elif test -f "${new_path}.cmd"; then
16587       input_to_shortpath="${new_path}.cmd"
16588     else
16589       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16590 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16591       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16592 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16593       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16594     fi
16595   else
16596     input_to_shortpath="$new_path"
16597   fi
16598 
16599   # Call helper function which possibly converts this using DOS-style short mode.
16600   # If so, the updated path is stored in $new_path.
16601   new_path="$input_to_shortpath"
16602 
16603   input_path="$input_to_shortpath"
16604   # Check if we need to convert this using DOS-style short mode. If the path
16605   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16606   # take no chances and rewrite it.
16607   # Note: m4 eats our [], so we need to use [ and ] instead.
16608   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16609   if test "x$has_forbidden_chars" != x; then
16610     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16611     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16612     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16613     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16614       # Going to short mode and back again did indeed matter. Since short mode is
16615       # case insensitive, let's make it lowercase to improve readability.
16616       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16617       # Now convert it back to Unix-style (cygpath)
16618       input_path=`$CYGPATH -u "$shortmode_path"`
16619       new_path="$input_path"
16620     fi
16621   fi
16622 
16623   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16624   if test "x$test_cygdrive_prefix" = x; then
16625     # As a simple fix, exclude /usr/bin since it's not a real path.
16626     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16627       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16628       # a path prefixed by /cygdrive for fixpath to work.
16629       new_path="$CYGWIN_ROOT_PATH$input_path"
16630     fi
16631   fi
16632 
16633   # remove trailing .exe if any
16634   new_path="${new_path/%.exe/}"
16635 
16636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16637 
16638   # First separate the path from the arguments. This will split at the first
16639   # space.
16640   complete="$FOUND_MAKE"
16641   path="${complete%% *}"
16642   tmp="$complete EOL"
16643   arguments="${tmp#* }"
16644 
16645   # Input might be given as Windows format, start by converting to
16646   # unix format.
16647   new_path="$path"
16648 
16649   windows_path="$new_path"
16650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16651     unix_path=`$CYGPATH -u "$windows_path"`
16652     new_path="$unix_path"
16653   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16654     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16655     new_path="$unix_path"
16656   fi
16657 
16658 
16659   # Now try to locate executable using which
16660   new_path=`$WHICH "$new_path" 2> /dev/null`
16661 
16662   if test "x$new_path" = x; then
16663     # Oops. Which didn't find the executable.
16664     # The splitting of arguments from the executable at a space might have been incorrect,
16665     # since paths with space are more likely in Windows. Give it another try with the whole
16666     # argument.
16667     path="$complete"
16668     arguments="EOL"
16669     new_path="$path"
16670 
16671   windows_path="$new_path"
16672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16673     unix_path=`$CYGPATH -u "$windows_path"`
16674     new_path="$unix_path"
16675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16676     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16677     new_path="$unix_path"
16678   fi
16679 
16680 
16681     new_path=`$WHICH "$new_path" 2> /dev/null`
16682     # bat and cmd files are not always considered executable in MSYS causing which
16683     # to not find them
16684     if test "x$new_path" = x \
16685         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16686         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16687       new_path="$path"
16688 
16689   windows_path="$new_path"
16690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16691     unix_path=`$CYGPATH -u "$windows_path"`
16692     new_path="$unix_path"
16693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16695     new_path="$unix_path"
16696   fi
16697 
16698     fi
16699 
16700     if test "x$new_path" = x; then
16701       # It's still not found. Now this is an unrecoverable error.
16702       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16703 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16704       has_space=`$ECHO "$complete" | $GREP " "`
16705       if test "x$has_space" != x; then
16706         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16707 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16708       fi
16709       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16710     fi
16711   fi
16712 
16713   # Now new_path has a complete unix path to the binary
16714   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16715     # Keep paths in /bin as-is, but remove trailing .exe if any
16716     new_path="${new_path/%.exe/}"
16717     # Do not save /bin paths to all_fixpath_prefixes!
16718   else
16719     # Not in mixed or Windows style, start by that.
16720     new_path=`cmd //c echo $new_path`
16721 
16722   input_path="$new_path"
16723   # Check if we need to convert this using DOS-style short mode. If the path
16724   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16725   # take no chances and rewrite it.
16726   # Note: m4 eats our [], so we need to use [ and ] instead.
16727   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16728   if test "x$has_forbidden_chars" != x; then
16729     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16730     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16731   fi
16732 
16733     # Output is in $new_path
16734 
16735   windows_path="$new_path"
16736   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16737     unix_path=`$CYGPATH -u "$windows_path"`
16738     new_path="$unix_path"
16739   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16740     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16741     new_path="$unix_path"
16742   fi
16743 
16744     # remove trailing .exe if any
16745     new_path="${new_path/%.exe/}"
16746 
16747     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16748     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16749   fi
16750 
16751   else
16752     # We're on a posix platform. Hooray! :)
16753     # First separate the path from the arguments. This will split at the first
16754     # space.
16755     complete="$FOUND_MAKE"
16756     path="${complete%% *}"
16757     tmp="$complete EOL"
16758     arguments="${tmp#* }"
16759 
16760     # Cannot rely on the command "which" here since it doesn't always work.
16761     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16762     if test -z "$is_absolute_path"; then
16763       # Path to executable is not absolute. Find it.
16764       IFS_save="$IFS"
16765       IFS=:
16766       for p in $PATH; do
16767         if test -f "$p/$path" && test -x "$p/$path"; then
16768           new_path="$p/$path"
16769           break
16770         fi
16771       done
16772       IFS="$IFS_save"
16773     else
16774       # This is an absolute path, we can use it without further modifications.
16775       new_path="$path"
16776     fi
16777 
16778     if test "x$new_path" = x; then
16779       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16780 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16781       has_space=`$ECHO "$complete" | $GREP " "`
16782       if test "x$has_space" != x; then
16783         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16784 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16785       fi
16786       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16787     fi
16788   fi
16789 
16790   # Now join together the path and the arguments once again
16791   if test "x$arguments" != xEOL; then
16792     new_complete="$new_path ${arguments% *}"
16793   else
16794     new_complete="$new_path"
16795   fi
16796 
16797   if test "x$complete" != "x$new_complete"; then
16798     FOUND_MAKE="$new_complete"
16799     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16800 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16801   fi
16802 
16803         fi
16804       fi
16805     fi
16806   fi
16807 
16808         if test "x$FOUND_MAKE" = x; then
16809           for ac_prog in make
16810 do
16811   # Extract the first word of "$ac_prog", so it can be a program name with args.
16812 set dummy $ac_prog; ac_word=$2
16813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16814 $as_echo_n "checking for $ac_word... " >&6; }
16815 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16816   $as_echo_n "(cached) " >&6
16817 else
16818   case $CHECK_TOOLSDIR_MAKE in
16819   [\\/]* | ?:[\\/]*)
16820   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16821   ;;
16822   *)
16823   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16824 for as_dir in $PATH
16825 do
16826   IFS=$as_save_IFS
16827   test -z "$as_dir" && as_dir=.
16828     for ac_exec_ext in '' $ac_executable_extensions; do
16829   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16830     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16831     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16832     break 2
16833   fi
16834 done
16835   done
16836 IFS=$as_save_IFS
16837 
16838   ;;
16839 esac
16840 fi
16841 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16842 if test -n "$CHECK_TOOLSDIR_MAKE"; then
16843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16844 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16845 else
16846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16847 $as_echo "no" >&6; }
16848 fi
16849 
16850 
16851   test -n "$CHECK_TOOLSDIR_MAKE" && break
16852 done
16853 
16854 
16855   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16856   DESCRIPTION="make in tools-dir"
16857   if test "x$MAKE_CANDIDATE" != x; then
16858     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16859 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16860     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16861     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16862     if test "x$IS_GNU_MAKE" = x; then
16863       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16864 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16865     else
16866       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16867       if test "x$IS_MODERN_MAKE" = x; then
16868         { $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
16869 $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;}
16870       else
16871         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16872           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16873             MAKE_EXPECTED_ENV='cygwin'
16874           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16875             MAKE_EXPECTED_ENV='msys'
16876           else
16877             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16878           fi
16879           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16880           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16881         else
16882           # Not relevant for non-Windows
16883           IS_MAKE_CORRECT_ENV=true
16884         fi
16885         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16886           { $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
16887 $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;}
16888         else
16889           FOUND_MAKE=$MAKE_CANDIDATE
16890 
16891   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16892 
16893   # First separate the path from the arguments. This will split at the first
16894   # space.
16895   complete="$FOUND_MAKE"
16896   path="${complete%% *}"
16897   tmp="$complete EOL"
16898   arguments="${tmp#* }"
16899 
16900   # Input might be given as Windows format, start by converting to
16901   # unix format.
16902   new_path=`$CYGPATH -u "$path"`
16903 
16904   # Now try to locate executable using which
16905   new_path=`$WHICH "$new_path" 2> /dev/null`
16906   # bat and cmd files are not always considered executable in cygwin causing which
16907   # to not find them
16908   if test "x$new_path" = x \
16909       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16910       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16911     new_path=`$CYGPATH -u "$path"`
16912   fi
16913   if test "x$new_path" = x; then
16914     # Oops. Which didn't find the executable.
16915     # The splitting of arguments from the executable at a space might have been incorrect,
16916     # since paths with space are more likely in Windows. Give it another try with the whole
16917     # argument.
16918     path="$complete"
16919     arguments="EOL"
16920     new_path=`$CYGPATH -u "$path"`
16921     new_path=`$WHICH "$new_path" 2> /dev/null`
16922     # bat and cmd files are not always considered executable in cygwin causing which
16923     # to not find them
16924     if test "x$new_path" = x \
16925         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16926         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16927       new_path=`$CYGPATH -u "$path"`
16928     fi
16929     if test "x$new_path" = x; then
16930       # It's still not found. Now this is an unrecoverable error.
16931       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16932 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16933       has_space=`$ECHO "$complete" | $GREP " "`
16934       if test "x$has_space" != x; then
16935         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16936 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16937       fi
16938       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16939     fi
16940   fi
16941 
16942   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16943   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16944   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16945   # "foo.exe" is OK but "foo" is an error.
16946   #
16947   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16948   # It is also a way to make sure we got the proper file name for the real test later on.
16949   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16950   if test "x$test_shortpath" = x; then
16951     # Short path failed, file does not exist as specified.
16952     # Try adding .exe or .cmd
16953     if test -f "${new_path}.exe"; then
16954       input_to_shortpath="${new_path}.exe"
16955     elif test -f "${new_path}.cmd"; then
16956       input_to_shortpath="${new_path}.cmd"
16957     else
16958       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16959 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16960       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16961 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16962       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16963     fi
16964   else
16965     input_to_shortpath="$new_path"
16966   fi
16967 
16968   # Call helper function which possibly converts this using DOS-style short mode.
16969   # If so, the updated path is stored in $new_path.
16970   new_path="$input_to_shortpath"
16971 
16972   input_path="$input_to_shortpath"
16973   # Check if we need to convert this using DOS-style short mode. If the path
16974   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16975   # take no chances and rewrite it.
16976   # Note: m4 eats our [], so we need to use [ and ] instead.
16977   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16978   if test "x$has_forbidden_chars" != x; then
16979     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16980     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16981     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16982     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16983       # Going to short mode and back again did indeed matter. Since short mode is
16984       # case insensitive, let's make it lowercase to improve readability.
16985       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16986       # Now convert it back to Unix-style (cygpath)
16987       input_path=`$CYGPATH -u "$shortmode_path"`
16988       new_path="$input_path"
16989     fi
16990   fi
16991 
16992   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16993   if test "x$test_cygdrive_prefix" = x; then
16994     # As a simple fix, exclude /usr/bin since it's not a real path.
16995     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16996       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16997       # a path prefixed by /cygdrive for fixpath to work.
16998       new_path="$CYGWIN_ROOT_PATH$input_path"
16999     fi
17000   fi
17001 
17002   # remove trailing .exe if any
17003   new_path="${new_path/%.exe/}"
17004 
17005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17006 
17007   # First separate the path from the arguments. This will split at the first
17008   # space.
17009   complete="$FOUND_MAKE"
17010   path="${complete%% *}"
17011   tmp="$complete EOL"
17012   arguments="${tmp#* }"
17013 
17014   # Input might be given as Windows format, start by converting to
17015   # unix format.
17016   new_path="$path"
17017 
17018   windows_path="$new_path"
17019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17020     unix_path=`$CYGPATH -u "$windows_path"`
17021     new_path="$unix_path"
17022   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17023     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17024     new_path="$unix_path"
17025   fi
17026 
17027 
17028   # Now try to locate executable using which
17029   new_path=`$WHICH "$new_path" 2> /dev/null`
17030 
17031   if test "x$new_path" = x; then
17032     # Oops. Which didn't find the executable.
17033     # The splitting of arguments from the executable at a space might have been incorrect,
17034     # since paths with space are more likely in Windows. Give it another try with the whole
17035     # argument.
17036     path="$complete"
17037     arguments="EOL"
17038     new_path="$path"
17039 
17040   windows_path="$new_path"
17041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17042     unix_path=`$CYGPATH -u "$windows_path"`
17043     new_path="$unix_path"
17044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17045     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17046     new_path="$unix_path"
17047   fi
17048 
17049 
17050     new_path=`$WHICH "$new_path" 2> /dev/null`
17051     # bat and cmd files are not always considered executable in MSYS causing which
17052     # to not find them
17053     if test "x$new_path" = x \
17054         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17055         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17056       new_path="$path"
17057 
17058   windows_path="$new_path"
17059   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17060     unix_path=`$CYGPATH -u "$windows_path"`
17061     new_path="$unix_path"
17062   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17063     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17064     new_path="$unix_path"
17065   fi
17066 
17067     fi
17068 
17069     if test "x$new_path" = x; then
17070       # It's still not found. Now this is an unrecoverable error.
17071       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17072 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17073       has_space=`$ECHO "$complete" | $GREP " "`
17074       if test "x$has_space" != x; then
17075         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17076 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17077       fi
17078       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17079     fi
17080   fi
17081 
17082   # Now new_path has a complete unix path to the binary
17083   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17084     # Keep paths in /bin as-is, but remove trailing .exe if any
17085     new_path="${new_path/%.exe/}"
17086     # Do not save /bin paths to all_fixpath_prefixes!
17087   else
17088     # Not in mixed or Windows style, start by that.
17089     new_path=`cmd //c echo $new_path`
17090 
17091   input_path="$new_path"
17092   # Check if we need to convert this using DOS-style short mode. If the path
17093   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17094   # take no chances and rewrite it.
17095   # Note: m4 eats our [], so we need to use [ and ] instead.
17096   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17097   if test "x$has_forbidden_chars" != x; then
17098     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17099     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17100   fi
17101 
17102     # Output is in $new_path
17103 
17104   windows_path="$new_path"
17105   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17106     unix_path=`$CYGPATH -u "$windows_path"`
17107     new_path="$unix_path"
17108   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17109     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17110     new_path="$unix_path"
17111   fi
17112 
17113     # remove trailing .exe if any
17114     new_path="${new_path/%.exe/}"
17115 
17116     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17117     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17118   fi
17119 
17120   else
17121     # We're on a posix platform. Hooray! :)
17122     # First separate the path from the arguments. This will split at the first
17123     # space.
17124     complete="$FOUND_MAKE"
17125     path="${complete%% *}"
17126     tmp="$complete EOL"
17127     arguments="${tmp#* }"
17128 
17129     # Cannot rely on the command "which" here since it doesn't always work.
17130     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17131     if test -z "$is_absolute_path"; then
17132       # Path to executable is not absolute. Find it.
17133       IFS_save="$IFS"
17134       IFS=:
17135       for p in $PATH; do
17136         if test -f "$p/$path" && test -x "$p/$path"; then
17137           new_path="$p/$path"
17138           break
17139         fi
17140       done
17141       IFS="$IFS_save"
17142     else
17143       # This is an absolute path, we can use it without further modifications.
17144       new_path="$path"
17145     fi
17146 
17147     if test "x$new_path" = x; then
17148       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17149 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17150       has_space=`$ECHO "$complete" | $GREP " "`
17151       if test "x$has_space" != x; then
17152         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17153 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17154       fi
17155       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17156     fi
17157   fi
17158 
17159   # Now join together the path and the arguments once again
17160   if test "x$arguments" != xEOL; then
17161     new_complete="$new_path ${arguments% *}"
17162   else
17163     new_complete="$new_path"
17164   fi
17165 
17166   if test "x$complete" != "x$new_complete"; then
17167     FOUND_MAKE="$new_complete"
17168     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17169 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17170   fi
17171 
17172         fi
17173       fi
17174     fi
17175   fi
17176 
17177         fi
17178         PATH=$OLD_PATH
17179       fi
17180     fi
17181 
17182     if test "x$FOUND_MAKE" = x; then
17183       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
17184     fi
17185   fi
17186 
17187   MAKE=$FOUND_MAKE
17188 
17189   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17190 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17191 
17192 
17193 
17194   # Test if find supports -delete
17195   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17196 $as_echo_n "checking if find supports -delete... " >&6; }
17197   FIND_DELETE="-delete"
17198 
17199   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17200 
17201   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17202 
17203   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17204   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17205     # No, it does not.
17206     rm $DELETEDIR/TestIfFindSupportsDelete
17207     FIND_DELETE="-exec rm \{\} \+"
17208     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17209 $as_echo "no" >&6; }
17210   else
17211     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17212 $as_echo "yes" >&6; }
17213   fi
17214   rmdir $DELETEDIR
17215 
17216 
17217 
17218   # These tools might not be installed by default,
17219   # need hint on how to install them.
17220 
17221 
17222 
17223   # Publish this variable in the help.
17224 
17225 
17226   if test "x$UNZIP" = x; then
17227     # The variable is not set by user, try to locate tool using the code snippet
17228     for ac_prog in unzip
17229 do
17230   # Extract the first word of "$ac_prog", so it can be a program name with args.
17231 set dummy $ac_prog; ac_word=$2
17232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17233 $as_echo_n "checking for $ac_word... " >&6; }
17234 if ${ac_cv_path_UNZIP+:} false; then :
17235   $as_echo_n "(cached) " >&6
17236 else
17237   case $UNZIP in
17238   [\\/]* | ?:[\\/]*)
17239   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17240   ;;
17241   *)
17242   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17243 for as_dir in $PATH
17244 do
17245   IFS=$as_save_IFS
17246   test -z "$as_dir" && as_dir=.
17247     for ac_exec_ext in '' $ac_executable_extensions; do
17248   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17249     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17250     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17251     break 2
17252   fi
17253 done
17254   done
17255 IFS=$as_save_IFS
17256 
17257   ;;
17258 esac
17259 fi
17260 UNZIP=$ac_cv_path_UNZIP
17261 if test -n "$UNZIP"; then
17262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17263 $as_echo "$UNZIP" >&6; }
17264 else
17265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17266 $as_echo "no" >&6; }
17267 fi
17268 
17269 
17270   test -n "$UNZIP" && break
17271 done
17272 
17273   else
17274     # The variable is set, but is it from the command line or the environment?
17275 
17276     # Try to remove the string !UNZIP! from our list.
17277     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17278     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17279       # If it failed, the variable was not from the command line. Ignore it,
17280       # but warn the user (except for BASH, which is always set by the calling BASH).
17281       if test "xUNZIP" != xBASH; then
17282         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17283 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17284       fi
17285       # Try to locate tool using the code snippet
17286       for ac_prog in unzip
17287 do
17288   # Extract the first word of "$ac_prog", so it can be a program name with args.
17289 set dummy $ac_prog; ac_word=$2
17290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17291 $as_echo_n "checking for $ac_word... " >&6; }
17292 if ${ac_cv_path_UNZIP+:} false; then :
17293   $as_echo_n "(cached) " >&6
17294 else
17295   case $UNZIP in
17296   [\\/]* | ?:[\\/]*)
17297   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17298   ;;
17299   *)
17300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17301 for as_dir in $PATH
17302 do
17303   IFS=$as_save_IFS
17304   test -z "$as_dir" && as_dir=.
17305     for ac_exec_ext in '' $ac_executable_extensions; do
17306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17307     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17309     break 2
17310   fi
17311 done
17312   done
17313 IFS=$as_save_IFS
17314 
17315   ;;
17316 esac
17317 fi
17318 UNZIP=$ac_cv_path_UNZIP
17319 if test -n "$UNZIP"; then
17320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17321 $as_echo "$UNZIP" >&6; }
17322 else
17323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17324 $as_echo "no" >&6; }
17325 fi
17326 
17327 
17328   test -n "$UNZIP" && break
17329 done
17330 
17331     else
17332       # If it succeeded, then it was overridden by the user. We will use it
17333       # for the tool.
17334 
17335       # First remove it from the list of overridden variables, so we can test
17336       # for unknown variables in the end.
17337       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17338 
17339       # Check if the provided tool contains a complete path.
17340       tool_specified="$UNZIP"
17341       tool_basename="${tool_specified##*/}"
17342       if test "x$tool_basename" = "x$tool_specified"; then
17343         # A command without a complete path is provided, search $PATH.
17344         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17345 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17346         # Extract the first word of "$tool_basename", so it can be a program name with args.
17347 set dummy $tool_basename; ac_word=$2
17348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17349 $as_echo_n "checking for $ac_word... " >&6; }
17350 if ${ac_cv_path_UNZIP+:} false; then :
17351   $as_echo_n "(cached) " >&6
17352 else
17353   case $UNZIP in
17354   [\\/]* | ?:[\\/]*)
17355   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17356   ;;
17357   *)
17358   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17359 for as_dir in $PATH
17360 do
17361   IFS=$as_save_IFS
17362   test -z "$as_dir" && as_dir=.
17363     for ac_exec_ext in '' $ac_executable_extensions; do
17364   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17365     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17366     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17367     break 2
17368   fi
17369 done
17370   done
17371 IFS=$as_save_IFS
17372 
17373   ;;
17374 esac
17375 fi
17376 UNZIP=$ac_cv_path_UNZIP
17377 if test -n "$UNZIP"; then
17378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17379 $as_echo "$UNZIP" >&6; }
17380 else
17381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17382 $as_echo "no" >&6; }
17383 fi
17384 
17385 
17386         if test "x$UNZIP" = x; then
17387           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17388         fi
17389       else
17390         # Otherwise we believe it is a complete path. Use it as it is.
17391         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17392 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17393         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17394 $as_echo_n "checking for UNZIP... " >&6; }
17395         if test ! -x "$tool_specified"; then
17396           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17397 $as_echo "not found" >&6; }
17398           as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17399         fi
17400         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17401 $as_echo "$tool_specified" >&6; }
17402       fi
17403     fi
17404   fi
17405 
17406 
17407 
17408   if test "x$UNZIP" = x; then
17409     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17410   fi
17411 
17412 
17413 
17414 
17415 
17416   # Publish this variable in the help.
17417 
17418 
17419   if test "x$ZIP" = x; then
17420     # The variable is not set by user, try to locate tool using the code snippet
17421     for ac_prog in zip
17422 do
17423   # Extract the first word of "$ac_prog", so it can be a program name with args.
17424 set dummy $ac_prog; ac_word=$2
17425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17426 $as_echo_n "checking for $ac_word... " >&6; }
17427 if ${ac_cv_path_ZIP+:} false; then :
17428   $as_echo_n "(cached) " >&6
17429 else
17430   case $ZIP in
17431   [\\/]* | ?:[\\/]*)
17432   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17433   ;;
17434   *)
17435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17436 for as_dir in $PATH
17437 do
17438   IFS=$as_save_IFS
17439   test -z "$as_dir" && as_dir=.
17440     for ac_exec_ext in '' $ac_executable_extensions; do
17441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17442     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17444     break 2
17445   fi
17446 done
17447   done
17448 IFS=$as_save_IFS
17449 
17450   ;;
17451 esac
17452 fi
17453 ZIP=$ac_cv_path_ZIP
17454 if test -n "$ZIP"; then
17455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17456 $as_echo "$ZIP" >&6; }
17457 else
17458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17459 $as_echo "no" >&6; }
17460 fi
17461 
17462 
17463   test -n "$ZIP" && break
17464 done
17465 
17466   else
17467     # The variable is set, but is it from the command line or the environment?
17468 
17469     # Try to remove the string !ZIP! from our list.
17470     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17471     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17472       # If it failed, the variable was not from the command line. Ignore it,
17473       # but warn the user (except for BASH, which is always set by the calling BASH).
17474       if test "xZIP" != xBASH; then
17475         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17476 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17477       fi
17478       # Try to locate tool using the code snippet
17479       for ac_prog in zip
17480 do
17481   # Extract the first word of "$ac_prog", so it can be a program name with args.
17482 set dummy $ac_prog; ac_word=$2
17483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17484 $as_echo_n "checking for $ac_word... " >&6; }
17485 if ${ac_cv_path_ZIP+:} false; then :
17486   $as_echo_n "(cached) " >&6
17487 else
17488   case $ZIP in
17489   [\\/]* | ?:[\\/]*)
17490   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17491   ;;
17492   *)
17493   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17494 for as_dir in $PATH
17495 do
17496   IFS=$as_save_IFS
17497   test -z "$as_dir" && as_dir=.
17498     for ac_exec_ext in '' $ac_executable_extensions; do
17499   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17500     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17501     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17502     break 2
17503   fi
17504 done
17505   done
17506 IFS=$as_save_IFS
17507 
17508   ;;
17509 esac
17510 fi
17511 ZIP=$ac_cv_path_ZIP
17512 if test -n "$ZIP"; then
17513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17514 $as_echo "$ZIP" >&6; }
17515 else
17516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17517 $as_echo "no" >&6; }
17518 fi
17519 
17520 
17521   test -n "$ZIP" && break
17522 done
17523 
17524     else
17525       # If it succeeded, then it was overridden by the user. We will use it
17526       # for the tool.
17527 
17528       # First remove it from the list of overridden variables, so we can test
17529       # for unknown variables in the end.
17530       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17531 
17532       # Check if the provided tool contains a complete path.
17533       tool_specified="$ZIP"
17534       tool_basename="${tool_specified##*/}"
17535       if test "x$tool_basename" = "x$tool_specified"; then
17536         # A command without a complete path is provided, search $PATH.
17537         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17538 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17539         # Extract the first word of "$tool_basename", so it can be a program name with args.
17540 set dummy $tool_basename; ac_word=$2
17541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17542 $as_echo_n "checking for $ac_word... " >&6; }
17543 if ${ac_cv_path_ZIP+:} false; then :
17544   $as_echo_n "(cached) " >&6
17545 else
17546   case $ZIP in
17547   [\\/]* | ?:[\\/]*)
17548   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17549   ;;
17550   *)
17551   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17552 for as_dir in $PATH
17553 do
17554   IFS=$as_save_IFS
17555   test -z "$as_dir" && as_dir=.
17556     for ac_exec_ext in '' $ac_executable_extensions; do
17557   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17558     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17559     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17560     break 2
17561   fi
17562 done
17563   done
17564 IFS=$as_save_IFS
17565 
17566   ;;
17567 esac
17568 fi
17569 ZIP=$ac_cv_path_ZIP
17570 if test -n "$ZIP"; then
17571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17572 $as_echo "$ZIP" >&6; }
17573 else
17574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17575 $as_echo "no" >&6; }
17576 fi
17577 
17578 
17579         if test "x$ZIP" = x; then
17580           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17581         fi
17582       else
17583         # Otherwise we believe it is a complete path. Use it as it is.
17584         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17585 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17586         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17587 $as_echo_n "checking for ZIP... " >&6; }
17588         if test ! -x "$tool_specified"; then
17589           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17590 $as_echo "not found" >&6; }
17591           as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17592         fi
17593         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17594 $as_echo "$tool_specified" >&6; }
17595       fi
17596     fi
17597   fi
17598 
17599 
17600 
17601   if test "x$ZIP" = x; then
17602     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17603   fi
17604 
17605 
17606 
17607   # Non-required basic tools
17608 
17609 
17610 
17611   # Publish this variable in the help.
17612 
17613 
17614   if test "x$LDD" = x; then
17615     # The variable is not set by user, try to locate tool using the code snippet
17616     for ac_prog in ldd
17617 do
17618   # Extract the first word of "$ac_prog", so it can be a program name with args.
17619 set dummy $ac_prog; ac_word=$2
17620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17621 $as_echo_n "checking for $ac_word... " >&6; }
17622 if ${ac_cv_path_LDD+:} false; then :
17623   $as_echo_n "(cached) " >&6
17624 else
17625   case $LDD in
17626   [\\/]* | ?:[\\/]*)
17627   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17628   ;;
17629   *)
17630   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17631 for as_dir in $PATH
17632 do
17633   IFS=$as_save_IFS
17634   test -z "$as_dir" && as_dir=.
17635     for ac_exec_ext in '' $ac_executable_extensions; do
17636   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17637     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17638     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17639     break 2
17640   fi
17641 done
17642   done
17643 IFS=$as_save_IFS
17644 
17645   ;;
17646 esac
17647 fi
17648 LDD=$ac_cv_path_LDD
17649 if test -n "$LDD"; then
17650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17651 $as_echo "$LDD" >&6; }
17652 else
17653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17654 $as_echo "no" >&6; }
17655 fi
17656 
17657 
17658   test -n "$LDD" && break
17659 done
17660 
17661   else
17662     # The variable is set, but is it from the command line or the environment?
17663 
17664     # Try to remove the string !LDD! from our list.
17665     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17666     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17667       # If it failed, the variable was not from the command line. Ignore it,
17668       # but warn the user (except for BASH, which is always set by the calling BASH).
17669       if test "xLDD" != xBASH; then
17670         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17671 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17672       fi
17673       # Try to locate tool using the code snippet
17674       for ac_prog in ldd
17675 do
17676   # Extract the first word of "$ac_prog", so it can be a program name with args.
17677 set dummy $ac_prog; ac_word=$2
17678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17679 $as_echo_n "checking for $ac_word... " >&6; }
17680 if ${ac_cv_path_LDD+:} false; then :
17681   $as_echo_n "(cached) " >&6
17682 else
17683   case $LDD in
17684   [\\/]* | ?:[\\/]*)
17685   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17686   ;;
17687   *)
17688   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17689 for as_dir in $PATH
17690 do
17691   IFS=$as_save_IFS
17692   test -z "$as_dir" && as_dir=.
17693     for ac_exec_ext in '' $ac_executable_extensions; do
17694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17695     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17697     break 2
17698   fi
17699 done
17700   done
17701 IFS=$as_save_IFS
17702 
17703   ;;
17704 esac
17705 fi
17706 LDD=$ac_cv_path_LDD
17707 if test -n "$LDD"; then
17708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17709 $as_echo "$LDD" >&6; }
17710 else
17711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17712 $as_echo "no" >&6; }
17713 fi
17714 
17715 
17716   test -n "$LDD" && break
17717 done
17718 
17719     else
17720       # If it succeeded, then it was overridden by the user. We will use it
17721       # for the tool.
17722 
17723       # First remove it from the list of overridden variables, so we can test
17724       # for unknown variables in the end.
17725       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17726 
17727       # Check if the provided tool contains a complete path.
17728       tool_specified="$LDD"
17729       tool_basename="${tool_specified##*/}"
17730       if test "x$tool_basename" = "x$tool_specified"; then
17731         # A command without a complete path is provided, search $PATH.
17732         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17733 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17734         # Extract the first word of "$tool_basename", so it can be a program name with args.
17735 set dummy $tool_basename; ac_word=$2
17736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17737 $as_echo_n "checking for $ac_word... " >&6; }
17738 if ${ac_cv_path_LDD+:} false; then :
17739   $as_echo_n "(cached) " >&6
17740 else
17741   case $LDD in
17742   [\\/]* | ?:[\\/]*)
17743   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17744   ;;
17745   *)
17746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17747 for as_dir in $PATH
17748 do
17749   IFS=$as_save_IFS
17750   test -z "$as_dir" && as_dir=.
17751     for ac_exec_ext in '' $ac_executable_extensions; do
17752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17753     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17755     break 2
17756   fi
17757 done
17758   done
17759 IFS=$as_save_IFS
17760 
17761   ;;
17762 esac
17763 fi
17764 LDD=$ac_cv_path_LDD
17765 if test -n "$LDD"; then
17766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17767 $as_echo "$LDD" >&6; }
17768 else
17769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17770 $as_echo "no" >&6; }
17771 fi
17772 
17773 
17774         if test "x$LDD" = x; then
17775           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17776         fi
17777       else
17778         # Otherwise we believe it is a complete path. Use it as it is.
17779         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17780 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17781         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17782 $as_echo_n "checking for LDD... " >&6; }
17783         if test ! -x "$tool_specified"; then
17784           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17785 $as_echo "not found" >&6; }
17786           as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17787         fi
17788         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17789 $as_echo "$tool_specified" >&6; }
17790       fi
17791     fi
17792   fi
17793 
17794 
17795   if test "x$LDD" = "x"; then
17796     # List shared lib dependencies is used for
17797     # debug output and checking for forbidden dependencies.
17798     # We can build without it.
17799     LDD="true"
17800   fi
17801 
17802 
17803   # Publish this variable in the help.
17804 
17805 
17806   if test "x$READELF" = x; then
17807     # The variable is not set by user, try to locate tool using the code snippet
17808     for ac_prog in readelf greadelf
17809 do
17810   # Extract the first word of "$ac_prog", so it can be a program name with args.
17811 set dummy $ac_prog; ac_word=$2
17812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17813 $as_echo_n "checking for $ac_word... " >&6; }
17814 if ${ac_cv_path_READELF+:} false; then :
17815   $as_echo_n "(cached) " >&6
17816 else
17817   case $READELF in
17818   [\\/]* | ?:[\\/]*)
17819   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17820   ;;
17821   *)
17822   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17823 for as_dir in $PATH
17824 do
17825   IFS=$as_save_IFS
17826   test -z "$as_dir" && as_dir=.
17827     for ac_exec_ext in '' $ac_executable_extensions; do
17828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17829     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17831     break 2
17832   fi
17833 done
17834   done
17835 IFS=$as_save_IFS
17836 
17837   ;;
17838 esac
17839 fi
17840 READELF=$ac_cv_path_READELF
17841 if test -n "$READELF"; then
17842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17843 $as_echo "$READELF" >&6; }
17844 else
17845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17846 $as_echo "no" >&6; }
17847 fi
17848 
17849 
17850   test -n "$READELF" && break
17851 done
17852 
17853   else
17854     # The variable is set, but is it from the command line or the environment?
17855 
17856     # Try to remove the string !READELF! from our list.
17857     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17858     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17859       # If it failed, the variable was not from the command line. Ignore it,
17860       # but warn the user (except for BASH, which is always set by the calling BASH).
17861       if test "xREADELF" != xBASH; then
17862         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17863 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17864       fi
17865       # Try to locate tool using the code snippet
17866       for ac_prog in readelf greadelf
17867 do
17868   # Extract the first word of "$ac_prog", so it can be a program name with args.
17869 set dummy $ac_prog; ac_word=$2
17870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17871 $as_echo_n "checking for $ac_word... " >&6; }
17872 if ${ac_cv_path_READELF+:} false; then :
17873   $as_echo_n "(cached) " >&6
17874 else
17875   case $READELF in
17876   [\\/]* | ?:[\\/]*)
17877   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17878   ;;
17879   *)
17880   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17881 for as_dir in $PATH
17882 do
17883   IFS=$as_save_IFS
17884   test -z "$as_dir" && as_dir=.
17885     for ac_exec_ext in '' $ac_executable_extensions; do
17886   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17887     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17888     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17889     break 2
17890   fi
17891 done
17892   done
17893 IFS=$as_save_IFS
17894 
17895   ;;
17896 esac
17897 fi
17898 READELF=$ac_cv_path_READELF
17899 if test -n "$READELF"; then
17900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17901 $as_echo "$READELF" >&6; }
17902 else
17903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17904 $as_echo "no" >&6; }
17905 fi
17906 
17907 
17908   test -n "$READELF" && break
17909 done
17910 
17911     else
17912       # If it succeeded, then it was overridden by the user. We will use it
17913       # for the tool.
17914 
17915       # First remove it from the list of overridden variables, so we can test
17916       # for unknown variables in the end.
17917       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17918 
17919       # Check if the provided tool contains a complete path.
17920       tool_specified="$READELF"
17921       tool_basename="${tool_specified##*/}"
17922       if test "x$tool_basename" = "x$tool_specified"; then
17923         # A command without a complete path is provided, search $PATH.
17924         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17925 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17926         # Extract the first word of "$tool_basename", so it can be a program name with args.
17927 set dummy $tool_basename; ac_word=$2
17928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17929 $as_echo_n "checking for $ac_word... " >&6; }
17930 if ${ac_cv_path_READELF+:} false; then :
17931   $as_echo_n "(cached) " >&6
17932 else
17933   case $READELF in
17934   [\\/]* | ?:[\\/]*)
17935   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17936   ;;
17937   *)
17938   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17939 for as_dir in $PATH
17940 do
17941   IFS=$as_save_IFS
17942   test -z "$as_dir" && as_dir=.
17943     for ac_exec_ext in '' $ac_executable_extensions; do
17944   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17945     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17946     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17947     break 2
17948   fi
17949 done
17950   done
17951 IFS=$as_save_IFS
17952 
17953   ;;
17954 esac
17955 fi
17956 READELF=$ac_cv_path_READELF
17957 if test -n "$READELF"; then
17958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17959 $as_echo "$READELF" >&6; }
17960 else
17961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17962 $as_echo "no" >&6; }
17963 fi
17964 
17965 
17966         if test "x$READELF" = x; then
17967           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17968         fi
17969       else
17970         # Otherwise we believe it is a complete path. Use it as it is.
17971         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17972 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17973         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17974 $as_echo_n "checking for READELF... " >&6; }
17975         if test ! -x "$tool_specified"; then
17976           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17977 $as_echo "not found" >&6; }
17978           as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17979         fi
17980         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17981 $as_echo "$tool_specified" >&6; }
17982       fi
17983     fi
17984   fi
17985 
17986 
17987 
17988 
17989   # Publish this variable in the help.
17990 
17991 
17992   if test "x$HG" = x; then
17993     # The variable is not set by user, try to locate tool using the code snippet
17994     for ac_prog in hg
17995 do
17996   # Extract the first word of "$ac_prog", so it can be a program name with args.
17997 set dummy $ac_prog; ac_word=$2
17998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17999 $as_echo_n "checking for $ac_word... " >&6; }
18000 if ${ac_cv_path_HG+:} false; then :
18001   $as_echo_n "(cached) " >&6
18002 else
18003   case $HG in
18004   [\\/]* | ?:[\\/]*)
18005   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18006   ;;
18007   *)
18008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18009 for as_dir in $PATH
18010 do
18011   IFS=$as_save_IFS
18012   test -z "$as_dir" && as_dir=.
18013     for ac_exec_ext in '' $ac_executable_extensions; do
18014   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18015     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18017     break 2
18018   fi
18019 done
18020   done
18021 IFS=$as_save_IFS
18022 
18023   ;;
18024 esac
18025 fi
18026 HG=$ac_cv_path_HG
18027 if test -n "$HG"; then
18028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18029 $as_echo "$HG" >&6; }
18030 else
18031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18032 $as_echo "no" >&6; }
18033 fi
18034 
18035 
18036   test -n "$HG" && break
18037 done
18038 
18039   else
18040     # The variable is set, but is it from the command line or the environment?
18041 
18042     # Try to remove the string !HG! from our list.
18043     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18044     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18045       # If it failed, the variable was not from the command line. Ignore it,
18046       # but warn the user (except for BASH, which is always set by the calling BASH).
18047       if test "xHG" != xBASH; then
18048         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18049 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18050       fi
18051       # Try to locate tool using the code snippet
18052       for ac_prog in hg
18053 do
18054   # Extract the first word of "$ac_prog", so it can be a program name with args.
18055 set dummy $ac_prog; ac_word=$2
18056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18057 $as_echo_n "checking for $ac_word... " >&6; }
18058 if ${ac_cv_path_HG+:} false; then :
18059   $as_echo_n "(cached) " >&6
18060 else
18061   case $HG in
18062   [\\/]* | ?:[\\/]*)
18063   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18064   ;;
18065   *)
18066   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18067 for as_dir in $PATH
18068 do
18069   IFS=$as_save_IFS
18070   test -z "$as_dir" && as_dir=.
18071     for ac_exec_ext in '' $ac_executable_extensions; do
18072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18073     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18075     break 2
18076   fi
18077 done
18078   done
18079 IFS=$as_save_IFS
18080 
18081   ;;
18082 esac
18083 fi
18084 HG=$ac_cv_path_HG
18085 if test -n "$HG"; then
18086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18087 $as_echo "$HG" >&6; }
18088 else
18089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18090 $as_echo "no" >&6; }
18091 fi
18092 
18093 
18094   test -n "$HG" && break
18095 done
18096 
18097     else
18098       # If it succeeded, then it was overridden by the user. We will use it
18099       # for the tool.
18100 
18101       # First remove it from the list of overridden variables, so we can test
18102       # for unknown variables in the end.
18103       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18104 
18105       # Check if the provided tool contains a complete path.
18106       tool_specified="$HG"
18107       tool_basename="${tool_specified##*/}"
18108       if test "x$tool_basename" = "x$tool_specified"; then
18109         # A command without a complete path is provided, search $PATH.
18110         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18111 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18112         # Extract the first word of "$tool_basename", so it can be a program name with args.
18113 set dummy $tool_basename; ac_word=$2
18114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18115 $as_echo_n "checking for $ac_word... " >&6; }
18116 if ${ac_cv_path_HG+:} false; then :
18117   $as_echo_n "(cached) " >&6
18118 else
18119   case $HG in
18120   [\\/]* | ?:[\\/]*)
18121   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18122   ;;
18123   *)
18124   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18125 for as_dir in $PATH
18126 do
18127   IFS=$as_save_IFS
18128   test -z "$as_dir" && as_dir=.
18129     for ac_exec_ext in '' $ac_executable_extensions; do
18130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18131     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18133     break 2
18134   fi
18135 done
18136   done
18137 IFS=$as_save_IFS
18138 
18139   ;;
18140 esac
18141 fi
18142 HG=$ac_cv_path_HG
18143 if test -n "$HG"; then
18144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18145 $as_echo "$HG" >&6; }
18146 else
18147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18148 $as_echo "no" >&6; }
18149 fi
18150 
18151 
18152         if test "x$HG" = x; then
18153           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18154         fi
18155       else
18156         # Otherwise we believe it is a complete path. Use it as it is.
18157         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18158 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18159         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18160 $as_echo_n "checking for HG... " >&6; }
18161         if test ! -x "$tool_specified"; then
18162           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18163 $as_echo "not found" >&6; }
18164           as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18165         fi
18166         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18167 $as_echo "$tool_specified" >&6; }
18168       fi
18169     fi
18170   fi
18171 
18172 
18173 
18174 
18175   # Publish this variable in the help.
18176 
18177 
18178   if test "x$STAT" = x; then
18179     # The variable is not set by user, try to locate tool using the code snippet
18180     for ac_prog in stat
18181 do
18182   # Extract the first word of "$ac_prog", so it can be a program name with args.
18183 set dummy $ac_prog; ac_word=$2
18184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18185 $as_echo_n "checking for $ac_word... " >&6; }
18186 if ${ac_cv_path_STAT+:} false; then :
18187   $as_echo_n "(cached) " >&6
18188 else
18189   case $STAT in
18190   [\\/]* | ?:[\\/]*)
18191   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18192   ;;
18193   *)
18194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18195 for as_dir in $PATH
18196 do
18197   IFS=$as_save_IFS
18198   test -z "$as_dir" && as_dir=.
18199     for ac_exec_ext in '' $ac_executable_extensions; do
18200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18201     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18203     break 2
18204   fi
18205 done
18206   done
18207 IFS=$as_save_IFS
18208 
18209   ;;
18210 esac
18211 fi
18212 STAT=$ac_cv_path_STAT
18213 if test -n "$STAT"; then
18214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18215 $as_echo "$STAT" >&6; }
18216 else
18217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18218 $as_echo "no" >&6; }
18219 fi
18220 
18221 
18222   test -n "$STAT" && break
18223 done
18224 
18225   else
18226     # The variable is set, but is it from the command line or the environment?
18227 
18228     # Try to remove the string !STAT! from our list.
18229     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18230     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18231       # If it failed, the variable was not from the command line. Ignore it,
18232       # but warn the user (except for BASH, which is always set by the calling BASH).
18233       if test "xSTAT" != xBASH; then
18234         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18235 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18236       fi
18237       # Try to locate tool using the code snippet
18238       for ac_prog in stat
18239 do
18240   # Extract the first word of "$ac_prog", so it can be a program name with args.
18241 set dummy $ac_prog; ac_word=$2
18242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18243 $as_echo_n "checking for $ac_word... " >&6; }
18244 if ${ac_cv_path_STAT+:} false; then :
18245   $as_echo_n "(cached) " >&6
18246 else
18247   case $STAT in
18248   [\\/]* | ?:[\\/]*)
18249   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18250   ;;
18251   *)
18252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18253 for as_dir in $PATH
18254 do
18255   IFS=$as_save_IFS
18256   test -z "$as_dir" && as_dir=.
18257     for ac_exec_ext in '' $ac_executable_extensions; do
18258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18259     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18261     break 2
18262   fi
18263 done
18264   done
18265 IFS=$as_save_IFS
18266 
18267   ;;
18268 esac
18269 fi
18270 STAT=$ac_cv_path_STAT
18271 if test -n "$STAT"; then
18272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18273 $as_echo "$STAT" >&6; }
18274 else
18275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18276 $as_echo "no" >&6; }
18277 fi
18278 
18279 
18280   test -n "$STAT" && break
18281 done
18282 
18283     else
18284       # If it succeeded, then it was overridden by the user. We will use it
18285       # for the tool.
18286 
18287       # First remove it from the list of overridden variables, so we can test
18288       # for unknown variables in the end.
18289       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18290 
18291       # Check if the provided tool contains a complete path.
18292       tool_specified="$STAT"
18293       tool_basename="${tool_specified##*/}"
18294       if test "x$tool_basename" = "x$tool_specified"; then
18295         # A command without a complete path is provided, search $PATH.
18296         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18297 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18298         # Extract the first word of "$tool_basename", so it can be a program name with args.
18299 set dummy $tool_basename; ac_word=$2
18300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18301 $as_echo_n "checking for $ac_word... " >&6; }
18302 if ${ac_cv_path_STAT+:} false; then :
18303   $as_echo_n "(cached) " >&6
18304 else
18305   case $STAT in
18306   [\\/]* | ?:[\\/]*)
18307   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18308   ;;
18309   *)
18310   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18311 for as_dir in $PATH
18312 do
18313   IFS=$as_save_IFS
18314   test -z "$as_dir" && as_dir=.
18315     for ac_exec_ext in '' $ac_executable_extensions; do
18316   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18317     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18318     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18319     break 2
18320   fi
18321 done
18322   done
18323 IFS=$as_save_IFS
18324 
18325   ;;
18326 esac
18327 fi
18328 STAT=$ac_cv_path_STAT
18329 if test -n "$STAT"; then
18330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18331 $as_echo "$STAT" >&6; }
18332 else
18333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18334 $as_echo "no" >&6; }
18335 fi
18336 
18337 
18338         if test "x$STAT" = x; then
18339           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18340         fi
18341       else
18342         # Otherwise we believe it is a complete path. Use it as it is.
18343         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18344 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18345         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18346 $as_echo_n "checking for STAT... " >&6; }
18347         if test ! -x "$tool_specified"; then
18348           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18349 $as_echo "not found" >&6; }
18350           as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18351         fi
18352         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18353 $as_echo "$tool_specified" >&6; }
18354       fi
18355     fi
18356   fi
18357 
18358 
18359 
18360 
18361   # Publish this variable in the help.
18362 
18363 
18364   if test "x$TIME" = x; then
18365     # The variable is not set by user, try to locate tool using the code snippet
18366     for ac_prog in time
18367 do
18368   # Extract the first word of "$ac_prog", so it can be a program name with args.
18369 set dummy $ac_prog; ac_word=$2
18370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18371 $as_echo_n "checking for $ac_word... " >&6; }
18372 if ${ac_cv_path_TIME+:} false; then :
18373   $as_echo_n "(cached) " >&6
18374 else
18375   case $TIME in
18376   [\\/]* | ?:[\\/]*)
18377   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18378   ;;
18379   *)
18380   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18381 for as_dir in $PATH
18382 do
18383   IFS=$as_save_IFS
18384   test -z "$as_dir" && as_dir=.
18385     for ac_exec_ext in '' $ac_executable_extensions; do
18386   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18387     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18389     break 2
18390   fi
18391 done
18392   done
18393 IFS=$as_save_IFS
18394 
18395   ;;
18396 esac
18397 fi
18398 TIME=$ac_cv_path_TIME
18399 if test -n "$TIME"; then
18400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18401 $as_echo "$TIME" >&6; }
18402 else
18403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18404 $as_echo "no" >&6; }
18405 fi
18406 
18407 
18408   test -n "$TIME" && break
18409 done
18410 
18411   else
18412     # The variable is set, but is it from the command line or the environment?
18413 
18414     # Try to remove the string !TIME! from our list.
18415     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18416     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18417       # If it failed, the variable was not from the command line. Ignore it,
18418       # but warn the user (except for BASH, which is always set by the calling BASH).
18419       if test "xTIME" != xBASH; then
18420         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18421 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18422       fi
18423       # Try to locate tool using the code snippet
18424       for ac_prog in time
18425 do
18426   # Extract the first word of "$ac_prog", so it can be a program name with args.
18427 set dummy $ac_prog; ac_word=$2
18428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18429 $as_echo_n "checking for $ac_word... " >&6; }
18430 if ${ac_cv_path_TIME+:} false; then :
18431   $as_echo_n "(cached) " >&6
18432 else
18433   case $TIME in
18434   [\\/]* | ?:[\\/]*)
18435   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18436   ;;
18437   *)
18438   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18439 for as_dir in $PATH
18440 do
18441   IFS=$as_save_IFS
18442   test -z "$as_dir" && as_dir=.
18443     for ac_exec_ext in '' $ac_executable_extensions; do
18444   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18445     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18447     break 2
18448   fi
18449 done
18450   done
18451 IFS=$as_save_IFS
18452 
18453   ;;
18454 esac
18455 fi
18456 TIME=$ac_cv_path_TIME
18457 if test -n "$TIME"; then
18458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18459 $as_echo "$TIME" >&6; }
18460 else
18461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18462 $as_echo "no" >&6; }
18463 fi
18464 
18465 
18466   test -n "$TIME" && break
18467 done
18468 
18469     else
18470       # If it succeeded, then it was overridden by the user. We will use it
18471       # for the tool.
18472 
18473       # First remove it from the list of overridden variables, so we can test
18474       # for unknown variables in the end.
18475       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18476 
18477       # Check if the provided tool contains a complete path.
18478       tool_specified="$TIME"
18479       tool_basename="${tool_specified##*/}"
18480       if test "x$tool_basename" = "x$tool_specified"; then
18481         # A command without a complete path is provided, search $PATH.
18482         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18483 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18484         # Extract the first word of "$tool_basename", so it can be a program name with args.
18485 set dummy $tool_basename; ac_word=$2
18486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18487 $as_echo_n "checking for $ac_word... " >&6; }
18488 if ${ac_cv_path_TIME+:} false; then :
18489   $as_echo_n "(cached) " >&6
18490 else
18491   case $TIME in
18492   [\\/]* | ?:[\\/]*)
18493   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18494   ;;
18495   *)
18496   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18497 for as_dir in $PATH
18498 do
18499   IFS=$as_save_IFS
18500   test -z "$as_dir" && as_dir=.
18501     for ac_exec_ext in '' $ac_executable_extensions; do
18502   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18503     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18504     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18505     break 2
18506   fi
18507 done
18508   done
18509 IFS=$as_save_IFS
18510 
18511   ;;
18512 esac
18513 fi
18514 TIME=$ac_cv_path_TIME
18515 if test -n "$TIME"; then
18516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18517 $as_echo "$TIME" >&6; }
18518 else
18519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18520 $as_echo "no" >&6; }
18521 fi
18522 
18523 
18524         if test "x$TIME" = x; then
18525           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18526         fi
18527       else
18528         # Otherwise we believe it is a complete path. Use it as it is.
18529         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18530 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18531         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18532 $as_echo_n "checking for TIME... " >&6; }
18533         if test ! -x "$tool_specified"; then
18534           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18535 $as_echo "not found" >&6; }
18536           as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18537         fi
18538         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18539 $as_echo "$tool_specified" >&6; }
18540       fi
18541     fi
18542   fi
18543 
18544 
18545   # Check if it's GNU time
18546   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18547   if test "x$IS_GNU_TIME" != x; then
18548     IS_GNU_TIME=yes
18549   else
18550     IS_GNU_TIME=no
18551   fi
18552 
18553 
18554   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18555 
18556 
18557 
18558   # Publish this variable in the help.
18559 
18560 
18561   if test "x$COMM" = x; then
18562     # The variable is not set by user, try to locate tool using the code snippet
18563     for ac_prog in comm
18564 do
18565   # Extract the first word of "$ac_prog", so it can be a program name with args.
18566 set dummy $ac_prog; ac_word=$2
18567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18568 $as_echo_n "checking for $ac_word... " >&6; }
18569 if ${ac_cv_path_COMM+:} false; then :
18570   $as_echo_n "(cached) " >&6
18571 else
18572   case $COMM in
18573   [\\/]* | ?:[\\/]*)
18574   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18575   ;;
18576   *)
18577   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18578 for as_dir in $PATH
18579 do
18580   IFS=$as_save_IFS
18581   test -z "$as_dir" && as_dir=.
18582     for ac_exec_ext in '' $ac_executable_extensions; do
18583   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18584     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18585     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18586     break 2
18587   fi
18588 done
18589   done
18590 IFS=$as_save_IFS
18591 
18592   ;;
18593 esac
18594 fi
18595 COMM=$ac_cv_path_COMM
18596 if test -n "$COMM"; then
18597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18598 $as_echo "$COMM" >&6; }
18599 else
18600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18601 $as_echo "no" >&6; }
18602 fi
18603 
18604 
18605   test -n "$COMM" && break
18606 done
18607 
18608   else
18609     # The variable is set, but is it from the command line or the environment?
18610 
18611     # Try to remove the string !COMM! from our list.
18612     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18613     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18614       # If it failed, the variable was not from the command line. Ignore it,
18615       # but warn the user (except for BASH, which is always set by the calling BASH).
18616       if test "xCOMM" != xBASH; then
18617         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18618 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18619       fi
18620       # Try to locate tool using the code snippet
18621       for ac_prog in comm
18622 do
18623   # Extract the first word of "$ac_prog", so it can be a program name with args.
18624 set dummy $ac_prog; ac_word=$2
18625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18626 $as_echo_n "checking for $ac_word... " >&6; }
18627 if ${ac_cv_path_COMM+:} false; then :
18628   $as_echo_n "(cached) " >&6
18629 else
18630   case $COMM in
18631   [\\/]* | ?:[\\/]*)
18632   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18633   ;;
18634   *)
18635   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18636 for as_dir in $PATH
18637 do
18638   IFS=$as_save_IFS
18639   test -z "$as_dir" && as_dir=.
18640     for ac_exec_ext in '' $ac_executable_extensions; do
18641   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18642     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18643     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18644     break 2
18645   fi
18646 done
18647   done
18648 IFS=$as_save_IFS
18649 
18650   ;;
18651 esac
18652 fi
18653 COMM=$ac_cv_path_COMM
18654 if test -n "$COMM"; then
18655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18656 $as_echo "$COMM" >&6; }
18657 else
18658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18659 $as_echo "no" >&6; }
18660 fi
18661 
18662 
18663   test -n "$COMM" && break
18664 done
18665 
18666     else
18667       # If it succeeded, then it was overridden by the user. We will use it
18668       # for the tool.
18669 
18670       # First remove it from the list of overridden variables, so we can test
18671       # for unknown variables in the end.
18672       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18673 
18674       # Check if the provided tool contains a complete path.
18675       tool_specified="$COMM"
18676       tool_basename="${tool_specified##*/}"
18677       if test "x$tool_basename" = "x$tool_specified"; then
18678         # A command without a complete path is provided, search $PATH.
18679         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18680 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18681         # Extract the first word of "$tool_basename", so it can be a program name with args.
18682 set dummy $tool_basename; ac_word=$2
18683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18684 $as_echo_n "checking for $ac_word... " >&6; }
18685 if ${ac_cv_path_COMM+:} false; then :
18686   $as_echo_n "(cached) " >&6
18687 else
18688   case $COMM in
18689   [\\/]* | ?:[\\/]*)
18690   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18691   ;;
18692   *)
18693   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18694 for as_dir in $PATH
18695 do
18696   IFS=$as_save_IFS
18697   test -z "$as_dir" && as_dir=.
18698     for ac_exec_ext in '' $ac_executable_extensions; do
18699   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18700     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18702     break 2
18703   fi
18704 done
18705   done
18706 IFS=$as_save_IFS
18707 
18708   ;;
18709 esac
18710 fi
18711 COMM=$ac_cv_path_COMM
18712 if test -n "$COMM"; then
18713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18714 $as_echo "$COMM" >&6; }
18715 else
18716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18717 $as_echo "no" >&6; }
18718 fi
18719 
18720 
18721         if test "x$COMM" = x; then
18722           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18723         fi
18724       else
18725         # Otherwise we believe it is a complete path. Use it as it is.
18726         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18727 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18728         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18729 $as_echo_n "checking for COMM... " >&6; }
18730         if test ! -x "$tool_specified"; then
18731           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18732 $as_echo "not found" >&6; }
18733           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18734         fi
18735         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18736 $as_echo "$tool_specified" >&6; }
18737       fi
18738     fi
18739   fi
18740 
18741 
18742 
18743   if test "x$COMM" = x; then
18744     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18745   fi
18746 
18747 
18748   fi
18749 
18750   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18751 
18752 
18753 
18754   # Publish this variable in the help.
18755 
18756 
18757   if test "x$DSYMUTIL" = x; then
18758     # The variable is not set by user, try to locate tool using the code snippet
18759     for ac_prog in dsymutil
18760 do
18761   # Extract the first word of "$ac_prog", so it can be a program name with args.
18762 set dummy $ac_prog; ac_word=$2
18763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18764 $as_echo_n "checking for $ac_word... " >&6; }
18765 if ${ac_cv_path_DSYMUTIL+:} false; then :
18766   $as_echo_n "(cached) " >&6
18767 else
18768   case $DSYMUTIL in
18769   [\\/]* | ?:[\\/]*)
18770   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18771   ;;
18772   *)
18773   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18774 for as_dir in $PATH
18775 do
18776   IFS=$as_save_IFS
18777   test -z "$as_dir" && as_dir=.
18778     for ac_exec_ext in '' $ac_executable_extensions; do
18779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18780     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18782     break 2
18783   fi
18784 done
18785   done
18786 IFS=$as_save_IFS
18787 
18788   ;;
18789 esac
18790 fi
18791 DSYMUTIL=$ac_cv_path_DSYMUTIL
18792 if test -n "$DSYMUTIL"; then
18793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18794 $as_echo "$DSYMUTIL" >&6; }
18795 else
18796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18797 $as_echo "no" >&6; }
18798 fi
18799 
18800 
18801   test -n "$DSYMUTIL" && break
18802 done
18803 
18804   else
18805     # The variable is set, but is it from the command line or the environment?
18806 
18807     # Try to remove the string !DSYMUTIL! from our list.
18808     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18809     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18810       # If it failed, the variable was not from the command line. Ignore it,
18811       # but warn the user (except for BASH, which is always set by the calling BASH).
18812       if test "xDSYMUTIL" != xBASH; then
18813         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18814 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18815       fi
18816       # Try to locate tool using the code snippet
18817       for ac_prog in dsymutil
18818 do
18819   # Extract the first word of "$ac_prog", so it can be a program name with args.
18820 set dummy $ac_prog; ac_word=$2
18821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18822 $as_echo_n "checking for $ac_word... " >&6; }
18823 if ${ac_cv_path_DSYMUTIL+:} false; then :
18824   $as_echo_n "(cached) " >&6
18825 else
18826   case $DSYMUTIL in
18827   [\\/]* | ?:[\\/]*)
18828   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18829   ;;
18830   *)
18831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18832 for as_dir in $PATH
18833 do
18834   IFS=$as_save_IFS
18835   test -z "$as_dir" && as_dir=.
18836     for ac_exec_ext in '' $ac_executable_extensions; do
18837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18838     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18840     break 2
18841   fi
18842 done
18843   done
18844 IFS=$as_save_IFS
18845 
18846   ;;
18847 esac
18848 fi
18849 DSYMUTIL=$ac_cv_path_DSYMUTIL
18850 if test -n "$DSYMUTIL"; then
18851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18852 $as_echo "$DSYMUTIL" >&6; }
18853 else
18854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18855 $as_echo "no" >&6; }
18856 fi
18857 
18858 
18859   test -n "$DSYMUTIL" && break
18860 done
18861 
18862     else
18863       # If it succeeded, then it was overridden by the user. We will use it
18864       # for the tool.
18865 
18866       # First remove it from the list of overridden variables, so we can test
18867       # for unknown variables in the end.
18868       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18869 
18870       # Check if the provided tool contains a complete path.
18871       tool_specified="$DSYMUTIL"
18872       tool_basename="${tool_specified##*/}"
18873       if test "x$tool_basename" = "x$tool_specified"; then
18874         # A command without a complete path is provided, search $PATH.
18875         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18876 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18877         # Extract the first word of "$tool_basename", so it can be a program name with args.
18878 set dummy $tool_basename; ac_word=$2
18879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18880 $as_echo_n "checking for $ac_word... " >&6; }
18881 if ${ac_cv_path_DSYMUTIL+:} false; then :
18882   $as_echo_n "(cached) " >&6
18883 else
18884   case $DSYMUTIL in
18885   [\\/]* | ?:[\\/]*)
18886   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18887   ;;
18888   *)
18889   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18890 for as_dir in $PATH
18891 do
18892   IFS=$as_save_IFS
18893   test -z "$as_dir" && as_dir=.
18894     for ac_exec_ext in '' $ac_executable_extensions; do
18895   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18896     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18897     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18898     break 2
18899   fi
18900 done
18901   done
18902 IFS=$as_save_IFS
18903 
18904   ;;
18905 esac
18906 fi
18907 DSYMUTIL=$ac_cv_path_DSYMUTIL
18908 if test -n "$DSYMUTIL"; then
18909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18910 $as_echo "$DSYMUTIL" >&6; }
18911 else
18912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18913 $as_echo "no" >&6; }
18914 fi
18915 
18916 
18917         if test "x$DSYMUTIL" = x; then
18918           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18919         fi
18920       else
18921         # Otherwise we believe it is a complete path. Use it as it is.
18922         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18923 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18924         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18925 $as_echo_n "checking for DSYMUTIL... " >&6; }
18926         if test ! -x "$tool_specified"; then
18927           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18928 $as_echo "not found" >&6; }
18929           as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18930         fi
18931         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18932 $as_echo "$tool_specified" >&6; }
18933       fi
18934     fi
18935   fi
18936 
18937 
18938 
18939   if test "x$DSYMUTIL" = x; then
18940     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18941   fi
18942 
18943 
18944 
18945 
18946 
18947   # Publish this variable in the help.
18948 
18949 
18950   if test "x$XATTR" = x; then
18951     # The variable is not set by user, try to locate tool using the code snippet
18952     for ac_prog in xattr
18953 do
18954   # Extract the first word of "$ac_prog", so it can be a program name with args.
18955 set dummy $ac_prog; ac_word=$2
18956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18957 $as_echo_n "checking for $ac_word... " >&6; }
18958 if ${ac_cv_path_XATTR+:} false; then :
18959   $as_echo_n "(cached) " >&6
18960 else
18961   case $XATTR in
18962   [\\/]* | ?:[\\/]*)
18963   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18964   ;;
18965   *)
18966   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18967 for as_dir in $PATH
18968 do
18969   IFS=$as_save_IFS
18970   test -z "$as_dir" && as_dir=.
18971     for ac_exec_ext in '' $ac_executable_extensions; do
18972   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18973     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18974     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18975     break 2
18976   fi
18977 done
18978   done
18979 IFS=$as_save_IFS
18980 
18981   ;;
18982 esac
18983 fi
18984 XATTR=$ac_cv_path_XATTR
18985 if test -n "$XATTR"; then
18986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18987 $as_echo "$XATTR" >&6; }
18988 else
18989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18990 $as_echo "no" >&6; }
18991 fi
18992 
18993 
18994   test -n "$XATTR" && break
18995 done
18996 
18997   else
18998     # The variable is set, but is it from the command line or the environment?
18999 
19000     # Try to remove the string !XATTR! from our list.
19001     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19002     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19003       # If it failed, the variable was not from the command line. Ignore it,
19004       # but warn the user (except for BASH, which is always set by the calling BASH).
19005       if test "xXATTR" != xBASH; then
19006         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19007 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19008       fi
19009       # Try to locate tool using the code snippet
19010       for ac_prog in xattr
19011 do
19012   # Extract the first word of "$ac_prog", so it can be a program name with args.
19013 set dummy $ac_prog; ac_word=$2
19014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19015 $as_echo_n "checking for $ac_word... " >&6; }
19016 if ${ac_cv_path_XATTR+:} false; then :
19017   $as_echo_n "(cached) " >&6
19018 else
19019   case $XATTR in
19020   [\\/]* | ?:[\\/]*)
19021   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19022   ;;
19023   *)
19024   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19025 for as_dir in $PATH
19026 do
19027   IFS=$as_save_IFS
19028   test -z "$as_dir" && as_dir=.
19029     for ac_exec_ext in '' $ac_executable_extensions; do
19030   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19031     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19033     break 2
19034   fi
19035 done
19036   done
19037 IFS=$as_save_IFS
19038 
19039   ;;
19040 esac
19041 fi
19042 XATTR=$ac_cv_path_XATTR
19043 if test -n "$XATTR"; then
19044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19045 $as_echo "$XATTR" >&6; }
19046 else
19047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19048 $as_echo "no" >&6; }
19049 fi
19050 
19051 
19052   test -n "$XATTR" && break
19053 done
19054 
19055     else
19056       # If it succeeded, then it was overridden by the user. We will use it
19057       # for the tool.
19058 
19059       # First remove it from the list of overridden variables, so we can test
19060       # for unknown variables in the end.
19061       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19062 
19063       # Check if the provided tool contains a complete path.
19064       tool_specified="$XATTR"
19065       tool_basename="${tool_specified##*/}"
19066       if test "x$tool_basename" = "x$tool_specified"; then
19067         # A command without a complete path is provided, search $PATH.
19068         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19069 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19070         # Extract the first word of "$tool_basename", so it can be a program name with args.
19071 set dummy $tool_basename; ac_word=$2
19072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19073 $as_echo_n "checking for $ac_word... " >&6; }
19074 if ${ac_cv_path_XATTR+:} false; then :
19075   $as_echo_n "(cached) " >&6
19076 else
19077   case $XATTR in
19078   [\\/]* | ?:[\\/]*)
19079   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19080   ;;
19081   *)
19082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19083 for as_dir in $PATH
19084 do
19085   IFS=$as_save_IFS
19086   test -z "$as_dir" && as_dir=.
19087     for ac_exec_ext in '' $ac_executable_extensions; do
19088   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19089     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19091     break 2
19092   fi
19093 done
19094   done
19095 IFS=$as_save_IFS
19096 
19097   ;;
19098 esac
19099 fi
19100 XATTR=$ac_cv_path_XATTR
19101 if test -n "$XATTR"; then
19102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19103 $as_echo "$XATTR" >&6; }
19104 else
19105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19106 $as_echo "no" >&6; }
19107 fi
19108 
19109 
19110         if test "x$XATTR" = x; then
19111           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19112         fi
19113       else
19114         # Otherwise we believe it is a complete path. Use it as it is.
19115         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19116 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19117         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19118 $as_echo_n "checking for XATTR... " >&6; }
19119         if test ! -x "$tool_specified"; then
19120           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19121 $as_echo "not found" >&6; }
19122           as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19123         fi
19124         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19125 $as_echo "$tool_specified" >&6; }
19126       fi
19127     fi
19128   fi
19129 
19130 
19131 
19132   if test "x$XATTR" = x; then
19133     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19134   fi
19135 
19136 
19137 
19138 
19139   # Publish this variable in the help.
19140 
19141 
19142   if test "x$CODESIGN" = x; then
19143     # The variable is not set by user, try to locate tool using the code snippet
19144     for ac_prog in codesign
19145 do
19146   # Extract the first word of "$ac_prog", so it can be a program name with args.
19147 set dummy $ac_prog; ac_word=$2
19148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19149 $as_echo_n "checking for $ac_word... " >&6; }
19150 if ${ac_cv_path_CODESIGN+:} false; then :
19151   $as_echo_n "(cached) " >&6
19152 else
19153   case $CODESIGN in
19154   [\\/]* | ?:[\\/]*)
19155   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19156   ;;
19157   *)
19158   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19159 for as_dir in $PATH
19160 do
19161   IFS=$as_save_IFS
19162   test -z "$as_dir" && as_dir=.
19163     for ac_exec_ext in '' $ac_executable_extensions; do
19164   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19165     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19166     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19167     break 2
19168   fi
19169 done
19170   done
19171 IFS=$as_save_IFS
19172 
19173   ;;
19174 esac
19175 fi
19176 CODESIGN=$ac_cv_path_CODESIGN
19177 if test -n "$CODESIGN"; then
19178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19179 $as_echo "$CODESIGN" >&6; }
19180 else
19181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19182 $as_echo "no" >&6; }
19183 fi
19184 
19185 
19186   test -n "$CODESIGN" && break
19187 done
19188 
19189   else
19190     # The variable is set, but is it from the command line or the environment?
19191 
19192     # Try to remove the string !CODESIGN! from our list.
19193     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19194     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19195       # If it failed, the variable was not from the command line. Ignore it,
19196       # but warn the user (except for BASH, which is always set by the calling BASH).
19197       if test "xCODESIGN" != xBASH; then
19198         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19199 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19200       fi
19201       # Try to locate tool using the code snippet
19202       for ac_prog in codesign
19203 do
19204   # Extract the first word of "$ac_prog", so it can be a program name with args.
19205 set dummy $ac_prog; ac_word=$2
19206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19207 $as_echo_n "checking for $ac_word... " >&6; }
19208 if ${ac_cv_path_CODESIGN+:} false; then :
19209   $as_echo_n "(cached) " >&6
19210 else
19211   case $CODESIGN in
19212   [\\/]* | ?:[\\/]*)
19213   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19214   ;;
19215   *)
19216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19217 for as_dir in $PATH
19218 do
19219   IFS=$as_save_IFS
19220   test -z "$as_dir" && as_dir=.
19221     for ac_exec_ext in '' $ac_executable_extensions; do
19222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19223     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19225     break 2
19226   fi
19227 done
19228   done
19229 IFS=$as_save_IFS
19230 
19231   ;;
19232 esac
19233 fi
19234 CODESIGN=$ac_cv_path_CODESIGN
19235 if test -n "$CODESIGN"; then
19236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19237 $as_echo "$CODESIGN" >&6; }
19238 else
19239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19240 $as_echo "no" >&6; }
19241 fi
19242 
19243 
19244   test -n "$CODESIGN" && break
19245 done
19246 
19247     else
19248       # If it succeeded, then it was overridden by the user. We will use it
19249       # for the tool.
19250 
19251       # First remove it from the list of overridden variables, so we can test
19252       # for unknown variables in the end.
19253       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19254 
19255       # Check if the provided tool contains a complete path.
19256       tool_specified="$CODESIGN"
19257       tool_basename="${tool_specified##*/}"
19258       if test "x$tool_basename" = "x$tool_specified"; then
19259         # A command without a complete path is provided, search $PATH.
19260         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19261 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19262         # Extract the first word of "$tool_basename", so it can be a program name with args.
19263 set dummy $tool_basename; ac_word=$2
19264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19265 $as_echo_n "checking for $ac_word... " >&6; }
19266 if ${ac_cv_path_CODESIGN+:} false; then :
19267   $as_echo_n "(cached) " >&6
19268 else
19269   case $CODESIGN in
19270   [\\/]* | ?:[\\/]*)
19271   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19272   ;;
19273   *)
19274   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19275 for as_dir in $PATH
19276 do
19277   IFS=$as_save_IFS
19278   test -z "$as_dir" && as_dir=.
19279     for ac_exec_ext in '' $ac_executable_extensions; do
19280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19281     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19283     break 2
19284   fi
19285 done
19286   done
19287 IFS=$as_save_IFS
19288 
19289   ;;
19290 esac
19291 fi
19292 CODESIGN=$ac_cv_path_CODESIGN
19293 if test -n "$CODESIGN"; then
19294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19295 $as_echo "$CODESIGN" >&6; }
19296 else
19297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19298 $as_echo "no" >&6; }
19299 fi
19300 
19301 
19302         if test "x$CODESIGN" = x; then
19303           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19304         fi
19305       else
19306         # Otherwise we believe it is a complete path. Use it as it is.
19307         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19308 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19309         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19310 $as_echo_n "checking for CODESIGN... " >&6; }
19311         if test ! -x "$tool_specified"; then
19312           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19313 $as_echo "not found" >&6; }
19314           as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19315         fi
19316         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19317 $as_echo "$tool_specified" >&6; }
19318       fi
19319     fi
19320   fi
19321 
19322 
19323     if test "x$CODESIGN" != "x"; then
19324       # Verify that the openjdk_codesign certificate is present
19325       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19326 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19327       rm -f codesign-testfile
19328       touch codesign-testfile
19329       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19330       rm -f codesign-testfile
19331       if test "x$CODESIGN" = x; then
19332         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19333 $as_echo "no" >&6; }
19334       else
19335         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19336 $as_echo "yes" >&6; }
19337       fi
19338     fi
19339   fi
19340 
19341 
19342 # Check if pkg-config is available.
19343 
19344 
19345 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19346         if test -n "$ac_tool_prefix"; then
19347   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19348 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19350 $as_echo_n "checking for $ac_word... " >&6; }
19351 if ${ac_cv_path_PKG_CONFIG+:} false; then :
19352   $as_echo_n "(cached) " >&6
19353 else
19354   case $PKG_CONFIG in
19355   [\\/]* | ?:[\\/]*)
19356   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19357   ;;
19358   *)
19359   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19360 for as_dir in $PATH
19361 do
19362   IFS=$as_save_IFS
19363   test -z "$as_dir" && as_dir=.
19364     for ac_exec_ext in '' $ac_executable_extensions; do
19365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19366     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19368     break 2
19369   fi
19370 done
19371   done
19372 IFS=$as_save_IFS
19373 
19374   ;;
19375 esac
19376 fi
19377 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19378 if test -n "$PKG_CONFIG"; then
19379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19380 $as_echo "$PKG_CONFIG" >&6; }
19381 else
19382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19383 $as_echo "no" >&6; }
19384 fi
19385 
19386 
19387 fi
19388 if test -z "$ac_cv_path_PKG_CONFIG"; then
19389   ac_pt_PKG_CONFIG=$PKG_CONFIG
19390   # Extract the first word of "pkg-config", so it can be a program name with args.
19391 set dummy pkg-config; ac_word=$2
19392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19393 $as_echo_n "checking for $ac_word... " >&6; }
19394 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19395   $as_echo_n "(cached) " >&6
19396 else
19397   case $ac_pt_PKG_CONFIG in
19398   [\\/]* | ?:[\\/]*)
19399   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19400   ;;
19401   *)
19402   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19403 for as_dir in $PATH
19404 do
19405   IFS=$as_save_IFS
19406   test -z "$as_dir" && as_dir=.
19407     for ac_exec_ext in '' $ac_executable_extensions; do
19408   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19409     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19410     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19411     break 2
19412   fi
19413 done
19414   done
19415 IFS=$as_save_IFS
19416 
19417   ;;
19418 esac
19419 fi
19420 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19421 if test -n "$ac_pt_PKG_CONFIG"; then
19422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19423 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19424 else
19425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19426 $as_echo "no" >&6; }
19427 fi
19428 
19429   if test "x$ac_pt_PKG_CONFIG" = x; then
19430     PKG_CONFIG=""
19431   else
19432     case $cross_compiling:$ac_tool_warned in
19433 yes:)
19434 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19435 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19436 ac_tool_warned=yes ;;
19437 esac
19438     PKG_CONFIG=$ac_pt_PKG_CONFIG
19439   fi
19440 else
19441   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19442 fi
19443 
19444 fi
19445 if test -n "$PKG_CONFIG"; then
19446         _pkg_min_version=0.9.0
19447         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19448 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19449         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19450                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19451 $as_echo "yes" >&6; }
19452         else
19453                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19454 $as_echo "no" >&6; }
19455                 PKG_CONFIG=""
19456         fi
19457 
19458 fi
19459 
19460 # After basic tools have been setup, we can check build os specific details.
19461 
19462   ###############################################################################
19463 
19464   # Note that this is the build platform OS version!
19465 
19466   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19467   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19468   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19469   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19470 
19471 
19472 
19473 
19474 
19475 # Setup builddeps, for automatic downloading of tools we need.
19476 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19477 # boot-jdk setup, but we need to have basic tools setup first.
19478 
19479 
19480 # Check whether --with-builddeps-conf was given.
19481 if test "${with_builddeps_conf+set}" = set; then :
19482   withval=$with_builddeps_conf;
19483 fi
19484 
19485 
19486 
19487 # Check whether --with-builddeps-server was given.
19488 if test "${with_builddeps_server+set}" = set; then :
19489   withval=$with_builddeps_server;
19490 fi
19491 
19492 
19493 
19494 # Check whether --with-builddeps-dir was given.
19495 if test "${with_builddeps_dir+set}" = set; then :
19496   withval=$with_builddeps_dir;
19497 else
19498   with_builddeps_dir=/localhome/builddeps
19499 fi
19500 
19501 
19502 
19503 # Check whether --with-builddeps-group was given.
19504 if test "${with_builddeps_group+set}" = set; then :
19505   withval=$with_builddeps_group;
19506 fi
19507 
19508 
19509 
19510 
19511   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19512     if test "x$with_builddeps_conf" != x; then
19513       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19514 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19515       builddepsfile=$with_builddeps_conf
19516       if test -s $builddepsfile; then
19517         . $builddepsfile
19518         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19519 $as_echo "loaded!" >&6; }
19520       else
19521         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19522       fi
19523     else
19524       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19525 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19526       builddepsfile=`mktemp`
19527       touch $builddepsfile
19528       # Put all found confs into a single file.
19529       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19530       # Source the file to acquire the variables
19531       if test -s $builddepsfile; then
19532         . $builddepsfile
19533         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19534 $as_echo "found at least one!" >&6; }
19535       else
19536         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19537       fi
19538     fi
19539     # Create build and target names that use _ instead of "-" and ".".
19540     # This is necessary to use them in variable names.
19541     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19542     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19543     # Extract rewrite information for build and target
19544     eval rewritten_build=\${REWRITE_${build_var}}
19545     if test "x$rewritten_build" = x; then
19546       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19547       echo Build stays the same $rewritten_build
19548     else
19549       echo Rewriting build for builddeps into $rewritten_build
19550     fi
19551     eval rewritten_target=\${REWRITE_${target_var}}
19552     if test "x$rewritten_target" = x; then
19553       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19554       echo Target stays the same $rewritten_target
19555     else
19556       echo Rewriting target for builddeps into $rewritten_target
19557     fi
19558     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19559     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19560   fi
19561   for ac_prog in 7z unzip
19562 do
19563   # Extract the first word of "$ac_prog", so it can be a program name with args.
19564 set dummy $ac_prog; ac_word=$2
19565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19566 $as_echo_n "checking for $ac_word... " >&6; }
19567 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19568   $as_echo_n "(cached) " >&6
19569 else
19570   if test -n "$BDEPS_UNZIP"; then
19571   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19572 else
19573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19574 for as_dir in $PATH
19575 do
19576   IFS=$as_save_IFS
19577   test -z "$as_dir" && as_dir=.
19578     for ac_exec_ext in '' $ac_executable_extensions; do
19579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19580     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19582     break 2
19583   fi
19584 done
19585   done
19586 IFS=$as_save_IFS
19587 
19588 fi
19589 fi
19590 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19591 if test -n "$BDEPS_UNZIP"; then
19592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19593 $as_echo "$BDEPS_UNZIP" >&6; }
19594 else
19595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19596 $as_echo "no" >&6; }
19597 fi
19598 
19599 
19600   test -n "$BDEPS_UNZIP" && break
19601 done
19602 
19603   if test "x$BDEPS_UNZIP" = x7z; then
19604     BDEPS_UNZIP="7z x"
19605   fi
19606 
19607   for ac_prog in wget lftp ftp
19608 do
19609   # Extract the first word of "$ac_prog", so it can be a program name with args.
19610 set dummy $ac_prog; ac_word=$2
19611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19612 $as_echo_n "checking for $ac_word... " >&6; }
19613 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19614   $as_echo_n "(cached) " >&6
19615 else
19616   if test -n "$BDEPS_FTP"; then
19617   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19618 else
19619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19620 for as_dir in $PATH
19621 do
19622   IFS=$as_save_IFS
19623   test -z "$as_dir" && as_dir=.
19624     for ac_exec_ext in '' $ac_executable_extensions; do
19625   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19626     ac_cv_prog_BDEPS_FTP="$ac_prog"
19627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19628     break 2
19629   fi
19630 done
19631   done
19632 IFS=$as_save_IFS
19633 
19634 fi
19635 fi
19636 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19637 if test -n "$BDEPS_FTP"; then
19638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19639 $as_echo "$BDEPS_FTP" >&6; }
19640 else
19641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19642 $as_echo "no" >&6; }
19643 fi
19644 
19645 
19646   test -n "$BDEPS_FTP" && break
19647 done
19648 
19649 
19650 
19651 ###############################################################################
19652 #
19653 # Determine OpenJDK variants, options and version numbers.
19654 #
19655 ###############################################################################
19656 
19657 # We need build & target for this.
19658 
19659 
19660   ###############################################################################
19661   #
19662   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19663   # We always build headless support.
19664   #
19665   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19666 $as_echo_n "checking headful support... " >&6; }
19667   # Check whether --enable-headful was given.
19668 if test "${enable_headful+set}" = set; then :
19669   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19670 else
19671   SUPPORT_HEADFUL=yes
19672 fi
19673 
19674 
19675   SUPPORT_HEADLESS=yes
19676   BUILD_HEADLESS="BUILD_HEADLESS:=true"
19677 
19678   if test "x$SUPPORT_HEADFUL" = xyes; then
19679     # We are building both headful and headless.
19680     headful_msg="include support for both headful and headless"
19681   fi
19682 
19683   if test "x$SUPPORT_HEADFUL" = xno; then
19684     # Thus we are building headless only.
19685     BUILD_HEADLESS="BUILD_HEADLESS:=true"
19686     headful_msg="headless only"
19687   fi
19688 
19689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19690 $as_echo "$headful_msg" >&6; }
19691 
19692 
19693 
19694 
19695 
19696   # Control wether Hotspot runs Queens test after build.
19697   # Check whether --enable-hotspot-test-in-build was given.
19698 if test "${enable_hotspot_test_in_build+set}" = set; then :
19699   enableval=$enable_hotspot_test_in_build;
19700 else
19701   enable_hotspot_test_in_build=no
19702 fi
19703 
19704   if test "x$enable_hotspot_test_in_build" = "xyes"; then
19705     TEST_IN_BUILD=true
19706   else
19707     TEST_IN_BUILD=false
19708   fi
19709 
19710 
19711   ###############################################################################
19712   #
19713   # Choose cacerts source file
19714   #
19715 
19716 # Check whether --with-cacerts-file was given.
19717 if test "${with_cacerts_file+set}" = set; then :
19718   withval=$with_cacerts_file;
19719 fi
19720 
19721   if test "x$with_cacerts_file" != x; then
19722     CACERTS_FILE=$with_cacerts_file
19723   else
19724     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19725   fi
19726 
19727 
19728   ###############################################################################
19729   #
19730   # Enable or disable unlimited crypto
19731   #
19732   # Check whether --enable-unlimited-crypto was given.
19733 if test "${enable_unlimited_crypto+set}" = set; then :
19734   enableval=$enable_unlimited_crypto;
19735 else
19736   enable_unlimited_crypto=no
19737 fi
19738 
19739   if test "x$enable_unlimited_crypto" = "xyes"; then
19740     UNLIMITED_CRYPTO=true
19741   else
19742     UNLIMITED_CRYPTO=false
19743   fi
19744 
19745 
19746   ###############################################################################
19747   #
19748   # Enable or disable the elliptic curve crypto implementation
19749   #
19750 
19751 
19752   ###############################################################################
19753   #
19754   # Compress jars
19755   #
19756   COMPRESS_JARS=false
19757 
19758 
19759 
19760 
19761   # Source the version numbers
19762   . $AUTOCONF_DIR/version-numbers
19763 
19764   # Get the settings from parameters
19765 
19766 # Check whether --with-milestone was given.
19767 if test "${with_milestone+set}" = set; then :
19768   withval=$with_milestone;
19769 fi
19770 
19771   if test "x$with_milestone" = xyes; then
19772     as_fn_error $? "Milestone must have a value" "$LINENO" 5
19773   elif test "x$with_milestone" != x; then
19774     MILESTONE="$with_milestone"
19775   fi
19776   if test "x$MILESTONE" = x; then
19777     MILESTONE=internal
19778   fi
19779 
19780 
19781 # Check whether --with-update-version was given.
19782 if test "${with_update_version+set}" = set; then :
19783   withval=$with_update_version;
19784 fi
19785 
19786   if test "x$with_update_version" = xyes; then
19787     as_fn_error $? "Update version must have a value" "$LINENO" 5
19788   elif test "x$with_update_version" != x; then
19789     JDK_UPDATE_VERSION="$with_update_version"
19790     # On macosx 10.7, it's not possible to set --with-update-version=0X due
19791     # to a bug in expr (which reduces it to just X). To work around this, we
19792     # always add a 0 to one digit update versions.
19793     if test "${#JDK_UPDATE_VERSION}" = "1"; then
19794       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19795     fi
19796   fi
19797 
19798 
19799 # Check whether --with-user-release-suffix was given.
19800 if test "${with_user_release_suffix+set}" = set; then :
19801   withval=$with_user_release_suffix;
19802 fi
19803 
19804   if test "x$with_user_release_suffix" = xyes; then
19805     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19806   elif test "x$with_user_release_suffix" != x; then
19807     USER_RELEASE_SUFFIX="$with_user_release_suffix"
19808   fi
19809 
19810 
19811 # Check whether --with-build-number was given.
19812 if test "${with_build_number+set}" = set; then :
19813   withval=$with_build_number;
19814 fi
19815 
19816   if test "x$with_build_number" = xyes; then
19817     as_fn_error $? "Build number must have a value" "$LINENO" 5
19818   elif test "x$with_build_number" != x; then
19819     JDK_BUILD_NUMBER="$with_build_number"
19820   fi
19821   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19822   if test "x$JDK_BUILD_NUMBER" = x; then
19823     JDK_BUILD_NUMBER=b00
19824     if test "x$USER_RELEASE_SUFFIX" = x; then
19825       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19826       # Avoid [:alnum:] since it depends on the locale.
19827       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19828       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19829     fi
19830   fi
19831 
19832   # Now set the JDK version, milestone, build number etc.
19833 
19834 
19835 
19836 
19837 
19838 
19839 
19840 
19841 
19842 
19843 
19844 
19845 
19846 
19847 
19848 
19849 # Check whether --with-copyright-year was given.
19850 if test "${with_copyright_year+set}" = set; then :
19851   withval=$with_copyright_year;
19852 fi
19853 
19854   if test "x$with_copyright_year" = xyes; then
19855     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
19856   elif test "x$with_copyright_year" != x; then
19857     COPYRIGHT_YEAR="$with_copyright_year"
19858   else
19859     COPYRIGHT_YEAR=`date +'%Y'`
19860   fi
19861 
19862 
19863   if test "x$JDK_UPDATE_VERSION" != x; then
19864     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19865   else
19866     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19867   fi
19868 
19869 
19870   # The cooked update version used to encode trailing letters in the update
19871   # version into a trailing number. That is no longer needed, but need to
19872   # keep the format in 8u for compatibility.
19873   COOKED_JDK_UPDATE_VERSION="${JDK_UPDATE_VERSION}0"
19874 
19875 
19876   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19877 
19878 
19879 
19880 ###############################################################################
19881 #
19882 # Setup BootJDK, used to bootstrap the build.
19883 #
19884 ###############################################################################
19885 
19886 
19887   BOOT_JDK_FOUND=no
19888 
19889 # Check whether --with-boot-jdk was given.
19890 if test "${with_boot_jdk+set}" = set; then :
19891   withval=$with_boot_jdk;
19892 fi
19893 
19894 
19895   # We look for the Boot JDK through various means, going from more certain to
19896   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19897   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19898   # must check if this is indeed valid; otherwise we'll continue looking.
19899 
19900   # Test: Is bootjdk explicitely set by command line arguments?
19901 
19902   if test "x$BOOT_JDK_FOUND" = xno; then
19903     # Now execute the test
19904 
19905   if test "x$with_boot_jdk" != x; then
19906     BOOT_JDK=$with_boot_jdk
19907     BOOT_JDK_FOUND=maybe
19908     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19909 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19910   fi
19911 
19912 
19913     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19914     if test "x$BOOT_JDK_FOUND" = xmaybe; then
19915       # Do we have a bin/java?
19916       if test ! -x "$BOOT_JDK/bin/java"; then
19917         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19918 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19919         BOOT_JDK_FOUND=no
19920       else
19921         # Do we have a bin/javac?
19922         if test ! -x "$BOOT_JDK/bin/javac"; then
19923           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19924 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19925           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19926 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19927           BOOT_JDK_FOUND=no
19928         else
19929           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19930           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19931             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19932 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19933             BOOT_JDK_FOUND=no
19934           else
19935             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19936             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19937 
19938             # Extra M4 quote needed to protect [] in grep expression.
19939             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
19940             if test "x$FOUND_VERSION_78" = x; then
19941               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19942 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19943               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
19944 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
19945               BOOT_JDK_FOUND=no
19946             else
19947               # We're done! :-)
19948               BOOT_JDK_FOUND=yes
19949 
19950   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19951 
19952   # Input might be given as Windows format, start by converting to
19953   # unix format.
19954   path="$BOOT_JDK"
19955   new_path=`$CYGPATH -u "$path"`
19956 
19957   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19958   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19959   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19960   # "foo.exe" is OK but "foo" is an error.
19961   #
19962   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19963   # It is also a way to make sure we got the proper file name for the real test later on.
19964   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19965   if test "x$test_shortpath" = x; then
19966     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19967 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19968     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19969   fi
19970 
19971   # Call helper function which possibly converts this using DOS-style short mode.
19972   # If so, the updated path is stored in $new_path.
19973 
19974   input_path="$new_path"
19975   # Check if we need to convert this using DOS-style short mode. If the path
19976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19977   # take no chances and rewrite it.
19978   # Note: m4 eats our [], so we need to use [ and ] instead.
19979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19980   if test "x$has_forbidden_chars" != x; then
19981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19982     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19983     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19984     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19985       # Going to short mode and back again did indeed matter. Since short mode is
19986       # case insensitive, let's make it lowercase to improve readability.
19987       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19988       # Now convert it back to Unix-style (cygpath)
19989       input_path=`$CYGPATH -u "$shortmode_path"`
19990       new_path="$input_path"
19991     fi
19992   fi
19993 
19994   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19995   if test "x$test_cygdrive_prefix" = x; then
19996     # As a simple fix, exclude /usr/bin since it's not a real path.
19997     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19998       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19999       # a path prefixed by /cygdrive for fixpath to work.
20000       new_path="$CYGWIN_ROOT_PATH$input_path"
20001     fi
20002   fi
20003 
20004 
20005   if test "x$path" != "x$new_path"; then
20006     BOOT_JDK="$new_path"
20007     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20008 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20009   fi
20010 
20011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20012 
20013   path="$BOOT_JDK"
20014   has_colon=`$ECHO $path | $GREP ^.:`
20015   new_path="$path"
20016   if test "x$has_colon" = x; then
20017     # Not in mixed or Windows style, start by that.
20018     new_path=`cmd //c echo $path`
20019   fi
20020 
20021 
20022   input_path="$new_path"
20023   # Check if we need to convert this using DOS-style short mode. If the path
20024   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20025   # take no chances and rewrite it.
20026   # Note: m4 eats our [], so we need to use [ and ] instead.
20027   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20028   if test "x$has_forbidden_chars" != x; then
20029     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20030     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20031   fi
20032 
20033 
20034   windows_path="$new_path"
20035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20036     unix_path=`$CYGPATH -u "$windows_path"`
20037     new_path="$unix_path"
20038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20039     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20040     new_path="$unix_path"
20041   fi
20042 
20043   if test "x$path" != "x$new_path"; then
20044     BOOT_JDK="$new_path"
20045     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20046 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20047   fi
20048 
20049   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20050   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20051 
20052   else
20053     # We're on a posix platform. Hooray! :)
20054     path="$BOOT_JDK"
20055     has_space=`$ECHO "$path" | $GREP " "`
20056     if test "x$has_space" != x; then
20057       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20058 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20059       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20060     fi
20061 
20062     # Use eval to expand a potential ~
20063     eval path="$path"
20064     if test ! -f "$path" && test ! -d "$path"; then
20065       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20066     fi
20067 
20068     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20069   fi
20070 
20071               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20072 $as_echo_n "checking for Boot JDK... " >&6; }
20073               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20074 $as_echo "$BOOT_JDK" >&6; }
20075               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20076 $as_echo_n "checking Boot JDK version... " >&6; }
20077               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20078               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20079 $as_echo "$BOOT_JDK_VERSION" >&6; }
20080             fi # end check jdk version
20081           fi # end check rt.jar
20082         fi # end check javac
20083       fi # end check java
20084     fi # end check boot jdk found
20085   fi
20086 
20087   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20088     # Having specified an argument which is incorrect will produce an instant failure;
20089     # we should not go on looking
20090     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20091   fi
20092 
20093   # Test: Is bootjdk available from builddeps?
20094 
20095   if test "x$BOOT_JDK_FOUND" = xno; then
20096     # Now execute the test
20097 
20098 
20099 
20100   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20101     # Source the builddeps file again, to make sure it uses the latest variables!
20102     . $builddepsfile
20103     # Look for a target and build machine specific resource!
20104     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20105     if test "x$resource" = x; then
20106       # Ok, lets instead look for a target specific resource
20107       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20108     fi
20109     if test "x$resource" = x; then
20110       # Ok, lets instead look for a build specific resource
20111       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20112     fi
20113     if test "x$resource" = x; then
20114       # Ok, lets instead look for a generic resource
20115       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20116       resource=${builddep_bootjdk}
20117     fi
20118     if test "x$resource" != x; then
20119       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20120 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20121       # If the resource in the builddeps.conf file is an existing directory,
20122       # for example /java/linux/cups
20123       if test -d ${resource}; then
20124         depdir=${resource}
20125       else
20126 
20127   # bootjdk is for example mymodule
20128   # $resource is for example libs/general/libmymod_1_2_3.zip
20129   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20130   # $with_builddeps_dir is for example /localhome/builddeps
20131   # depdir is the name of the variable into which we store the depdir, eg MYMOD
20132   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20133   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20134   filename=`basename $resource`
20135   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20136   filebase=${filename%%.*}
20137   extension=${filename#*.}
20138   installdir=$with_builddeps_dir/$filebase
20139   if test ! -f $installdir/$filename.unpacked; then
20140     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20141 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20142     if test ! -d $installdir; then
20143       mkdir -p $installdir
20144     fi
20145     if test ! -d $installdir; then
20146       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20147     fi
20148     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20149     touch $tmpfile
20150     if test ! -f $tmpfile; then
20151       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20152     fi
20153 
20154   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20155   # $tmpfile is the local file name for the downloaded file.
20156   VALID_TOOL=no
20157   if test "x$BDEPS_FTP" = xwget; then
20158     VALID_TOOL=yes
20159     wget -O $tmpfile $with_builddeps_server/$resource
20160   fi
20161   if test "x$BDEPS_FTP" = xlftp; then
20162     VALID_TOOL=yes
20163     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20164   fi
20165   if test "x$BDEPS_FTP" = xftp; then
20166     VALID_TOOL=yes
20167     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20168     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20169     FTPUSERPWD=${FTPSERVER%%@*}
20170     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20171       FTPUSER=${userpwd%%:*}
20172       FTPPWD=${userpwd#*@}
20173       FTPSERVER=${FTPSERVER#*@}
20174     else
20175       FTPUSER=ftp
20176       FTPPWD=ftp
20177     fi
20178     # the "pass" command does not work on some
20179     # ftp clients (read ftp.exe) but if it works,
20180     # passive mode is better!
20181     ( \
20182         echo "user $FTPUSER $FTPPWD"        ; \
20183         echo "pass"                         ; \
20184         echo "bin"                          ; \
20185         echo "get $FTPPATH $tmpfile"              ; \
20186     ) | ftp -in $FTPSERVER
20187   fi
20188   if test "x$VALID_TOOL" != xyes; then
20189     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20190   fi
20191 
20192     mv $tmpfile $installdir/$filename
20193     if test ! -s $installdir/$filename; then
20194       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20195     fi
20196     case "$extension" in
20197       zip)  echo "Unzipping $installdir/$filename..."
20198         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20199         ;;
20200       tar.gz) echo "Untaring $installdir/$filename..."
20201         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20202         ;;
20203       tgz) echo "Untaring $installdir/$filename..."
20204         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20205         ;;
20206       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20207         ;;
20208     esac
20209   fi
20210   if test -f $installdir/$filename.unpacked; then
20211     depdir=$installdir
20212   fi
20213 
20214       fi
20215       # Source the builddeps file again, because in the previous command, the depdir
20216       # was updated to point at the current build dependency install directory.
20217       . $builddepsfile
20218       # Now extract variables from the builddeps.conf files.
20219       theroot=${builddep_bootjdk_ROOT}
20220       thecflags=${builddep_bootjdk_CFLAGS}
20221       thelibs=${builddep_bootjdk_LIBS}
20222       if test "x$depdir" = x; then
20223         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20224       fi
20225       BOOT_JDK=$depdir
20226       if test "x$theroot" != x; then
20227         BOOT_JDK="$theroot"
20228       fi
20229       if test "x$thecflags" != x; then
20230         BOOT_JDK_CFLAGS="$thecflags"
20231       fi
20232       if test "x$thelibs" != x; then
20233         BOOT_JDK_LIBS="$thelibs"
20234       fi
20235       BOOT_JDK_FOUND=maybe
20236       else BOOT_JDK_FOUND=no
20237 
20238     fi
20239     else BOOT_JDK_FOUND=no
20240 
20241   fi
20242 
20243 
20244 
20245     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20246     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20247       # Do we have a bin/java?
20248       if test ! -x "$BOOT_JDK/bin/java"; then
20249         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20250 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20251         BOOT_JDK_FOUND=no
20252       else
20253         # Do we have a bin/javac?
20254         if test ! -x "$BOOT_JDK/bin/javac"; then
20255           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20256 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20257           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20258 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20259           BOOT_JDK_FOUND=no
20260         else
20261           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20262           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20263             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20264 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20265             BOOT_JDK_FOUND=no
20266           else
20267             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20268             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20269 
20270             # Extra M4 quote needed to protect [] in grep expression.
20271             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20272             if test "x$FOUND_VERSION_78" = x; then
20273               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20274 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20275               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20276 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20277               BOOT_JDK_FOUND=no
20278             else
20279               # We're done! :-)
20280               BOOT_JDK_FOUND=yes
20281 
20282   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20283 
20284   # Input might be given as Windows format, start by converting to
20285   # unix format.
20286   path="$BOOT_JDK"
20287   new_path=`$CYGPATH -u "$path"`
20288 
20289   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20290   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20291   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20292   # "foo.exe" is OK but "foo" is an error.
20293   #
20294   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20295   # It is also a way to make sure we got the proper file name for the real test later on.
20296   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20297   if test "x$test_shortpath" = x; then
20298     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20299 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20300     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20301   fi
20302 
20303   # Call helper function which possibly converts this using DOS-style short mode.
20304   # If so, the updated path is stored in $new_path.
20305 
20306   input_path="$new_path"
20307   # Check if we need to convert this using DOS-style short mode. If the path
20308   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20309   # take no chances and rewrite it.
20310   # Note: m4 eats our [], so we need to use [ and ] instead.
20311   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20312   if test "x$has_forbidden_chars" != x; then
20313     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20314     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20315     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20316     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20317       # Going to short mode and back again did indeed matter. Since short mode is
20318       # case insensitive, let's make it lowercase to improve readability.
20319       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20320       # Now convert it back to Unix-style (cygpath)
20321       input_path=`$CYGPATH -u "$shortmode_path"`
20322       new_path="$input_path"
20323     fi
20324   fi
20325 
20326   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20327   if test "x$test_cygdrive_prefix" = x; then
20328     # As a simple fix, exclude /usr/bin since it's not a real path.
20329     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20330       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20331       # a path prefixed by /cygdrive for fixpath to work.
20332       new_path="$CYGWIN_ROOT_PATH$input_path"
20333     fi
20334   fi
20335 
20336 
20337   if test "x$path" != "x$new_path"; then
20338     BOOT_JDK="$new_path"
20339     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20340 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20341   fi
20342 
20343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20344 
20345   path="$BOOT_JDK"
20346   has_colon=`$ECHO $path | $GREP ^.:`
20347   new_path="$path"
20348   if test "x$has_colon" = x; then
20349     # Not in mixed or Windows style, start by that.
20350     new_path=`cmd //c echo $path`
20351   fi
20352 
20353 
20354   input_path="$new_path"
20355   # Check if we need to convert this using DOS-style short mode. If the path
20356   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20357   # take no chances and rewrite it.
20358   # Note: m4 eats our [], so we need to use [ and ] instead.
20359   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20360   if test "x$has_forbidden_chars" != x; then
20361     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20362     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20363   fi
20364 
20365 
20366   windows_path="$new_path"
20367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20368     unix_path=`$CYGPATH -u "$windows_path"`
20369     new_path="$unix_path"
20370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20371     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20372     new_path="$unix_path"
20373   fi
20374 
20375   if test "x$path" != "x$new_path"; then
20376     BOOT_JDK="$new_path"
20377     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20378 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20379   fi
20380 
20381   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20382   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20383 
20384   else
20385     # We're on a posix platform. Hooray! :)
20386     path="$BOOT_JDK"
20387     has_space=`$ECHO "$path" | $GREP " "`
20388     if test "x$has_space" != x; then
20389       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20390 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20391       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20392     fi
20393 
20394     # Use eval to expand a potential ~
20395     eval path="$path"
20396     if test ! -f "$path" && test ! -d "$path"; then
20397       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20398     fi
20399 
20400     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20401   fi
20402 
20403               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20404 $as_echo_n "checking for Boot JDK... " >&6; }
20405               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20406 $as_echo "$BOOT_JDK" >&6; }
20407               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20408 $as_echo_n "checking Boot JDK version... " >&6; }
20409               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20410               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20411 $as_echo "$BOOT_JDK_VERSION" >&6; }
20412             fi # end check jdk version
20413           fi # end check rt.jar
20414         fi # end check javac
20415       fi # end check java
20416     fi # end check boot jdk found
20417   fi
20418 
20419 
20420   # Test: Is $JAVA_HOME set?
20421 
20422   if test "x$BOOT_JDK_FOUND" = xno; then
20423     # Now execute the test
20424 
20425   if test "x$JAVA_HOME" != x; then
20426     JAVA_HOME_PROCESSED="$JAVA_HOME"
20427 
20428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20429 
20430   # Input might be given as Windows format, start by converting to
20431   # unix format.
20432   path="$JAVA_HOME_PROCESSED"
20433   new_path=`$CYGPATH -u "$path"`
20434 
20435   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20436   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20437   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20438   # "foo.exe" is OK but "foo" is an error.
20439   #
20440   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20441   # It is also a way to make sure we got the proper file name for the real test later on.
20442   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20443   if test "x$test_shortpath" = x; then
20444     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
20445 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
20446     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
20447   fi
20448 
20449   # Call helper function which possibly converts this using DOS-style short mode.
20450   # If so, the updated path is stored in $new_path.
20451 
20452   input_path="$new_path"
20453   # Check if we need to convert this using DOS-style short mode. If the path
20454   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20455   # take no chances and rewrite it.
20456   # Note: m4 eats our [], so we need to use [ and ] instead.
20457   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20458   if test "x$has_forbidden_chars" != x; then
20459     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20460     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20461     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20462     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20463       # Going to short mode and back again did indeed matter. Since short mode is
20464       # case insensitive, let's make it lowercase to improve readability.
20465       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20466       # Now convert it back to Unix-style (cygpath)
20467       input_path=`$CYGPATH -u "$shortmode_path"`
20468       new_path="$input_path"
20469     fi
20470   fi
20471 
20472   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20473   if test "x$test_cygdrive_prefix" = x; then
20474     # As a simple fix, exclude /usr/bin since it's not a real path.
20475     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20476       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20477       # a path prefixed by /cygdrive for fixpath to work.
20478       new_path="$CYGWIN_ROOT_PATH$input_path"
20479     fi
20480   fi
20481 
20482 
20483   if test "x$path" != "x$new_path"; then
20484     JAVA_HOME_PROCESSED="$new_path"
20485     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
20486 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
20487   fi
20488 
20489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20490 
20491   path="$JAVA_HOME_PROCESSED"
20492   has_colon=`$ECHO $path | $GREP ^.:`
20493   new_path="$path"
20494   if test "x$has_colon" = x; then
20495     # Not in mixed or Windows style, start by that.
20496     new_path=`cmd //c echo $path`
20497   fi
20498 
20499 
20500   input_path="$new_path"
20501   # Check if we need to convert this using DOS-style short mode. If the path
20502   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20503   # take no chances and rewrite it.
20504   # Note: m4 eats our [], so we need to use [ and ] instead.
20505   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20506   if test "x$has_forbidden_chars" != x; then
20507     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20508     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20509   fi
20510 
20511 
20512   windows_path="$new_path"
20513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20514     unix_path=`$CYGPATH -u "$windows_path"`
20515     new_path="$unix_path"
20516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20517     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20518     new_path="$unix_path"
20519   fi
20520 
20521   if test "x$path" != "x$new_path"; then
20522     JAVA_HOME_PROCESSED="$new_path"
20523     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
20524 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
20525   fi
20526 
20527   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20528   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20529 
20530   else
20531     # We're on a posix platform. Hooray! :)
20532     path="$JAVA_HOME_PROCESSED"
20533     has_space=`$ECHO "$path" | $GREP " "`
20534     if test "x$has_space" != x; then
20535       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
20536 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
20537       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20538     fi
20539 
20540     # Use eval to expand a potential ~
20541     eval path="$path"
20542     if test ! -f "$path" && test ! -d "$path"; then
20543       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
20544     fi
20545 
20546     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
20547   fi
20548 
20549     if test ! -d "$JAVA_HOME_PROCESSED"; then
20550       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
20551 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
20552     else
20553       # Aha, the user has set a JAVA_HOME
20554       # let us use that as the Boot JDK.
20555       BOOT_JDK="$JAVA_HOME_PROCESSED"
20556       BOOT_JDK_FOUND=maybe
20557       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
20558 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
20559     fi
20560   fi
20561 
20562 
20563     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20564     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20565       # Do we have a bin/java?
20566       if test ! -x "$BOOT_JDK/bin/java"; then
20567         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20568 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20569         BOOT_JDK_FOUND=no
20570       else
20571         # Do we have a bin/javac?
20572         if test ! -x "$BOOT_JDK/bin/javac"; then
20573           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20574 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20575           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20576 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20577           BOOT_JDK_FOUND=no
20578         else
20579           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20580           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20581             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20582 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20583             BOOT_JDK_FOUND=no
20584           else
20585             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20586             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20587 
20588             # Extra M4 quote needed to protect [] in grep expression.
20589             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20590             if test "x$FOUND_VERSION_78" = x; then
20591               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20592 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20593               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20594 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20595               BOOT_JDK_FOUND=no
20596             else
20597               # We're done! :-)
20598               BOOT_JDK_FOUND=yes
20599 
20600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20601 
20602   # Input might be given as Windows format, start by converting to
20603   # unix format.
20604   path="$BOOT_JDK"
20605   new_path=`$CYGPATH -u "$path"`
20606 
20607   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20608   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20609   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20610   # "foo.exe" is OK but "foo" is an error.
20611   #
20612   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20613   # It is also a way to make sure we got the proper file name for the real test later on.
20614   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20615   if test "x$test_shortpath" = x; then
20616     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20617 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20618     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20619   fi
20620 
20621   # Call helper function which possibly converts this using DOS-style short mode.
20622   # If so, the updated path is stored in $new_path.
20623 
20624   input_path="$new_path"
20625   # Check if we need to convert this using DOS-style short mode. If the path
20626   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20627   # take no chances and rewrite it.
20628   # Note: m4 eats our [], so we need to use [ and ] instead.
20629   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20630   if test "x$has_forbidden_chars" != x; then
20631     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20632     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20633     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20634     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20635       # Going to short mode and back again did indeed matter. Since short mode is
20636       # case insensitive, let's make it lowercase to improve readability.
20637       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20638       # Now convert it back to Unix-style (cygpath)
20639       input_path=`$CYGPATH -u "$shortmode_path"`
20640       new_path="$input_path"
20641     fi
20642   fi
20643 
20644   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20645   if test "x$test_cygdrive_prefix" = x; then
20646     # As a simple fix, exclude /usr/bin since it's not a real path.
20647     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20648       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20649       # a path prefixed by /cygdrive for fixpath to work.
20650       new_path="$CYGWIN_ROOT_PATH$input_path"
20651     fi
20652   fi
20653 
20654 
20655   if test "x$path" != "x$new_path"; then
20656     BOOT_JDK="$new_path"
20657     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20658 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20659   fi
20660 
20661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20662 
20663   path="$BOOT_JDK"
20664   has_colon=`$ECHO $path | $GREP ^.:`
20665   new_path="$path"
20666   if test "x$has_colon" = x; then
20667     # Not in mixed or Windows style, start by that.
20668     new_path=`cmd //c echo $path`
20669   fi
20670 
20671 
20672   input_path="$new_path"
20673   # Check if we need to convert this using DOS-style short mode. If the path
20674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20675   # take no chances and rewrite it.
20676   # Note: m4 eats our [], so we need to use [ and ] instead.
20677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20678   if test "x$has_forbidden_chars" != x; then
20679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20680     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20681   fi
20682 
20683 
20684   windows_path="$new_path"
20685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20686     unix_path=`$CYGPATH -u "$windows_path"`
20687     new_path="$unix_path"
20688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20690     new_path="$unix_path"
20691   fi
20692 
20693   if test "x$path" != "x$new_path"; then
20694     BOOT_JDK="$new_path"
20695     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20696 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20697   fi
20698 
20699   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20700   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20701 
20702   else
20703     # We're on a posix platform. Hooray! :)
20704     path="$BOOT_JDK"
20705     has_space=`$ECHO "$path" | $GREP " "`
20706     if test "x$has_space" != x; then
20707       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20708 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20709       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20710     fi
20711 
20712     # Use eval to expand a potential ~
20713     eval path="$path"
20714     if test ! -f "$path" && test ! -d "$path"; then
20715       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20716     fi
20717 
20718     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20719   fi
20720 
20721               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20722 $as_echo_n "checking for Boot JDK... " >&6; }
20723               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20724 $as_echo "$BOOT_JDK" >&6; }
20725               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20726 $as_echo_n "checking Boot JDK version... " >&6; }
20727               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20728               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20729 $as_echo "$BOOT_JDK_VERSION" >&6; }
20730             fi # end check jdk version
20731           fi # end check rt.jar
20732         fi # end check javac
20733       fi # end check java
20734     fi # end check boot jdk found
20735   fi
20736 
20737 
20738   # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
20739 
20740   if test "x$BOOT_JDK_FOUND" = xno; then
20741     # Now execute the test
20742 
20743   if test -x /usr/libexec/java_home; then
20744     BOOT_JDK=`/usr/libexec/java_home`
20745     BOOT_JDK_FOUND=maybe
20746     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
20747 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
20748   fi
20749 
20750 
20751     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20752     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20753       # Do we have a bin/java?
20754       if test ! -x "$BOOT_JDK/bin/java"; then
20755         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20756 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20757         BOOT_JDK_FOUND=no
20758       else
20759         # Do we have a bin/javac?
20760         if test ! -x "$BOOT_JDK/bin/javac"; then
20761           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20762 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20763           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20764 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20765           BOOT_JDK_FOUND=no
20766         else
20767           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20768           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20769             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20770 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20771             BOOT_JDK_FOUND=no
20772           else
20773             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20774             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20775 
20776             # Extra M4 quote needed to protect [] in grep expression.
20777             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20778             if test "x$FOUND_VERSION_78" = x; then
20779               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20780 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20781               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20782 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20783               BOOT_JDK_FOUND=no
20784             else
20785               # We're done! :-)
20786               BOOT_JDK_FOUND=yes
20787 
20788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20789 
20790   # Input might be given as Windows format, start by converting to
20791   # unix format.
20792   path="$BOOT_JDK"
20793   new_path=`$CYGPATH -u "$path"`
20794 
20795   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20796   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20797   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20798   # "foo.exe" is OK but "foo" is an error.
20799   #
20800   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20801   # It is also a way to make sure we got the proper file name for the real test later on.
20802   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20803   if test "x$test_shortpath" = x; then
20804     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20805 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20806     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20807   fi
20808 
20809   # Call helper function which possibly converts this using DOS-style short mode.
20810   # If so, the updated path is stored in $new_path.
20811 
20812   input_path="$new_path"
20813   # Check if we need to convert this using DOS-style short mode. If the path
20814   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20815   # take no chances and rewrite it.
20816   # Note: m4 eats our [], so we need to use [ and ] instead.
20817   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20818   if test "x$has_forbidden_chars" != x; then
20819     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20820     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20821     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20822     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20823       # Going to short mode and back again did indeed matter. Since short mode is
20824       # case insensitive, let's make it lowercase to improve readability.
20825       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20826       # Now convert it back to Unix-style (cygpath)
20827       input_path=`$CYGPATH -u "$shortmode_path"`
20828       new_path="$input_path"
20829     fi
20830   fi
20831 
20832   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20833   if test "x$test_cygdrive_prefix" = x; then
20834     # As a simple fix, exclude /usr/bin since it's not a real path.
20835     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20836       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20837       # a path prefixed by /cygdrive for fixpath to work.
20838       new_path="$CYGWIN_ROOT_PATH$input_path"
20839     fi
20840   fi
20841 
20842 
20843   if test "x$path" != "x$new_path"; then
20844     BOOT_JDK="$new_path"
20845     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20846 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20847   fi
20848 
20849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20850 
20851   path="$BOOT_JDK"
20852   has_colon=`$ECHO $path | $GREP ^.:`
20853   new_path="$path"
20854   if test "x$has_colon" = x; then
20855     # Not in mixed or Windows style, start by that.
20856     new_path=`cmd //c echo $path`
20857   fi
20858 
20859 
20860   input_path="$new_path"
20861   # Check if we need to convert this using DOS-style short mode. If the path
20862   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20863   # take no chances and rewrite it.
20864   # Note: m4 eats our [], so we need to use [ and ] instead.
20865   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20866   if test "x$has_forbidden_chars" != x; then
20867     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20868     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20869   fi
20870 
20871 
20872   windows_path="$new_path"
20873   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20874     unix_path=`$CYGPATH -u "$windows_path"`
20875     new_path="$unix_path"
20876   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20877     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20878     new_path="$unix_path"
20879   fi
20880 
20881   if test "x$path" != "x$new_path"; then
20882     BOOT_JDK="$new_path"
20883     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20884 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20885   fi
20886 
20887   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20888   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20889 
20890   else
20891     # We're on a posix platform. Hooray! :)
20892     path="$BOOT_JDK"
20893     has_space=`$ECHO "$path" | $GREP " "`
20894     if test "x$has_space" != x; then
20895       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20896 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20897       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20898     fi
20899 
20900     # Use eval to expand a potential ~
20901     eval path="$path"
20902     if test ! -f "$path" && test ! -d "$path"; then
20903       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20904     fi
20905 
20906     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20907   fi
20908 
20909               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20910 $as_echo_n "checking for Boot JDK... " >&6; }
20911               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20912 $as_echo "$BOOT_JDK" >&6; }
20913               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20914 $as_echo_n "checking Boot JDK version... " >&6; }
20915               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20916               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20917 $as_echo "$BOOT_JDK_VERSION" >&6; }
20918             fi # end check jdk version
20919           fi # end check rt.jar
20920         fi # end check javac
20921       fi # end check java
20922     fi # end check boot jdk found
20923   fi
20924 
20925 
20926   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
20927 
20928   if test "x$BOOT_JDK_FOUND" = xno; then
20929     # Now execute the test
20930 
20931   # Extract the first word of "javac", so it can be a program name with args.
20932 set dummy javac; ac_word=$2
20933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20934 $as_echo_n "checking for $ac_word... " >&6; }
20935 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
20936   $as_echo_n "(cached) " >&6
20937 else
20938   case $JAVAC_CHECK in
20939   [\\/]* | ?:[\\/]*)
20940   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
20941   ;;
20942   *)
20943   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20944 for as_dir in $PATH
20945 do
20946   IFS=$as_save_IFS
20947   test -z "$as_dir" && as_dir=.
20948     for ac_exec_ext in '' $ac_executable_extensions; do
20949   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20950     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
20951     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20952     break 2
20953   fi
20954 done
20955   done
20956 IFS=$as_save_IFS
20957 
20958   ;;
20959 esac
20960 fi
20961 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
20962 if test -n "$JAVAC_CHECK"; then
20963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
20964 $as_echo "$JAVAC_CHECK" >&6; }
20965 else
20966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20967 $as_echo "no" >&6; }
20968 fi
20969 
20970 
20971   # Extract the first word of "java", so it can be a program name with args.
20972 set dummy java; ac_word=$2
20973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20974 $as_echo_n "checking for $ac_word... " >&6; }
20975 if ${ac_cv_path_JAVA_CHECK+:} false; then :
20976   $as_echo_n "(cached) " >&6
20977 else
20978   case $JAVA_CHECK in
20979   [\\/]* | ?:[\\/]*)
20980   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
20981   ;;
20982   *)
20983   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20984 for as_dir in $PATH
20985 do
20986   IFS=$as_save_IFS
20987   test -z "$as_dir" && as_dir=.
20988     for ac_exec_ext in '' $ac_executable_extensions; do
20989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20990     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
20991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20992     break 2
20993   fi
20994 done
20995   done
20996 IFS=$as_save_IFS
20997 
20998   ;;
20999 esac
21000 fi
21001 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21002 if test -n "$JAVA_CHECK"; then
21003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21004 $as_echo "$JAVA_CHECK" >&6; }
21005 else
21006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21007 $as_echo "no" >&6; }
21008 fi
21009 
21010 
21011   BINARY="$JAVAC_CHECK"
21012   if test "x$JAVAC_CHECK" = x; then
21013     BINARY="$JAVA_CHECK"
21014   fi
21015   if test "x$BINARY" != x; then
21016     # So there is a java(c) binary, it might be part of a JDK.
21017     # Lets find the JDK/JRE directory by following symbolic links.
21018     # Linux/GNU systems often have links from /usr/bin/java to
21019     # /etc/alternatives/java to the real JDK binary.
21020 
21021   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21022     # Follow a chain of symbolic links. Use readlink
21023     # where it exists, else fall back to horribly
21024     # complicated shell code.
21025     if test "x$READLINK_TESTED" != yes; then
21026       # On MacOSX there is a readlink tool with a different
21027       # purpose than the GNU readlink tool. Check the found readlink.
21028       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21029       if test "x$ISGNU" = x; then
21030         # A readlink that we do not know how to use.
21031         # Are there other non-GNU readlinks out there?
21032         READLINK_TESTED=yes
21033         READLINK=
21034       fi
21035     fi
21036 
21037     if test "x$READLINK" != x; then
21038       BINARY=`$READLINK -f $BINARY`
21039     else
21040       # Save the current directory for restoring afterwards
21041       STARTDIR=$PWD
21042       COUNTER=0
21043       sym_link_dir=`$DIRNAME $BINARY`
21044       sym_link_file=`$BASENAME $BINARY`
21045       cd $sym_link_dir
21046       # Use -P flag to resolve symlinks in directories.
21047       cd `$THEPWDCMD -P`
21048       sym_link_dir=`$THEPWDCMD -P`
21049       # Resolve file symlinks
21050       while test $COUNTER -lt 20; do
21051         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21052         if test "x$ISLINK" == x; then
21053           # This is not a symbolic link! We are done!
21054           break
21055         fi
21056         # Again resolve directory symlinks since the target of the just found
21057         # link could be in a different directory
21058         cd `$DIRNAME $ISLINK`
21059         sym_link_dir=`$THEPWDCMD -P`
21060         sym_link_file=`$BASENAME $ISLINK`
21061         let COUNTER=COUNTER+1
21062       done
21063       cd $STARTDIR
21064       BINARY=$sym_link_dir/$sym_link_file
21065     fi
21066   fi
21067 
21068     BOOT_JDK=`dirname "$BINARY"`
21069     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21070     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21071       # Looks like we found ourselves an JDK
21072       BOOT_JDK_FOUND=maybe
21073       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21074 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21075     fi
21076   fi
21077 
21078 
21079     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21080     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21081       # Do we have a bin/java?
21082       if test ! -x "$BOOT_JDK/bin/java"; then
21083         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21084 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21085         BOOT_JDK_FOUND=no
21086       else
21087         # Do we have a bin/javac?
21088         if test ! -x "$BOOT_JDK/bin/javac"; then
21089           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21090 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21091           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21092 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21093           BOOT_JDK_FOUND=no
21094         else
21095           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21096           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21097             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21098 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21099             BOOT_JDK_FOUND=no
21100           else
21101             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21102             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21103 
21104             # Extra M4 quote needed to protect [] in grep expression.
21105             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21106             if test "x$FOUND_VERSION_78" = x; then
21107               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21108 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21109               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21110 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21111               BOOT_JDK_FOUND=no
21112             else
21113               # We're done! :-)
21114               BOOT_JDK_FOUND=yes
21115 
21116   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21117 
21118   # Input might be given as Windows format, start by converting to
21119   # unix format.
21120   path="$BOOT_JDK"
21121   new_path=`$CYGPATH -u "$path"`
21122 
21123   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21124   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21125   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21126   # "foo.exe" is OK but "foo" is an error.
21127   #
21128   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21129   # It is also a way to make sure we got the proper file name for the real test later on.
21130   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21131   if test "x$test_shortpath" = x; then
21132     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21133 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21134     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21135   fi
21136 
21137   # Call helper function which possibly converts this using DOS-style short mode.
21138   # If so, the updated path is stored in $new_path.
21139 
21140   input_path="$new_path"
21141   # Check if we need to convert this using DOS-style short mode. If the path
21142   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21143   # take no chances and rewrite it.
21144   # Note: m4 eats our [], so we need to use [ and ] instead.
21145   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21146   if test "x$has_forbidden_chars" != x; then
21147     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21148     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21149     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21150     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21151       # Going to short mode and back again did indeed matter. Since short mode is
21152       # case insensitive, let's make it lowercase to improve readability.
21153       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21154       # Now convert it back to Unix-style (cygpath)
21155       input_path=`$CYGPATH -u "$shortmode_path"`
21156       new_path="$input_path"
21157     fi
21158   fi
21159 
21160   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21161   if test "x$test_cygdrive_prefix" = x; then
21162     # As a simple fix, exclude /usr/bin since it's not a real path.
21163     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21164       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21165       # a path prefixed by /cygdrive for fixpath to work.
21166       new_path="$CYGWIN_ROOT_PATH$input_path"
21167     fi
21168   fi
21169 
21170 
21171   if test "x$path" != "x$new_path"; then
21172     BOOT_JDK="$new_path"
21173     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21174 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21175   fi
21176 
21177   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21178 
21179   path="$BOOT_JDK"
21180   has_colon=`$ECHO $path | $GREP ^.:`
21181   new_path="$path"
21182   if test "x$has_colon" = x; then
21183     # Not in mixed or Windows style, start by that.
21184     new_path=`cmd //c echo $path`
21185   fi
21186 
21187 
21188   input_path="$new_path"
21189   # Check if we need to convert this using DOS-style short mode. If the path
21190   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21191   # take no chances and rewrite it.
21192   # Note: m4 eats our [], so we need to use [ and ] instead.
21193   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21194   if test "x$has_forbidden_chars" != x; then
21195     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21196     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21197   fi
21198 
21199 
21200   windows_path="$new_path"
21201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21202     unix_path=`$CYGPATH -u "$windows_path"`
21203     new_path="$unix_path"
21204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21206     new_path="$unix_path"
21207   fi
21208 
21209   if test "x$path" != "x$new_path"; then
21210     BOOT_JDK="$new_path"
21211     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21212 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21213   fi
21214 
21215   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21216   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21217 
21218   else
21219     # We're on a posix platform. Hooray! :)
21220     path="$BOOT_JDK"
21221     has_space=`$ECHO "$path" | $GREP " "`
21222     if test "x$has_space" != x; then
21223       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21224 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21225       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21226     fi
21227 
21228     # Use eval to expand a potential ~
21229     eval path="$path"
21230     if test ! -f "$path" && test ! -d "$path"; then
21231       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21232     fi
21233 
21234     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21235   fi
21236 
21237               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21238 $as_echo_n "checking for Boot JDK... " >&6; }
21239               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21240 $as_echo "$BOOT_JDK" >&6; }
21241               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21242 $as_echo_n "checking Boot JDK version... " >&6; }
21243               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21244               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21245 $as_echo "$BOOT_JDK_VERSION" >&6; }
21246             fi # end check jdk version
21247           fi # end check rt.jar
21248         fi # end check javac
21249       fi # end check java
21250     fi # end check boot jdk found
21251   fi
21252 
21253 
21254   # Test: Is there a JDK installed in default, well-known locations?
21255 
21256   if test "x$BOOT_JDK_FOUND" = xno; then
21257     # Now execute the test
21258 
21259   if test "x$OPENJDK_TARGET_OS" = xwindows; then
21260 
21261   if test "x$BOOT_JDK_FOUND" = xno; then
21262     # Now execute the test
21263 
21264   if test "x$ProgramW6432" != x; then
21265     VIRTUAL_DIR="$ProgramW6432/Java"
21266 
21267   windows_path="$VIRTUAL_DIR"
21268   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21269     unix_path=`$CYGPATH -u "$windows_path"`
21270     VIRTUAL_DIR="$unix_path"
21271   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21272     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21273     VIRTUAL_DIR="$unix_path"
21274   fi
21275 
21276 
21277   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21278   BOOT_JDK_SUFFIX=""
21279   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21280   if test "x$ALL_JDKS_FOUND" != x; then
21281     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21282 
21283   if test "x$BOOT_JDK_FOUND" = xno; then
21284     # Now execute the test
21285 
21286         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21287         if test -d "$BOOT_JDK"; then
21288           BOOT_JDK_FOUND=maybe
21289           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21290 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21291         fi
21292 
21293 
21294     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21295     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21296       # Do we have a bin/java?
21297       if test ! -x "$BOOT_JDK/bin/java"; then
21298         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21299 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21300         BOOT_JDK_FOUND=no
21301       else
21302         # Do we have a bin/javac?
21303         if test ! -x "$BOOT_JDK/bin/javac"; then
21304           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21305 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21306           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21307 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21308           BOOT_JDK_FOUND=no
21309         else
21310           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21311           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21312             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21313 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21314             BOOT_JDK_FOUND=no
21315           else
21316             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21317             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21318 
21319             # Extra M4 quote needed to protect [] in grep expression.
21320             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21321             if test "x$FOUND_VERSION_78" = x; then
21322               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21323 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21324               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21325 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21326               BOOT_JDK_FOUND=no
21327             else
21328               # We're done! :-)
21329               BOOT_JDK_FOUND=yes
21330 
21331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21332 
21333   # Input might be given as Windows format, start by converting to
21334   # unix format.
21335   path="$BOOT_JDK"
21336   new_path=`$CYGPATH -u "$path"`
21337 
21338   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21339   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21340   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21341   # "foo.exe" is OK but "foo" is an error.
21342   #
21343   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21344   # It is also a way to make sure we got the proper file name for the real test later on.
21345   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21346   if test "x$test_shortpath" = x; then
21347     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21348 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21349     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21350   fi
21351 
21352   # Call helper function which possibly converts this using DOS-style short mode.
21353   # If so, the updated path is stored in $new_path.
21354 
21355   input_path="$new_path"
21356   # Check if we need to convert this using DOS-style short mode. If the path
21357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21358   # take no chances and rewrite it.
21359   # Note: m4 eats our [], so we need to use [ and ] instead.
21360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21361   if test "x$has_forbidden_chars" != x; then
21362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21363     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21364     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21365     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21366       # Going to short mode and back again did indeed matter. Since short mode is
21367       # case insensitive, let's make it lowercase to improve readability.
21368       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21369       # Now convert it back to Unix-style (cygpath)
21370       input_path=`$CYGPATH -u "$shortmode_path"`
21371       new_path="$input_path"
21372     fi
21373   fi
21374 
21375   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21376   if test "x$test_cygdrive_prefix" = x; then
21377     # As a simple fix, exclude /usr/bin since it's not a real path.
21378     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21379       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21380       # a path prefixed by /cygdrive for fixpath to work.
21381       new_path="$CYGWIN_ROOT_PATH$input_path"
21382     fi
21383   fi
21384 
21385 
21386   if test "x$path" != "x$new_path"; then
21387     BOOT_JDK="$new_path"
21388     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21389 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21390   fi
21391 
21392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21393 
21394   path="$BOOT_JDK"
21395   has_colon=`$ECHO $path | $GREP ^.:`
21396   new_path="$path"
21397   if test "x$has_colon" = x; then
21398     # Not in mixed or Windows style, start by that.
21399     new_path=`cmd //c echo $path`
21400   fi
21401 
21402 
21403   input_path="$new_path"
21404   # Check if we need to convert this using DOS-style short mode. If the path
21405   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21406   # take no chances and rewrite it.
21407   # Note: m4 eats our [], so we need to use [ and ] instead.
21408   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21409   if test "x$has_forbidden_chars" != x; then
21410     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21411     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21412   fi
21413 
21414 
21415   windows_path="$new_path"
21416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21417     unix_path=`$CYGPATH -u "$windows_path"`
21418     new_path="$unix_path"
21419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21421     new_path="$unix_path"
21422   fi
21423 
21424   if test "x$path" != "x$new_path"; then
21425     BOOT_JDK="$new_path"
21426     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21427 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21428   fi
21429 
21430   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21431   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21432 
21433   else
21434     # We're on a posix platform. Hooray! :)
21435     path="$BOOT_JDK"
21436     has_space=`$ECHO "$path" | $GREP " "`
21437     if test "x$has_space" != x; then
21438       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21439 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21440       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21441     fi
21442 
21443     # Use eval to expand a potential ~
21444     eval path="$path"
21445     if test ! -f "$path" && test ! -d "$path"; then
21446       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21447     fi
21448 
21449     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21450   fi
21451 
21452               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21453 $as_echo_n "checking for Boot JDK... " >&6; }
21454               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21455 $as_echo "$BOOT_JDK" >&6; }
21456               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21457 $as_echo_n "checking Boot JDK version... " >&6; }
21458               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21459               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21460 $as_echo "$BOOT_JDK_VERSION" >&6; }
21461             fi # end check jdk version
21462           fi # end check rt.jar
21463         fi # end check javac
21464       fi # end check java
21465     fi # end check boot jdk found
21466   fi
21467 
21468     done
21469   fi
21470 
21471   fi
21472 
21473 
21474     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21475     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21476       # Do we have a bin/java?
21477       if test ! -x "$BOOT_JDK/bin/java"; then
21478         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21479 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21480         BOOT_JDK_FOUND=no
21481       else
21482         # Do we have a bin/javac?
21483         if test ! -x "$BOOT_JDK/bin/javac"; then
21484           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21485 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21486           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21487 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21488           BOOT_JDK_FOUND=no
21489         else
21490           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21491           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21492             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21493 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21494             BOOT_JDK_FOUND=no
21495           else
21496             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21497             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21498 
21499             # Extra M4 quote needed to protect [] in grep expression.
21500             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21501             if test "x$FOUND_VERSION_78" = x; then
21502               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21503 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21504               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21505 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21506               BOOT_JDK_FOUND=no
21507             else
21508               # We're done! :-)
21509               BOOT_JDK_FOUND=yes
21510 
21511   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21512 
21513   # Input might be given as Windows format, start by converting to
21514   # unix format.
21515   path="$BOOT_JDK"
21516   new_path=`$CYGPATH -u "$path"`
21517 
21518   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21519   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21520   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21521   # "foo.exe" is OK but "foo" is an error.
21522   #
21523   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21524   # It is also a way to make sure we got the proper file name for the real test later on.
21525   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21526   if test "x$test_shortpath" = x; then
21527     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21528 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21529     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21530   fi
21531 
21532   # Call helper function which possibly converts this using DOS-style short mode.
21533   # If so, the updated path is stored in $new_path.
21534 
21535   input_path="$new_path"
21536   # Check if we need to convert this using DOS-style short mode. If the path
21537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21538   # take no chances and rewrite it.
21539   # Note: m4 eats our [], so we need to use [ and ] instead.
21540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21541   if test "x$has_forbidden_chars" != x; then
21542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21543     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21544     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21545     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21546       # Going to short mode and back again did indeed matter. Since short mode is
21547       # case insensitive, let's make it lowercase to improve readability.
21548       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21549       # Now convert it back to Unix-style (cygpath)
21550       input_path=`$CYGPATH -u "$shortmode_path"`
21551       new_path="$input_path"
21552     fi
21553   fi
21554 
21555   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21556   if test "x$test_cygdrive_prefix" = x; then
21557     # As a simple fix, exclude /usr/bin since it's not a real path.
21558     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21559       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21560       # a path prefixed by /cygdrive for fixpath to work.
21561       new_path="$CYGWIN_ROOT_PATH$input_path"
21562     fi
21563   fi
21564 
21565 
21566   if test "x$path" != "x$new_path"; then
21567     BOOT_JDK="$new_path"
21568     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21569 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21570   fi
21571 
21572   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21573 
21574   path="$BOOT_JDK"
21575   has_colon=`$ECHO $path | $GREP ^.:`
21576   new_path="$path"
21577   if test "x$has_colon" = x; then
21578     # Not in mixed or Windows style, start by that.
21579     new_path=`cmd //c echo $path`
21580   fi
21581 
21582 
21583   input_path="$new_path"
21584   # Check if we need to convert this using DOS-style short mode. If the path
21585   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21586   # take no chances and rewrite it.
21587   # Note: m4 eats our [], so we need to use [ and ] instead.
21588   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21589   if test "x$has_forbidden_chars" != x; then
21590     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21591     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21592   fi
21593 
21594 
21595   windows_path="$new_path"
21596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21597     unix_path=`$CYGPATH -u "$windows_path"`
21598     new_path="$unix_path"
21599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21601     new_path="$unix_path"
21602   fi
21603 
21604   if test "x$path" != "x$new_path"; then
21605     BOOT_JDK="$new_path"
21606     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21607 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21608   fi
21609 
21610   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21611   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21612 
21613   else
21614     # We're on a posix platform. Hooray! :)
21615     path="$BOOT_JDK"
21616     has_space=`$ECHO "$path" | $GREP " "`
21617     if test "x$has_space" != x; then
21618       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21619 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21620       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21621     fi
21622 
21623     # Use eval to expand a potential ~
21624     eval path="$path"
21625     if test ! -f "$path" && test ! -d "$path"; then
21626       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21627     fi
21628 
21629     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21630   fi
21631 
21632               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21633 $as_echo_n "checking for Boot JDK... " >&6; }
21634               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21635 $as_echo "$BOOT_JDK" >&6; }
21636               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21637 $as_echo_n "checking Boot JDK version... " >&6; }
21638               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21639               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21640 $as_echo "$BOOT_JDK_VERSION" >&6; }
21641             fi # end check jdk version
21642           fi # end check rt.jar
21643         fi # end check javac
21644       fi # end check java
21645     fi # end check boot jdk found
21646   fi
21647 
21648 
21649   if test "x$BOOT_JDK_FOUND" = xno; then
21650     # Now execute the test
21651 
21652   if test "x$PROGRAMW6432" != x; then
21653     VIRTUAL_DIR="$PROGRAMW6432/Java"
21654 
21655   windows_path="$VIRTUAL_DIR"
21656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21657     unix_path=`$CYGPATH -u "$windows_path"`
21658     VIRTUAL_DIR="$unix_path"
21659   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21660     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21661     VIRTUAL_DIR="$unix_path"
21662   fi
21663 
21664 
21665   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21666   BOOT_JDK_SUFFIX=""
21667   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21668   if test "x$ALL_JDKS_FOUND" != x; then
21669     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21670 
21671   if test "x$BOOT_JDK_FOUND" = xno; then
21672     # Now execute the test
21673 
21674         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21675         if test -d "$BOOT_JDK"; then
21676           BOOT_JDK_FOUND=maybe
21677           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21678 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21679         fi
21680 
21681 
21682     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21683     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21684       # Do we have a bin/java?
21685       if test ! -x "$BOOT_JDK/bin/java"; then
21686         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21687 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21688         BOOT_JDK_FOUND=no
21689       else
21690         # Do we have a bin/javac?
21691         if test ! -x "$BOOT_JDK/bin/javac"; then
21692           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21693 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21694           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21695 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21696           BOOT_JDK_FOUND=no
21697         else
21698           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21699           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21700             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21701 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21702             BOOT_JDK_FOUND=no
21703           else
21704             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21705             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21706 
21707             # Extra M4 quote needed to protect [] in grep expression.
21708             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21709             if test "x$FOUND_VERSION_78" = x; then
21710               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21711 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21712               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21713 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21714               BOOT_JDK_FOUND=no
21715             else
21716               # We're done! :-)
21717               BOOT_JDK_FOUND=yes
21718 
21719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21720 
21721   # Input might be given as Windows format, start by converting to
21722   # unix format.
21723   path="$BOOT_JDK"
21724   new_path=`$CYGPATH -u "$path"`
21725 
21726   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21727   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21728   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21729   # "foo.exe" is OK but "foo" is an error.
21730   #
21731   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21732   # It is also a way to make sure we got the proper file name for the real test later on.
21733   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21734   if test "x$test_shortpath" = x; then
21735     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21736 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21737     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21738   fi
21739 
21740   # Call helper function which possibly converts this using DOS-style short mode.
21741   # If so, the updated path is stored in $new_path.
21742 
21743   input_path="$new_path"
21744   # Check if we need to convert this using DOS-style short mode. If the path
21745   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21746   # take no chances and rewrite it.
21747   # Note: m4 eats our [], so we need to use [ and ] instead.
21748   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21749   if test "x$has_forbidden_chars" != x; then
21750     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21751     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21752     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21753     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21754       # Going to short mode and back again did indeed matter. Since short mode is
21755       # case insensitive, let's make it lowercase to improve readability.
21756       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21757       # Now convert it back to Unix-style (cygpath)
21758       input_path=`$CYGPATH -u "$shortmode_path"`
21759       new_path="$input_path"
21760     fi
21761   fi
21762 
21763   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21764   if test "x$test_cygdrive_prefix" = x; then
21765     # As a simple fix, exclude /usr/bin since it's not a real path.
21766     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21767       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21768       # a path prefixed by /cygdrive for fixpath to work.
21769       new_path="$CYGWIN_ROOT_PATH$input_path"
21770     fi
21771   fi
21772 
21773 
21774   if test "x$path" != "x$new_path"; then
21775     BOOT_JDK="$new_path"
21776     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21777 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21778   fi
21779 
21780   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21781 
21782   path="$BOOT_JDK"
21783   has_colon=`$ECHO $path | $GREP ^.:`
21784   new_path="$path"
21785   if test "x$has_colon" = x; then
21786     # Not in mixed or Windows style, start by that.
21787     new_path=`cmd //c echo $path`
21788   fi
21789 
21790 
21791   input_path="$new_path"
21792   # Check if we need to convert this using DOS-style short mode. If the path
21793   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21794   # take no chances and rewrite it.
21795   # Note: m4 eats our [], so we need to use [ and ] instead.
21796   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21797   if test "x$has_forbidden_chars" != x; then
21798     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21799     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21800   fi
21801 
21802 
21803   windows_path="$new_path"
21804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21805     unix_path=`$CYGPATH -u "$windows_path"`
21806     new_path="$unix_path"
21807   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21808     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21809     new_path="$unix_path"
21810   fi
21811 
21812   if test "x$path" != "x$new_path"; then
21813     BOOT_JDK="$new_path"
21814     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21815 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21816   fi
21817 
21818   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21819   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21820 
21821   else
21822     # We're on a posix platform. Hooray! :)
21823     path="$BOOT_JDK"
21824     has_space=`$ECHO "$path" | $GREP " "`
21825     if test "x$has_space" != x; then
21826       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21827 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21828       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21829     fi
21830 
21831     # Use eval to expand a potential ~
21832     eval path="$path"
21833     if test ! -f "$path" && test ! -d "$path"; then
21834       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21835     fi
21836 
21837     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21838   fi
21839 
21840               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21841 $as_echo_n "checking for Boot JDK... " >&6; }
21842               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21843 $as_echo "$BOOT_JDK" >&6; }
21844               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21845 $as_echo_n "checking Boot JDK version... " >&6; }
21846               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21847               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21848 $as_echo "$BOOT_JDK_VERSION" >&6; }
21849             fi # end check jdk version
21850           fi # end check rt.jar
21851         fi # end check javac
21852       fi # end check java
21853     fi # end check boot jdk found
21854   fi
21855 
21856     done
21857   fi
21858 
21859   fi
21860 
21861 
21862     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21863     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21864       # Do we have a bin/java?
21865       if test ! -x "$BOOT_JDK/bin/java"; then
21866         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21867 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21868         BOOT_JDK_FOUND=no
21869       else
21870         # Do we have a bin/javac?
21871         if test ! -x "$BOOT_JDK/bin/javac"; then
21872           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21873 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21874           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21875 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21876           BOOT_JDK_FOUND=no
21877         else
21878           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21879           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21880             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21881 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21882             BOOT_JDK_FOUND=no
21883           else
21884             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21885             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21886 
21887             # Extra M4 quote needed to protect [] in grep expression.
21888             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21889             if test "x$FOUND_VERSION_78" = x; then
21890               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21891 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21892               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21893 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21894               BOOT_JDK_FOUND=no
21895             else
21896               # We're done! :-)
21897               BOOT_JDK_FOUND=yes
21898 
21899   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21900 
21901   # Input might be given as Windows format, start by converting to
21902   # unix format.
21903   path="$BOOT_JDK"
21904   new_path=`$CYGPATH -u "$path"`
21905 
21906   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21907   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21908   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21909   # "foo.exe" is OK but "foo" is an error.
21910   #
21911   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21912   # It is also a way to make sure we got the proper file name for the real test later on.
21913   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21914   if test "x$test_shortpath" = x; then
21915     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21916 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21917     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21918   fi
21919 
21920   # Call helper function which possibly converts this using DOS-style short mode.
21921   # If so, the updated path is stored in $new_path.
21922 
21923   input_path="$new_path"
21924   # Check if we need to convert this using DOS-style short mode. If the path
21925   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21926   # take no chances and rewrite it.
21927   # Note: m4 eats our [], so we need to use [ and ] instead.
21928   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21929   if test "x$has_forbidden_chars" != x; then
21930     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21931     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21932     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21933     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21934       # Going to short mode and back again did indeed matter. Since short mode is
21935       # case insensitive, let's make it lowercase to improve readability.
21936       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21937       # Now convert it back to Unix-style (cygpath)
21938       input_path=`$CYGPATH -u "$shortmode_path"`
21939       new_path="$input_path"
21940     fi
21941   fi
21942 
21943   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21944   if test "x$test_cygdrive_prefix" = x; then
21945     # As a simple fix, exclude /usr/bin since it's not a real path.
21946     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21947       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21948       # a path prefixed by /cygdrive for fixpath to work.
21949       new_path="$CYGWIN_ROOT_PATH$input_path"
21950     fi
21951   fi
21952 
21953 
21954   if test "x$path" != "x$new_path"; then
21955     BOOT_JDK="$new_path"
21956     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21957 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21958   fi
21959 
21960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21961 
21962   path="$BOOT_JDK"
21963   has_colon=`$ECHO $path | $GREP ^.:`
21964   new_path="$path"
21965   if test "x$has_colon" = x; then
21966     # Not in mixed or Windows style, start by that.
21967     new_path=`cmd //c echo $path`
21968   fi
21969 
21970 
21971   input_path="$new_path"
21972   # Check if we need to convert this using DOS-style short mode. If the path
21973   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21974   # take no chances and rewrite it.
21975   # Note: m4 eats our [], so we need to use [ and ] instead.
21976   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21977   if test "x$has_forbidden_chars" != x; then
21978     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21979     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21980   fi
21981 
21982 
21983   windows_path="$new_path"
21984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21985     unix_path=`$CYGPATH -u "$windows_path"`
21986     new_path="$unix_path"
21987   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21988     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21989     new_path="$unix_path"
21990   fi
21991 
21992   if test "x$path" != "x$new_path"; then
21993     BOOT_JDK="$new_path"
21994     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21995 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21996   fi
21997 
21998   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21999   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22000 
22001   else
22002     # We're on a posix platform. Hooray! :)
22003     path="$BOOT_JDK"
22004     has_space=`$ECHO "$path" | $GREP " "`
22005     if test "x$has_space" != x; then
22006       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22007 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22008       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22009     fi
22010 
22011     # Use eval to expand a potential ~
22012     eval path="$path"
22013     if test ! -f "$path" && test ! -d "$path"; then
22014       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22015     fi
22016 
22017     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22018   fi
22019 
22020               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22021 $as_echo_n "checking for Boot JDK... " >&6; }
22022               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22023 $as_echo "$BOOT_JDK" >&6; }
22024               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22025 $as_echo_n "checking Boot JDK version... " >&6; }
22026               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22027               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22028 $as_echo "$BOOT_JDK_VERSION" >&6; }
22029             fi # end check jdk version
22030           fi # end check rt.jar
22031         fi # end check javac
22032       fi # end check java
22033     fi # end check boot jdk found
22034   fi
22035 
22036 
22037   if test "x$BOOT_JDK_FOUND" = xno; then
22038     # Now execute the test
22039 
22040   if test "x$PROGRAMFILES" != x; then
22041     VIRTUAL_DIR="$PROGRAMFILES/Java"
22042 
22043   windows_path="$VIRTUAL_DIR"
22044   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22045     unix_path=`$CYGPATH -u "$windows_path"`
22046     VIRTUAL_DIR="$unix_path"
22047   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22048     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22049     VIRTUAL_DIR="$unix_path"
22050   fi
22051 
22052 
22053   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22054   BOOT_JDK_SUFFIX=""
22055   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22056   if test "x$ALL_JDKS_FOUND" != x; then
22057     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22058 
22059   if test "x$BOOT_JDK_FOUND" = xno; then
22060     # Now execute the test
22061 
22062         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22063         if test -d "$BOOT_JDK"; then
22064           BOOT_JDK_FOUND=maybe
22065           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22066 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22067         fi
22068 
22069 
22070     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22071     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22072       # Do we have a bin/java?
22073       if test ! -x "$BOOT_JDK/bin/java"; then
22074         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22075 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22076         BOOT_JDK_FOUND=no
22077       else
22078         # Do we have a bin/javac?
22079         if test ! -x "$BOOT_JDK/bin/javac"; then
22080           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22081 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22082           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22083 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22084           BOOT_JDK_FOUND=no
22085         else
22086           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22087           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22088             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22089 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22090             BOOT_JDK_FOUND=no
22091           else
22092             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22093             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22094 
22095             # Extra M4 quote needed to protect [] in grep expression.
22096             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22097             if test "x$FOUND_VERSION_78" = x; then
22098               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22099 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22100               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22101 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22102               BOOT_JDK_FOUND=no
22103             else
22104               # We're done! :-)
22105               BOOT_JDK_FOUND=yes
22106 
22107   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22108 
22109   # Input might be given as Windows format, start by converting to
22110   # unix format.
22111   path="$BOOT_JDK"
22112   new_path=`$CYGPATH -u "$path"`
22113 
22114   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22115   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22116   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22117   # "foo.exe" is OK but "foo" is an error.
22118   #
22119   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22120   # It is also a way to make sure we got the proper file name for the real test later on.
22121   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22122   if test "x$test_shortpath" = x; then
22123     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22124 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22125     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22126   fi
22127 
22128   # Call helper function which possibly converts this using DOS-style short mode.
22129   # If so, the updated path is stored in $new_path.
22130 
22131   input_path="$new_path"
22132   # Check if we need to convert this using DOS-style short mode. If the path
22133   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22134   # take no chances and rewrite it.
22135   # Note: m4 eats our [], so we need to use [ and ] instead.
22136   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22137   if test "x$has_forbidden_chars" != x; then
22138     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22139     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22140     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22141     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22142       # Going to short mode and back again did indeed matter. Since short mode is
22143       # case insensitive, let's make it lowercase to improve readability.
22144       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22145       # Now convert it back to Unix-style (cygpath)
22146       input_path=`$CYGPATH -u "$shortmode_path"`
22147       new_path="$input_path"
22148     fi
22149   fi
22150 
22151   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22152   if test "x$test_cygdrive_prefix" = x; then
22153     # As a simple fix, exclude /usr/bin since it's not a real path.
22154     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22155       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22156       # a path prefixed by /cygdrive for fixpath to work.
22157       new_path="$CYGWIN_ROOT_PATH$input_path"
22158     fi
22159   fi
22160 
22161 
22162   if test "x$path" != "x$new_path"; then
22163     BOOT_JDK="$new_path"
22164     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22165 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22166   fi
22167 
22168   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22169 
22170   path="$BOOT_JDK"
22171   has_colon=`$ECHO $path | $GREP ^.:`
22172   new_path="$path"
22173   if test "x$has_colon" = x; then
22174     # Not in mixed or Windows style, start by that.
22175     new_path=`cmd //c echo $path`
22176   fi
22177 
22178 
22179   input_path="$new_path"
22180   # Check if we need to convert this using DOS-style short mode. If the path
22181   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22182   # take no chances and rewrite it.
22183   # Note: m4 eats our [], so we need to use [ and ] instead.
22184   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22185   if test "x$has_forbidden_chars" != x; then
22186     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22187     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22188   fi
22189 
22190 
22191   windows_path="$new_path"
22192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22193     unix_path=`$CYGPATH -u "$windows_path"`
22194     new_path="$unix_path"
22195   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22196     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22197     new_path="$unix_path"
22198   fi
22199 
22200   if test "x$path" != "x$new_path"; then
22201     BOOT_JDK="$new_path"
22202     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22203 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22204   fi
22205 
22206   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22207   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22208 
22209   else
22210     # We're on a posix platform. Hooray! :)
22211     path="$BOOT_JDK"
22212     has_space=`$ECHO "$path" | $GREP " "`
22213     if test "x$has_space" != x; then
22214       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22215 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22216       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22217     fi
22218 
22219     # Use eval to expand a potential ~
22220     eval path="$path"
22221     if test ! -f "$path" && test ! -d "$path"; then
22222       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22223     fi
22224 
22225     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22226   fi
22227 
22228               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22229 $as_echo_n "checking for Boot JDK... " >&6; }
22230               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22231 $as_echo "$BOOT_JDK" >&6; }
22232               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22233 $as_echo_n "checking Boot JDK version... " >&6; }
22234               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22235               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22236 $as_echo "$BOOT_JDK_VERSION" >&6; }
22237             fi # end check jdk version
22238           fi # end check rt.jar
22239         fi # end check javac
22240       fi # end check java
22241     fi # end check boot jdk found
22242   fi
22243 
22244     done
22245   fi
22246 
22247   fi
22248 
22249 
22250     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22251     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22252       # Do we have a bin/java?
22253       if test ! -x "$BOOT_JDK/bin/java"; then
22254         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22255 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22256         BOOT_JDK_FOUND=no
22257       else
22258         # Do we have a bin/javac?
22259         if test ! -x "$BOOT_JDK/bin/javac"; then
22260           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22261 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22262           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22263 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22264           BOOT_JDK_FOUND=no
22265         else
22266           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22267           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22268             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22269 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22270             BOOT_JDK_FOUND=no
22271           else
22272             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22273             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22274 
22275             # Extra M4 quote needed to protect [] in grep expression.
22276             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22277             if test "x$FOUND_VERSION_78" = x; then
22278               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22279 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22280               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22281 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22282               BOOT_JDK_FOUND=no
22283             else
22284               # We're done! :-)
22285               BOOT_JDK_FOUND=yes
22286 
22287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22288 
22289   # Input might be given as Windows format, start by converting to
22290   # unix format.
22291   path="$BOOT_JDK"
22292   new_path=`$CYGPATH -u "$path"`
22293 
22294   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22295   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22296   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22297   # "foo.exe" is OK but "foo" is an error.
22298   #
22299   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22300   # It is also a way to make sure we got the proper file name for the real test later on.
22301   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22302   if test "x$test_shortpath" = x; then
22303     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22304 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22305     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22306   fi
22307 
22308   # Call helper function which possibly converts this using DOS-style short mode.
22309   # If so, the updated path is stored in $new_path.
22310 
22311   input_path="$new_path"
22312   # Check if we need to convert this using DOS-style short mode. If the path
22313   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22314   # take no chances and rewrite it.
22315   # Note: m4 eats our [], so we need to use [ and ] instead.
22316   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22317   if test "x$has_forbidden_chars" != x; then
22318     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22319     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22320     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22321     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22322       # Going to short mode and back again did indeed matter. Since short mode is
22323       # case insensitive, let's make it lowercase to improve readability.
22324       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22325       # Now convert it back to Unix-style (cygpath)
22326       input_path=`$CYGPATH -u "$shortmode_path"`
22327       new_path="$input_path"
22328     fi
22329   fi
22330 
22331   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22332   if test "x$test_cygdrive_prefix" = x; then
22333     # As a simple fix, exclude /usr/bin since it's not a real path.
22334     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22335       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22336       # a path prefixed by /cygdrive for fixpath to work.
22337       new_path="$CYGWIN_ROOT_PATH$input_path"
22338     fi
22339   fi
22340 
22341 
22342   if test "x$path" != "x$new_path"; then
22343     BOOT_JDK="$new_path"
22344     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22345 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22346   fi
22347 
22348   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22349 
22350   path="$BOOT_JDK"
22351   has_colon=`$ECHO $path | $GREP ^.:`
22352   new_path="$path"
22353   if test "x$has_colon" = x; then
22354     # Not in mixed or Windows style, start by that.
22355     new_path=`cmd //c echo $path`
22356   fi
22357 
22358 
22359   input_path="$new_path"
22360   # Check if we need to convert this using DOS-style short mode. If the path
22361   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22362   # take no chances and rewrite it.
22363   # Note: m4 eats our [], so we need to use [ and ] instead.
22364   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22365   if test "x$has_forbidden_chars" != x; then
22366     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22367     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22368   fi
22369 
22370 
22371   windows_path="$new_path"
22372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22373     unix_path=`$CYGPATH -u "$windows_path"`
22374     new_path="$unix_path"
22375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22377     new_path="$unix_path"
22378   fi
22379 
22380   if test "x$path" != "x$new_path"; then
22381     BOOT_JDK="$new_path"
22382     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22383 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22384   fi
22385 
22386   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22387   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22388 
22389   else
22390     # We're on a posix platform. Hooray! :)
22391     path="$BOOT_JDK"
22392     has_space=`$ECHO "$path" | $GREP " "`
22393     if test "x$has_space" != x; then
22394       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22395 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22396       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22397     fi
22398 
22399     # Use eval to expand a potential ~
22400     eval path="$path"
22401     if test ! -f "$path" && test ! -d "$path"; then
22402       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22403     fi
22404 
22405     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22406   fi
22407 
22408               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22409 $as_echo_n "checking for Boot JDK... " >&6; }
22410               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22411 $as_echo "$BOOT_JDK" >&6; }
22412               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22413 $as_echo_n "checking Boot JDK version... " >&6; }
22414               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22415               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22416 $as_echo "$BOOT_JDK_VERSION" >&6; }
22417             fi # end check jdk version
22418           fi # end check rt.jar
22419         fi # end check javac
22420       fi # end check java
22421     fi # end check boot jdk found
22422   fi
22423 
22424 
22425   if test "x$BOOT_JDK_FOUND" = xno; then
22426     # Now execute the test
22427 
22428   if test "x$ProgramFiles" != x; then
22429     VIRTUAL_DIR="$ProgramFiles/Java"
22430 
22431   windows_path="$VIRTUAL_DIR"
22432   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22433     unix_path=`$CYGPATH -u "$windows_path"`
22434     VIRTUAL_DIR="$unix_path"
22435   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22436     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22437     VIRTUAL_DIR="$unix_path"
22438   fi
22439 
22440 
22441   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22442   BOOT_JDK_SUFFIX=""
22443   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22444   if test "x$ALL_JDKS_FOUND" != x; then
22445     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22446 
22447   if test "x$BOOT_JDK_FOUND" = xno; then
22448     # Now execute the test
22449 
22450         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22451         if test -d "$BOOT_JDK"; then
22452           BOOT_JDK_FOUND=maybe
22453           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22454 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22455         fi
22456 
22457 
22458     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22459     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22460       # Do we have a bin/java?
22461       if test ! -x "$BOOT_JDK/bin/java"; then
22462         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22463 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22464         BOOT_JDK_FOUND=no
22465       else
22466         # Do we have a bin/javac?
22467         if test ! -x "$BOOT_JDK/bin/javac"; then
22468           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22469 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22470           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22471 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22472           BOOT_JDK_FOUND=no
22473         else
22474           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22475           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22476             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22477 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22478             BOOT_JDK_FOUND=no
22479           else
22480             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22481             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22482 
22483             # Extra M4 quote needed to protect [] in grep expression.
22484             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22485             if test "x$FOUND_VERSION_78" = x; then
22486               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22487 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22488               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22489 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22490               BOOT_JDK_FOUND=no
22491             else
22492               # We're done! :-)
22493               BOOT_JDK_FOUND=yes
22494 
22495   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22496 
22497   # Input might be given as Windows format, start by converting to
22498   # unix format.
22499   path="$BOOT_JDK"
22500   new_path=`$CYGPATH -u "$path"`
22501 
22502   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22503   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22504   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22505   # "foo.exe" is OK but "foo" is an error.
22506   #
22507   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22508   # It is also a way to make sure we got the proper file name for the real test later on.
22509   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22510   if test "x$test_shortpath" = x; then
22511     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22512 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22513     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22514   fi
22515 
22516   # Call helper function which possibly converts this using DOS-style short mode.
22517   # If so, the updated path is stored in $new_path.
22518 
22519   input_path="$new_path"
22520   # Check if we need to convert this using DOS-style short mode. If the path
22521   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22522   # take no chances and rewrite it.
22523   # Note: m4 eats our [], so we need to use [ and ] instead.
22524   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22525   if test "x$has_forbidden_chars" != x; then
22526     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22527     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22528     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22529     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22530       # Going to short mode and back again did indeed matter. Since short mode is
22531       # case insensitive, let's make it lowercase to improve readability.
22532       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22533       # Now convert it back to Unix-style (cygpath)
22534       input_path=`$CYGPATH -u "$shortmode_path"`
22535       new_path="$input_path"
22536     fi
22537   fi
22538 
22539   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22540   if test "x$test_cygdrive_prefix" = x; then
22541     # As a simple fix, exclude /usr/bin since it's not a real path.
22542     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22543       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22544       # a path prefixed by /cygdrive for fixpath to work.
22545       new_path="$CYGWIN_ROOT_PATH$input_path"
22546     fi
22547   fi
22548 
22549 
22550   if test "x$path" != "x$new_path"; then
22551     BOOT_JDK="$new_path"
22552     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22553 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22554   fi
22555 
22556   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22557 
22558   path="$BOOT_JDK"
22559   has_colon=`$ECHO $path | $GREP ^.:`
22560   new_path="$path"
22561   if test "x$has_colon" = x; then
22562     # Not in mixed or Windows style, start by that.
22563     new_path=`cmd //c echo $path`
22564   fi
22565 
22566 
22567   input_path="$new_path"
22568   # Check if we need to convert this using DOS-style short mode. If the path
22569   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22570   # take no chances and rewrite it.
22571   # Note: m4 eats our [], so we need to use [ and ] instead.
22572   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22573   if test "x$has_forbidden_chars" != x; then
22574     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22575     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22576   fi
22577 
22578 
22579   windows_path="$new_path"
22580   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22581     unix_path=`$CYGPATH -u "$windows_path"`
22582     new_path="$unix_path"
22583   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22584     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22585     new_path="$unix_path"
22586   fi
22587 
22588   if test "x$path" != "x$new_path"; then
22589     BOOT_JDK="$new_path"
22590     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22591 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22592   fi
22593 
22594   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22595   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22596 
22597   else
22598     # We're on a posix platform. Hooray! :)
22599     path="$BOOT_JDK"
22600     has_space=`$ECHO "$path" | $GREP " "`
22601     if test "x$has_space" != x; then
22602       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22603 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22604       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22605     fi
22606 
22607     # Use eval to expand a potential ~
22608     eval path="$path"
22609     if test ! -f "$path" && test ! -d "$path"; then
22610       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22611     fi
22612 
22613     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22614   fi
22615 
22616               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22617 $as_echo_n "checking for Boot JDK... " >&6; }
22618               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22619 $as_echo "$BOOT_JDK" >&6; }
22620               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22621 $as_echo_n "checking Boot JDK version... " >&6; }
22622               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22623               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22624 $as_echo "$BOOT_JDK_VERSION" >&6; }
22625             fi # end check jdk version
22626           fi # end check rt.jar
22627         fi # end check javac
22628       fi # end check java
22629     fi # end check boot jdk found
22630   fi
22631 
22632     done
22633   fi
22634 
22635   fi
22636 
22637 
22638     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22639     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22640       # Do we have a bin/java?
22641       if test ! -x "$BOOT_JDK/bin/java"; then
22642         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22643 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22644         BOOT_JDK_FOUND=no
22645       else
22646         # Do we have a bin/javac?
22647         if test ! -x "$BOOT_JDK/bin/javac"; then
22648           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22649 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22650           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22651 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22652           BOOT_JDK_FOUND=no
22653         else
22654           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22655           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22656             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22657 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22658             BOOT_JDK_FOUND=no
22659           else
22660             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22661             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22662 
22663             # Extra M4 quote needed to protect [] in grep expression.
22664             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22665             if test "x$FOUND_VERSION_78" = x; then
22666               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22667 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22668               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22669 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22670               BOOT_JDK_FOUND=no
22671             else
22672               # We're done! :-)
22673               BOOT_JDK_FOUND=yes
22674 
22675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22676 
22677   # Input might be given as Windows format, start by converting to
22678   # unix format.
22679   path="$BOOT_JDK"
22680   new_path=`$CYGPATH -u "$path"`
22681 
22682   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22683   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22684   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22685   # "foo.exe" is OK but "foo" is an error.
22686   #
22687   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22688   # It is also a way to make sure we got the proper file name for the real test later on.
22689   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22690   if test "x$test_shortpath" = x; then
22691     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22692 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22693     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22694   fi
22695 
22696   # Call helper function which possibly converts this using DOS-style short mode.
22697   # If so, the updated path is stored in $new_path.
22698 
22699   input_path="$new_path"
22700   # Check if we need to convert this using DOS-style short mode. If the path
22701   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22702   # take no chances and rewrite it.
22703   # Note: m4 eats our [], so we need to use [ and ] instead.
22704   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22705   if test "x$has_forbidden_chars" != x; then
22706     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22707     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22708     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22709     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22710       # Going to short mode and back again did indeed matter. Since short mode is
22711       # case insensitive, let's make it lowercase to improve readability.
22712       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22713       # Now convert it back to Unix-style (cygpath)
22714       input_path=`$CYGPATH -u "$shortmode_path"`
22715       new_path="$input_path"
22716     fi
22717   fi
22718 
22719   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22720   if test "x$test_cygdrive_prefix" = x; then
22721     # As a simple fix, exclude /usr/bin since it's not a real path.
22722     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22723       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22724       # a path prefixed by /cygdrive for fixpath to work.
22725       new_path="$CYGWIN_ROOT_PATH$input_path"
22726     fi
22727   fi
22728 
22729 
22730   if test "x$path" != "x$new_path"; then
22731     BOOT_JDK="$new_path"
22732     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22733 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22734   fi
22735 
22736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22737 
22738   path="$BOOT_JDK"
22739   has_colon=`$ECHO $path | $GREP ^.:`
22740   new_path="$path"
22741   if test "x$has_colon" = x; then
22742     # Not in mixed or Windows style, start by that.
22743     new_path=`cmd //c echo $path`
22744   fi
22745 
22746 
22747   input_path="$new_path"
22748   # Check if we need to convert this using DOS-style short mode. If the path
22749   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22750   # take no chances and rewrite it.
22751   # Note: m4 eats our [], so we need to use [ and ] instead.
22752   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22753   if test "x$has_forbidden_chars" != x; then
22754     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22755     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22756   fi
22757 
22758 
22759   windows_path="$new_path"
22760   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22761     unix_path=`$CYGPATH -u "$windows_path"`
22762     new_path="$unix_path"
22763   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22764     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22765     new_path="$unix_path"
22766   fi
22767 
22768   if test "x$path" != "x$new_path"; then
22769     BOOT_JDK="$new_path"
22770     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22771 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22772   fi
22773 
22774   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22775   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22776 
22777   else
22778     # We're on a posix platform. Hooray! :)
22779     path="$BOOT_JDK"
22780     has_space=`$ECHO "$path" | $GREP " "`
22781     if test "x$has_space" != x; then
22782       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22783 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22784       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22785     fi
22786 
22787     # Use eval to expand a potential ~
22788     eval path="$path"
22789     if test ! -f "$path" && test ! -d "$path"; then
22790       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22791     fi
22792 
22793     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22794   fi
22795 
22796               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22797 $as_echo_n "checking for Boot JDK... " >&6; }
22798               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22799 $as_echo "$BOOT_JDK" >&6; }
22800               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22801 $as_echo_n "checking Boot JDK version... " >&6; }
22802               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22803               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22804 $as_echo "$BOOT_JDK_VERSION" >&6; }
22805             fi # end check jdk version
22806           fi # end check rt.jar
22807         fi # end check javac
22808       fi # end check java
22809     fi # end check boot jdk found
22810   fi
22811 
22812 
22813   if test "x$BOOT_JDK_FOUND" = xno; then
22814     # Now execute the test
22815 
22816   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
22817   BOOT_JDK_SUFFIX=""
22818   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22819   if test "x$ALL_JDKS_FOUND" != x; then
22820     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22821 
22822   if test "x$BOOT_JDK_FOUND" = xno; then
22823     # Now execute the test
22824 
22825         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22826         if test -d "$BOOT_JDK"; then
22827           BOOT_JDK_FOUND=maybe
22828           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22829 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22830         fi
22831 
22832 
22833     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22834     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22835       # Do we have a bin/java?
22836       if test ! -x "$BOOT_JDK/bin/java"; then
22837         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22838 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22839         BOOT_JDK_FOUND=no
22840       else
22841         # Do we have a bin/javac?
22842         if test ! -x "$BOOT_JDK/bin/javac"; then
22843           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22844 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22845           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22846 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22847           BOOT_JDK_FOUND=no
22848         else
22849           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22850           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22851             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22852 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22853             BOOT_JDK_FOUND=no
22854           else
22855             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22856             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22857 
22858             # Extra M4 quote needed to protect [] in grep expression.
22859             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22860             if test "x$FOUND_VERSION_78" = x; then
22861               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22862 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22863               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22864 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22865               BOOT_JDK_FOUND=no
22866             else
22867               # We're done! :-)
22868               BOOT_JDK_FOUND=yes
22869 
22870   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22871 
22872   # Input might be given as Windows format, start by converting to
22873   # unix format.
22874   path="$BOOT_JDK"
22875   new_path=`$CYGPATH -u "$path"`
22876 
22877   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22878   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22879   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22880   # "foo.exe" is OK but "foo" is an error.
22881   #
22882   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22883   # It is also a way to make sure we got the proper file name for the real test later on.
22884   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22885   if test "x$test_shortpath" = x; then
22886     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22887 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22888     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22889   fi
22890 
22891   # Call helper function which possibly converts this using DOS-style short mode.
22892   # If so, the updated path is stored in $new_path.
22893 
22894   input_path="$new_path"
22895   # Check if we need to convert this using DOS-style short mode. If the path
22896   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22897   # take no chances and rewrite it.
22898   # Note: m4 eats our [], so we need to use [ and ] instead.
22899   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22900   if test "x$has_forbidden_chars" != x; then
22901     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22902     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22903     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22904     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22905       # Going to short mode and back again did indeed matter. Since short mode is
22906       # case insensitive, let's make it lowercase to improve readability.
22907       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22908       # Now convert it back to Unix-style (cygpath)
22909       input_path=`$CYGPATH -u "$shortmode_path"`
22910       new_path="$input_path"
22911     fi
22912   fi
22913 
22914   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22915   if test "x$test_cygdrive_prefix" = x; then
22916     # As a simple fix, exclude /usr/bin since it's not a real path.
22917     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22918       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22919       # a path prefixed by /cygdrive for fixpath to work.
22920       new_path="$CYGWIN_ROOT_PATH$input_path"
22921     fi
22922   fi
22923 
22924 
22925   if test "x$path" != "x$new_path"; then
22926     BOOT_JDK="$new_path"
22927     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22928 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22929   fi
22930 
22931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22932 
22933   path="$BOOT_JDK"
22934   has_colon=`$ECHO $path | $GREP ^.:`
22935   new_path="$path"
22936   if test "x$has_colon" = x; then
22937     # Not in mixed or Windows style, start by that.
22938     new_path=`cmd //c echo $path`
22939   fi
22940 
22941 
22942   input_path="$new_path"
22943   # Check if we need to convert this using DOS-style short mode. If the path
22944   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22945   # take no chances and rewrite it.
22946   # Note: m4 eats our [], so we need to use [ and ] instead.
22947   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22948   if test "x$has_forbidden_chars" != x; then
22949     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22950     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22951   fi
22952 
22953 
22954   windows_path="$new_path"
22955   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22956     unix_path=`$CYGPATH -u "$windows_path"`
22957     new_path="$unix_path"
22958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22959     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22960     new_path="$unix_path"
22961   fi
22962 
22963   if test "x$path" != "x$new_path"; then
22964     BOOT_JDK="$new_path"
22965     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22966 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22967   fi
22968 
22969   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22970   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22971 
22972   else
22973     # We're on a posix platform. Hooray! :)
22974     path="$BOOT_JDK"
22975     has_space=`$ECHO "$path" | $GREP " "`
22976     if test "x$has_space" != x; then
22977       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22978 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22979       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22980     fi
22981 
22982     # Use eval to expand a potential ~
22983     eval path="$path"
22984     if test ! -f "$path" && test ! -d "$path"; then
22985       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22986     fi
22987 
22988     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22989   fi
22990 
22991               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22992 $as_echo_n "checking for Boot JDK... " >&6; }
22993               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22994 $as_echo "$BOOT_JDK" >&6; }
22995               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22996 $as_echo_n "checking Boot JDK version... " >&6; }
22997               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22998               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22999 $as_echo "$BOOT_JDK_VERSION" >&6; }
23000             fi # end check jdk version
23001           fi # end check rt.jar
23002         fi # end check javac
23003       fi # end check java
23004     fi # end check boot jdk found
23005   fi
23006 
23007     done
23008   fi
23009 
23010 
23011     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23012     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23013       # Do we have a bin/java?
23014       if test ! -x "$BOOT_JDK/bin/java"; then
23015         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23016 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23017         BOOT_JDK_FOUND=no
23018       else
23019         # Do we have a bin/javac?
23020         if test ! -x "$BOOT_JDK/bin/javac"; then
23021           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23022 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23023           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23024 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23025           BOOT_JDK_FOUND=no
23026         else
23027           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23028           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23029             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23030 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23031             BOOT_JDK_FOUND=no
23032           else
23033             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23034             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23035 
23036             # Extra M4 quote needed to protect [] in grep expression.
23037             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23038             if test "x$FOUND_VERSION_78" = x; then
23039               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23040 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23041               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23042 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23043               BOOT_JDK_FOUND=no
23044             else
23045               # We're done! :-)
23046               BOOT_JDK_FOUND=yes
23047 
23048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23049 
23050   # Input might be given as Windows format, start by converting to
23051   # unix format.
23052   path="$BOOT_JDK"
23053   new_path=`$CYGPATH -u "$path"`
23054 
23055   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23056   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23057   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23058   # "foo.exe" is OK but "foo" is an error.
23059   #
23060   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23061   # It is also a way to make sure we got the proper file name for the real test later on.
23062   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23063   if test "x$test_shortpath" = x; then
23064     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23065 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23066     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23067   fi
23068 
23069   # Call helper function which possibly converts this using DOS-style short mode.
23070   # If so, the updated path is stored in $new_path.
23071 
23072   input_path="$new_path"
23073   # Check if we need to convert this using DOS-style short mode. If the path
23074   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23075   # take no chances and rewrite it.
23076   # Note: m4 eats our [], so we need to use [ and ] instead.
23077   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23078   if test "x$has_forbidden_chars" != x; then
23079     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23080     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23081     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23082     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23083       # Going to short mode and back again did indeed matter. Since short mode is
23084       # case insensitive, let's make it lowercase to improve readability.
23085       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23086       # Now convert it back to Unix-style (cygpath)
23087       input_path=`$CYGPATH -u "$shortmode_path"`
23088       new_path="$input_path"
23089     fi
23090   fi
23091 
23092   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23093   if test "x$test_cygdrive_prefix" = x; then
23094     # As a simple fix, exclude /usr/bin since it's not a real path.
23095     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23096       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23097       # a path prefixed by /cygdrive for fixpath to work.
23098       new_path="$CYGWIN_ROOT_PATH$input_path"
23099     fi
23100   fi
23101 
23102 
23103   if test "x$path" != "x$new_path"; then
23104     BOOT_JDK="$new_path"
23105     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23106 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23107   fi
23108 
23109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23110 
23111   path="$BOOT_JDK"
23112   has_colon=`$ECHO $path | $GREP ^.:`
23113   new_path="$path"
23114   if test "x$has_colon" = x; then
23115     # Not in mixed or Windows style, start by that.
23116     new_path=`cmd //c echo $path`
23117   fi
23118 
23119 
23120   input_path="$new_path"
23121   # Check if we need to convert this using DOS-style short mode. If the path
23122   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23123   # take no chances and rewrite it.
23124   # Note: m4 eats our [], so we need to use [ and ] instead.
23125   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23126   if test "x$has_forbidden_chars" != x; then
23127     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23128     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23129   fi
23130 
23131 
23132   windows_path="$new_path"
23133   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23134     unix_path=`$CYGPATH -u "$windows_path"`
23135     new_path="$unix_path"
23136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23137     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23138     new_path="$unix_path"
23139   fi
23140 
23141   if test "x$path" != "x$new_path"; then
23142     BOOT_JDK="$new_path"
23143     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23144 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23145   fi
23146 
23147   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23148   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23149 
23150   else
23151     # We're on a posix platform. Hooray! :)
23152     path="$BOOT_JDK"
23153     has_space=`$ECHO "$path" | $GREP " "`
23154     if test "x$has_space" != x; then
23155       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23156 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23157       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23158     fi
23159 
23160     # Use eval to expand a potential ~
23161     eval path="$path"
23162     if test ! -f "$path" && test ! -d "$path"; then
23163       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23164     fi
23165 
23166     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23167   fi
23168 
23169               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23170 $as_echo_n "checking for Boot JDK... " >&6; }
23171               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23172 $as_echo "$BOOT_JDK" >&6; }
23173               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23174 $as_echo_n "checking Boot JDK version... " >&6; }
23175               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23176               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23177 $as_echo "$BOOT_JDK_VERSION" >&6; }
23178             fi # end check jdk version
23179           fi # end check rt.jar
23180         fi # end check javac
23181       fi # end check java
23182     fi # end check boot jdk found
23183   fi
23184 
23185   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23186 
23187   if test "x$BOOT_JDK_FOUND" = xno; then
23188     # Now execute the test
23189 
23190   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23191   BOOT_JDK_SUFFIX="/Contents/Home"
23192   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23193   if test "x$ALL_JDKS_FOUND" != x; then
23194     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23195 
23196   if test "x$BOOT_JDK_FOUND" = xno; then
23197     # Now execute the test
23198 
23199         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23200         if test -d "$BOOT_JDK"; then
23201           BOOT_JDK_FOUND=maybe
23202           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23203 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23204         fi
23205 
23206 
23207     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23208     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23209       # Do we have a bin/java?
23210       if test ! -x "$BOOT_JDK/bin/java"; then
23211         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23212 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23213         BOOT_JDK_FOUND=no
23214       else
23215         # Do we have a bin/javac?
23216         if test ! -x "$BOOT_JDK/bin/javac"; then
23217           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23218 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23219           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23220 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23221           BOOT_JDK_FOUND=no
23222         else
23223           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23224           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23225             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23226 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23227             BOOT_JDK_FOUND=no
23228           else
23229             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23230             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23231 
23232             # Extra M4 quote needed to protect [] in grep expression.
23233             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23234             if test "x$FOUND_VERSION_78" = x; then
23235               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23236 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23237               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23238 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23239               BOOT_JDK_FOUND=no
23240             else
23241               # We're done! :-)
23242               BOOT_JDK_FOUND=yes
23243 
23244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23245 
23246   # Input might be given as Windows format, start by converting to
23247   # unix format.
23248   path="$BOOT_JDK"
23249   new_path=`$CYGPATH -u "$path"`
23250 
23251   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23252   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23253   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23254   # "foo.exe" is OK but "foo" is an error.
23255   #
23256   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23257   # It is also a way to make sure we got the proper file name for the real test later on.
23258   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23259   if test "x$test_shortpath" = x; then
23260     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23261 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23262     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23263   fi
23264 
23265   # Call helper function which possibly converts this using DOS-style short mode.
23266   # If so, the updated path is stored in $new_path.
23267 
23268   input_path="$new_path"
23269   # Check if we need to convert this using DOS-style short mode. If the path
23270   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23271   # take no chances and rewrite it.
23272   # Note: m4 eats our [], so we need to use [ and ] instead.
23273   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23274   if test "x$has_forbidden_chars" != x; then
23275     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23276     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23277     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23278     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23279       # Going to short mode and back again did indeed matter. Since short mode is
23280       # case insensitive, let's make it lowercase to improve readability.
23281       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23282       # Now convert it back to Unix-style (cygpath)
23283       input_path=`$CYGPATH -u "$shortmode_path"`
23284       new_path="$input_path"
23285     fi
23286   fi
23287 
23288   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23289   if test "x$test_cygdrive_prefix" = x; then
23290     # As a simple fix, exclude /usr/bin since it's not a real path.
23291     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23292       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23293       # a path prefixed by /cygdrive for fixpath to work.
23294       new_path="$CYGWIN_ROOT_PATH$input_path"
23295     fi
23296   fi
23297 
23298 
23299   if test "x$path" != "x$new_path"; then
23300     BOOT_JDK="$new_path"
23301     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23302 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23303   fi
23304 
23305   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23306 
23307   path="$BOOT_JDK"
23308   has_colon=`$ECHO $path | $GREP ^.:`
23309   new_path="$path"
23310   if test "x$has_colon" = x; then
23311     # Not in mixed or Windows style, start by that.
23312     new_path=`cmd //c echo $path`
23313   fi
23314 
23315 
23316   input_path="$new_path"
23317   # Check if we need to convert this using DOS-style short mode. If the path
23318   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23319   # take no chances and rewrite it.
23320   # Note: m4 eats our [], so we need to use [ and ] instead.
23321   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23322   if test "x$has_forbidden_chars" != x; then
23323     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23324     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23325   fi
23326 
23327 
23328   windows_path="$new_path"
23329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23330     unix_path=`$CYGPATH -u "$windows_path"`
23331     new_path="$unix_path"
23332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23333     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23334     new_path="$unix_path"
23335   fi
23336 
23337   if test "x$path" != "x$new_path"; then
23338     BOOT_JDK="$new_path"
23339     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23340 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23341   fi
23342 
23343   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23344   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23345 
23346   else
23347     # We're on a posix platform. Hooray! :)
23348     path="$BOOT_JDK"
23349     has_space=`$ECHO "$path" | $GREP " "`
23350     if test "x$has_space" != x; then
23351       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23352 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23353       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23354     fi
23355 
23356     # Use eval to expand a potential ~
23357     eval path="$path"
23358     if test ! -f "$path" && test ! -d "$path"; then
23359       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23360     fi
23361 
23362     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23363   fi
23364 
23365               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23366 $as_echo_n "checking for Boot JDK... " >&6; }
23367               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23368 $as_echo "$BOOT_JDK" >&6; }
23369               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23370 $as_echo_n "checking Boot JDK version... " >&6; }
23371               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23372               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23373 $as_echo "$BOOT_JDK_VERSION" >&6; }
23374             fi # end check jdk version
23375           fi # end check rt.jar
23376         fi # end check javac
23377       fi # end check java
23378     fi # end check boot jdk found
23379   fi
23380 
23381     done
23382   fi
23383 
23384 
23385     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23386     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23387       # Do we have a bin/java?
23388       if test ! -x "$BOOT_JDK/bin/java"; then
23389         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23390 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23391         BOOT_JDK_FOUND=no
23392       else
23393         # Do we have a bin/javac?
23394         if test ! -x "$BOOT_JDK/bin/javac"; then
23395           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23396 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23397           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23398 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23399           BOOT_JDK_FOUND=no
23400         else
23401           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23402           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23403             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23404 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23405             BOOT_JDK_FOUND=no
23406           else
23407             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23408             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23409 
23410             # Extra M4 quote needed to protect [] in grep expression.
23411             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23412             if test "x$FOUND_VERSION_78" = x; then
23413               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23414 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23415               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23416 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23417               BOOT_JDK_FOUND=no
23418             else
23419               # We're done! :-)
23420               BOOT_JDK_FOUND=yes
23421 
23422   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23423 
23424   # Input might be given as Windows format, start by converting to
23425   # unix format.
23426   path="$BOOT_JDK"
23427   new_path=`$CYGPATH -u "$path"`
23428 
23429   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23430   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23431   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23432   # "foo.exe" is OK but "foo" is an error.
23433   #
23434   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23435   # It is also a way to make sure we got the proper file name for the real test later on.
23436   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23437   if test "x$test_shortpath" = x; then
23438     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23439 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23440     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23441   fi
23442 
23443   # Call helper function which possibly converts this using DOS-style short mode.
23444   # If so, the updated path is stored in $new_path.
23445 
23446   input_path="$new_path"
23447   # Check if we need to convert this using DOS-style short mode. If the path
23448   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23449   # take no chances and rewrite it.
23450   # Note: m4 eats our [], so we need to use [ and ] instead.
23451   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23452   if test "x$has_forbidden_chars" != x; then
23453     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23454     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23455     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23456     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23457       # Going to short mode and back again did indeed matter. Since short mode is
23458       # case insensitive, let's make it lowercase to improve readability.
23459       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23460       # Now convert it back to Unix-style (cygpath)
23461       input_path=`$CYGPATH -u "$shortmode_path"`
23462       new_path="$input_path"
23463     fi
23464   fi
23465 
23466   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23467   if test "x$test_cygdrive_prefix" = x; then
23468     # As a simple fix, exclude /usr/bin since it's not a real path.
23469     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23470       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23471       # a path prefixed by /cygdrive for fixpath to work.
23472       new_path="$CYGWIN_ROOT_PATH$input_path"
23473     fi
23474   fi
23475 
23476 
23477   if test "x$path" != "x$new_path"; then
23478     BOOT_JDK="$new_path"
23479     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23480 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23481   fi
23482 
23483   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23484 
23485   path="$BOOT_JDK"
23486   has_colon=`$ECHO $path | $GREP ^.:`
23487   new_path="$path"
23488   if test "x$has_colon" = x; then
23489     # Not in mixed or Windows style, start by that.
23490     new_path=`cmd //c echo $path`
23491   fi
23492 
23493 
23494   input_path="$new_path"
23495   # Check if we need to convert this using DOS-style short mode. If the path
23496   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23497   # take no chances and rewrite it.
23498   # Note: m4 eats our [], so we need to use [ and ] instead.
23499   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23500   if test "x$has_forbidden_chars" != x; then
23501     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23502     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23503   fi
23504 
23505 
23506   windows_path="$new_path"
23507   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23508     unix_path=`$CYGPATH -u "$windows_path"`
23509     new_path="$unix_path"
23510   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23511     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23512     new_path="$unix_path"
23513   fi
23514 
23515   if test "x$path" != "x$new_path"; then
23516     BOOT_JDK="$new_path"
23517     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23518 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23519   fi
23520 
23521   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23522   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23523 
23524   else
23525     # We're on a posix platform. Hooray! :)
23526     path="$BOOT_JDK"
23527     has_space=`$ECHO "$path" | $GREP " "`
23528     if test "x$has_space" != x; then
23529       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23530 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23531       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23532     fi
23533 
23534     # Use eval to expand a potential ~
23535     eval path="$path"
23536     if test ! -f "$path" && test ! -d "$path"; then
23537       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23538     fi
23539 
23540     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23541   fi
23542 
23543               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23544 $as_echo_n "checking for Boot JDK... " >&6; }
23545               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23546 $as_echo "$BOOT_JDK" >&6; }
23547               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23548 $as_echo_n "checking Boot JDK version... " >&6; }
23549               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23550               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23551 $as_echo "$BOOT_JDK_VERSION" >&6; }
23552             fi # end check jdk version
23553           fi # end check rt.jar
23554         fi # end check javac
23555       fi # end check java
23556     fi # end check boot jdk found
23557   fi
23558 
23559 
23560   if test "x$BOOT_JDK_FOUND" = xno; then
23561     # Now execute the test
23562 
23563   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
23564   BOOT_JDK_SUFFIX="/Contents/Home"
23565   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23566   if test "x$ALL_JDKS_FOUND" != x; then
23567     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23568 
23569   if test "x$BOOT_JDK_FOUND" = xno; then
23570     # Now execute the test
23571 
23572         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23573         if test -d "$BOOT_JDK"; then
23574           BOOT_JDK_FOUND=maybe
23575           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23576 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23577         fi
23578 
23579 
23580     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23581     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23582       # Do we have a bin/java?
23583       if test ! -x "$BOOT_JDK/bin/java"; then
23584         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23585 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23586         BOOT_JDK_FOUND=no
23587       else
23588         # Do we have a bin/javac?
23589         if test ! -x "$BOOT_JDK/bin/javac"; then
23590           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23591 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23592           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23593 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23594           BOOT_JDK_FOUND=no
23595         else
23596           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23597           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23598             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23599 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23600             BOOT_JDK_FOUND=no
23601           else
23602             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23603             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23604 
23605             # Extra M4 quote needed to protect [] in grep expression.
23606             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23607             if test "x$FOUND_VERSION_78" = x; then
23608               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23609 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23610               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23611 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23612               BOOT_JDK_FOUND=no
23613             else
23614               # We're done! :-)
23615               BOOT_JDK_FOUND=yes
23616 
23617   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23618 
23619   # Input might be given as Windows format, start by converting to
23620   # unix format.
23621   path="$BOOT_JDK"
23622   new_path=`$CYGPATH -u "$path"`
23623 
23624   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23625   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23626   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23627   # "foo.exe" is OK but "foo" is an error.
23628   #
23629   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23630   # It is also a way to make sure we got the proper file name for the real test later on.
23631   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23632   if test "x$test_shortpath" = x; then
23633     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23634 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23635     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23636   fi
23637 
23638   # Call helper function which possibly converts this using DOS-style short mode.
23639   # If so, the updated path is stored in $new_path.
23640 
23641   input_path="$new_path"
23642   # Check if we need to convert this using DOS-style short mode. If the path
23643   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23644   # take no chances and rewrite it.
23645   # Note: m4 eats our [], so we need to use [ and ] instead.
23646   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23647   if test "x$has_forbidden_chars" != x; then
23648     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23649     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23650     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23651     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23652       # Going to short mode and back again did indeed matter. Since short mode is
23653       # case insensitive, let's make it lowercase to improve readability.
23654       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23655       # Now convert it back to Unix-style (cygpath)
23656       input_path=`$CYGPATH -u "$shortmode_path"`
23657       new_path="$input_path"
23658     fi
23659   fi
23660 
23661   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23662   if test "x$test_cygdrive_prefix" = x; then
23663     # As a simple fix, exclude /usr/bin since it's not a real path.
23664     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23665       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23666       # a path prefixed by /cygdrive for fixpath to work.
23667       new_path="$CYGWIN_ROOT_PATH$input_path"
23668     fi
23669   fi
23670 
23671 
23672   if test "x$path" != "x$new_path"; then
23673     BOOT_JDK="$new_path"
23674     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23675 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23676   fi
23677 
23678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23679 
23680   path="$BOOT_JDK"
23681   has_colon=`$ECHO $path | $GREP ^.:`
23682   new_path="$path"
23683   if test "x$has_colon" = x; then
23684     # Not in mixed or Windows style, start by that.
23685     new_path=`cmd //c echo $path`
23686   fi
23687 
23688 
23689   input_path="$new_path"
23690   # Check if we need to convert this using DOS-style short mode. If the path
23691   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23692   # take no chances and rewrite it.
23693   # Note: m4 eats our [], so we need to use [ and ] instead.
23694   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23695   if test "x$has_forbidden_chars" != x; then
23696     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23697     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23698   fi
23699 
23700 
23701   windows_path="$new_path"
23702   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23703     unix_path=`$CYGPATH -u "$windows_path"`
23704     new_path="$unix_path"
23705   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23706     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23707     new_path="$unix_path"
23708   fi
23709 
23710   if test "x$path" != "x$new_path"; then
23711     BOOT_JDK="$new_path"
23712     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23713 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23714   fi
23715 
23716   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23717   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23718 
23719   else
23720     # We're on a posix platform. Hooray! :)
23721     path="$BOOT_JDK"
23722     has_space=`$ECHO "$path" | $GREP " "`
23723     if test "x$has_space" != x; then
23724       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23725 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23726       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23727     fi
23728 
23729     # Use eval to expand a potential ~
23730     eval path="$path"
23731     if test ! -f "$path" && test ! -d "$path"; then
23732       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23733     fi
23734 
23735     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23736   fi
23737 
23738               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23739 $as_echo_n "checking for Boot JDK... " >&6; }
23740               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23741 $as_echo "$BOOT_JDK" >&6; }
23742               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23743 $as_echo_n "checking Boot JDK version... " >&6; }
23744               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23745               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23746 $as_echo "$BOOT_JDK_VERSION" >&6; }
23747             fi # end check jdk version
23748           fi # end check rt.jar
23749         fi # end check javac
23750       fi # end check java
23751     fi # end check boot jdk found
23752   fi
23753 
23754     done
23755   fi
23756 
23757 
23758     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23759     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23760       # Do we have a bin/java?
23761       if test ! -x "$BOOT_JDK/bin/java"; then
23762         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23763 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23764         BOOT_JDK_FOUND=no
23765       else
23766         # Do we have a bin/javac?
23767         if test ! -x "$BOOT_JDK/bin/javac"; then
23768           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23769 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23770           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23771 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23772           BOOT_JDK_FOUND=no
23773         else
23774           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23775           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23776             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23777 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23778             BOOT_JDK_FOUND=no
23779           else
23780             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23781             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23782 
23783             # Extra M4 quote needed to protect [] in grep expression.
23784             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23785             if test "x$FOUND_VERSION_78" = x; then
23786               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23787 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23788               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23789 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23790               BOOT_JDK_FOUND=no
23791             else
23792               # We're done! :-)
23793               BOOT_JDK_FOUND=yes
23794 
23795   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23796 
23797   # Input might be given as Windows format, start by converting to
23798   # unix format.
23799   path="$BOOT_JDK"
23800   new_path=`$CYGPATH -u "$path"`
23801 
23802   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23803   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23804   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23805   # "foo.exe" is OK but "foo" is an error.
23806   #
23807   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23808   # It is also a way to make sure we got the proper file name for the real test later on.
23809   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23810   if test "x$test_shortpath" = x; then
23811     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23812 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23813     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23814   fi
23815 
23816   # Call helper function which possibly converts this using DOS-style short mode.
23817   # If so, the updated path is stored in $new_path.
23818 
23819   input_path="$new_path"
23820   # Check if we need to convert this using DOS-style short mode. If the path
23821   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23822   # take no chances and rewrite it.
23823   # Note: m4 eats our [], so we need to use [ and ] instead.
23824   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23825   if test "x$has_forbidden_chars" != x; then
23826     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23827     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23828     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23829     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23830       # Going to short mode and back again did indeed matter. Since short mode is
23831       # case insensitive, let's make it lowercase to improve readability.
23832       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23833       # Now convert it back to Unix-style (cygpath)
23834       input_path=`$CYGPATH -u "$shortmode_path"`
23835       new_path="$input_path"
23836     fi
23837   fi
23838 
23839   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23840   if test "x$test_cygdrive_prefix" = x; then
23841     # As a simple fix, exclude /usr/bin since it's not a real path.
23842     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23843       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23844       # a path prefixed by /cygdrive for fixpath to work.
23845       new_path="$CYGWIN_ROOT_PATH$input_path"
23846     fi
23847   fi
23848 
23849 
23850   if test "x$path" != "x$new_path"; then
23851     BOOT_JDK="$new_path"
23852     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23853 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23854   fi
23855 
23856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23857 
23858   path="$BOOT_JDK"
23859   has_colon=`$ECHO $path | $GREP ^.:`
23860   new_path="$path"
23861   if test "x$has_colon" = x; then
23862     # Not in mixed or Windows style, start by that.
23863     new_path=`cmd //c echo $path`
23864   fi
23865 
23866 
23867   input_path="$new_path"
23868   # Check if we need to convert this using DOS-style short mode. If the path
23869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23870   # take no chances and rewrite it.
23871   # Note: m4 eats our [], so we need to use [ and ] instead.
23872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23873   if test "x$has_forbidden_chars" != x; then
23874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23875     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23876   fi
23877 
23878 
23879   windows_path="$new_path"
23880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23881     unix_path=`$CYGPATH -u "$windows_path"`
23882     new_path="$unix_path"
23883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23884     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23885     new_path="$unix_path"
23886   fi
23887 
23888   if test "x$path" != "x$new_path"; then
23889     BOOT_JDK="$new_path"
23890     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23891 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23892   fi
23893 
23894   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23895   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23896 
23897   else
23898     # We're on a posix platform. Hooray! :)
23899     path="$BOOT_JDK"
23900     has_space=`$ECHO "$path" | $GREP " "`
23901     if test "x$has_space" != x; then
23902       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23903 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23904       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23905     fi
23906 
23907     # Use eval to expand a potential ~
23908     eval path="$path"
23909     if test ! -f "$path" && test ! -d "$path"; then
23910       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23911     fi
23912 
23913     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23914   fi
23915 
23916               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23917 $as_echo_n "checking for Boot JDK... " >&6; }
23918               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23919 $as_echo "$BOOT_JDK" >&6; }
23920               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23921 $as_echo_n "checking Boot JDK version... " >&6; }
23922               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23923               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23924 $as_echo "$BOOT_JDK_VERSION" >&6; }
23925             fi # end check jdk version
23926           fi # end check rt.jar
23927         fi # end check javac
23928       fi # end check java
23929     fi # end check boot jdk found
23930   fi
23931 
23932   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
23933 
23934   if test "x$BOOT_JDK_FOUND" = xno; then
23935     # Now execute the test
23936 
23937   BOOT_JDK_PREFIX="/usr/lib/jvm"
23938   BOOT_JDK_SUFFIX=""
23939   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23940   if test "x$ALL_JDKS_FOUND" != x; then
23941     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23942 
23943   if test "x$BOOT_JDK_FOUND" = xno; then
23944     # Now execute the test
23945 
23946         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23947         if test -d "$BOOT_JDK"; then
23948           BOOT_JDK_FOUND=maybe
23949           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23950 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23951         fi
23952 
23953 
23954     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23955     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23956       # Do we have a bin/java?
23957       if test ! -x "$BOOT_JDK/bin/java"; then
23958         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23959 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23960         BOOT_JDK_FOUND=no
23961       else
23962         # Do we have a bin/javac?
23963         if test ! -x "$BOOT_JDK/bin/javac"; then
23964           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23965 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23966           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23967 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23968           BOOT_JDK_FOUND=no
23969         else
23970           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23971           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23972             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23973 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23974             BOOT_JDK_FOUND=no
23975           else
23976             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23977             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23978 
23979             # Extra M4 quote needed to protect [] in grep expression.
23980             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23981             if test "x$FOUND_VERSION_78" = x; then
23982               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23983 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23984               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23985 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23986               BOOT_JDK_FOUND=no
23987             else
23988               # We're done! :-)
23989               BOOT_JDK_FOUND=yes
23990 
23991   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23992 
23993   # Input might be given as Windows format, start by converting to
23994   # unix format.
23995   path="$BOOT_JDK"
23996   new_path=`$CYGPATH -u "$path"`
23997 
23998   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23999   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24000   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24001   # "foo.exe" is OK but "foo" is an error.
24002   #
24003   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24004   # It is also a way to make sure we got the proper file name for the real test later on.
24005   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24006   if test "x$test_shortpath" = x; then
24007     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24008 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24009     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24010   fi
24011 
24012   # Call helper function which possibly converts this using DOS-style short mode.
24013   # If so, the updated path is stored in $new_path.
24014 
24015   input_path="$new_path"
24016   # Check if we need to convert this using DOS-style short mode. If the path
24017   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24018   # take no chances and rewrite it.
24019   # Note: m4 eats our [], so we need to use [ and ] instead.
24020   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24021   if test "x$has_forbidden_chars" != x; then
24022     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24023     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24024     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24025     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24026       # Going to short mode and back again did indeed matter. Since short mode is
24027       # case insensitive, let's make it lowercase to improve readability.
24028       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24029       # Now convert it back to Unix-style (cygpath)
24030       input_path=`$CYGPATH -u "$shortmode_path"`
24031       new_path="$input_path"
24032     fi
24033   fi
24034 
24035   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24036   if test "x$test_cygdrive_prefix" = x; then
24037     # As a simple fix, exclude /usr/bin since it's not a real path.
24038     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24039       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24040       # a path prefixed by /cygdrive for fixpath to work.
24041       new_path="$CYGWIN_ROOT_PATH$input_path"
24042     fi
24043   fi
24044 
24045 
24046   if test "x$path" != "x$new_path"; then
24047     BOOT_JDK="$new_path"
24048     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24049 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24050   fi
24051 
24052   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24053 
24054   path="$BOOT_JDK"
24055   has_colon=`$ECHO $path | $GREP ^.:`
24056   new_path="$path"
24057   if test "x$has_colon" = x; then
24058     # Not in mixed or Windows style, start by that.
24059     new_path=`cmd //c echo $path`
24060   fi
24061 
24062 
24063   input_path="$new_path"
24064   # Check if we need to convert this using DOS-style short mode. If the path
24065   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24066   # take no chances and rewrite it.
24067   # Note: m4 eats our [], so we need to use [ and ] instead.
24068   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24069   if test "x$has_forbidden_chars" != x; then
24070     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24071     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24072   fi
24073 
24074 
24075   windows_path="$new_path"
24076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24077     unix_path=`$CYGPATH -u "$windows_path"`
24078     new_path="$unix_path"
24079   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24080     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24081     new_path="$unix_path"
24082   fi
24083 
24084   if test "x$path" != "x$new_path"; then
24085     BOOT_JDK="$new_path"
24086     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24087 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24088   fi
24089 
24090   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24091   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24092 
24093   else
24094     # We're on a posix platform. Hooray! :)
24095     path="$BOOT_JDK"
24096     has_space=`$ECHO "$path" | $GREP " "`
24097     if test "x$has_space" != x; then
24098       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24099 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24100       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24101     fi
24102 
24103     # Use eval to expand a potential ~
24104     eval path="$path"
24105     if test ! -f "$path" && test ! -d "$path"; then
24106       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24107     fi
24108 
24109     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24110   fi
24111 
24112               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24113 $as_echo_n "checking for Boot JDK... " >&6; }
24114               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24115 $as_echo "$BOOT_JDK" >&6; }
24116               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24117 $as_echo_n "checking Boot JDK version... " >&6; }
24118               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24119               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24120 $as_echo "$BOOT_JDK_VERSION" >&6; }
24121             fi # end check jdk version
24122           fi # end check rt.jar
24123         fi # end check javac
24124       fi # end check java
24125     fi # end check boot jdk found
24126   fi
24127 
24128     done
24129   fi
24130 
24131 
24132     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24133     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24134       # Do we have a bin/java?
24135       if test ! -x "$BOOT_JDK/bin/java"; then
24136         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24137 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24138         BOOT_JDK_FOUND=no
24139       else
24140         # Do we have a bin/javac?
24141         if test ! -x "$BOOT_JDK/bin/javac"; then
24142           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24143 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24144           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24145 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24146           BOOT_JDK_FOUND=no
24147         else
24148           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24149           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24150             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24151 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24152             BOOT_JDK_FOUND=no
24153           else
24154             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24155             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24156 
24157             # Extra M4 quote needed to protect [] in grep expression.
24158             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
24159             if test "x$FOUND_VERSION_78" = x; then
24160               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24161 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24162               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
24163 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
24164               BOOT_JDK_FOUND=no
24165             else
24166               # We're done! :-)
24167               BOOT_JDK_FOUND=yes
24168 
24169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24170 
24171   # Input might be given as Windows format, start by converting to
24172   # unix format.
24173   path="$BOOT_JDK"
24174   new_path=`$CYGPATH -u "$path"`
24175 
24176   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24177   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24178   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24179   # "foo.exe" is OK but "foo" is an error.
24180   #
24181   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24182   # It is also a way to make sure we got the proper file name for the real test later on.
24183   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24184   if test "x$test_shortpath" = x; then
24185     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24186 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24187     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24188   fi
24189 
24190   # Call helper function which possibly converts this using DOS-style short mode.
24191   # If so, the updated path is stored in $new_path.
24192 
24193   input_path="$new_path"
24194   # Check if we need to convert this using DOS-style short mode. If the path
24195   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24196   # take no chances and rewrite it.
24197   # Note: m4 eats our [], so we need to use [ and ] instead.
24198   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24199   if test "x$has_forbidden_chars" != x; then
24200     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24201     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24202     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24203     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24204       # Going to short mode and back again did indeed matter. Since short mode is
24205       # case insensitive, let's make it lowercase to improve readability.
24206       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24207       # Now convert it back to Unix-style (cygpath)
24208       input_path=`$CYGPATH -u "$shortmode_path"`
24209       new_path="$input_path"
24210     fi
24211   fi
24212 
24213   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24214   if test "x$test_cygdrive_prefix" = x; then
24215     # As a simple fix, exclude /usr/bin since it's not a real path.
24216     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24217       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24218       # a path prefixed by /cygdrive for fixpath to work.
24219       new_path="$CYGWIN_ROOT_PATH$input_path"
24220     fi
24221   fi
24222 
24223 
24224   if test "x$path" != "x$new_path"; then
24225     BOOT_JDK="$new_path"
24226     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24227 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24228   fi
24229 
24230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24231 
24232   path="$BOOT_JDK"
24233   has_colon=`$ECHO $path | $GREP ^.:`
24234   new_path="$path"
24235   if test "x$has_colon" = x; then
24236     # Not in mixed or Windows style, start by that.
24237     new_path=`cmd //c echo $path`
24238   fi
24239 
24240 
24241   input_path="$new_path"
24242   # Check if we need to convert this using DOS-style short mode. If the path
24243   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24244   # take no chances and rewrite it.
24245   # Note: m4 eats our [], so we need to use [ and ] instead.
24246   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24247   if test "x$has_forbidden_chars" != x; then
24248     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24249     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24250   fi
24251 
24252 
24253   windows_path="$new_path"
24254   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24255     unix_path=`$CYGPATH -u "$windows_path"`
24256     new_path="$unix_path"
24257   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24258     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24259     new_path="$unix_path"
24260   fi
24261 
24262   if test "x$path" != "x$new_path"; then
24263     BOOT_JDK="$new_path"
24264     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24265 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24266   fi
24267 
24268   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24269   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24270 
24271   else
24272     # We're on a posix platform. Hooray! :)
24273     path="$BOOT_JDK"
24274     has_space=`$ECHO "$path" | $GREP " "`
24275     if test "x$has_space" != x; then
24276       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24277 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24278       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24279     fi
24280 
24281     # Use eval to expand a potential ~
24282     eval path="$path"
24283     if test ! -f "$path" && test ! -d "$path"; then
24284       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24285     fi
24286 
24287     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24288   fi
24289 
24290               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24291 $as_echo_n "checking for Boot JDK... " >&6; }
24292               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24293 $as_echo "$BOOT_JDK" >&6; }
24294               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24295 $as_echo_n "checking Boot JDK version... " >&6; }
24296               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24297               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24298 $as_echo "$BOOT_JDK_VERSION" >&6; }
24299             fi # end check jdk version
24300           fi # end check rt.jar
24301         fi # end check javac
24302       fi # end check java
24303     fi # end check boot jdk found
24304   fi
24305 
24306   fi
24307 
24308 
24309     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24310     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24311       # Do we have a bin/java?
24312       if test ! -x "$BOOT_JDK/bin/java"; then
24313         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24314 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24315         BOOT_JDK_FOUND=no
24316       else
24317         # Do we have a bin/javac?
24318         if test ! -x "$BOOT_JDK/bin/javac"; then
24319           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24320 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24321           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24322 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24323           BOOT_JDK_FOUND=no
24324         else
24325           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24326           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24327             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24328 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24329             BOOT_JDK_FOUND=no
24330           else
24331             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24332             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24333 
24334             # Extra M4 quote needed to protect [] in grep expression.
24335             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
24336             if test "x$FOUND_VERSION_78" = x; then
24337               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24338 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24339               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
24340 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
24341               BOOT_JDK_FOUND=no
24342             else
24343               # We're done! :-)
24344               BOOT_JDK_FOUND=yes
24345 
24346   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24347 
24348   # Input might be given as Windows format, start by converting to
24349   # unix format.
24350   path="$BOOT_JDK"
24351   new_path=`$CYGPATH -u "$path"`
24352 
24353   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24354   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24355   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24356   # "foo.exe" is OK but "foo" is an error.
24357   #
24358   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24359   # It is also a way to make sure we got the proper file name for the real test later on.
24360   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24361   if test "x$test_shortpath" = x; then
24362     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24363 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24364     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24365   fi
24366 
24367   # Call helper function which possibly converts this using DOS-style short mode.
24368   # If so, the updated path is stored in $new_path.
24369 
24370   input_path="$new_path"
24371   # Check if we need to convert this using DOS-style short mode. If the path
24372   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24373   # take no chances and rewrite it.
24374   # Note: m4 eats our [], so we need to use [ and ] instead.
24375   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24376   if test "x$has_forbidden_chars" != x; then
24377     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24378     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24379     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24380     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24381       # Going to short mode and back again did indeed matter. Since short mode is
24382       # case insensitive, let's make it lowercase to improve readability.
24383       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24384       # Now convert it back to Unix-style (cygpath)
24385       input_path=`$CYGPATH -u "$shortmode_path"`
24386       new_path="$input_path"
24387     fi
24388   fi
24389 
24390   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24391   if test "x$test_cygdrive_prefix" = x; then
24392     # As a simple fix, exclude /usr/bin since it's not a real path.
24393     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24394       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24395       # a path prefixed by /cygdrive for fixpath to work.
24396       new_path="$CYGWIN_ROOT_PATH$input_path"
24397     fi
24398   fi
24399 
24400 
24401   if test "x$path" != "x$new_path"; then
24402     BOOT_JDK="$new_path"
24403     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24404 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24405   fi
24406 
24407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24408 
24409   path="$BOOT_JDK"
24410   has_colon=`$ECHO $path | $GREP ^.:`
24411   new_path="$path"
24412   if test "x$has_colon" = x; then
24413     # Not in mixed or Windows style, start by that.
24414     new_path=`cmd //c echo $path`
24415   fi
24416 
24417 
24418   input_path="$new_path"
24419   # Check if we need to convert this using DOS-style short mode. If the path
24420   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24421   # take no chances and rewrite it.
24422   # Note: m4 eats our [], so we need to use [ and ] instead.
24423   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24424   if test "x$has_forbidden_chars" != x; then
24425     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24426     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24427   fi
24428 
24429 
24430   windows_path="$new_path"
24431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24432     unix_path=`$CYGPATH -u "$windows_path"`
24433     new_path="$unix_path"
24434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24435     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24436     new_path="$unix_path"
24437   fi
24438 
24439   if test "x$path" != "x$new_path"; then
24440     BOOT_JDK="$new_path"
24441     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24442 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24443   fi
24444 
24445   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24446   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24447 
24448   else
24449     # We're on a posix platform. Hooray! :)
24450     path="$BOOT_JDK"
24451     has_space=`$ECHO "$path" | $GREP " "`
24452     if test "x$has_space" != x; then
24453       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24454 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24455       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24456     fi
24457 
24458     # Use eval to expand a potential ~
24459     eval path="$path"
24460     if test ! -f "$path" && test ! -d "$path"; then
24461       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24462     fi
24463 
24464     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24465   fi
24466 
24467               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24468 $as_echo_n "checking for Boot JDK... " >&6; }
24469               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24470 $as_echo "$BOOT_JDK" >&6; }
24471               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24472 $as_echo_n "checking Boot JDK version... " >&6; }
24473               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24474               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24475 $as_echo "$BOOT_JDK_VERSION" >&6; }
24476             fi # end check jdk version
24477           fi # end check rt.jar
24478         fi # end check javac
24479       fi # end check java
24480     fi # end check boot jdk found
24481   fi
24482 
24483 
24484   # If we haven't found anything yet, we've truly lost. Give up.
24485   if test "x$BOOT_JDK_FOUND" = xno; then
24486 
24487   # Print a helpful message on how to acquire the necessary build dependency.
24488   # openjdk is the help tag: freetype, cups, pulse, alsa etc
24489   MISSING_DEPENDENCY=openjdk
24490 
24491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24492     cygwin_help $MISSING_DEPENDENCY
24493   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24494     msys_help $MISSING_DEPENDENCY
24495   else
24496     PKGHANDLER_COMMAND=
24497 
24498     case $PKGHANDLER in
24499       apt-get)
24500         apt_help     $MISSING_DEPENDENCY ;;
24501       yum)
24502         yum_help     $MISSING_DEPENDENCY ;;
24503       port)
24504         port_help    $MISSING_DEPENDENCY ;;
24505       pkgutil)
24506         pkgutil_help $MISSING_DEPENDENCY ;;
24507       pkgadd)
24508         pkgadd_help  $MISSING_DEPENDENCY ;;
24509     esac
24510 
24511     if test "x$PKGHANDLER_COMMAND" != x; then
24512       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24513     fi
24514   fi
24515 
24516     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
24517 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
24518     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
24519 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24520     as_fn_error $? "Cannot continue" "$LINENO" 5
24521   fi
24522 
24523   # Setup proper paths for what we found
24524   BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
24525   if test ! -f "$BOOT_RTJAR"; then
24526     # On MacOSX it is called classes.jar
24527     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
24528     if test -f "$BOOT_RTJAR"; then
24529       # Remove the ..
24530       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
24531     fi
24532   fi
24533   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
24534   BOOT_JDK="$BOOT_JDK"
24535 
24536 
24537 
24538 
24539   # Setup tools from the Boot JDK.
24540 
24541   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
24542 $as_echo_n "checking for java in Boot JDK... " >&6; }
24543   JAVA=$BOOT_JDK/bin/java
24544   if test ! -x $JAVA; then
24545     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24546 $as_echo "not found" >&6; }
24547     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24548 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24549     as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
24550   fi
24551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24552 $as_echo "ok" >&6; }
24553 
24554 
24555   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
24556 $as_echo_n "checking for javac in Boot JDK... " >&6; }
24557   JAVAC=$BOOT_JDK/bin/javac
24558   if test ! -x $JAVAC; then
24559     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24560 $as_echo "not found" >&6; }
24561     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24562 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24563     as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
24564   fi
24565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24566 $as_echo "ok" >&6; }
24567 
24568 
24569   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
24570 $as_echo_n "checking for javah in Boot JDK... " >&6; }
24571   JAVAH=$BOOT_JDK/bin/javah
24572   if test ! -x $JAVAH; then
24573     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24574 $as_echo "not found" >&6; }
24575     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24576 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24577     as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
24578   fi
24579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24580 $as_echo "ok" >&6; }
24581 
24582 
24583   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
24584 $as_echo_n "checking for javap in Boot JDK... " >&6; }
24585   JAVAP=$BOOT_JDK/bin/javap
24586   if test ! -x $JAVAP; then
24587     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24588 $as_echo "not found" >&6; }
24589     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24590 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24591     as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
24592   fi
24593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24594 $as_echo "ok" >&6; }
24595 
24596 
24597   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
24598 $as_echo_n "checking for jar in Boot JDK... " >&6; }
24599   JAR=$BOOT_JDK/bin/jar
24600   if test ! -x $JAR; then
24601     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24602 $as_echo "not found" >&6; }
24603     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24604 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24605     as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
24606   fi
24607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24608 $as_echo "ok" >&6; }
24609 
24610 
24611   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
24612 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
24613   RMIC=$BOOT_JDK/bin/rmic
24614   if test ! -x $RMIC; then
24615     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24616 $as_echo "not found" >&6; }
24617     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24618 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24619     as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
24620   fi
24621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24622 $as_echo "ok" >&6; }
24623 
24624 
24625   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
24626 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
24627   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
24628   if test ! -x $NATIVE2ASCII; then
24629     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24630 $as_echo "not found" >&6; }
24631     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24632 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24633     as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
24634   fi
24635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24636 $as_echo "ok" >&6; }
24637 
24638 
24639   # Finally, set some other options...
24640 
24641   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
24642   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
24643 
24644 
24645 
24646   # Check if the boot jdk is 32 or 64 bit
24647   if "$JAVA" -d64 -version > /dev/null 2>&1; then
24648     BOOT_JDK_BITS="64"
24649   else
24650     BOOT_JDK_BITS="32"
24651   fi
24652   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
24653 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
24654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
24655 $as_echo "$BOOT_JDK_BITS" >&6; }
24656 
24657 
24658 
24659   ##############################################################################
24660   #
24661   # Specify options for anything that is run with the Boot JDK.
24662   #
24663 
24664 # Check whether --with-boot-jdk-jvmargs was given.
24665 if test "${with_boot_jdk_jvmargs+set}" = set; then :
24666   withval=$with_boot_jdk_jvmargs;
24667 fi
24668 
24669 
24670   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
24671 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
24672 
24673   # Disable special log output when a debug build is used as Boot JDK...
24674 
24675   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
24676   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
24677   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
24678   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24679   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24680   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24681     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
24682     JVM_ARG_OK=true
24683   else
24684     $ECHO "Arg failed:" >&5
24685     $ECHO "$OUTPUT" >&5
24686     JVM_ARG_OK=false
24687   fi
24688 
24689 
24690   # Apply user provided options.
24691 
24692   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
24693   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
24694   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
24695   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24696   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24697   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24698     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
24699     JVM_ARG_OK=true
24700   else
24701     $ECHO "Arg failed:" >&5
24702     $ECHO "$OUTPUT" >&5
24703     JVM_ARG_OK=false
24704   fi
24705 
24706 
24707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
24708 $as_echo "$boot_jdk_jvmargs" >&6; }
24709 
24710   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
24711   JAVA_FLAGS=$boot_jdk_jvmargs
24712 
24713 
24714 
24715   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
24716 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
24717 
24718   # Starting amount of heap memory.
24719 
24720   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
24721   $ECHO "Command: $JAVA -Xms64M -version" >&5
24722   OUTPUT=`$JAVA -Xms64M -version 2>&1`
24723   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24724   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24725   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24726     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
24727     JVM_ARG_OK=true
24728   else
24729     $ECHO "Arg failed:" >&5
24730     $ECHO "$OUTPUT" >&5
24731     JVM_ARG_OK=false
24732   fi
24733 
24734 
24735   # Maximum amount of heap memory.
24736   # Maximum stack size.
24737   if test "x$BOOT_JDK_BITS" = x32; then
24738     JVM_MAX_HEAP=768M
24739     STACK_SIZE=768
24740   else
24741     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
24742     # pointers are used. Apparently, we need to increase the heap and stack
24743     # space for the jvm. More specifically, when running javac to build huge
24744     # jdk batch
24745     JVM_MAX_HEAP=1600M
24746     STACK_SIZE=1536
24747   fi
24748 
24749   $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
24750   $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
24751   OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
24752   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24753   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24754   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24755     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
24756     JVM_ARG_OK=true
24757   else
24758     $ECHO "Arg failed:" >&5
24759     $ECHO "$OUTPUT" >&5
24760     JVM_ARG_OK=false
24761   fi
24762 
24763 
24764   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
24765   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
24766   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
24767   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24768   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24769   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24770     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
24771     JVM_ARG_OK=true
24772   else
24773     $ECHO "Arg failed:" >&5
24774     $ECHO "$OUTPUT" >&5
24775     JVM_ARG_OK=false
24776   fi
24777 
24778 
24779   $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
24780   $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
24781   OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
24782   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24783   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24784   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24785     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:PermSize=32m"
24786     JVM_ARG_OK=true
24787   else
24788     $ECHO "Arg failed:" >&5
24789     $ECHO "$OUTPUT" >&5
24790     JVM_ARG_OK=false
24791   fi
24792 
24793 
24794   $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
24795   $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
24796   OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
24797   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24798   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24799   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24800     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:MaxPermSize=160m"
24801     JVM_ARG_OK=true
24802   else
24803     $ECHO "Arg failed:" >&5
24804     $ECHO "$OUTPUT" >&5
24805     JVM_ARG_OK=false
24806   fi
24807 
24808 
24809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
24810 $as_echo "$boot_jdk_jvmargs_big" >&6; }
24811 
24812   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
24813 
24814 
24815 
24816   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
24817 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
24818 
24819   # Use serial gc for small short lived tools if possible
24820 
24821   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
24822   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
24823   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
24824   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24825   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24826   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24827     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
24828     JVM_ARG_OK=true
24829   else
24830     $ECHO "Arg failed:" >&5
24831     $ECHO "$OUTPUT" >&5
24832     JVM_ARG_OK=false
24833   fi
24834 
24835 
24836   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
24837   $ECHO "Command: $JAVA -Xms32M -version" >&5
24838   OUTPUT=`$JAVA -Xms32M -version 2>&1`
24839   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24840   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24841   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24842     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
24843     JVM_ARG_OK=true
24844   else
24845     $ECHO "Arg failed:" >&5
24846     $ECHO "$OUTPUT" >&5
24847     JVM_ARG_OK=false
24848   fi
24849 
24850 
24851   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
24852   $ECHO "Command: $JAVA -Xmx512M -version" >&5
24853   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
24854   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24855   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24856   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24857     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
24858     JVM_ARG_OK=true
24859   else
24860     $ECHO "Arg failed:" >&5
24861     $ECHO "$OUTPUT" >&5
24862     JVM_ARG_OK=false
24863   fi
24864 
24865 
24866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
24867 $as_echo "$boot_jdk_jvmargs_small" >&6; }
24868 
24869   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
24870 
24871 
24872 
24873 ###############################################################################
24874 #
24875 # Configure the sources to use. We can add or override individual directories.
24876 #
24877 ###############################################################################
24878 
24879 
24880   # Where are the sources. Any of these can be overridden
24881   # using --with-override-corba and the likes.
24882   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
24883   CORBA_TOPDIR="$SRC_ROOT/corba"
24884   JAXP_TOPDIR="$SRC_ROOT/jaxp"
24885   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
24886   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
24887   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
24888   JDK_TOPDIR="$SRC_ROOT/jdk"
24889 
24890 
24891 
24892 
24893 
24894 
24895 
24896 
24897 
24898 
24899   ###############################################################################
24900   #
24901   # Pickup additional source for a component from outside of the source root
24902   # or override source for a component.
24903   #
24904 
24905 # Check whether --with-add-source-root was given.
24906 if test "${with_add_source_root+set}" = set; then :
24907   withval=$with_add_source_root;
24908 fi
24909 
24910 
24911 
24912 # Check whether --with-override-source-root was given.
24913 if test "${with_override_source_root+set}" = set; then :
24914   withval=$with_override_source_root;
24915 fi
24916 
24917 
24918 
24919 # Check whether --with-adds-and-overrides was given.
24920 if test "${with_adds_and_overrides+set}" = set; then :
24921   withval=$with_adds_and_overrides;
24922 fi
24923 
24924 
24925   if test "x$with_adds_and_overrides" != x; then
24926     with_add_source_root="$with_adds_and_overrides/adds"
24927     with_override_source_root="$with_adds_and_overrides/overrides"
24928   fi
24929 
24930   if test "x$with_add_source_root" != x; then
24931     if ! test -d $with_add_source_root; then
24932       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
24933     fi
24934     CURDIR="$PWD"
24935     cd "$with_add_source_root"
24936     ADD_SRC_ROOT="`pwd`"
24937     cd "$CURDIR"
24938     # Verify that the addon source root does not have any root makefiles.
24939     # If it does, then it is usually an error, prevent this.
24940     if test -f $with_add_source_root/langtools/make/Makefile; then
24941       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
24942     fi
24943     if test -f $with_add_source_root/corba/make/Makefile; then
24944       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
24945     fi
24946     if test -f $with_add_source_root/jaxp/make/Makefile; then
24947       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
24948     fi
24949     if test -f $with_add_source_root/jaxws/make/Makefile; then
24950       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
24951     fi
24952     if test -f $with_add_source_root/hotspot/make/Makefile; then
24953       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
24954     fi
24955     if test -f $with_add_source_root/nashorn/make/Makefile; then
24956       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
24957     fi
24958     if test -f $with_add_source_root/jdk/make/Makefile; then
24959       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
24960     fi
24961   fi
24962 
24963 
24964   if test "x$with_override_source_root" != x; then
24965     if ! test -d $with_override_source_root; then
24966       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
24967     fi
24968     CURDIR="$PWD"
24969     cd "$with_override_source_root"
24970     OVERRIDE_SRC_ROOT="`pwd`"
24971     cd "$CURDIR"
24972     if test -f $with_override_source_root/langtools/make/Makefile; then
24973       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
24974     fi
24975     if test -f $with_override_source_root/corba/make/Makefile; then
24976       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
24977     fi
24978     if test -f $with_override_source_root/jaxp/make/Makefile; then
24979       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
24980     fi
24981     if test -f $with_override_source_root/jaxws/make/Makefile; then
24982       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
24983     fi
24984     if test -f $with_override_source_root/hotspot/make/Makefile; then
24985       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
24986     fi
24987     if test -f $with_override_source_root/nashorn/make/Makefile; then
24988       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
24989     fi
24990     if test -f $with_override_source_root/jdk/make/Makefile; then
24991       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
24992     fi
24993   fi
24994 
24995 
24996   ###############################################################################
24997   #
24998   # Override a repo completely, this is used for example when you have 3 small
24999   # development sandboxes of the langtools sources and want to avoid having 3 full
25000   # OpenJDK sources checked out on disk.
25001   #
25002   # Assuming that the 3 langtools sandboxes are located here:
25003   # /home/fredrik/sandbox1/langtools
25004   # /home/fredrik/sandbox2/langtools
25005   # /home/fredrik/sandbox3/langtools
25006   #
25007   # From the source root you create build subdirs manually:
25008   #     mkdir -p build1 build2 build3
25009   # in each build directory run:
25010   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
25011   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
25012   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
25013   #
25014 
25015 
25016 # Check whether --with-override-langtools was given.
25017 if test "${with_override_langtools+set}" = set; then :
25018   withval=$with_override_langtools;
25019 fi
25020 
25021 
25022 
25023 # Check whether --with-override-corba was given.
25024 if test "${with_override_corba+set}" = set; then :
25025   withval=$with_override_corba;
25026 fi
25027 
25028 
25029 
25030 # Check whether --with-override-jaxp was given.
25031 if test "${with_override_jaxp+set}" = set; then :
25032   withval=$with_override_jaxp;
25033 fi
25034 
25035 
25036 
25037 # Check whether --with-override-jaxws was given.
25038 if test "${with_override_jaxws+set}" = set; then :
25039   withval=$with_override_jaxws;
25040 fi
25041 
25042 
25043 
25044 # Check whether --with-override-hotspot was given.
25045 if test "${with_override_hotspot+set}" = set; then :
25046   withval=$with_override_hotspot;
25047 fi
25048 
25049 
25050 
25051 # Check whether --with-override-nashorn was given.
25052 if test "${with_override_nashorn+set}" = set; then :
25053   withval=$with_override_nashorn;
25054 fi
25055 
25056 
25057 
25058 # Check whether --with-override-jdk was given.
25059 if test "${with_override_jdk+set}" = set; then :
25060   withval=$with_override_jdk;
25061 fi
25062 
25063 
25064   if test "x$with_override_langtools" != x; then
25065     CURDIR="$PWD"
25066     cd "$with_override_langtools"
25067     LANGTOOLS_TOPDIR="`pwd`"
25068     cd "$CURDIR"
25069     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
25070       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
25071     fi
25072     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
25073 $as_echo_n "checking if langtools should be overridden... " >&6; }
25074     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
25075 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
25076   fi
25077   if test "x$with_override_corba" != x; then
25078     CURDIR="$PWD"
25079     cd "$with_override_corba"
25080     CORBA_TOPDIR="`pwd`"
25081     cd "$CURDIR"
25082     if ! test -f $CORBA_TOPDIR/make/Makefile; then
25083       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
25084     fi
25085     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
25086 $as_echo_n "checking if corba should be overridden... " >&6; }
25087     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
25088 $as_echo "yes with $CORBA_TOPDIR" >&6; }
25089   fi
25090   if test "x$with_override_jaxp" != x; then
25091     CURDIR="$PWD"
25092     cd "$with_override_jaxp"
25093     JAXP_TOPDIR="`pwd`"
25094     cd "$CURDIR"
25095     if ! test -f $JAXP_TOPDIR/make/Makefile; then
25096       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
25097     fi
25098     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
25099 $as_echo_n "checking if jaxp should be overridden... " >&6; }
25100     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
25101 $as_echo "yes with $JAXP_TOPDIR" >&6; }
25102   fi
25103   if test "x$with_override_jaxws" != x; then
25104     CURDIR="$PWD"
25105     cd "$with_override_jaxws"
25106     JAXWS_TOPDIR="`pwd`"
25107     cd "$CURDIR"
25108     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
25109       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
25110     fi
25111     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
25112 $as_echo_n "checking if jaxws should be overridden... " >&6; }
25113     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
25114 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
25115   fi
25116   if test "x$with_override_hotspot" != x; then
25117     CURDIR="$PWD"
25118     cd "$with_override_hotspot"
25119     HOTSPOT_TOPDIR="`pwd`"
25120     cd "$CURDIR"
25121     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
25122       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
25123     fi
25124     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
25125 $as_echo_n "checking if hotspot should be overridden... " >&6; }
25126     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
25127 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
25128   fi
25129   if test "x$with_override_nashorn" != x; then
25130     CURDIR="$PWD"
25131     cd "$with_override_nashorn"
25132     NASHORN_TOPDIR="`pwd`"
25133     cd "$CURDIR"
25134     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
25135       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
25136     fi
25137     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
25138 $as_echo_n "checking if nashorn should be overridden... " >&6; }
25139     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
25140 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
25141   fi
25142   if test "x$with_override_jdk" != x; then
25143     CURDIR="$PWD"
25144     cd "$with_override_jdk"
25145     JDK_TOPDIR="`pwd`"
25146     cd "$CURDIR"
25147     if ! test -f $JDK_TOPDIR/make/Makefile; then
25148       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
25149     fi
25150     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
25151 $as_echo_n "checking if JDK should be overridden... " >&6; }
25152     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
25153 $as_echo "yes with $JDK_TOPDIR" >&6; }
25154   fi
25155 
25156 
25157   BUILD_OUTPUT="$OUTPUT_ROOT"
25158 
25159 
25160   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
25161   BUILD_HOTSPOT=true
25162 
25163 
25164 
25165 # Check whether --with-import-hotspot was given.
25166 if test "${with_import_hotspot+set}" = set; then :
25167   withval=$with_import_hotspot;
25168 fi
25169 
25170   if test "x$with_import_hotspot" != x; then
25171     CURDIR="$PWD"
25172     cd "$with_import_hotspot"
25173     HOTSPOT_DIST="`pwd`"
25174     cd "$CURDIR"
25175     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
25176       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
25177     fi
25178     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
25179 $as_echo_n "checking if hotspot should be imported... " >&6; }
25180     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
25181 $as_echo "yes from $HOTSPOT_DIST" >&6; }
25182     BUILD_HOTSPOT=false
25183   fi
25184 
25185   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
25186 
25187 
25188 ###############################################################################
25189 #
25190 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
25191 # native code.
25192 #
25193 ###############################################################################
25194 
25195 # First determine the toolchain type (compiler family)
25196 
25197 
25198 # Check whether --with-toolchain-type was given.
25199 if test "${with_toolchain_type+set}" = set; then :
25200   withval=$with_toolchain_type;
25201 fi
25202 
25203 
25204   # Use indirect variable referencing
25205   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
25206   VALID_TOOLCHAINS=${!toolchain_var_name}
25207   # First toolchain type in the list is the default
25208   DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
25209 
25210   if test "x$with_toolchain_type" = xlist; then
25211     # List all toolchains
25212     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
25213 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
25214     for toolchain in $VALID_TOOLCHAINS; do
25215       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
25216       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
25217       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
25218     done
25219 
25220     exit 0
25221   elif test "x$with_toolchain_type" != x; then
25222     # User override; check that it is valid
25223     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
25224       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
25225 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
25226       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
25227 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
25228       as_fn_error $? "Cannot continue." "$LINENO" 5
25229     fi
25230     TOOLCHAIN_TYPE=$with_toolchain_type
25231   else
25232     # No flag given, use default
25233     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
25234   fi
25235 
25236 
25237   TOOLCHAIN_CC_BINARY_clang="clang"
25238   TOOLCHAIN_CC_BINARY_gcc="gcc"
25239   TOOLCHAIN_CC_BINARY_microsoft="cl"
25240   TOOLCHAIN_CC_BINARY_solstudio="cc"
25241   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
25242 
25243   TOOLCHAIN_CXX_BINARY_clang="clang++"
25244   TOOLCHAIN_CXX_BINARY_gcc="g++"
25245   TOOLCHAIN_CXX_BINARY_microsoft="cl"
25246   TOOLCHAIN_CXX_BINARY_solstudio="CC"
25247   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
25248 
25249   # Use indirect variable referencing
25250   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
25251   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
25252   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
25253   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
25254   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
25255   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
25256 
25257 
25258   # Define filename patterns
25259   if test "x$OPENJDK_TARGET_OS" = xwindows; then
25260     LIBRARY_PREFIX=
25261     SHARED_LIBRARY_SUFFIX='.dll'
25262     STATIC_LIBRARY_SUFFIX='.lib'
25263     SHARED_LIBRARY='$1.dll'
25264     STATIC_LIBRARY='$1.lib'
25265     OBJ_SUFFIX='.obj'
25266     EXE_SUFFIX='.exe'
25267   else
25268     LIBRARY_PREFIX=lib
25269     SHARED_LIBRARY_SUFFIX='.so'
25270     STATIC_LIBRARY_SUFFIX='.a'
25271     SHARED_LIBRARY='lib$1.so'
25272     STATIC_LIBRARY='lib$1.a'
25273     OBJ_SUFFIX='.o'
25274     EXE_SUFFIX=''
25275     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25276       SHARED_LIBRARY='lib$1.dylib'
25277       SHARED_LIBRARY_SUFFIX='.dylib'
25278     fi
25279   fi
25280 
25281 
25282 
25283 
25284 
25285 
25286 
25287 
25288 
25289 
25290   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
25291     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
25292 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
25293   else
25294     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
25295 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
25296   fi
25297 
25298 
25299 # Then detect the actual binaries needed
25300 
25301   # FIXME: Is this needed?
25302   ac_ext=cpp
25303 ac_cpp='$CXXCPP $CPPFLAGS'
25304 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25305 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25306 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25307 
25308 
25309   # Store the CFLAGS etal passed to the configure script.
25310   ORG_CFLAGS="$CFLAGS"
25311   ORG_CXXFLAGS="$CXXFLAGS"
25312   ORG_OBJCFLAGS="$OBJCFLAGS"
25313 
25314   # autoconf magic only relies on PATH, so update it if tools dir is specified
25315   OLD_PATH="$PATH"
25316 
25317   # On Windows, we need to detect the visual studio installation first.
25318   # This will change the PATH, but we need to keep that new PATH even
25319   # after toolchain detection is done, since the compiler (on x86) uses
25320   # it for DLL resolution in runtime.
25321   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
25322       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
25323 
25324   # Store path to cygwin link.exe to help excluding it when searching for
25325   # VS linker. This must be done before changing the PATH when looking for VS.
25326   # Extract the first word of "link", so it can be a program name with args.
25327 set dummy link; ac_word=$2
25328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25329 $as_echo_n "checking for $ac_word... " >&6; }
25330 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
25331   $as_echo_n "(cached) " >&6
25332 else
25333   case $CYGWIN_LINK in
25334   [\\/]* | ?:[\\/]*)
25335   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
25336   ;;
25337   *)
25338   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25339 for as_dir in $PATH
25340 do
25341   IFS=$as_save_IFS
25342   test -z "$as_dir" && as_dir=.
25343     for ac_exec_ext in '' $ac_executable_extensions; do
25344   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25345     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
25346     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25347     break 2
25348   fi
25349 done
25350   done
25351 IFS=$as_save_IFS
25352 
25353   ;;
25354 esac
25355 fi
25356 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
25357 if test -n "$CYGWIN_LINK"; then
25358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
25359 $as_echo "$CYGWIN_LINK" >&6; }
25360 else
25361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25362 $as_echo "no" >&6; }
25363 fi
25364 
25365 
25366   if test "x$CYGWIN_LINK" != x; then
25367     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
25368 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
25369     "$CYGWIN_LINK" --version > /dev/null
25370     if test $? -eq 0 ; then
25371       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25372 $as_echo "yes" >&6; }
25373     else
25374       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25375 $as_echo "no" >&6; }
25376       # This might be the VS linker. Don't exclude it later on.
25377       CYGWIN_LINK=""
25378     fi
25379   fi
25380 
25381   # First-hand choice is to locate and run the vsvars bat file.
25382 
25383 
25384 # Check whether --with-toolchain-version was given.
25385 if test "${with_toolchain_version+set}" = set; then :
25386   withval=$with_toolchain_version;
25387 fi
25388 
25389 
25390   if test "x$with_toolchain_version" = xlist; then
25391     # List all toolchains
25392     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
25393 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
25394     for version in $VALID_VS_VERSIONS; do
25395       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
25396       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
25397     done
25398 
25399     exit 0
25400   elif test "x$DEVKIT_VS_VERSION" != x; then
25401     VS_VERSION=$DEVKIT_VS_VERSION
25402     TOOLCHAIN_VERSION=$VS_VERSION
25403     # If the devkit has a name, use that as description
25404     VS_DESCRIPTION="$DEVKIT_NAME"
25405     if test "x$VS_DESCRIPTION" = x; then
25406       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
25407     fi
25408     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
25409     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
25410     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
25411     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25412     VS_PATH="$TOOLCHAIN_PATH:$PATH"
25413 
25414     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
25415     # can still be exported as INCLUDE for compiler invocations without
25416     # SYSROOT_CFLAGS
25417     OLDIFS="$IFS"
25418     IFS=";"
25419     for i in $DEVKIT_VS_INCLUDE; do
25420       ipath=$i
25421 
25422   unix_path="$ipath"
25423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25424     windows_path=`$CYGPATH -m "$unix_path"`
25425     ipath="$windows_path"
25426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25427     windows_path=`cmd //c echo $unix_path`
25428     ipath="$windows_path"
25429   fi
25430 
25431       VS_INCLUDE="$VS_INCLUDE;$ipath"
25432     done
25433     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
25434     # as LIB for compiler invocations without SYSROOT_LDFLAGS
25435     for i in $DEVKIT_VS_LIB; do
25436       libpath=$i
25437 
25438   unix_path="$libpath"
25439   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25440     windows_path=`$CYGPATH -m "$unix_path"`
25441     libpath="$windows_path"
25442   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25443     windows_path=`cmd //c echo $unix_path`
25444     libpath="$windows_path"
25445   fi
25446 
25447       VS_LIB="$VS_LIB;$libpath"
25448     done
25449     IFS="$OLDIFS"
25450 
25451     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
25452 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
25453 
25454   elif test "x$with_toolchain_version" != x; then
25455     # User override; check that it is valid
25456     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
25457       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
25458 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
25459       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
25460 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
25461       as_fn_error $? "Cannot continue." "$LINENO" 5
25462     fi
25463     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
25464   else
25465     # No flag given, use default
25466     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
25467   fi
25468 
25469   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
25470 
25471   VS_VERSION="$VS_VERSION"
25472   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
25473   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
25474   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
25475   eval VS_EDITIONS="\${VS_EDITIONS_${VS_VERSION}}"
25476   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
25477   eval VS_ENV_ARGS="\${VS_ENV_ARGS_${VS_VERSION}}"
25478 
25479   # When using --with-tools-dir, assume it points to the correct and default
25480   # version of Visual Studio or that --with-toolchain-version was also set.
25481   if test "x$with_tools_dir" != x; then
25482 
25483   if test "x$VS_ENV_CMD" = x; then
25484     VS_VERSION="${VS_VERSION}"
25485     VS_BASE="$with_tools_dir/../.."
25486     METHOD="--with-tools-dir"
25487 
25488 
25489   windows_path="$VS_BASE"
25490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25491     unix_path=`$CYGPATH -u "$windows_path"`
25492     VS_BASE="$unix_path"
25493   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25494     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25495     VS_BASE="$unix_path"
25496   fi
25497 
25498     # In VS 2017, the default installation is in a subdir named after the edition.
25499     # Find the first one present and use that.
25500     if test "x$VS_EDITIONS" != x; then
25501       for edition in $VS_EDITIONS; do
25502         if test -d "$VS_BASE/$edition"; then
25503           VS_BASE="$VS_BASE/$edition"
25504           break
25505         fi
25506       done
25507     fi
25508 
25509     if test -d "$VS_BASE"; then
25510       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25511 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25512       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25513         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25514       else
25515         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25516             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25517       fi
25518 
25519       for VCVARSFILE in $VCVARSFILES; do
25520         if test -f "$VS_BASE/$VCVARSFILE"; then
25521           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25522           break
25523         fi
25524       done
25525 
25526       if test "x$VS_ENV_CMD" = x; then
25527         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25528 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25529       else
25530         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25531         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25532         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25533         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25534 
25535       fi
25536     fi
25537   fi
25538 
25539 
25540   if test "x$VS_ENV_CMD" = x; then
25541     VS_VERSION="${VS_VERSION}"
25542     VS_BASE="$with_tools_dir/../../.."
25543     METHOD="--with-tools-dir"
25544 
25545 
25546   windows_path="$VS_BASE"
25547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25548     unix_path=`$CYGPATH -u "$windows_path"`
25549     VS_BASE="$unix_path"
25550   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25551     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25552     VS_BASE="$unix_path"
25553   fi
25554 
25555     # In VS 2017, the default installation is in a subdir named after the edition.
25556     # Find the first one present and use that.
25557     if test "x$VS_EDITIONS" != x; then
25558       for edition in $VS_EDITIONS; do
25559         if test -d "$VS_BASE/$edition"; then
25560           VS_BASE="$VS_BASE/$edition"
25561           break
25562         fi
25563       done
25564     fi
25565 
25566     if test -d "$VS_BASE"; then
25567       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25568 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25569       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25570         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25571       else
25572         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25573             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25574       fi
25575 
25576       for VCVARSFILE in $VCVARSFILES; do
25577         if test -f "$VS_BASE/$VCVARSFILE"; then
25578           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25579           break
25580         fi
25581       done
25582 
25583       if test "x$VS_ENV_CMD" = x; then
25584         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25585 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25586       else
25587         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25588         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25589         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25590         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25591 
25592       fi
25593     fi
25594   fi
25595 
25596     if test "x$VS_ENV_CMD" = x; then
25597       # Having specified an argument which is incorrect will produce an instant failure;
25598       # we should not go on looking
25599       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
25600 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
25601       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
25602 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
25603       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
25604 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
25605       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
25606     fi
25607   fi
25608 
25609   VS_ENV_CMD=""
25610 
25611   if test "x$VS_COMNTOOLS" != x; then
25612 
25613   if test "x$VS_ENV_CMD" = x; then
25614     VS_VERSION="${VS_VERSION}"
25615     VS_BASE="$VS_COMNTOOLS/../.."
25616     METHOD="$VS_COMNTOOLS_VAR variable"
25617 
25618 
25619   windows_path="$VS_BASE"
25620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25621     unix_path=`$CYGPATH -u "$windows_path"`
25622     VS_BASE="$unix_path"
25623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25624     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25625     VS_BASE="$unix_path"
25626   fi
25627 
25628     # In VS 2017, the default installation is in a subdir named after the edition.
25629     # Find the first one present and use that.
25630     if test "x$VS_EDITIONS" != x; then
25631       for edition in $VS_EDITIONS; do
25632         if test -d "$VS_BASE/$edition"; then
25633           VS_BASE="$VS_BASE/$edition"
25634           break
25635         fi
25636       done
25637     fi
25638 
25639     if test -d "$VS_BASE"; then
25640       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25641 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25642       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25643         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25644       else
25645         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25646             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25647       fi
25648 
25649       for VCVARSFILE in $VCVARSFILES; do
25650         if test -f "$VS_BASE/$VCVARSFILE"; then
25651           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25652           break
25653         fi
25654       done
25655 
25656       if test "x$VS_ENV_CMD" = x; then
25657         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25658 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25659       else
25660         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25661         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25662         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25663         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25664 
25665       fi
25666     fi
25667   fi
25668 
25669   fi
25670   if test "x$PROGRAMFILES" != x; then
25671 
25672   if test "x$VS_ENV_CMD" = x; then
25673     VS_VERSION="${VS_VERSION}"
25674     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
25675     METHOD="well-known name"
25676 
25677 
25678   windows_path="$VS_BASE"
25679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25680     unix_path=`$CYGPATH -u "$windows_path"`
25681     VS_BASE="$unix_path"
25682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25683     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25684     VS_BASE="$unix_path"
25685   fi
25686 
25687     # In VS 2017, the default installation is in a subdir named after the edition.
25688     # Find the first one present and use that.
25689     if test "x$VS_EDITIONS" != x; then
25690       for edition in $VS_EDITIONS; do
25691         if test -d "$VS_BASE/$edition"; then
25692           VS_BASE="$VS_BASE/$edition"
25693           break
25694         fi
25695       done
25696     fi
25697 
25698     if test -d "$VS_BASE"; then
25699       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25700 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25701       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25702         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25703       else
25704         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25705             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25706       fi
25707 
25708       for VCVARSFILE in $VCVARSFILES; do
25709         if test -f "$VS_BASE/$VCVARSFILE"; then
25710           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25711           break
25712         fi
25713       done
25714 
25715       if test "x$VS_ENV_CMD" = x; then
25716         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25717 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25718       else
25719         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25720         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25721         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25722         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25723 
25724       fi
25725     fi
25726   fi
25727 
25728   fi
25729   # Work around the insanely named ProgramFiles(x86) env variable
25730   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
25731   if test "x$PROGRAMFILES_X86" != x; then
25732 
25733   if test "x$VS_ENV_CMD" = x; then
25734     VS_VERSION="${VS_VERSION}"
25735     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
25736     METHOD="well-known name"
25737 
25738 
25739   windows_path="$VS_BASE"
25740   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25741     unix_path=`$CYGPATH -u "$windows_path"`
25742     VS_BASE="$unix_path"
25743   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25744     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25745     VS_BASE="$unix_path"
25746   fi
25747 
25748     # In VS 2017, the default installation is in a subdir named after the edition.
25749     # Find the first one present and use that.
25750     if test "x$VS_EDITIONS" != x; then
25751       for edition in $VS_EDITIONS; do
25752         if test -d "$VS_BASE/$edition"; then
25753           VS_BASE="$VS_BASE/$edition"
25754           break
25755         fi
25756       done
25757     fi
25758 
25759     if test -d "$VS_BASE"; then
25760       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25761 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25762       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25763         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25764       else
25765         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25766             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25767       fi
25768 
25769       for VCVARSFILE in $VCVARSFILES; do
25770         if test -f "$VS_BASE/$VCVARSFILE"; then
25771           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25772           break
25773         fi
25774       done
25775 
25776       if test "x$VS_ENV_CMD" = x; then
25777         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25778 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25779       else
25780         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25781         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25782         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25783         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25784 
25785       fi
25786     fi
25787   fi
25788 
25789   fi
25790 
25791   if test "x$VS_ENV_CMD" = x; then
25792     VS_VERSION="${VS_VERSION}"
25793     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
25794     METHOD="well-known name"
25795 
25796 
25797   windows_path="$VS_BASE"
25798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25799     unix_path=`$CYGPATH -u "$windows_path"`
25800     VS_BASE="$unix_path"
25801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25802     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25803     VS_BASE="$unix_path"
25804   fi
25805 
25806     # In VS 2017, the default installation is in a subdir named after the edition.
25807     # Find the first one present and use that.
25808     if test "x$VS_EDITIONS" != x; then
25809       for edition in $VS_EDITIONS; do
25810         if test -d "$VS_BASE/$edition"; then
25811           VS_BASE="$VS_BASE/$edition"
25812           break
25813         fi
25814       done
25815     fi
25816 
25817     if test -d "$VS_BASE"; then
25818       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25819 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25820       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25821         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25822       else
25823         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25824             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25825       fi
25826 
25827       for VCVARSFILE in $VCVARSFILES; do
25828         if test -f "$VS_BASE/$VCVARSFILE"; then
25829           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25830           break
25831         fi
25832       done
25833 
25834       if test "x$VS_ENV_CMD" = x; then
25835         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25836 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25837       else
25838         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25839         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25840         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25841         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25842 
25843       fi
25844     fi
25845   fi
25846 
25847 
25848   if test "x$VS_ENV_CMD" = x; then
25849     VS_VERSION="${VS_VERSION}"
25850     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
25851     METHOD="well-known name"
25852 
25853 
25854   windows_path="$VS_BASE"
25855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25856     unix_path=`$CYGPATH -u "$windows_path"`
25857     VS_BASE="$unix_path"
25858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25859     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25860     VS_BASE="$unix_path"
25861   fi
25862 
25863     # In VS 2017, the default installation is in a subdir named after the edition.
25864     # Find the first one present and use that.
25865     if test "x$VS_EDITIONS" != x; then
25866       for edition in $VS_EDITIONS; do
25867         if test -d "$VS_BASE/$edition"; then
25868           VS_BASE="$VS_BASE/$edition"
25869           break
25870         fi
25871       done
25872     fi
25873 
25874     if test -d "$VS_BASE"; then
25875       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25876 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25877       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25878         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25879       else
25880         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25881             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25882       fi
25883 
25884       for VCVARSFILE in $VCVARSFILES; do
25885         if test -f "$VS_BASE/$VCVARSFILE"; then
25886           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25887           break
25888         fi
25889       done
25890 
25891       if test "x$VS_ENV_CMD" = x; then
25892         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25893 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25894       else
25895         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25896         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25897         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25898         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25899 
25900       fi
25901     fi
25902   fi
25903 
25904 
25905   if test "x$SDK_INSTALL_DIR" != x; then
25906     if test "x$ProgramW6432" != x; then
25907 
25908   if test "x$VS_ENV_CMD" = x; then
25909     VS_VERSION="${VS_VERSION}"
25910     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
25911     METHOD="well-known name"
25912 
25913   windows_path="$WIN_SDK_BASE"
25914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25915     unix_path=`$CYGPATH -u "$windows_path"`
25916     WIN_SDK_BASE="$unix_path"
25917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25918     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25919     WIN_SDK_BASE="$unix_path"
25920   fi
25921 
25922     if test -d "$WIN_SDK_BASE"; then
25923       # There have been cases of partial or broken SDK installations. A missing
25924       # lib dir is not going to work.
25925       if test ! -d "$WIN_SDK_BASE/lib"; then
25926         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25927 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25928         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25929 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25930       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
25931         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25932 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25933         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
25934         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25935           VS_ENV_ARGS="/x86"
25936         else
25937           VS_ENV_ARGS="/x64"
25938         fi
25939         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
25940         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
25941         # TODO: improve detection for other versions of SDK
25942         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
25943       else
25944         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25945 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25946         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25947 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25948       fi
25949     fi
25950   fi
25951 
25952     fi
25953     if test "x$PROGRAMW6432" != x; then
25954 
25955   if test "x$VS_ENV_CMD" = x; then
25956     VS_VERSION="${VS_VERSION}"
25957     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
25958     METHOD="well-known name"
25959 
25960   windows_path="$WIN_SDK_BASE"
25961   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25962     unix_path=`$CYGPATH -u "$windows_path"`
25963     WIN_SDK_BASE="$unix_path"
25964   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25965     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25966     WIN_SDK_BASE="$unix_path"
25967   fi
25968 
25969     if test -d "$WIN_SDK_BASE"; then
25970       # There have been cases of partial or broken SDK installations. A missing
25971       # lib dir is not going to work.
25972       if test ! -d "$WIN_SDK_BASE/lib"; then
25973         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25974 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25975         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25976 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25977       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
25978         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25979 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25980         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
25981         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25982           VS_ENV_ARGS="/x86"
25983         else
25984           VS_ENV_ARGS="/x64"
25985         fi
25986         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
25987         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
25988         # TODO: improve detection for other versions of SDK
25989         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
25990       else
25991         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25992 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25993         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25994 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25995       fi
25996     fi
25997   fi
25998 
25999     fi
26000     if test "x$PROGRAMFILES" != x; then
26001 
26002   if test "x$VS_ENV_CMD" = x; then
26003     VS_VERSION="${VS_VERSION}"
26004     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
26005     METHOD="well-known name"
26006 
26007   windows_path="$WIN_SDK_BASE"
26008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26009     unix_path=`$CYGPATH -u "$windows_path"`
26010     WIN_SDK_BASE="$unix_path"
26011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26013     WIN_SDK_BASE="$unix_path"
26014   fi
26015 
26016     if test -d "$WIN_SDK_BASE"; then
26017       # There have been cases of partial or broken SDK installations. A missing
26018       # lib dir is not going to work.
26019       if test ! -d "$WIN_SDK_BASE/lib"; then
26020         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26021 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26022         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26023 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26024       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26025         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26026 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26027         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26028         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26029           VS_ENV_ARGS="/x86"
26030         else
26031           VS_ENV_ARGS="/x64"
26032         fi
26033         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26034         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26035         # TODO: improve detection for other versions of SDK
26036         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26037       else
26038         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26039 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26040         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26041 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26042       fi
26043     fi
26044   fi
26045 
26046     fi
26047 
26048   if test "x$VS_ENV_CMD" = x; then
26049     VS_VERSION="${VS_VERSION}"
26050     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
26051     METHOD="well-known name"
26052 
26053   windows_path="$WIN_SDK_BASE"
26054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26055     unix_path=`$CYGPATH -u "$windows_path"`
26056     WIN_SDK_BASE="$unix_path"
26057   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26058     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26059     WIN_SDK_BASE="$unix_path"
26060   fi
26061 
26062     if test -d "$WIN_SDK_BASE"; then
26063       # There have been cases of partial or broken SDK installations. A missing
26064       # lib dir is not going to work.
26065       if test ! -d "$WIN_SDK_BASE/lib"; then
26066         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26067 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26068         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26069 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26070       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26071         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26072 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26073         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26074         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26075           VS_ENV_ARGS="/x86"
26076         else
26077           VS_ENV_ARGS="/x64"
26078         fi
26079         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26080         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26081         # TODO: improve detection for other versions of SDK
26082         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26083       else
26084         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26085 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26086         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26087 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26088       fi
26089     fi
26090   fi
26091 
26092 
26093   if test "x$VS_ENV_CMD" = x; then
26094     VS_VERSION="${VS_VERSION}"
26095     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
26096     METHOD="well-known name"
26097 
26098   windows_path="$WIN_SDK_BASE"
26099   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26100     unix_path=`$CYGPATH -u "$windows_path"`
26101     WIN_SDK_BASE="$unix_path"
26102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26103     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26104     WIN_SDK_BASE="$unix_path"
26105   fi
26106 
26107     if test -d "$WIN_SDK_BASE"; then
26108       # There have been cases of partial or broken SDK installations. A missing
26109       # lib dir is not going to work.
26110       if test ! -d "$WIN_SDK_BASE/lib"; then
26111         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26112 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26113         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26114 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26115       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26116         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26117 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26118         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26119         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26120           VS_ENV_ARGS="/x86"
26121         else
26122           VS_ENV_ARGS="/x64"
26123         fi
26124         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26125         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26126         # TODO: improve detection for other versions of SDK
26127         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26128       else
26129         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26130 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26131         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26132 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26133       fi
26134     fi
26135   fi
26136 
26137   fi
26138 
26139     if test "x$VS_ENV_CMD" != x; then
26140       TOOLCHAIN_VERSION=$VS_VERSION
26141       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
26142       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
26143       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
26144       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
26145       # The rest of the variables are already evaled while probing
26146       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
26147 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
26148       break
26149     fi
26150   done
26151 
26152   TOOLCHAIN_DESCRIPTION="$VS_DESCRIPTION"
26153   if test "$TOOLCHAIN_VERSION" -gt 2013; then
26154     UNSUPPORTED_TOOLCHAIN_VERSION=yes
26155   fi
26156 
26157 
26158   # If we have a devkit, skip all of the below.
26159   if test "x$DEVKIT_VS_VERSION" = x; then
26160     if test "x$VS_ENV_CMD" != x; then
26161       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26162 
26163   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26164 
26165   # First separate the path from the arguments. This will split at the first
26166   # space.
26167   complete="$VS_ENV_CMD"
26168   path="${complete%% *}"
26169   tmp="$complete EOL"
26170   arguments="${tmp#* }"
26171 
26172   # Input might be given as Windows format, start by converting to
26173   # unix format.
26174   new_path=`$CYGPATH -u "$path"`
26175 
26176   # Now try to locate executable using which
26177   new_path=`$WHICH "$new_path" 2> /dev/null`
26178   # bat and cmd files are not always considered executable in cygwin causing which
26179   # to not find them
26180   if test "x$new_path" = x \
26181       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26182       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26183     new_path=`$CYGPATH -u "$path"`
26184   fi
26185   if test "x$new_path" = x; then
26186     # Oops. Which didn't find the executable.
26187     # The splitting of arguments from the executable at a space might have been incorrect,
26188     # since paths with space are more likely in Windows. Give it another try with the whole
26189     # argument.
26190     path="$complete"
26191     arguments="EOL"
26192     new_path=`$CYGPATH -u "$path"`
26193     new_path=`$WHICH "$new_path" 2> /dev/null`
26194     # bat and cmd files are not always considered executable in cygwin causing which
26195     # to not find them
26196     if test "x$new_path" = x \
26197         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26198         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26199       new_path=`$CYGPATH -u "$path"`
26200     fi
26201     if test "x$new_path" = x; then
26202       # It's still not found. Now this is an unrecoverable error.
26203       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26204 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26205       has_space=`$ECHO "$complete" | $GREP " "`
26206       if test "x$has_space" != x; then
26207         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26208 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26209       fi
26210       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26211     fi
26212   fi
26213 
26214   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26215   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26216   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26217   # "foo.exe" is OK but "foo" is an error.
26218   #
26219   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26220   # It is also a way to make sure we got the proper file name for the real test later on.
26221   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26222   if test "x$test_shortpath" = x; then
26223     # Short path failed, file does not exist as specified.
26224     # Try adding .exe or .cmd
26225     if test -f "${new_path}.exe"; then
26226       input_to_shortpath="${new_path}.exe"
26227     elif test -f "${new_path}.cmd"; then
26228       input_to_shortpath="${new_path}.cmd"
26229     else
26230       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
26231 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
26232       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26233 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26234       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26235     fi
26236   else
26237     input_to_shortpath="$new_path"
26238   fi
26239 
26240   # Call helper function which possibly converts this using DOS-style short mode.
26241   # If so, the updated path is stored in $new_path.
26242   new_path="$input_to_shortpath"
26243 
26244   input_path="$input_to_shortpath"
26245   # Check if we need to convert this using DOS-style short mode. If the path
26246   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26247   # take no chances and rewrite it.
26248   # Note: m4 eats our [], so we need to use [ and ] instead.
26249   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26250   if test "x$has_forbidden_chars" != x; then
26251     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26252     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26253     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26254     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26255       # Going to short mode and back again did indeed matter. Since short mode is
26256       # case insensitive, let's make it lowercase to improve readability.
26257       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26258       # Now convert it back to Unix-style (cygpath)
26259       input_path=`$CYGPATH -u "$shortmode_path"`
26260       new_path="$input_path"
26261     fi
26262   fi
26263 
26264   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26265   if test "x$test_cygdrive_prefix" = x; then
26266     # As a simple fix, exclude /usr/bin since it's not a real path.
26267     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26268       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26269       # a path prefixed by /cygdrive for fixpath to work.
26270       new_path="$CYGWIN_ROOT_PATH$input_path"
26271     fi
26272   fi
26273 
26274   # remove trailing .exe if any
26275   new_path="${new_path/%.exe/}"
26276 
26277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26278 
26279   # First separate the path from the arguments. This will split at the first
26280   # space.
26281   complete="$VS_ENV_CMD"
26282   path="${complete%% *}"
26283   tmp="$complete EOL"
26284   arguments="${tmp#* }"
26285 
26286   # Input might be given as Windows format, start by converting to
26287   # unix format.
26288   new_path="$path"
26289 
26290   windows_path="$new_path"
26291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26292     unix_path=`$CYGPATH -u "$windows_path"`
26293     new_path="$unix_path"
26294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26295     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26296     new_path="$unix_path"
26297   fi
26298 
26299 
26300   # Now try to locate executable using which
26301   new_path=`$WHICH "$new_path" 2> /dev/null`
26302 
26303   if test "x$new_path" = x; then
26304     # Oops. Which didn't find the executable.
26305     # The splitting of arguments from the executable at a space might have been incorrect,
26306     # since paths with space are more likely in Windows. Give it another try with the whole
26307     # argument.
26308     path="$complete"
26309     arguments="EOL"
26310     new_path="$path"
26311 
26312   windows_path="$new_path"
26313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26314     unix_path=`$CYGPATH -u "$windows_path"`
26315     new_path="$unix_path"
26316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26317     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26318     new_path="$unix_path"
26319   fi
26320 
26321 
26322     new_path=`$WHICH "$new_path" 2> /dev/null`
26323     # bat and cmd files are not always considered executable in MSYS causing which
26324     # to not find them
26325     if test "x$new_path" = x \
26326         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26327         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26328       new_path="$path"
26329 
26330   windows_path="$new_path"
26331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26332     unix_path=`$CYGPATH -u "$windows_path"`
26333     new_path="$unix_path"
26334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26335     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26336     new_path="$unix_path"
26337   fi
26338 
26339     fi
26340 
26341     if test "x$new_path" = x; then
26342       # It's still not found. Now this is an unrecoverable error.
26343       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26344 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26345       has_space=`$ECHO "$complete" | $GREP " "`
26346       if test "x$has_space" != x; then
26347         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26348 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26349       fi
26350       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26351     fi
26352   fi
26353 
26354   # Now new_path has a complete unix path to the binary
26355   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26356     # Keep paths in /bin as-is, but remove trailing .exe if any
26357     new_path="${new_path/%.exe/}"
26358     # Do not save /bin paths to all_fixpath_prefixes!
26359   else
26360     # Not in mixed or Windows style, start by that.
26361     new_path=`cmd //c echo $new_path`
26362 
26363   input_path="$new_path"
26364   # Check if we need to convert this using DOS-style short mode. If the path
26365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26366   # take no chances and rewrite it.
26367   # Note: m4 eats our [], so we need to use [ and ] instead.
26368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26369   if test "x$has_forbidden_chars" != x; then
26370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26371     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26372   fi
26373 
26374     # Output is in $new_path
26375 
26376   windows_path="$new_path"
26377   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26378     unix_path=`$CYGPATH -u "$windows_path"`
26379     new_path="$unix_path"
26380   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26381     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26382     new_path="$unix_path"
26383   fi
26384 
26385     # remove trailing .exe if any
26386     new_path="${new_path/%.exe/}"
26387 
26388     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26389     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26390   fi
26391 
26392   else
26393     # We're on a posix platform. Hooray! :)
26394     # First separate the path from the arguments. This will split at the first
26395     # space.
26396     complete="$VS_ENV_CMD"
26397     path="${complete%% *}"
26398     tmp="$complete EOL"
26399     arguments="${tmp#* }"
26400 
26401     # Cannot rely on the command "which" here since it doesn't always work.
26402     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26403     if test -z "$is_absolute_path"; then
26404       # Path to executable is not absolute. Find it.
26405       IFS_save="$IFS"
26406       IFS=:
26407       for p in $PATH; do
26408         if test -f "$p/$path" && test -x "$p/$path"; then
26409           new_path="$p/$path"
26410           break
26411         fi
26412       done
26413       IFS="$IFS_save"
26414     else
26415       # This is an absolute path, we can use it without further modifications.
26416       new_path="$path"
26417     fi
26418 
26419     if test "x$new_path" = x; then
26420       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26421 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26422       has_space=`$ECHO "$complete" | $GREP " "`
26423       if test "x$has_space" != x; then
26424         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26425 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26426       fi
26427       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26428     fi
26429   fi
26430 
26431   # Now join together the path and the arguments once again
26432   if test "x$arguments" != xEOL; then
26433     new_complete="$new_path ${arguments% *}"
26434   else
26435     new_complete="$new_path"
26436   fi
26437 
26438   if test "x$complete" != "x$new_complete"; then
26439     VS_ENV_CMD="$new_complete"
26440     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
26441 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
26442   fi
26443 
26444 
26445       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
26446       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
26447 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
26448 
26449       # We need to create a couple of temporary files.
26450       VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
26451       $MKDIR -p $VS_ENV_TMP_DIR
26452 
26453       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
26454       # Instead create a shell script which will set the relevant variables when run.
26455       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
26456 
26457   unix_path="$WINPATH_VS_ENV_CMD"
26458   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26459     windows_path=`$CYGPATH -m "$unix_path"`
26460     WINPATH_VS_ENV_CMD="$windows_path"
26461   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26462     windows_path=`cmd //c echo $unix_path`
26463     WINPATH_VS_ENV_CMD="$windows_path"
26464   fi
26465 
26466       WINPATH_BASH="$BASH"
26467 
26468   unix_path="$WINPATH_BASH"
26469   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26470     windows_path=`$CYGPATH -m "$unix_path"`
26471     WINPATH_BASH="$windows_path"
26472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26473     windows_path=`cmd //c echo $unix_path`
26474     WINPATH_BASH="$windows_path"
26475   fi
26476 
26477 
26478       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
26479       # script (executable by bash) that will setup the important variables.
26480       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
26481       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
26482       # This will end up something like:
26483       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
26484       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
26485       # In some cases, the VS_ENV_CMD will change directory, change back so
26486       # the set-vs-env.sh ends up in the right place.
26487       $ECHO 'cd %~dp0' >> $EXTRACT_VC_ENV_BAT_FILE
26488       # These will end up something like:
26489       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
26490       # The trailing space for everyone except PATH is no typo, but is needed due
26491       # to trailing \ in the Windows paths. These will be stripped later.
26492       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
26493           >> $EXTRACT_VC_ENV_BAT_FILE
26494       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' \
26495           >> $EXTRACT_VC_ENV_BAT_FILE
26496       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' \
26497           >> $EXTRACT_VC_ENV_BAT_FILE
26498       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
26499           >> $EXTRACT_VC_ENV_BAT_FILE
26500       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
26501           >> $EXTRACT_VC_ENV_BAT_FILE
26502       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
26503           >> $EXTRACT_VC_ENV_BAT_FILE
26504 
26505       # Now execute the newly created bat file.
26506       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
26507       # Change directory so we don't need to mess with Windows paths in redirects.
26508       cd $VS_ENV_TMP_DIR
26509       cmd /c extract-vs-env.bat | $CAT
26510       cd $CURDIR
26511 
26512       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
26513         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
26514 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
26515         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
26516 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
26517         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
26518 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
26519         as_fn_error $? "Cannot continue" "$LINENO" 5
26520       fi
26521 
26522       # Now set all paths and other env variables. This will allow the rest of
26523       # the configure script to find and run the compiler in the proper way.
26524       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
26525 $as_echo "$as_me: Setting extracted environment variables" >&6;}
26526       . $VS_ENV_TMP_DIR/set-vs-env.sh
26527       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
26528       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
26529     else
26530       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
26531      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
26532 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
26533     fi
26534   fi
26535 
26536   # At this point, we should have correct variables in the environment, or we can't continue.
26537   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
26538 $as_echo_n "checking for Visual Studio variables... " >&6; }
26539 
26540   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
26541       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
26542     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
26543       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
26544 $as_echo "present but broken" >&6; }
26545       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
26546     else
26547       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26548 $as_echo "ok" >&6; }
26549       # Remove any trailing "\" and " " from the variables.
26550       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
26551       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
26552       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
26553       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
26554       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
26555       # Remove any paths containing # (typically F#) as that messes up make. This
26556       # is needed if visual studio was installed with F# support.
26557       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
26558 
26559 
26560 
26561 
26562     fi
26563   else
26564     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26565 $as_echo "not found" >&6; }
26566 
26567     if test "x$VS_ENV_CMD" = x; then
26568       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
26569 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
26570       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
26571 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
26572     else
26573       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
26574 $as_echo "$as_me: Running the extraction script failed." >&6;}
26575     fi
26576     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
26577 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
26578     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
26579 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
26580     as_fn_error $? "Cannot continue" "$LINENO" 5
26581   fi
26582 
26583     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
26584     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
26585     PATH="$VS_PATH"
26586     # The microsoft toolchain also requires INCLUDE and LIB to be set.
26587     export INCLUDE="$VS_INCLUDE"
26588     export LIB="$VS_LIB"
26589   fi
26590 
26591   # Before we locate the compilers, we need to sanitize the Xcode build environment
26592   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26593     # determine path to Xcode developer directory
26594     # can be empty in which case all the tools will rely on a sane Xcode 4 installation
26595     SET_DEVELOPER_DIR=
26596 
26597     if test -n "$XCODE_PATH"; then
26598       DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
26599     fi
26600 
26601     # DEVELOPER_DIR could also be provided directly
26602     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining if we need to set DEVELOPER_DIR" >&5
26603 $as_echo_n "checking Determining if we need to set DEVELOPER_DIR... " >&6; }
26604     if test -n "$DEVELOPER_DIR"; then
26605       if test ! -d "$DEVELOPER_DIR"; then
26606         as_fn_error $? "Xcode Developer path does not exist: $DEVELOPER_DIR, please provide a path to the Xcode 4 application bundle using --with-xcode-path" "$LINENO" 5
26607       fi
26608       if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then
26609         as_fn_error $? "Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle" "$LINENO" 5
26610       fi
26611       # make it visible to all the tools immediately
26612       export DEVELOPER_DIR
26613       SET_DEVELOPER_DIR="export DEVELOPER_DIR := $DEVELOPER_DIR"
26614       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEVELOPER_DIR)" >&5
26615 $as_echo "yes ($DEVELOPER_DIR)" >&6; }
26616     else
26617       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26618 $as_echo "no" >&6; }
26619     fi
26620 
26621 
26622     # Extract the first word of "xcodebuild", so it can be a program name with args.
26623 set dummy xcodebuild; ac_word=$2
26624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26625 $as_echo_n "checking for $ac_word... " >&6; }
26626 if ${ac_cv_path_XCODEBUILD+:} false; then :
26627   $as_echo_n "(cached) " >&6
26628 else
26629   case $XCODEBUILD in
26630   [\\/]* | ?:[\\/]*)
26631   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
26632   ;;
26633   *)
26634   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26635 for as_dir in $PATH
26636 do
26637   IFS=$as_save_IFS
26638   test -z "$as_dir" && as_dir=.
26639     for ac_exec_ext in '' $ac_executable_extensions; do
26640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26641     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
26642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26643     break 2
26644   fi
26645 done
26646   done
26647 IFS=$as_save_IFS
26648 
26649   ;;
26650 esac
26651 fi
26652 XCODEBUILD=$ac_cv_path_XCODEBUILD
26653 if test -n "$XCODEBUILD"; then
26654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
26655 $as_echo "$XCODEBUILD" >&6; }
26656 else
26657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26658 $as_echo "no" >&6; }
26659 fi
26660 
26661 
26662     if test -z "$XCODEBUILD"; then
26663       as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
26664     fi
26665 
26666     # Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later
26667     XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
26668     XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
26669     if test ! "${XC_VERSION_PARTS[0]}" = "4"; then
26670       as_fn_error $? "Xcode 4 is required to build JDK 8, the version found was $XCODE_VERSION. Use --with-xcode-path to specify the location of Xcode 4 or make Xcode 4 active by using xcode-select." "$LINENO" 5
26671     fi
26672 
26673     # Some versions of Xcode 5 command line tools install gcc and g++ as symlinks to
26674     # clang and clang++, which will break the build. So handle that here if we need to.
26675     if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
26676       # use xcrun to find the real gcc and add it's directory to PATH
26677       # then autoconf magic will find it
26678       { $as_echo "$as_me:${as_lineno-$LINENO}: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&5
26679 $as_echo "$as_me: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&6;}
26680       XCODE_BIN_PATH=$(dirname `xcrun -find gcc`)
26681       PATH="$XCODE_BIN_PATH":$PATH
26682     fi
26683 
26684     # Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools
26685     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining Xcode SDK path" >&5
26686 $as_echo_n "checking Determining Xcode SDK path... " >&6; }
26687     # allow SDKNAME to be set to override the default SDK selection
26688     SDKPATH=`"$XCODEBUILD" -sdk ${SDKNAME:-macosx} -version | grep '^Path: ' | sed 's/Path: //'`
26689     if test -n "$SDKPATH"; then
26690       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKPATH" >&5
26691 $as_echo "$SDKPATH" >&6; }
26692     else
26693       { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none, will use system headers and frameworks)" >&5
26694 $as_echo "(none, will use system headers and frameworks)" >&6; }
26695     fi
26696 
26697 
26698     # Perform a basic sanity test
26699     if test ! -f "$SDKPATH/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
26700       as_fn_error $? "Unable to find required framework headers, provide a valid path to Xcode 4 using --with-xcode-path" "$LINENO" 5
26701     fi
26702 
26703     # if SDKPATH is non-empty then we need to add -isysroot and -iframework for gcc and g++
26704     if test -n "$SDKPATH"; then
26705       # We need -isysroot <path> and -iframework<path>/System/Library/Frameworks
26706       CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26707       CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26708       LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26709     fi
26710 
26711     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
26712     # setting this here means it doesn't have to be peppered throughout the forest
26713     CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26714     CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26715     LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26716   fi
26717 
26718   # For solaris we really need solaris tools, and not the GNU equivalent.
26719   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
26720   # so add that to path before starting to probe.
26721   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
26722   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
26723     PATH="/usr/ccs/bin:$PATH"
26724   fi
26725 
26726   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
26727   # override all other locations.
26728   if test "x$TOOLCHAIN_PATH" != x; then
26729     PATH=$TOOLCHAIN_PATH:$PATH
26730   fi
26731 
26732 
26733   #
26734   # Setup the compilers (CC and CXX)
26735   #
26736 
26737   COMPILER_NAME=C
26738   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
26739 
26740   if test "x$CC" != x; then
26741     # User has supplied compiler name already, always let that override.
26742     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
26743 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
26744     if test "x`basename $CC`" = "x$CC"; then
26745       # A command without a complete path is provided, search $PATH.
26746 
26747       for ac_prog in $CC
26748 do
26749   # Extract the first word of "$ac_prog", so it can be a program name with args.
26750 set dummy $ac_prog; ac_word=$2
26751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26752 $as_echo_n "checking for $ac_word... " >&6; }
26753 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
26754   $as_echo_n "(cached) " >&6
26755 else
26756   case $POTENTIAL_CC in
26757   [\\/]* | ?:[\\/]*)
26758   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
26759   ;;
26760   *)
26761   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26762 for as_dir in $PATH
26763 do
26764   IFS=$as_save_IFS
26765   test -z "$as_dir" && as_dir=.
26766     for ac_exec_ext in '' $ac_executable_extensions; do
26767   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26768     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
26769     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26770     break 2
26771   fi
26772 done
26773   done
26774 IFS=$as_save_IFS
26775 
26776   ;;
26777 esac
26778 fi
26779 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
26780 if test -n "$POTENTIAL_CC"; then
26781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
26782 $as_echo "$POTENTIAL_CC" >&6; }
26783 else
26784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26785 $as_echo "no" >&6; }
26786 fi
26787 
26788 
26789   test -n "$POTENTIAL_CC" && break
26790 done
26791 
26792       if test "x$POTENTIAL_CC" != x; then
26793         CC=$POTENTIAL_CC
26794       else
26795         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
26796       fi
26797     else
26798       # Otherwise it might already be a complete path
26799       if test ! -x "$CC"; then
26800         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
26801       fi
26802     fi
26803   else
26804     # No user supplied value. Locate compiler ourselves.
26805 
26806     # If we are cross compiling, assume cross compilation tools follows the
26807     # cross compilation standard where they are prefixed with the autoconf
26808     # standard name for the target. For example the binary
26809     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
26810     # If we are not cross compiling, then the default compiler name will be
26811     # used.
26812 
26813     CC=
26814     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
26815     # before checking the rest of the PATH.
26816     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
26817     # step, this should not be necessary.
26818     if test -n "$TOOLCHAIN_PATH"; then
26819       PATH_save="$PATH"
26820       PATH="$TOOLCHAIN_PATH"
26821       for ac_prog in $SEARCH_LIST
26822 do
26823   # Extract the first word of "$ac_prog", so it can be a program name with args.
26824 set dummy $ac_prog; ac_word=$2
26825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26826 $as_echo_n "checking for $ac_word... " >&6; }
26827 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
26828   $as_echo_n "(cached) " >&6
26829 else
26830   case $TOOLCHAIN_PATH_CC in
26831   [\\/]* | ?:[\\/]*)
26832   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
26833   ;;
26834   *)
26835   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26836 for as_dir in $PATH
26837 do
26838   IFS=$as_save_IFS
26839   test -z "$as_dir" && as_dir=.
26840     for ac_exec_ext in '' $ac_executable_extensions; do
26841   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26842     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
26843     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26844     break 2
26845   fi
26846 done
26847   done
26848 IFS=$as_save_IFS
26849 
26850   ;;
26851 esac
26852 fi
26853 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
26854 if test -n "$TOOLCHAIN_PATH_CC"; then
26855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
26856 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
26857 else
26858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26859 $as_echo "no" >&6; }
26860 fi
26861 
26862 
26863   test -n "$TOOLCHAIN_PATH_CC" && break
26864 done
26865 
26866       CC=$TOOLCHAIN_PATH_CC
26867       PATH="$PATH_save"
26868     fi
26869 
26870     # AC_PATH_PROGS can't be run multiple times with the same variable,
26871     # so create a new name for this run.
26872     if test "x$CC" = x; then
26873       for ac_prog in $TOOLCHAIN_CC_BINARY
26874 do
26875   # Extract the first word of "$ac_prog", so it can be a program name with args.
26876 set dummy $ac_prog; ac_word=$2
26877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26878 $as_echo_n "checking for $ac_word... " >&6; }
26879 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
26880   $as_echo_n "(cached) " >&6
26881 else
26882   case $POTENTIAL_CC in
26883   [\\/]* | ?:[\\/]*)
26884   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
26885   ;;
26886   *)
26887   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26888 for as_dir in $PATH
26889 do
26890   IFS=$as_save_IFS
26891   test -z "$as_dir" && as_dir=.
26892     for ac_exec_ext in '' $ac_executable_extensions; do
26893   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26894     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
26895     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26896     break 2
26897   fi
26898 done
26899   done
26900 IFS=$as_save_IFS
26901 
26902   ;;
26903 esac
26904 fi
26905 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
26906 if test -n "$POTENTIAL_CC"; then
26907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
26908 $as_echo "$POTENTIAL_CC" >&6; }
26909 else
26910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26911 $as_echo "no" >&6; }
26912 fi
26913 
26914 
26915   test -n "$POTENTIAL_CC" && break
26916 done
26917 
26918       CC=$POTENTIAL_CC
26919     fi
26920 
26921     if test "x$CC" = x; then
26922 
26923   # Print a helpful message on how to acquire the necessary build dependency.
26924   # devkit is the help tag: freetype, cups, pulse, alsa etc
26925   MISSING_DEPENDENCY=devkit
26926 
26927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26928     cygwin_help $MISSING_DEPENDENCY
26929   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26930     msys_help $MISSING_DEPENDENCY
26931   else
26932     PKGHANDLER_COMMAND=
26933 
26934     case $PKGHANDLER in
26935       apt-get)
26936         apt_help     $MISSING_DEPENDENCY ;;
26937       yum)
26938         yum_help     $MISSING_DEPENDENCY ;;
26939       port)
26940         port_help    $MISSING_DEPENDENCY ;;
26941       pkgutil)
26942         pkgutil_help $MISSING_DEPENDENCY ;;
26943       pkgadd)
26944         pkgadd_help  $MISSING_DEPENDENCY ;;
26945     esac
26946 
26947     if test "x$PKGHANDLER_COMMAND" != x; then
26948       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
26949     fi
26950   fi
26951 
26952       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
26953     fi
26954   fi
26955 
26956   # Now we have a compiler binary in CC. Make sure it's okay.
26957 
26958   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26959 
26960   # First separate the path from the arguments. This will split at the first
26961   # space.
26962   complete="$CC"
26963   path="${complete%% *}"
26964   tmp="$complete EOL"
26965   arguments="${tmp#* }"
26966 
26967   # Input might be given as Windows format, start by converting to
26968   # unix format.
26969   new_path=`$CYGPATH -u "$path"`
26970 
26971   # Now try to locate executable using which
26972   new_path=`$WHICH "$new_path" 2> /dev/null`
26973   # bat and cmd files are not always considered executable in cygwin causing which
26974   # to not find them
26975   if test "x$new_path" = x \
26976       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26977       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26978     new_path=`$CYGPATH -u "$path"`
26979   fi
26980   if test "x$new_path" = x; then
26981     # Oops. Which didn't find the executable.
26982     # The splitting of arguments from the executable at a space might have been incorrect,
26983     # since paths with space are more likely in Windows. Give it another try with the whole
26984     # argument.
26985     path="$complete"
26986     arguments="EOL"
26987     new_path=`$CYGPATH -u "$path"`
26988     new_path=`$WHICH "$new_path" 2> /dev/null`
26989     # bat and cmd files are not always considered executable in cygwin causing which
26990     # to not find them
26991     if test "x$new_path" = x \
26992         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26993         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26994       new_path=`$CYGPATH -u "$path"`
26995     fi
26996     if test "x$new_path" = x; then
26997       # It's still not found. Now this is an unrecoverable error.
26998       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
26999 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27000       has_space=`$ECHO "$complete" | $GREP " "`
27001       if test "x$has_space" != x; then
27002         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27003 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27004       fi
27005       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27006     fi
27007   fi
27008 
27009   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27010   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27011   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27012   # "foo.exe" is OK but "foo" is an error.
27013   #
27014   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27015   # It is also a way to make sure we got the proper file name for the real test later on.
27016   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27017   if test "x$test_shortpath" = x; then
27018     # Short path failed, file does not exist as specified.
27019     # Try adding .exe or .cmd
27020     if test -f "${new_path}.exe"; then
27021       input_to_shortpath="${new_path}.exe"
27022     elif test -f "${new_path}.cmd"; then
27023       input_to_shortpath="${new_path}.cmd"
27024     else
27025       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27026 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27027       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27028 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27029       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27030     fi
27031   else
27032     input_to_shortpath="$new_path"
27033   fi
27034 
27035   # Call helper function which possibly converts this using DOS-style short mode.
27036   # If so, the updated path is stored in $new_path.
27037   new_path="$input_to_shortpath"
27038 
27039   input_path="$input_to_shortpath"
27040   # Check if we need to convert this using DOS-style short mode. If the path
27041   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27042   # take no chances and rewrite it.
27043   # Note: m4 eats our [], so we need to use [ and ] instead.
27044   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27045   if test "x$has_forbidden_chars" != x; then
27046     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27047     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27048     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27049     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27050       # Going to short mode and back again did indeed matter. Since short mode is
27051       # case insensitive, let's make it lowercase to improve readability.
27052       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27053       # Now convert it back to Unix-style (cygpath)
27054       input_path=`$CYGPATH -u "$shortmode_path"`
27055       new_path="$input_path"
27056     fi
27057   fi
27058 
27059   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27060   if test "x$test_cygdrive_prefix" = x; then
27061     # As a simple fix, exclude /usr/bin since it's not a real path.
27062     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27063       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27064       # a path prefixed by /cygdrive for fixpath to work.
27065       new_path="$CYGWIN_ROOT_PATH$input_path"
27066     fi
27067   fi
27068 
27069   # remove trailing .exe if any
27070   new_path="${new_path/%.exe/}"
27071 
27072   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27073 
27074   # First separate the path from the arguments. This will split at the first
27075   # space.
27076   complete="$CC"
27077   path="${complete%% *}"
27078   tmp="$complete EOL"
27079   arguments="${tmp#* }"
27080 
27081   # Input might be given as Windows format, start by converting to
27082   # unix format.
27083   new_path="$path"
27084 
27085   windows_path="$new_path"
27086   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27087     unix_path=`$CYGPATH -u "$windows_path"`
27088     new_path="$unix_path"
27089   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27090     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27091     new_path="$unix_path"
27092   fi
27093 
27094 
27095   # Now try to locate executable using which
27096   new_path=`$WHICH "$new_path" 2> /dev/null`
27097 
27098   if test "x$new_path" = x; then
27099     # Oops. Which didn't find the executable.
27100     # The splitting of arguments from the executable at a space might have been incorrect,
27101     # since paths with space are more likely in Windows. Give it another try with the whole
27102     # argument.
27103     path="$complete"
27104     arguments="EOL"
27105     new_path="$path"
27106 
27107   windows_path="$new_path"
27108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27109     unix_path=`$CYGPATH -u "$windows_path"`
27110     new_path="$unix_path"
27111   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27112     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27113     new_path="$unix_path"
27114   fi
27115 
27116 
27117     new_path=`$WHICH "$new_path" 2> /dev/null`
27118     # bat and cmd files are not always considered executable in MSYS causing which
27119     # to not find them
27120     if test "x$new_path" = x \
27121         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27122         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27123       new_path="$path"
27124 
27125   windows_path="$new_path"
27126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27127     unix_path=`$CYGPATH -u "$windows_path"`
27128     new_path="$unix_path"
27129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27130     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27131     new_path="$unix_path"
27132   fi
27133 
27134     fi
27135 
27136     if test "x$new_path" = x; then
27137       # It's still not found. Now this is an unrecoverable error.
27138       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27139 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27140       has_space=`$ECHO "$complete" | $GREP " "`
27141       if test "x$has_space" != x; then
27142         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27143 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27144       fi
27145       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27146     fi
27147   fi
27148 
27149   # Now new_path has a complete unix path to the binary
27150   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27151     # Keep paths in /bin as-is, but remove trailing .exe if any
27152     new_path="${new_path/%.exe/}"
27153     # Do not save /bin paths to all_fixpath_prefixes!
27154   else
27155     # Not in mixed or Windows style, start by that.
27156     new_path=`cmd //c echo $new_path`
27157 
27158   input_path="$new_path"
27159   # Check if we need to convert this using DOS-style short mode. If the path
27160   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27161   # take no chances and rewrite it.
27162   # Note: m4 eats our [], so we need to use [ and ] instead.
27163   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27164   if test "x$has_forbidden_chars" != x; then
27165     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27166     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27167   fi
27168 
27169     # Output is in $new_path
27170 
27171   windows_path="$new_path"
27172   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27173     unix_path=`$CYGPATH -u "$windows_path"`
27174     new_path="$unix_path"
27175   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27176     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27177     new_path="$unix_path"
27178   fi
27179 
27180     # remove trailing .exe if any
27181     new_path="${new_path/%.exe/}"
27182 
27183     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27184     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27185   fi
27186 
27187   else
27188     # We're on a posix platform. Hooray! :)
27189     # First separate the path from the arguments. This will split at the first
27190     # space.
27191     complete="$CC"
27192     path="${complete%% *}"
27193     tmp="$complete EOL"
27194     arguments="${tmp#* }"
27195 
27196     # Cannot rely on the command "which" here since it doesn't always work.
27197     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27198     if test -z "$is_absolute_path"; then
27199       # Path to executable is not absolute. Find it.
27200       IFS_save="$IFS"
27201       IFS=:
27202       for p in $PATH; do
27203         if test -f "$p/$path" && test -x "$p/$path"; then
27204           new_path="$p/$path"
27205           break
27206         fi
27207       done
27208       IFS="$IFS_save"
27209     else
27210       # This is an absolute path, we can use it without further modifications.
27211       new_path="$path"
27212     fi
27213 
27214     if test "x$new_path" = x; then
27215       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27216 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27217       has_space=`$ECHO "$complete" | $GREP " "`
27218       if test "x$has_space" != x; then
27219         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27220 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27221       fi
27222       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27223     fi
27224   fi
27225 
27226   # Now join together the path and the arguments once again
27227   if test "x$arguments" != xEOL; then
27228     new_complete="$new_path ${arguments% *}"
27229   else
27230     new_complete="$new_path"
27231   fi
27232 
27233   if test "x$complete" != "x$new_complete"; then
27234     CC="$new_complete"
27235     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
27236 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
27237   fi
27238 
27239   TEST_COMPILER="$CC"
27240 
27241   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
27242 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
27243   SYMLINK_ORIGINAL="$TEST_COMPILER"
27244 
27245   if test "x$OPENJDK_BUILD_OS" != xwindows; then
27246     # Follow a chain of symbolic links. Use readlink
27247     # where it exists, else fall back to horribly
27248     # complicated shell code.
27249     if test "x$READLINK_TESTED" != yes; then
27250       # On MacOSX there is a readlink tool with a different
27251       # purpose than the GNU readlink tool. Check the found readlink.
27252       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27253       if test "x$ISGNU" = x; then
27254         # A readlink that we do not know how to use.
27255         # Are there other non-GNU readlinks out there?
27256         READLINK_TESTED=yes
27257         READLINK=
27258       fi
27259     fi
27260 
27261     if test "x$READLINK" != x; then
27262       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
27263     else
27264       # Save the current directory for restoring afterwards
27265       STARTDIR=$PWD
27266       COUNTER=0
27267       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
27268       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
27269       cd $sym_link_dir
27270       # Use -P flag to resolve symlinks in directories.
27271       cd `$THEPWDCMD -P`
27272       sym_link_dir=`$THEPWDCMD -P`
27273       # Resolve file symlinks
27274       while test $COUNTER -lt 20; do
27275         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27276         if test "x$ISLINK" == x; then
27277           # This is not a symbolic link! We are done!
27278           break
27279         fi
27280         # Again resolve directory symlinks since the target of the just found
27281         # link could be in a different directory
27282         cd `$DIRNAME $ISLINK`
27283         sym_link_dir=`$THEPWDCMD -P`
27284         sym_link_file=`$BASENAME $ISLINK`
27285         let COUNTER=COUNTER+1
27286       done
27287       cd $STARTDIR
27288       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
27289     fi
27290   fi
27291 
27292   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
27293     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
27294 $as_echo "no symlink" >&6; }
27295   else
27296     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
27297 $as_echo "$SYMLINK_ORIGINAL" >&6; }
27298     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
27299 $as_echo_n "checking if CC is disguised ccache... " >&6; }
27300     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
27301     if test "x$COMPILER_BASENAME" = "xccache"; then
27302       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
27303 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
27304       # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
27305       # We want to control ccache invocation ourselves, so ignore this cc and try
27306       # searching again.
27307 
27308       # Remove the path to the fake ccache cc from the PATH
27309       RETRY_COMPILER_SAVED_PATH="$PATH"
27310       COMPILER_DIRNAME=`$DIRNAME $CC`
27311       PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
27312       # Try again looking for our compiler
27313       if test -n "$ac_tool_prefix"; then
27314   for ac_prog in $TOOLCHAIN_CC_BINARY
27315   do
27316     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27317 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27319 $as_echo_n "checking for $ac_word... " >&6; }
27320 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
27321   $as_echo_n "(cached) " >&6
27322 else
27323   if test -n "$PROPER_COMPILER_CC"; then
27324   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
27325 else
27326 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27327 for as_dir in $PATH
27328 do
27329   IFS=$as_save_IFS
27330   test -z "$as_dir" && as_dir=.
27331     for ac_exec_ext in '' $ac_executable_extensions; do
27332   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27333     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
27334     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27335     break 2
27336   fi
27337 done
27338   done
27339 IFS=$as_save_IFS
27340 
27341 fi
27342 fi
27343 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
27344 if test -n "$PROPER_COMPILER_CC"; then
27345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
27346 $as_echo "$PROPER_COMPILER_CC" >&6; }
27347 else
27348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27349 $as_echo "no" >&6; }
27350 fi
27351 
27352 
27353     test -n "$PROPER_COMPILER_CC" && break
27354   done
27355 fi
27356 if test -z "$PROPER_COMPILER_CC"; then
27357   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
27358   for ac_prog in $TOOLCHAIN_CC_BINARY
27359 do
27360   # Extract the first word of "$ac_prog", so it can be a program name with args.
27361 set dummy $ac_prog; ac_word=$2
27362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27363 $as_echo_n "checking for $ac_word... " >&6; }
27364 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
27365   $as_echo_n "(cached) " >&6
27366 else
27367   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
27368   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
27369 else
27370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27371 for as_dir in $PATH
27372 do
27373   IFS=$as_save_IFS
27374   test -z "$as_dir" && as_dir=.
27375     for ac_exec_ext in '' $ac_executable_extensions; do
27376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27377     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
27378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27379     break 2
27380   fi
27381 done
27382   done
27383 IFS=$as_save_IFS
27384 
27385 fi
27386 fi
27387 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
27388 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
27389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
27390 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
27391 else
27392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27393 $as_echo "no" >&6; }
27394 fi
27395 
27396 
27397   test -n "$ac_ct_PROPER_COMPILER_CC" && break
27398 done
27399 
27400   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
27401     PROPER_COMPILER_CC=""
27402   else
27403     case $cross_compiling:$ac_tool_warned in
27404 yes:)
27405 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27406 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27407 ac_tool_warned=yes ;;
27408 esac
27409     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
27410   fi
27411 fi
27412 
27413 
27414   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27415 
27416   # First separate the path from the arguments. This will split at the first
27417   # space.
27418   complete="$PROPER_COMPILER_CC"
27419   path="${complete%% *}"
27420   tmp="$complete EOL"
27421   arguments="${tmp#* }"
27422 
27423   # Input might be given as Windows format, start by converting to
27424   # unix format.
27425   new_path=`$CYGPATH -u "$path"`
27426 
27427   # Now try to locate executable using which
27428   new_path=`$WHICH "$new_path" 2> /dev/null`
27429   # bat and cmd files are not always considered executable in cygwin causing which
27430   # to not find them
27431   if test "x$new_path" = x \
27432       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27433       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27434     new_path=`$CYGPATH -u "$path"`
27435   fi
27436   if test "x$new_path" = x; then
27437     # Oops. Which didn't find the executable.
27438     # The splitting of arguments from the executable at a space might have been incorrect,
27439     # since paths with space are more likely in Windows. Give it another try with the whole
27440     # argument.
27441     path="$complete"
27442     arguments="EOL"
27443     new_path=`$CYGPATH -u "$path"`
27444     new_path=`$WHICH "$new_path" 2> /dev/null`
27445     # bat and cmd files are not always considered executable in cygwin causing which
27446     # to not find them
27447     if test "x$new_path" = x \
27448         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27449         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27450       new_path=`$CYGPATH -u "$path"`
27451     fi
27452     if test "x$new_path" = x; then
27453       # It's still not found. Now this is an unrecoverable error.
27454       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
27455 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
27456       has_space=`$ECHO "$complete" | $GREP " "`
27457       if test "x$has_space" != x; then
27458         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27459 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27460       fi
27461       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27462     fi
27463   fi
27464 
27465   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27466   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27467   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27468   # "foo.exe" is OK but "foo" is an error.
27469   #
27470   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27471   # It is also a way to make sure we got the proper file name for the real test later on.
27472   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27473   if test "x$test_shortpath" = x; then
27474     # Short path failed, file does not exist as specified.
27475     # Try adding .exe or .cmd
27476     if test -f "${new_path}.exe"; then
27477       input_to_shortpath="${new_path}.exe"
27478     elif test -f "${new_path}.cmd"; then
27479       input_to_shortpath="${new_path}.cmd"
27480     else
27481       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
27482 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
27483       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27484 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27485       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27486     fi
27487   else
27488     input_to_shortpath="$new_path"
27489   fi
27490 
27491   # Call helper function which possibly converts this using DOS-style short mode.
27492   # If so, the updated path is stored in $new_path.
27493   new_path="$input_to_shortpath"
27494 
27495   input_path="$input_to_shortpath"
27496   # Check if we need to convert this using DOS-style short mode. If the path
27497   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27498   # take no chances and rewrite it.
27499   # Note: m4 eats our [], so we need to use [ and ] instead.
27500   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27501   if test "x$has_forbidden_chars" != x; then
27502     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27503     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27504     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27505     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27506       # Going to short mode and back again did indeed matter. Since short mode is
27507       # case insensitive, let's make it lowercase to improve readability.
27508       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27509       # Now convert it back to Unix-style (cygpath)
27510       input_path=`$CYGPATH -u "$shortmode_path"`
27511       new_path="$input_path"
27512     fi
27513   fi
27514 
27515   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27516   if test "x$test_cygdrive_prefix" = x; then
27517     # As a simple fix, exclude /usr/bin since it's not a real path.
27518     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27519       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27520       # a path prefixed by /cygdrive for fixpath to work.
27521       new_path="$CYGWIN_ROOT_PATH$input_path"
27522     fi
27523   fi
27524 
27525   # remove trailing .exe if any
27526   new_path="${new_path/%.exe/}"
27527 
27528   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27529 
27530   # First separate the path from the arguments. This will split at the first
27531   # space.
27532   complete="$PROPER_COMPILER_CC"
27533   path="${complete%% *}"
27534   tmp="$complete EOL"
27535   arguments="${tmp#* }"
27536 
27537   # Input might be given as Windows format, start by converting to
27538   # unix format.
27539   new_path="$path"
27540 
27541   windows_path="$new_path"
27542   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27543     unix_path=`$CYGPATH -u "$windows_path"`
27544     new_path="$unix_path"
27545   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27546     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27547     new_path="$unix_path"
27548   fi
27549 
27550 
27551   # Now try to locate executable using which
27552   new_path=`$WHICH "$new_path" 2> /dev/null`
27553 
27554   if test "x$new_path" = x; then
27555     # Oops. Which didn't find the executable.
27556     # The splitting of arguments from the executable at a space might have been incorrect,
27557     # since paths with space are more likely in Windows. Give it another try with the whole
27558     # argument.
27559     path="$complete"
27560     arguments="EOL"
27561     new_path="$path"
27562 
27563   windows_path="$new_path"
27564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27565     unix_path=`$CYGPATH -u "$windows_path"`
27566     new_path="$unix_path"
27567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27568     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27569     new_path="$unix_path"
27570   fi
27571 
27572 
27573     new_path=`$WHICH "$new_path" 2> /dev/null`
27574     # bat and cmd files are not always considered executable in MSYS causing which
27575     # to not find them
27576     if test "x$new_path" = x \
27577         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27578         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27579       new_path="$path"
27580 
27581   windows_path="$new_path"
27582   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27583     unix_path=`$CYGPATH -u "$windows_path"`
27584     new_path="$unix_path"
27585   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27586     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27587     new_path="$unix_path"
27588   fi
27589 
27590     fi
27591 
27592     if test "x$new_path" = x; then
27593       # It's still not found. Now this is an unrecoverable error.
27594       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
27595 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
27596       has_space=`$ECHO "$complete" | $GREP " "`
27597       if test "x$has_space" != x; then
27598         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27599 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27600       fi
27601       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27602     fi
27603   fi
27604 
27605   # Now new_path has a complete unix path to the binary
27606   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27607     # Keep paths in /bin as-is, but remove trailing .exe if any
27608     new_path="${new_path/%.exe/}"
27609     # Do not save /bin paths to all_fixpath_prefixes!
27610   else
27611     # Not in mixed or Windows style, start by that.
27612     new_path=`cmd //c echo $new_path`
27613 
27614   input_path="$new_path"
27615   # Check if we need to convert this using DOS-style short mode. If the path
27616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27617   # take no chances and rewrite it.
27618   # Note: m4 eats our [], so we need to use [ and ] instead.
27619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27620   if test "x$has_forbidden_chars" != x; then
27621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27622     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27623   fi
27624 
27625     # Output is in $new_path
27626 
27627   windows_path="$new_path"
27628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27629     unix_path=`$CYGPATH -u "$windows_path"`
27630     new_path="$unix_path"
27631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27632     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27633     new_path="$unix_path"
27634   fi
27635 
27636     # remove trailing .exe if any
27637     new_path="${new_path/%.exe/}"
27638 
27639     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27640     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27641   fi
27642 
27643   else
27644     # We're on a posix platform. Hooray! :)
27645     # First separate the path from the arguments. This will split at the first
27646     # space.
27647     complete="$PROPER_COMPILER_CC"
27648     path="${complete%% *}"
27649     tmp="$complete EOL"
27650     arguments="${tmp#* }"
27651 
27652     # Cannot rely on the command "which" here since it doesn't always work.
27653     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27654     if test -z "$is_absolute_path"; then
27655       # Path to executable is not absolute. Find it.
27656       IFS_save="$IFS"
27657       IFS=:
27658       for p in $PATH; do
27659         if test -f "$p/$path" && test -x "$p/$path"; then
27660           new_path="$p/$path"
27661           break
27662         fi
27663       done
27664       IFS="$IFS_save"
27665     else
27666       # This is an absolute path, we can use it without further modifications.
27667       new_path="$path"
27668     fi
27669 
27670     if test "x$new_path" = x; then
27671       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
27672 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
27673       has_space=`$ECHO "$complete" | $GREP " "`
27674       if test "x$has_space" != x; then
27675         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27676 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27677       fi
27678       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27679     fi
27680   fi
27681 
27682   # Now join together the path and the arguments once again
27683   if test "x$arguments" != xEOL; then
27684     new_complete="$new_path ${arguments% *}"
27685   else
27686     new_complete="$new_path"
27687   fi
27688 
27689   if test "x$complete" != "x$new_complete"; then
27690     PROPER_COMPILER_CC="$new_complete"
27691     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
27692 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
27693   fi
27694 
27695       PATH="$RETRY_COMPILER_SAVED_PATH"
27696 
27697       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
27698 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
27699 
27700   if test "x$OPENJDK_BUILD_OS" != xwindows; then
27701     # Follow a chain of symbolic links. Use readlink
27702     # where it exists, else fall back to horribly
27703     # complicated shell code.
27704     if test "x$READLINK_TESTED" != yes; then
27705       # On MacOSX there is a readlink tool with a different
27706       # purpose than the GNU readlink tool. Check the found readlink.
27707       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27708       if test "x$ISGNU" = x; then
27709         # A readlink that we do not know how to use.
27710         # Are there other non-GNU readlinks out there?
27711         READLINK_TESTED=yes
27712         READLINK=
27713       fi
27714     fi
27715 
27716     if test "x$READLINK" != x; then
27717       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
27718     else
27719       # Save the current directory for restoring afterwards
27720       STARTDIR=$PWD
27721       COUNTER=0
27722       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
27723       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
27724       cd $sym_link_dir
27725       # Use -P flag to resolve symlinks in directories.
27726       cd `$THEPWDCMD -P`
27727       sym_link_dir=`$THEPWDCMD -P`
27728       # Resolve file symlinks
27729       while test $COUNTER -lt 20; do
27730         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27731         if test "x$ISLINK" == x; then
27732           # This is not a symbolic link! We are done!
27733           break
27734         fi
27735         # Again resolve directory symlinks since the target of the just found
27736         # link could be in a different directory
27737         cd `$DIRNAME $ISLINK`
27738         sym_link_dir=`$THEPWDCMD -P`
27739         sym_link_file=`$BASENAME $ISLINK`
27740         let COUNTER=COUNTER+1
27741       done
27742       cd $STARTDIR
27743       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
27744     fi
27745   fi
27746 
27747       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
27748 $as_echo "$PROPER_COMPILER_CC" >&6; }
27749       CC="$PROPER_COMPILER_CC"
27750     else
27751       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
27752 $as_echo "no, keeping CC" >&6; }
27753     fi
27754   fi
27755 
27756 
27757   COMPILER=$CC
27758   COMPILER_NAME=$COMPILER_NAME
27759 
27760   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
27761     # cc -V output typically looks like
27762     #     cc: Sun C 5.12 Linux_i386 2011/11/16
27763     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
27764     # Check that this is likely to be the Solaris Studio cc.
27765     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
27766     if test $? -ne 0; then
27767       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
27768       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
27769 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27770       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
27771 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
27772       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
27773 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
27774       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27775     fi
27776     # Remove usage instructions (if present), and
27777     # collapse compiler output into a single line
27778     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
27779         $SED -e 's/ *[Uu]sage:.*//'`
27780     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27781         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
27782   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
27783     # xlc -qversion output typically looks like
27784     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
27785     #     Version: 11.01.0000.0015
27786     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
27787     # Check that this is likely to be the IBM XL C compiler.
27788     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
27789     if test $? -ne 0; then
27790       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
27791       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
27792 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27793       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
27794 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
27795       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
27796 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
27797       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27798     fi
27799     # Collapse compiler output into a single line
27800     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
27801     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27802         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
27803   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
27804     # There is no specific version flag, but all output starts with a version string.
27805     # First line typically looks something like:
27806     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
27807     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
27808     # Check that this is likely to be Microsoft CL.EXE.
27809     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
27810     if test $? -ne 0; then
27811       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
27812 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27813       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
27814 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
27815       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27816     fi
27817     # Collapse compiler output into a single line
27818     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
27819     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27820         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
27821   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
27822     # gcc --version output typically looks like
27823     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
27824     #     Copyright (C) 2013 Free Software Foundation, Inc.
27825     #     This is free software; see the source for copying conditions.  There is NO
27826     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27827     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
27828     # Check that this is likely to be GCC.
27829     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
27830     if test $? -ne 0; then
27831       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
27832 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27833       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
27834 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
27835       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27836     fi
27837     # Remove Copyright and legalese from version string, and
27838     # collapse into a single line
27839     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
27840         $SED -e 's/ *Copyright .*//'`
27841     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27842         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
27843   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
27844     # clang --version output typically looks like
27845     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
27846     #    clang version 3.3 (tags/RELEASE_33/final)
27847     # or
27848     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
27849     #    Target: x86_64-pc-linux-gnu
27850     #    Thread model: posix
27851     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
27852     # Check that this is likely to be clang
27853     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
27854     if test $? -ne 0; then
27855       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
27856 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27857       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
27858 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
27859       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27860     fi
27861     # Collapse compiler output into a single line
27862     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
27863     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27864         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
27865 
27866   else
27867       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
27868   fi
27869   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
27870   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
27871   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
27872   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
27873 
27874   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
27875 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
27876 
27877 
27878   # Now that we have resolved CC ourself, let autoconf have its go at it
27879   ac_ext=c
27880 ac_cpp='$CPP $CPPFLAGS'
27881 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27882 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27883 ac_compiler_gnu=$ac_cv_c_compiler_gnu
27884 if test -n "$ac_tool_prefix"; then
27885   for ac_prog in $CC
27886   do
27887     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27888 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27890 $as_echo_n "checking for $ac_word... " >&6; }
27891 if ${ac_cv_prog_CC+:} false; then :
27892   $as_echo_n "(cached) " >&6
27893 else
27894   if test -n "$CC"; then
27895   ac_cv_prog_CC="$CC" # Let the user override the test.
27896 else
27897 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27898 for as_dir in $PATH
27899 do
27900   IFS=$as_save_IFS
27901   test -z "$as_dir" && as_dir=.
27902     for ac_exec_ext in '' $ac_executable_extensions; do
27903   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27904     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
27905     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27906     break 2
27907   fi
27908 done
27909   done
27910 IFS=$as_save_IFS
27911 
27912 fi
27913 fi
27914 CC=$ac_cv_prog_CC
27915 if test -n "$CC"; then
27916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
27917 $as_echo "$CC" >&6; }
27918 else
27919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27920 $as_echo "no" >&6; }
27921 fi
27922 
27923 
27924     test -n "$CC" && break
27925   done
27926 fi
27927 if test -z "$CC"; then
27928   ac_ct_CC=$CC
27929   for ac_prog in $CC
27930 do
27931   # Extract the first word of "$ac_prog", so it can be a program name with args.
27932 set dummy $ac_prog; ac_word=$2
27933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27934 $as_echo_n "checking for $ac_word... " >&6; }
27935 if ${ac_cv_prog_ac_ct_CC+:} false; then :
27936   $as_echo_n "(cached) " >&6
27937 else
27938   if test -n "$ac_ct_CC"; then
27939   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
27940 else
27941 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27942 for as_dir in $PATH
27943 do
27944   IFS=$as_save_IFS
27945   test -z "$as_dir" && as_dir=.
27946     for ac_exec_ext in '' $ac_executable_extensions; do
27947   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27948     ac_cv_prog_ac_ct_CC="$ac_prog"
27949     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27950     break 2
27951   fi
27952 done
27953   done
27954 IFS=$as_save_IFS
27955 
27956 fi
27957 fi
27958 ac_ct_CC=$ac_cv_prog_ac_ct_CC
27959 if test -n "$ac_ct_CC"; then
27960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
27961 $as_echo "$ac_ct_CC" >&6; }
27962 else
27963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27964 $as_echo "no" >&6; }
27965 fi
27966 
27967 
27968   test -n "$ac_ct_CC" && break
27969 done
27970 
27971   if test "x$ac_ct_CC" = x; then
27972     CC=""
27973   else
27974     case $cross_compiling:$ac_tool_warned in
27975 yes:)
27976 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27977 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27978 ac_tool_warned=yes ;;
27979 esac
27980     CC=$ac_ct_CC
27981   fi
27982 fi
27983 
27984 
27985 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27986 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27987 as_fn_error $? "no acceptable C compiler found in \$PATH
27988 See \`config.log' for more details" "$LINENO" 5; }
27989 
27990 # Provide some information about the compiler.
27991 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
27992 set X $ac_compile
27993 ac_compiler=$2
27994 for ac_option in --version -v -V -qversion; do
27995   { { ac_try="$ac_compiler $ac_option >&5"
27996 case "(($ac_try" in
27997   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27998   *) ac_try_echo=$ac_try;;
27999 esac
28000 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28001 $as_echo "$ac_try_echo"; } >&5
28002   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28003   ac_status=$?
28004   if test -s conftest.err; then
28005     sed '10a\
28006 ... rest of stderr output deleted ...
28007          10q' conftest.err >conftest.er1
28008     cat conftest.er1 >&5
28009   fi
28010   rm -f conftest.er1 conftest.err
28011   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28012   test $ac_status = 0; }
28013 done
28014 
28015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28016 /* end confdefs.h.  */
28017 
28018 int
28019 main ()
28020 {
28021 
28022   ;
28023   return 0;
28024 }
28025 _ACEOF
28026 ac_clean_files_save=$ac_clean_files
28027 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28028 # Try to create an executable without -o first, disregard a.out.
28029 # It will help us diagnose broken compilers, and finding out an intuition
28030 # of exeext.
28031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28032 $as_echo_n "checking whether the C compiler works... " >&6; }
28033 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28034 
28035 # The possible output files:
28036 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28037 
28038 ac_rmfiles=
28039 for ac_file in $ac_files
28040 do
28041   case $ac_file in
28042     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28043     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28044   esac
28045 done
28046 rm -f $ac_rmfiles
28047 
28048 if { { ac_try="$ac_link_default"
28049 case "(($ac_try" in
28050   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28051   *) ac_try_echo=$ac_try;;
28052 esac
28053 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28054 $as_echo "$ac_try_echo"; } >&5
28055   (eval "$ac_link_default") 2>&5
28056   ac_status=$?
28057   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28058   test $ac_status = 0; }; then :
28059   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28060 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28061 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
28062 # so that the user can short-circuit this test for compilers unknown to
28063 # Autoconf.
28064 for ac_file in $ac_files ''
28065 do
28066   test -f "$ac_file" || continue
28067   case $ac_file in
28068     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28069         ;;
28070     [ab].out )
28071         # We found the default executable, but exeext='' is most
28072         # certainly right.
28073         break;;
28074     *.* )
28075         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28076         then :; else
28077            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28078         fi
28079         # We set ac_cv_exeext here because the later test for it is not
28080         # safe: cross compilers may not add the suffix if given an `-o'
28081         # argument, so we may need to know it at that point already.
28082         # Even if this section looks crufty: it has the advantage of
28083         # actually working.
28084         break;;
28085     * )
28086         break;;
28087   esac
28088 done
28089 test "$ac_cv_exeext" = no && ac_cv_exeext=
28090 
28091 else
28092   ac_file=''
28093 fi
28094 if test -z "$ac_file"; then :
28095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28096 $as_echo "no" >&6; }
28097 $as_echo "$as_me: failed program was:" >&5
28098 sed 's/^/| /' conftest.$ac_ext >&5
28099 
28100 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28101 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28102 as_fn_error 77 "C compiler cannot create executables
28103 See \`config.log' for more details" "$LINENO" 5; }
28104 else
28105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28106 $as_echo "yes" >&6; }
28107 fi
28108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28109 $as_echo_n "checking for C compiler default output file name... " >&6; }
28110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28111 $as_echo "$ac_file" >&6; }
28112 ac_exeext=$ac_cv_exeext
28113 
28114 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28115 ac_clean_files=$ac_clean_files_save
28116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28117 $as_echo_n "checking for suffix of executables... " >&6; }
28118 if { { ac_try="$ac_link"
28119 case "(($ac_try" in
28120   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28121   *) ac_try_echo=$ac_try;;
28122 esac
28123 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28124 $as_echo "$ac_try_echo"; } >&5
28125   (eval "$ac_link") 2>&5
28126   ac_status=$?
28127   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28128   test $ac_status = 0; }; then :
28129   # If both `conftest.exe' and `conftest' are `present' (well, observable)
28130 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28131 # work properly (i.e., refer to `conftest.exe'), while it won't with
28132 # `rm'.
28133 for ac_file in conftest.exe conftest conftest.*; do
28134   test -f "$ac_file" || continue
28135   case $ac_file in
28136     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28137     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28138           break;;
28139     * ) break;;
28140   esac
28141 done
28142 else
28143   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28144 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28145 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28146 See \`config.log' for more details" "$LINENO" 5; }
28147 fi
28148 rm -f conftest conftest$ac_cv_exeext
28149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28150 $as_echo "$ac_cv_exeext" >&6; }
28151 
28152 rm -f conftest.$ac_ext
28153 EXEEXT=$ac_cv_exeext
28154 ac_exeext=$EXEEXT
28155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28156 /* end confdefs.h.  */
28157 #include <stdio.h>
28158 int
28159 main ()
28160 {
28161 FILE *f = fopen ("conftest.out", "w");
28162  return ferror (f) || fclose (f) != 0;
28163 
28164   ;
28165   return 0;
28166 }
28167 _ACEOF
28168 ac_clean_files="$ac_clean_files conftest.out"
28169 # Check that the compiler produces executables we can run.  If not, either
28170 # the compiler is broken, or we cross compile.
28171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28172 $as_echo_n "checking whether we are cross compiling... " >&6; }
28173 if test "$cross_compiling" != yes; then
28174   { { ac_try="$ac_link"
28175 case "(($ac_try" in
28176   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28177   *) ac_try_echo=$ac_try;;
28178 esac
28179 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28180 $as_echo "$ac_try_echo"; } >&5
28181   (eval "$ac_link") 2>&5
28182   ac_status=$?
28183   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28184   test $ac_status = 0; }
28185   if { ac_try='./conftest$ac_cv_exeext'
28186   { { case "(($ac_try" in
28187   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28188   *) ac_try_echo=$ac_try;;
28189 esac
28190 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28191 $as_echo "$ac_try_echo"; } >&5
28192   (eval "$ac_try") 2>&5
28193   ac_status=$?
28194   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28195   test $ac_status = 0; }; }; then
28196     cross_compiling=no
28197   else
28198     if test "$cross_compiling" = maybe; then
28199         cross_compiling=yes
28200     else
28201         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28202 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28203 as_fn_error $? "cannot run C compiled programs.
28204 If you meant to cross compile, use \`--host'.
28205 See \`config.log' for more details" "$LINENO" 5; }
28206     fi
28207   fi
28208 fi
28209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28210 $as_echo "$cross_compiling" >&6; }
28211 
28212 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28213 ac_clean_files=$ac_clean_files_save
28214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28215 $as_echo_n "checking for suffix of object files... " >&6; }
28216 if ${ac_cv_objext+:} false; then :
28217   $as_echo_n "(cached) " >&6
28218 else
28219   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28220 /* end confdefs.h.  */
28221 
28222 int
28223 main ()
28224 {
28225 
28226   ;
28227   return 0;
28228 }
28229 _ACEOF
28230 rm -f conftest.o conftest.obj
28231 if { { ac_try="$ac_compile"
28232 case "(($ac_try" in
28233   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28234   *) ac_try_echo=$ac_try;;
28235 esac
28236 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28237 $as_echo "$ac_try_echo"; } >&5
28238   (eval "$ac_compile") 2>&5
28239   ac_status=$?
28240   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28241   test $ac_status = 0; }; then :
28242   for ac_file in conftest.o conftest.obj conftest.*; do
28243   test -f "$ac_file" || continue;
28244   case $ac_file in
28245     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28246     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28247        break;;
28248   esac
28249 done
28250 else
28251   $as_echo "$as_me: failed program was:" >&5
28252 sed 's/^/| /' conftest.$ac_ext >&5
28253 
28254 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28255 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28256 as_fn_error $? "cannot compute suffix of object files: cannot compile
28257 See \`config.log' for more details" "$LINENO" 5; }
28258 fi
28259 rm -f conftest.$ac_cv_objext conftest.$ac_ext
28260 fi
28261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
28262 $as_echo "$ac_cv_objext" >&6; }
28263 OBJEXT=$ac_cv_objext
28264 ac_objext=$OBJEXT
28265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
28266 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
28267 if ${ac_cv_c_compiler_gnu+:} false; then :
28268   $as_echo_n "(cached) " >&6
28269 else
28270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28271 /* end confdefs.h.  */
28272 
28273 int
28274 main ()
28275 {
28276 #ifndef __GNUC__
28277        choke me
28278 #endif
28279 
28280   ;
28281   return 0;
28282 }
28283 _ACEOF
28284 if ac_fn_c_try_compile "$LINENO"; then :
28285   ac_compiler_gnu=yes
28286 else
28287   ac_compiler_gnu=no
28288 fi
28289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28290 ac_cv_c_compiler_gnu=$ac_compiler_gnu
28291 
28292 fi
28293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
28294 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
28295 if test $ac_compiler_gnu = yes; then
28296   GCC=yes
28297 else
28298   GCC=
28299 fi
28300 ac_test_CFLAGS=${CFLAGS+set}
28301 ac_save_CFLAGS=$CFLAGS
28302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
28303 $as_echo_n "checking whether $CC accepts -g... " >&6; }
28304 if ${ac_cv_prog_cc_g+:} false; then :
28305   $as_echo_n "(cached) " >&6
28306 else
28307   ac_save_c_werror_flag=$ac_c_werror_flag
28308    ac_c_werror_flag=yes
28309    ac_cv_prog_cc_g=no
28310    CFLAGS="-g"
28311    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28312 /* end confdefs.h.  */
28313 
28314 int
28315 main ()
28316 {
28317 
28318   ;
28319   return 0;
28320 }
28321 _ACEOF
28322 if ac_fn_c_try_compile "$LINENO"; then :
28323   ac_cv_prog_cc_g=yes
28324 else
28325   CFLAGS=""
28326       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28327 /* end confdefs.h.  */
28328 
28329 int
28330 main ()
28331 {
28332 
28333   ;
28334   return 0;
28335 }
28336 _ACEOF
28337 if ac_fn_c_try_compile "$LINENO"; then :
28338 
28339 else
28340   ac_c_werror_flag=$ac_save_c_werror_flag
28341          CFLAGS="-g"
28342          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28343 /* end confdefs.h.  */
28344 
28345 int
28346 main ()
28347 {
28348 
28349   ;
28350   return 0;
28351 }
28352 _ACEOF
28353 if ac_fn_c_try_compile "$LINENO"; then :
28354   ac_cv_prog_cc_g=yes
28355 fi
28356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28357 fi
28358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28359 fi
28360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28361    ac_c_werror_flag=$ac_save_c_werror_flag
28362 fi
28363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
28364 $as_echo "$ac_cv_prog_cc_g" >&6; }
28365 if test "$ac_test_CFLAGS" = set; then
28366   CFLAGS=$ac_save_CFLAGS
28367 elif test $ac_cv_prog_cc_g = yes; then
28368   if test "$GCC" = yes; then
28369     CFLAGS="-g -O2"
28370   else
28371     CFLAGS="-g"
28372   fi
28373 else
28374   if test "$GCC" = yes; then
28375     CFLAGS="-O2"
28376   else
28377     CFLAGS=
28378   fi
28379 fi
28380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
28381 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
28382 if ${ac_cv_prog_cc_c89+:} false; then :
28383   $as_echo_n "(cached) " >&6
28384 else
28385   ac_cv_prog_cc_c89=no
28386 ac_save_CC=$CC
28387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28388 /* end confdefs.h.  */
28389 #include <stdarg.h>
28390 #include <stdio.h>
28391 struct stat;
28392 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
28393 struct buf { int x; };
28394 FILE * (*rcsopen) (struct buf *, struct stat *, int);
28395 static char *e (p, i)
28396      char **p;
28397      int i;
28398 {
28399   return p[i];
28400 }
28401 static char *f (char * (*g) (char **, int), char **p, ...)
28402 {
28403   char *s;
28404   va_list v;
28405   va_start (v,p);
28406   s = g (p, va_arg (v,int));
28407   va_end (v);
28408   return s;
28409 }
28410 
28411 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
28412    function prototypes and stuff, but not '\xHH' hex character constants.
28413    These don't provoke an error unfortunately, instead are silently treated
28414    as 'x'.  The following induces an error, until -std is added to get
28415    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
28416    array size at least.  It's necessary to write '\x00'==0 to get something
28417    that's true only with -std.  */
28418 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
28419 
28420 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
28421    inside strings and character constants.  */
28422 #define FOO(x) 'x'
28423 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
28424 
28425 int test (int i, double x);
28426 struct s1 {int (*f) (int a);};
28427 struct s2 {int (*f) (double a);};
28428 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
28429 int argc;
28430 char **argv;
28431 int
28432 main ()
28433 {
28434 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
28435   ;
28436   return 0;
28437 }
28438 _ACEOF
28439 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
28440         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
28441 do
28442   CC="$ac_save_CC $ac_arg"
28443   if ac_fn_c_try_compile "$LINENO"; then :
28444   ac_cv_prog_cc_c89=$ac_arg
28445 fi
28446 rm -f core conftest.err conftest.$ac_objext
28447   test "x$ac_cv_prog_cc_c89" != "xno" && break
28448 done
28449 rm -f conftest.$ac_ext
28450 CC=$ac_save_CC
28451 
28452 fi
28453 # AC_CACHE_VAL
28454 case "x$ac_cv_prog_cc_c89" in
28455   x)
28456     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
28457 $as_echo "none needed" >&6; } ;;
28458   xno)
28459     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
28460 $as_echo "unsupported" >&6; } ;;
28461   *)
28462     CC="$CC $ac_cv_prog_cc_c89"
28463     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
28464 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
28465 esac
28466 if test "x$ac_cv_prog_cc_c89" != xno; then :
28467 
28468 fi
28469 
28470 ac_ext=cpp
28471 ac_cpp='$CXXCPP $CPPFLAGS'
28472 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28473 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28474 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28475 
28476 
28477 
28478   COMPILER_NAME=C++
28479   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
28480 
28481   if test "x$CXX" != x; then
28482     # User has supplied compiler name already, always let that override.
28483     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
28484 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
28485     if test "x`basename $CXX`" = "x$CXX"; then
28486       # A command without a complete path is provided, search $PATH.
28487 
28488       for ac_prog in $CXX
28489 do
28490   # Extract the first word of "$ac_prog", so it can be a program name with args.
28491 set dummy $ac_prog; ac_word=$2
28492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28493 $as_echo_n "checking for $ac_word... " >&6; }
28494 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
28495   $as_echo_n "(cached) " >&6
28496 else
28497   case $POTENTIAL_CXX in
28498   [\\/]* | ?:[\\/]*)
28499   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
28500   ;;
28501   *)
28502   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28503 for as_dir in $PATH
28504 do
28505   IFS=$as_save_IFS
28506   test -z "$as_dir" && as_dir=.
28507     for ac_exec_ext in '' $ac_executable_extensions; do
28508   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28509     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
28510     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28511     break 2
28512   fi
28513 done
28514   done
28515 IFS=$as_save_IFS
28516 
28517   ;;
28518 esac
28519 fi
28520 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
28521 if test -n "$POTENTIAL_CXX"; then
28522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
28523 $as_echo "$POTENTIAL_CXX" >&6; }
28524 else
28525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28526 $as_echo "no" >&6; }
28527 fi
28528 
28529 
28530   test -n "$POTENTIAL_CXX" && break
28531 done
28532 
28533       if test "x$POTENTIAL_CXX" != x; then
28534         CXX=$POTENTIAL_CXX
28535       else
28536         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
28537       fi
28538     else
28539       # Otherwise it might already be a complete path
28540       if test ! -x "$CXX"; then
28541         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
28542       fi
28543     fi
28544   else
28545     # No user supplied value. Locate compiler ourselves.
28546 
28547     # If we are cross compiling, assume cross compilation tools follows the
28548     # cross compilation standard where they are prefixed with the autoconf
28549     # standard name for the target. For example the binary
28550     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28551     # If we are not cross compiling, then the default compiler name will be
28552     # used.
28553 
28554     CXX=
28555     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28556     # before checking the rest of the PATH.
28557     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28558     # step, this should not be necessary.
28559     if test -n "$TOOLCHAIN_PATH"; then
28560       PATH_save="$PATH"
28561       PATH="$TOOLCHAIN_PATH"
28562       for ac_prog in $SEARCH_LIST
28563 do
28564   # Extract the first word of "$ac_prog", so it can be a program name with args.
28565 set dummy $ac_prog; ac_word=$2
28566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28567 $as_echo_n "checking for $ac_word... " >&6; }
28568 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
28569   $as_echo_n "(cached) " >&6
28570 else
28571   case $TOOLCHAIN_PATH_CXX in
28572   [\\/]* | ?:[\\/]*)
28573   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
28574   ;;
28575   *)
28576   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28577 for as_dir in $PATH
28578 do
28579   IFS=$as_save_IFS
28580   test -z "$as_dir" && as_dir=.
28581     for ac_exec_ext in '' $ac_executable_extensions; do
28582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28583     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
28584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28585     break 2
28586   fi
28587 done
28588   done
28589 IFS=$as_save_IFS
28590 
28591   ;;
28592 esac
28593 fi
28594 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
28595 if test -n "$TOOLCHAIN_PATH_CXX"; then
28596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
28597 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
28598 else
28599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28600 $as_echo "no" >&6; }
28601 fi
28602 
28603 
28604   test -n "$TOOLCHAIN_PATH_CXX" && break
28605 done
28606 
28607       CXX=$TOOLCHAIN_PATH_CXX
28608       PATH="$PATH_save"
28609     fi
28610 
28611     # AC_PATH_PROGS can't be run multiple times with the same variable,
28612     # so create a new name for this run.
28613     if test "x$CXX" = x; then
28614       for ac_prog in $TOOLCHAIN_CXX_BINARY
28615 do
28616   # Extract the first word of "$ac_prog", so it can be a program name with args.
28617 set dummy $ac_prog; ac_word=$2
28618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28619 $as_echo_n "checking for $ac_word... " >&6; }
28620 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
28621   $as_echo_n "(cached) " >&6
28622 else
28623   case $POTENTIAL_CXX in
28624   [\\/]* | ?:[\\/]*)
28625   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
28626   ;;
28627   *)
28628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28629 for as_dir in $PATH
28630 do
28631   IFS=$as_save_IFS
28632   test -z "$as_dir" && as_dir=.
28633     for ac_exec_ext in '' $ac_executable_extensions; do
28634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28635     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
28636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28637     break 2
28638   fi
28639 done
28640   done
28641 IFS=$as_save_IFS
28642 
28643   ;;
28644 esac
28645 fi
28646 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
28647 if test -n "$POTENTIAL_CXX"; then
28648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
28649 $as_echo "$POTENTIAL_CXX" >&6; }
28650 else
28651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28652 $as_echo "no" >&6; }
28653 fi
28654 
28655 
28656   test -n "$POTENTIAL_CXX" && break
28657 done
28658 
28659       CXX=$POTENTIAL_CXX
28660     fi
28661 
28662     if test "x$CXX" = x; then
28663 
28664   # Print a helpful message on how to acquire the necessary build dependency.
28665   # devkit is the help tag: freetype, cups, pulse, alsa etc
28666   MISSING_DEPENDENCY=devkit
28667 
28668   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28669     cygwin_help $MISSING_DEPENDENCY
28670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28671     msys_help $MISSING_DEPENDENCY
28672   else
28673     PKGHANDLER_COMMAND=
28674 
28675     case $PKGHANDLER in
28676       apt-get)
28677         apt_help     $MISSING_DEPENDENCY ;;
28678       yum)
28679         yum_help     $MISSING_DEPENDENCY ;;
28680       port)
28681         port_help    $MISSING_DEPENDENCY ;;
28682       pkgutil)
28683         pkgutil_help $MISSING_DEPENDENCY ;;
28684       pkgadd)
28685         pkgadd_help  $MISSING_DEPENDENCY ;;
28686     esac
28687 
28688     if test "x$PKGHANDLER_COMMAND" != x; then
28689       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28690     fi
28691   fi
28692 
28693       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28694     fi
28695   fi
28696 
28697   # Now we have a compiler binary in CXX. Make sure it's okay.
28698 
28699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28700 
28701   # First separate the path from the arguments. This will split at the first
28702   # space.
28703   complete="$CXX"
28704   path="${complete%% *}"
28705   tmp="$complete EOL"
28706   arguments="${tmp#* }"
28707 
28708   # Input might be given as Windows format, start by converting to
28709   # unix format.
28710   new_path=`$CYGPATH -u "$path"`
28711 
28712   # Now try to locate executable using which
28713   new_path=`$WHICH "$new_path" 2> /dev/null`
28714   # bat and cmd files are not always considered executable in cygwin causing which
28715   # to not find them
28716   if test "x$new_path" = x \
28717       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28718       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28719     new_path=`$CYGPATH -u "$path"`
28720   fi
28721   if test "x$new_path" = x; then
28722     # Oops. Which didn't find the executable.
28723     # The splitting of arguments from the executable at a space might have been incorrect,
28724     # since paths with space are more likely in Windows. Give it another try with the whole
28725     # argument.
28726     path="$complete"
28727     arguments="EOL"
28728     new_path=`$CYGPATH -u "$path"`
28729     new_path=`$WHICH "$new_path" 2> /dev/null`
28730     # bat and cmd files are not always considered executable in cygwin causing which
28731     # to not find them
28732     if test "x$new_path" = x \
28733         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28734         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28735       new_path=`$CYGPATH -u "$path"`
28736     fi
28737     if test "x$new_path" = x; then
28738       # It's still not found. Now this is an unrecoverable error.
28739       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
28740 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
28741       has_space=`$ECHO "$complete" | $GREP " "`
28742       if test "x$has_space" != x; then
28743         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28744 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28745       fi
28746       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
28747     fi
28748   fi
28749 
28750   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28751   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28752   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28753   # "foo.exe" is OK but "foo" is an error.
28754   #
28755   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28756   # It is also a way to make sure we got the proper file name for the real test later on.
28757   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28758   if test "x$test_shortpath" = x; then
28759     # Short path failed, file does not exist as specified.
28760     # Try adding .exe or .cmd
28761     if test -f "${new_path}.exe"; then
28762       input_to_shortpath="${new_path}.exe"
28763     elif test -f "${new_path}.cmd"; then
28764       input_to_shortpath="${new_path}.cmd"
28765     else
28766       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
28767 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
28768       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28769 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28770       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
28771     fi
28772   else
28773     input_to_shortpath="$new_path"
28774   fi
28775 
28776   # Call helper function which possibly converts this using DOS-style short mode.
28777   # If so, the updated path is stored in $new_path.
28778   new_path="$input_to_shortpath"
28779 
28780   input_path="$input_to_shortpath"
28781   # Check if we need to convert this using DOS-style short mode. If the path
28782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28783   # take no chances and rewrite it.
28784   # Note: m4 eats our [], so we need to use [ and ] instead.
28785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28786   if test "x$has_forbidden_chars" != x; then
28787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28788     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28789     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28790     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28791       # Going to short mode and back again did indeed matter. Since short mode is
28792       # case insensitive, let's make it lowercase to improve readability.
28793       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28794       # Now convert it back to Unix-style (cygpath)
28795       input_path=`$CYGPATH -u "$shortmode_path"`
28796       new_path="$input_path"
28797     fi
28798   fi
28799 
28800   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28801   if test "x$test_cygdrive_prefix" = x; then
28802     # As a simple fix, exclude /usr/bin since it's not a real path.
28803     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28804       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28805       # a path prefixed by /cygdrive for fixpath to work.
28806       new_path="$CYGWIN_ROOT_PATH$input_path"
28807     fi
28808   fi
28809 
28810   # remove trailing .exe if any
28811   new_path="${new_path/%.exe/}"
28812 
28813   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28814 
28815   # First separate the path from the arguments. This will split at the first
28816   # space.
28817   complete="$CXX"
28818   path="${complete%% *}"
28819   tmp="$complete EOL"
28820   arguments="${tmp#* }"
28821 
28822   # Input might be given as Windows format, start by converting to
28823   # unix format.
28824   new_path="$path"
28825 
28826   windows_path="$new_path"
28827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28828     unix_path=`$CYGPATH -u "$windows_path"`
28829     new_path="$unix_path"
28830   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28831     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28832     new_path="$unix_path"
28833   fi
28834 
28835 
28836   # Now try to locate executable using which
28837   new_path=`$WHICH "$new_path" 2> /dev/null`
28838 
28839   if test "x$new_path" = x; then
28840     # Oops. Which didn't find the executable.
28841     # The splitting of arguments from the executable at a space might have been incorrect,
28842     # since paths with space are more likely in Windows. Give it another try with the whole
28843     # argument.
28844     path="$complete"
28845     arguments="EOL"
28846     new_path="$path"
28847 
28848   windows_path="$new_path"
28849   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28850     unix_path=`$CYGPATH -u "$windows_path"`
28851     new_path="$unix_path"
28852   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28853     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28854     new_path="$unix_path"
28855   fi
28856 
28857 
28858     new_path=`$WHICH "$new_path" 2> /dev/null`
28859     # bat and cmd files are not always considered executable in MSYS causing which
28860     # to not find them
28861     if test "x$new_path" = x \
28862         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28863         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28864       new_path="$path"
28865 
28866   windows_path="$new_path"
28867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28868     unix_path=`$CYGPATH -u "$windows_path"`
28869     new_path="$unix_path"
28870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28872     new_path="$unix_path"
28873   fi
28874 
28875     fi
28876 
28877     if test "x$new_path" = x; then
28878       # It's still not found. Now this is an unrecoverable error.
28879       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
28880 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
28881       has_space=`$ECHO "$complete" | $GREP " "`
28882       if test "x$has_space" != x; then
28883         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28884 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28885       fi
28886       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
28887     fi
28888   fi
28889 
28890   # Now new_path has a complete unix path to the binary
28891   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28892     # Keep paths in /bin as-is, but remove trailing .exe if any
28893     new_path="${new_path/%.exe/}"
28894     # Do not save /bin paths to all_fixpath_prefixes!
28895   else
28896     # Not in mixed or Windows style, start by that.
28897     new_path=`cmd //c echo $new_path`
28898 
28899   input_path="$new_path"
28900   # Check if we need to convert this using DOS-style short mode. If the path
28901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28902   # take no chances and rewrite it.
28903   # Note: m4 eats our [], so we need to use [ and ] instead.
28904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28905   if test "x$has_forbidden_chars" != x; then
28906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28907     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28908   fi
28909 
28910     # Output is in $new_path
28911 
28912   windows_path="$new_path"
28913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28914     unix_path=`$CYGPATH -u "$windows_path"`
28915     new_path="$unix_path"
28916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28918     new_path="$unix_path"
28919   fi
28920 
28921     # remove trailing .exe if any
28922     new_path="${new_path/%.exe/}"
28923 
28924     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28925     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28926   fi
28927 
28928   else
28929     # We're on a posix platform. Hooray! :)
28930     # First separate the path from the arguments. This will split at the first
28931     # space.
28932     complete="$CXX"
28933     path="${complete%% *}"
28934     tmp="$complete EOL"
28935     arguments="${tmp#* }"
28936 
28937     # Cannot rely on the command "which" here since it doesn't always work.
28938     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28939     if test -z "$is_absolute_path"; then
28940       # Path to executable is not absolute. Find it.
28941       IFS_save="$IFS"
28942       IFS=:
28943       for p in $PATH; do
28944         if test -f "$p/$path" && test -x "$p/$path"; then
28945           new_path="$p/$path"
28946           break
28947         fi
28948       done
28949       IFS="$IFS_save"
28950     else
28951       # This is an absolute path, we can use it without further modifications.
28952       new_path="$path"
28953     fi
28954 
28955     if test "x$new_path" = x; then
28956       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
28957 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
28958       has_space=`$ECHO "$complete" | $GREP " "`
28959       if test "x$has_space" != x; then
28960         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28961 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28962       fi
28963       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
28964     fi
28965   fi
28966 
28967   # Now join together the path and the arguments once again
28968   if test "x$arguments" != xEOL; then
28969     new_complete="$new_path ${arguments% *}"
28970   else
28971     new_complete="$new_path"
28972   fi
28973 
28974   if test "x$complete" != "x$new_complete"; then
28975     CXX="$new_complete"
28976     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
28977 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
28978   fi
28979 
28980   TEST_COMPILER="$CXX"
28981 
28982   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
28983 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
28984   SYMLINK_ORIGINAL="$TEST_COMPILER"
28985 
28986   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28987     # Follow a chain of symbolic links. Use readlink
28988     # where it exists, else fall back to horribly
28989     # complicated shell code.
28990     if test "x$READLINK_TESTED" != yes; then
28991       # On MacOSX there is a readlink tool with a different
28992       # purpose than the GNU readlink tool. Check the found readlink.
28993       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28994       if test "x$ISGNU" = x; then
28995         # A readlink that we do not know how to use.
28996         # Are there other non-GNU readlinks out there?
28997         READLINK_TESTED=yes
28998         READLINK=
28999       fi
29000     fi
29001 
29002     if test "x$READLINK" != x; then
29003       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
29004     else
29005       # Save the current directory for restoring afterwards
29006       STARTDIR=$PWD
29007       COUNTER=0
29008       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
29009       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
29010       cd $sym_link_dir
29011       # Use -P flag to resolve symlinks in directories.
29012       cd `$THEPWDCMD -P`
29013       sym_link_dir=`$THEPWDCMD -P`
29014       # Resolve file symlinks
29015       while test $COUNTER -lt 20; do
29016         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29017         if test "x$ISLINK" == x; then
29018           # This is not a symbolic link! We are done!
29019           break
29020         fi
29021         # Again resolve directory symlinks since the target of the just found
29022         # link could be in a different directory
29023         cd `$DIRNAME $ISLINK`
29024         sym_link_dir=`$THEPWDCMD -P`
29025         sym_link_file=`$BASENAME $ISLINK`
29026         let COUNTER=COUNTER+1
29027       done
29028       cd $STARTDIR
29029       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
29030     fi
29031   fi
29032 
29033   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
29034     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
29035 $as_echo "no symlink" >&6; }
29036   else
29037     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
29038 $as_echo "$SYMLINK_ORIGINAL" >&6; }
29039     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29040 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
29041     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
29042     if test "x$COMPILER_BASENAME" = "xccache"; then
29043       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29044 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29045       # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29046       # We want to control ccache invocation ourselves, so ignore this cc and try
29047       # searching again.
29048 
29049       # Remove the path to the fake ccache cc from the PATH
29050       RETRY_COMPILER_SAVED_PATH="$PATH"
29051       COMPILER_DIRNAME=`$DIRNAME $CXX`
29052       PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29053       # Try again looking for our compiler
29054       if test -n "$ac_tool_prefix"; then
29055   for ac_prog in $TOOLCHAIN_CXX_BINARY
29056   do
29057     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29058 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29060 $as_echo_n "checking for $ac_word... " >&6; }
29061 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29062   $as_echo_n "(cached) " >&6
29063 else
29064   if test -n "$PROPER_COMPILER_CXX"; then
29065   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29066 else
29067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29068 for as_dir in $PATH
29069 do
29070   IFS=$as_save_IFS
29071   test -z "$as_dir" && as_dir=.
29072     for ac_exec_ext in '' $ac_executable_extensions; do
29073   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29074     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29076     break 2
29077   fi
29078 done
29079   done
29080 IFS=$as_save_IFS
29081 
29082 fi
29083 fi
29084 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29085 if test -n "$PROPER_COMPILER_CXX"; then
29086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29087 $as_echo "$PROPER_COMPILER_CXX" >&6; }
29088 else
29089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29090 $as_echo "no" >&6; }
29091 fi
29092 
29093 
29094     test -n "$PROPER_COMPILER_CXX" && break
29095   done
29096 fi
29097 if test -z "$PROPER_COMPILER_CXX"; then
29098   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29099   for ac_prog in $TOOLCHAIN_CXX_BINARY
29100 do
29101   # Extract the first word of "$ac_prog", so it can be a program name with args.
29102 set dummy $ac_prog; ac_word=$2
29103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29104 $as_echo_n "checking for $ac_word... " >&6; }
29105 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29106   $as_echo_n "(cached) " >&6
29107 else
29108   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29109   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29110 else
29111 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29112 for as_dir in $PATH
29113 do
29114   IFS=$as_save_IFS
29115   test -z "$as_dir" && as_dir=.
29116     for ac_exec_ext in '' $ac_executable_extensions; do
29117   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29118     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29119     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29120     break 2
29121   fi
29122 done
29123   done
29124 IFS=$as_save_IFS
29125 
29126 fi
29127 fi
29128 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29129 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29131 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29132 else
29133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29134 $as_echo "no" >&6; }
29135 fi
29136 
29137 
29138   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29139 done
29140 
29141   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29142     PROPER_COMPILER_CXX=""
29143   else
29144     case $cross_compiling:$ac_tool_warned in
29145 yes:)
29146 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29147 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29148 ac_tool_warned=yes ;;
29149 esac
29150     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29151   fi
29152 fi
29153 
29154 
29155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29156 
29157   # First separate the path from the arguments. This will split at the first
29158   # space.
29159   complete="$PROPER_COMPILER_CXX"
29160   path="${complete%% *}"
29161   tmp="$complete EOL"
29162   arguments="${tmp#* }"
29163 
29164   # Input might be given as Windows format, start by converting to
29165   # unix format.
29166   new_path=`$CYGPATH -u "$path"`
29167 
29168   # Now try to locate executable using which
29169   new_path=`$WHICH "$new_path" 2> /dev/null`
29170   # bat and cmd files are not always considered executable in cygwin causing which
29171   # to not find them
29172   if test "x$new_path" = x \
29173       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29174       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29175     new_path=`$CYGPATH -u "$path"`
29176   fi
29177   if test "x$new_path" = x; then
29178     # Oops. Which didn't find the executable.
29179     # The splitting of arguments from the executable at a space might have been incorrect,
29180     # since paths with space are more likely in Windows. Give it another try with the whole
29181     # argument.
29182     path="$complete"
29183     arguments="EOL"
29184     new_path=`$CYGPATH -u "$path"`
29185     new_path=`$WHICH "$new_path" 2> /dev/null`
29186     # bat and cmd files are not always considered executable in cygwin causing which
29187     # to not find them
29188     if test "x$new_path" = x \
29189         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29190         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29191       new_path=`$CYGPATH -u "$path"`
29192     fi
29193     if test "x$new_path" = x; then
29194       # It's still not found. Now this is an unrecoverable error.
29195       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29196 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29197       has_space=`$ECHO "$complete" | $GREP " "`
29198       if test "x$has_space" != x; then
29199         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29200 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29201       fi
29202       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29203     fi
29204   fi
29205 
29206   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29207   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29208   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29209   # "foo.exe" is OK but "foo" is an error.
29210   #
29211   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29212   # It is also a way to make sure we got the proper file name for the real test later on.
29213   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29214   if test "x$test_shortpath" = x; then
29215     # Short path failed, file does not exist as specified.
29216     # Try adding .exe or .cmd
29217     if test -f "${new_path}.exe"; then
29218       input_to_shortpath="${new_path}.exe"
29219     elif test -f "${new_path}.cmd"; then
29220       input_to_shortpath="${new_path}.cmd"
29221     else
29222       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29223 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29224       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29225 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29226       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29227     fi
29228   else
29229     input_to_shortpath="$new_path"
29230   fi
29231 
29232   # Call helper function which possibly converts this using DOS-style short mode.
29233   # If so, the updated path is stored in $new_path.
29234   new_path="$input_to_shortpath"
29235 
29236   input_path="$input_to_shortpath"
29237   # Check if we need to convert this using DOS-style short mode. If the path
29238   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29239   # take no chances and rewrite it.
29240   # Note: m4 eats our [], so we need to use [ and ] instead.
29241   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29242   if test "x$has_forbidden_chars" != x; then
29243     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29244     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29245     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29246     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29247       # Going to short mode and back again did indeed matter. Since short mode is
29248       # case insensitive, let's make it lowercase to improve readability.
29249       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29250       # Now convert it back to Unix-style (cygpath)
29251       input_path=`$CYGPATH -u "$shortmode_path"`
29252       new_path="$input_path"
29253     fi
29254   fi
29255 
29256   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29257   if test "x$test_cygdrive_prefix" = x; then
29258     # As a simple fix, exclude /usr/bin since it's not a real path.
29259     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29260       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29261       # a path prefixed by /cygdrive for fixpath to work.
29262       new_path="$CYGWIN_ROOT_PATH$input_path"
29263     fi
29264   fi
29265 
29266   # remove trailing .exe if any
29267   new_path="${new_path/%.exe/}"
29268 
29269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29270 
29271   # First separate the path from the arguments. This will split at the first
29272   # space.
29273   complete="$PROPER_COMPILER_CXX"
29274   path="${complete%% *}"
29275   tmp="$complete EOL"
29276   arguments="${tmp#* }"
29277 
29278   # Input might be given as Windows format, start by converting to
29279   # unix format.
29280   new_path="$path"
29281 
29282   windows_path="$new_path"
29283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29284     unix_path=`$CYGPATH -u "$windows_path"`
29285     new_path="$unix_path"
29286   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29287     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29288     new_path="$unix_path"
29289   fi
29290 
29291 
29292   # Now try to locate executable using which
29293   new_path=`$WHICH "$new_path" 2> /dev/null`
29294 
29295   if test "x$new_path" = x; then
29296     # Oops. Which didn't find the executable.
29297     # The splitting of arguments from the executable at a space might have been incorrect,
29298     # since paths with space are more likely in Windows. Give it another try with the whole
29299     # argument.
29300     path="$complete"
29301     arguments="EOL"
29302     new_path="$path"
29303 
29304   windows_path="$new_path"
29305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29306     unix_path=`$CYGPATH -u "$windows_path"`
29307     new_path="$unix_path"
29308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29309     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29310     new_path="$unix_path"
29311   fi
29312 
29313 
29314     new_path=`$WHICH "$new_path" 2> /dev/null`
29315     # bat and cmd files are not always considered executable in MSYS causing which
29316     # to not find them
29317     if test "x$new_path" = x \
29318         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29319         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29320       new_path="$path"
29321 
29322   windows_path="$new_path"
29323   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29324     unix_path=`$CYGPATH -u "$windows_path"`
29325     new_path="$unix_path"
29326   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29327     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29328     new_path="$unix_path"
29329   fi
29330 
29331     fi
29332 
29333     if test "x$new_path" = x; then
29334       # It's still not found. Now this is an unrecoverable error.
29335       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29336 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29337       has_space=`$ECHO "$complete" | $GREP " "`
29338       if test "x$has_space" != x; then
29339         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29340 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29341       fi
29342       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29343     fi
29344   fi
29345 
29346   # Now new_path has a complete unix path to the binary
29347   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29348     # Keep paths in /bin as-is, but remove trailing .exe if any
29349     new_path="${new_path/%.exe/}"
29350     # Do not save /bin paths to all_fixpath_prefixes!
29351   else
29352     # Not in mixed or Windows style, start by that.
29353     new_path=`cmd //c echo $new_path`
29354 
29355   input_path="$new_path"
29356   # Check if we need to convert this using DOS-style short mode. If the path
29357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29358   # take no chances and rewrite it.
29359   # Note: m4 eats our [], so we need to use [ and ] instead.
29360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29361   if test "x$has_forbidden_chars" != x; then
29362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29363     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29364   fi
29365 
29366     # Output is in $new_path
29367 
29368   windows_path="$new_path"
29369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29370     unix_path=`$CYGPATH -u "$windows_path"`
29371     new_path="$unix_path"
29372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29374     new_path="$unix_path"
29375   fi
29376 
29377     # remove trailing .exe if any
29378     new_path="${new_path/%.exe/}"
29379 
29380     # Save the first 10 bytes of this path to the storage, so fixpath can work.
29381     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29382   fi
29383 
29384   else
29385     # We're on a posix platform. Hooray! :)
29386     # First separate the path from the arguments. This will split at the first
29387     # space.
29388     complete="$PROPER_COMPILER_CXX"
29389     path="${complete%% *}"
29390     tmp="$complete EOL"
29391     arguments="${tmp#* }"
29392 
29393     # Cannot rely on the command "which" here since it doesn't always work.
29394     is_absolute_path=`$ECHO "$path" | $GREP ^/`
29395     if test -z "$is_absolute_path"; then
29396       # Path to executable is not absolute. Find it.
29397       IFS_save="$IFS"
29398       IFS=:
29399       for p in $PATH; do
29400         if test -f "$p/$path" && test -x "$p/$path"; then
29401           new_path="$p/$path"
29402           break
29403         fi
29404       done
29405       IFS="$IFS_save"
29406     else
29407       # This is an absolute path, we can use it without further modifications.
29408       new_path="$path"
29409     fi
29410 
29411     if test "x$new_path" = x; then
29412       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29413 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29414       has_space=`$ECHO "$complete" | $GREP " "`
29415       if test "x$has_space" != x; then
29416         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29417 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29418       fi
29419       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29420     fi
29421   fi
29422 
29423   # Now join together the path and the arguments once again
29424   if test "x$arguments" != xEOL; then
29425     new_complete="$new_path ${arguments% *}"
29426   else
29427     new_complete="$new_path"
29428   fi
29429 
29430   if test "x$complete" != "x$new_complete"; then
29431     PROPER_COMPILER_CXX="$new_complete"
29432     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
29433 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
29434   fi
29435 
29436       PATH="$RETRY_COMPILER_SAVED_PATH"
29437 
29438       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
29439 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
29440 
29441   if test "x$OPENJDK_BUILD_OS" != xwindows; then
29442     # Follow a chain of symbolic links. Use readlink
29443     # where it exists, else fall back to horribly
29444     # complicated shell code.
29445     if test "x$READLINK_TESTED" != yes; then
29446       # On MacOSX there is a readlink tool with a different
29447       # purpose than the GNU readlink tool. Check the found readlink.
29448       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29449       if test "x$ISGNU" = x; then
29450         # A readlink that we do not know how to use.
29451         # Are there other non-GNU readlinks out there?
29452         READLINK_TESTED=yes
29453         READLINK=
29454       fi
29455     fi
29456 
29457     if test "x$READLINK" != x; then
29458       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
29459     else
29460       # Save the current directory for restoring afterwards
29461       STARTDIR=$PWD
29462       COUNTER=0
29463       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
29464       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
29465       cd $sym_link_dir
29466       # Use -P flag to resolve symlinks in directories.
29467       cd `$THEPWDCMD -P`
29468       sym_link_dir=`$THEPWDCMD -P`
29469       # Resolve file symlinks
29470       while test $COUNTER -lt 20; do
29471         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29472         if test "x$ISLINK" == x; then
29473           # This is not a symbolic link! We are done!
29474           break
29475         fi
29476         # Again resolve directory symlinks since the target of the just found
29477         # link could be in a different directory
29478         cd `$DIRNAME $ISLINK`
29479         sym_link_dir=`$THEPWDCMD -P`
29480         sym_link_file=`$BASENAME $ISLINK`
29481         let COUNTER=COUNTER+1
29482       done
29483       cd $STARTDIR
29484       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
29485     fi
29486   fi
29487 
29488       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29489 $as_echo "$PROPER_COMPILER_CXX" >&6; }
29490       CXX="$PROPER_COMPILER_CXX"
29491     else
29492       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
29493 $as_echo "no, keeping CXX" >&6; }
29494     fi
29495   fi
29496 
29497 
29498   COMPILER=$CXX
29499   COMPILER_NAME=$COMPILER_NAME
29500 
29501   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29502     # cc -V output typically looks like
29503     #     cc: Sun C 5.12 Linux_i386 2011/11/16
29504     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29505     # Check that this is likely to be the Solaris Studio cc.
29506     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29507     if test $? -ne 0; then
29508       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29509       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
29510 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29511       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29512 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29513       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29514 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29515       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29516     fi
29517     # Remove usage instructions (if present), and
29518     # collapse compiler output into a single line
29519     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29520         $SED -e 's/ *[Uu]sage:.*//'`
29521     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29522         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29523   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29524     # xlc -qversion output typically looks like
29525     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29526     #     Version: 11.01.0000.0015
29527     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29528     # Check that this is likely to be the IBM XL C compiler.
29529     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29530     if test $? -ne 0; then
29531       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29532       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
29533 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29534       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29535 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29536       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29537 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29538       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29539     fi
29540     # Collapse compiler output into a single line
29541     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29542     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29543         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29544   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29545     # There is no specific version flag, but all output starts with a version string.
29546     # First line typically looks something like:
29547     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29548     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29549     # Check that this is likely to be Microsoft CL.EXE.
29550     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29551     if test $? -ne 0; then
29552       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
29553 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29554       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29555 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29556       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29557     fi
29558     # Collapse compiler output into a single line
29559     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29560     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29561         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29562   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29563     # gcc --version output typically looks like
29564     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29565     #     Copyright (C) 2013 Free Software Foundation, Inc.
29566     #     This is free software; see the source for copying conditions.  There is NO
29567     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29568     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29569     # Check that this is likely to be GCC.
29570     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29571     if test $? -ne 0; then
29572       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
29573 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29574       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29575 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29576       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29577     fi
29578     # Remove Copyright and legalese from version string, and
29579     # collapse into a single line
29580     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29581         $SED -e 's/ *Copyright .*//'`
29582     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29583         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29584   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29585     # clang --version output typically looks like
29586     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29587     #    clang version 3.3 (tags/RELEASE_33/final)
29588     # or
29589     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29590     #    Target: x86_64-pc-linux-gnu
29591     #    Thread model: posix
29592     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29593     # Check that this is likely to be clang
29594     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29595     if test $? -ne 0; then
29596       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
29597 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29598       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29599 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29600       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29601     fi
29602     # Collapse compiler output into a single line
29603     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29604     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29605         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29606 
29607   else
29608       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29609   fi
29610   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29611   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29612   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29613   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
29614 
29615   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29616 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29617 
29618 
29619   # Now that we have resolved CXX ourself, let autoconf have its go at it
29620   ac_ext=cpp
29621 ac_cpp='$CXXCPP $CPPFLAGS'
29622 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29623 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29624 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29625 if test -z "$CXX"; then
29626   if test -n "$CCC"; then
29627     CXX=$CCC
29628   else
29629     if test -n "$ac_tool_prefix"; then
29630   for ac_prog in $CXX
29631   do
29632     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29633 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29635 $as_echo_n "checking for $ac_word... " >&6; }
29636 if ${ac_cv_prog_CXX+:} false; then :
29637   $as_echo_n "(cached) " >&6
29638 else
29639   if test -n "$CXX"; then
29640   ac_cv_prog_CXX="$CXX" # Let the user override the test.
29641 else
29642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29643 for as_dir in $PATH
29644 do
29645   IFS=$as_save_IFS
29646   test -z "$as_dir" && as_dir=.
29647     for ac_exec_ext in '' $ac_executable_extensions; do
29648   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29649     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
29650     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29651     break 2
29652   fi
29653 done
29654   done
29655 IFS=$as_save_IFS
29656 
29657 fi
29658 fi
29659 CXX=$ac_cv_prog_CXX
29660 if test -n "$CXX"; then
29661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
29662 $as_echo "$CXX" >&6; }
29663 else
29664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29665 $as_echo "no" >&6; }
29666 fi
29667 
29668 
29669     test -n "$CXX" && break
29670   done
29671 fi
29672 if test -z "$CXX"; then
29673   ac_ct_CXX=$CXX
29674   for ac_prog in $CXX
29675 do
29676   # Extract the first word of "$ac_prog", so it can be a program name with args.
29677 set dummy $ac_prog; ac_word=$2
29678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29679 $as_echo_n "checking for $ac_word... " >&6; }
29680 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
29681   $as_echo_n "(cached) " >&6
29682 else
29683   if test -n "$ac_ct_CXX"; then
29684   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
29685 else
29686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29687 for as_dir in $PATH
29688 do
29689   IFS=$as_save_IFS
29690   test -z "$as_dir" && as_dir=.
29691     for ac_exec_ext in '' $ac_executable_extensions; do
29692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29693     ac_cv_prog_ac_ct_CXX="$ac_prog"
29694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29695     break 2
29696   fi
29697 done
29698   done
29699 IFS=$as_save_IFS
29700 
29701 fi
29702 fi
29703 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
29704 if test -n "$ac_ct_CXX"; then
29705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
29706 $as_echo "$ac_ct_CXX" >&6; }
29707 else
29708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29709 $as_echo "no" >&6; }
29710 fi
29711 
29712 
29713   test -n "$ac_ct_CXX" && break
29714 done
29715 
29716   if test "x$ac_ct_CXX" = x; then
29717     CXX="g++"
29718   else
29719     case $cross_compiling:$ac_tool_warned in
29720 yes:)
29721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29722 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29723 ac_tool_warned=yes ;;
29724 esac
29725     CXX=$ac_ct_CXX
29726   fi
29727 fi
29728 
29729   fi
29730 fi
29731 # Provide some information about the compiler.
29732 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
29733 set X $ac_compile
29734 ac_compiler=$2
29735 for ac_option in --version -v -V -qversion; do
29736   { { ac_try="$ac_compiler $ac_option >&5"
29737 case "(($ac_try" in
29738   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29739   *) ac_try_echo=$ac_try;;
29740 esac
29741 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29742 $as_echo "$ac_try_echo"; } >&5
29743   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29744   ac_status=$?
29745   if test -s conftest.err; then
29746     sed '10a\
29747 ... rest of stderr output deleted ...
29748          10q' conftest.err >conftest.er1
29749     cat conftest.er1 >&5
29750   fi
29751   rm -f conftest.er1 conftest.err
29752   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29753   test $ac_status = 0; }
29754 done
29755 
29756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
29757 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
29758 if ${ac_cv_cxx_compiler_gnu+:} false; then :
29759   $as_echo_n "(cached) " >&6
29760 else
29761   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29762 /* end confdefs.h.  */
29763 
29764 int
29765 main ()
29766 {
29767 #ifndef __GNUC__
29768        choke me
29769 #endif
29770 
29771   ;
29772   return 0;
29773 }
29774 _ACEOF
29775 if ac_fn_cxx_try_compile "$LINENO"; then :
29776   ac_compiler_gnu=yes
29777 else
29778   ac_compiler_gnu=no
29779 fi
29780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29781 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
29782 
29783 fi
29784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
29785 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
29786 if test $ac_compiler_gnu = yes; then
29787   GXX=yes
29788 else
29789   GXX=
29790 fi
29791 ac_test_CXXFLAGS=${CXXFLAGS+set}
29792 ac_save_CXXFLAGS=$CXXFLAGS
29793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
29794 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
29795 if ${ac_cv_prog_cxx_g+:} false; then :
29796   $as_echo_n "(cached) " >&6
29797 else
29798   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
29799    ac_cxx_werror_flag=yes
29800    ac_cv_prog_cxx_g=no
29801    CXXFLAGS="-g"
29802    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29803 /* end confdefs.h.  */
29804 
29805 int
29806 main ()
29807 {
29808 
29809   ;
29810   return 0;
29811 }
29812 _ACEOF
29813 if ac_fn_cxx_try_compile "$LINENO"; then :
29814   ac_cv_prog_cxx_g=yes
29815 else
29816   CXXFLAGS=""
29817       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29818 /* end confdefs.h.  */
29819 
29820 int
29821 main ()
29822 {
29823 
29824   ;
29825   return 0;
29826 }
29827 _ACEOF
29828 if ac_fn_cxx_try_compile "$LINENO"; then :
29829 
29830 else
29831   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
29832          CXXFLAGS="-g"
29833          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29834 /* end confdefs.h.  */
29835 
29836 int
29837 main ()
29838 {
29839 
29840   ;
29841   return 0;
29842 }
29843 _ACEOF
29844 if ac_fn_cxx_try_compile "$LINENO"; then :
29845   ac_cv_prog_cxx_g=yes
29846 fi
29847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29848 fi
29849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29850 fi
29851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29852    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
29853 fi
29854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
29855 $as_echo "$ac_cv_prog_cxx_g" >&6; }
29856 if test "$ac_test_CXXFLAGS" = set; then
29857   CXXFLAGS=$ac_save_CXXFLAGS
29858 elif test $ac_cv_prog_cxx_g = yes; then
29859   if test "$GXX" = yes; then
29860     CXXFLAGS="-g -O2"
29861   else
29862     CXXFLAGS="-g"
29863   fi
29864 else
29865   if test "$GXX" = yes; then
29866     CXXFLAGS="-O2"
29867   else
29868     CXXFLAGS=
29869   fi
29870 fi
29871 ac_ext=cpp
29872 ac_cpp='$CXXCPP $CPPFLAGS'
29873 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29874 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29875 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29876 
29877 
29878   # This is the compiler version number on the form X.Y[.Z]
29879 
29880 
29881 
29882 
29883   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
29884     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
29885 $as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
29886     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
29887 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
29888   fi
29889 
29890   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
29891   if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
29892     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&5
29893 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&2;}
29894   fi
29895 
29896   if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
29897     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&5
29898 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&2;}
29899   fi
29900 
29901   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
29902 
29903 
29904   #
29905   # Setup the preprocessor (CPP and CXXCPP)
29906   #
29907   ac_ext=c
29908 ac_cpp='$CPP $CPPFLAGS'
29909 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29910 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29911 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
29913 $as_echo_n "checking how to run the C preprocessor... " >&6; }
29914 # On Suns, sometimes $CPP names a directory.
29915 if test -n "$CPP" && test -d "$CPP"; then
29916   CPP=
29917 fi
29918 if test -z "$CPP"; then
29919   if ${ac_cv_prog_CPP+:} false; then :
29920   $as_echo_n "(cached) " >&6
29921 else
29922       # Double quotes because CPP needs to be expanded
29923     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
29924     do
29925       ac_preproc_ok=false
29926 for ac_c_preproc_warn_flag in '' yes
29927 do
29928   # Use a header file that comes with gcc, so configuring glibc
29929   # with a fresh cross-compiler works.
29930   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
29931   # <limits.h> exists even on freestanding compilers.
29932   # On the NeXT, cc -E runs the code through the compiler's parser,
29933   # not just through cpp. "Syntax error" is here to catch this case.
29934   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29935 /* end confdefs.h.  */
29936 #ifdef __STDC__
29937 # include <limits.h>
29938 #else
29939 # include <assert.h>
29940 #endif
29941                      Syntax error
29942 _ACEOF
29943 if ac_fn_c_try_cpp "$LINENO"; then :
29944 
29945 else
29946   # Broken: fails on valid input.
29947 continue
29948 fi
29949 rm -f conftest.err conftest.i conftest.$ac_ext
29950 
29951   # OK, works on sane cases.  Now check whether nonexistent headers
29952   # can be detected and how.
29953   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29954 /* end confdefs.h.  */
29955 #include <ac_nonexistent.h>
29956 _ACEOF
29957 if ac_fn_c_try_cpp "$LINENO"; then :
29958   # Broken: success on invalid input.
29959 continue
29960 else
29961   # Passes both tests.
29962 ac_preproc_ok=:
29963 break
29964 fi
29965 rm -f conftest.err conftest.i conftest.$ac_ext
29966 
29967 done
29968 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
29969 rm -f conftest.i conftest.err conftest.$ac_ext
29970 if $ac_preproc_ok; then :
29971   break
29972 fi
29973 
29974     done
29975     ac_cv_prog_CPP=$CPP
29976 
29977 fi
29978   CPP=$ac_cv_prog_CPP
29979 else
29980   ac_cv_prog_CPP=$CPP
29981 fi
29982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
29983 $as_echo "$CPP" >&6; }
29984 ac_preproc_ok=false
29985 for ac_c_preproc_warn_flag in '' yes
29986 do
29987   # Use a header file that comes with gcc, so configuring glibc
29988   # with a fresh cross-compiler works.
29989   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
29990   # <limits.h> exists even on freestanding compilers.
29991   # On the NeXT, cc -E runs the code through the compiler's parser,
29992   # not just through cpp. "Syntax error" is here to catch this case.
29993   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29994 /* end confdefs.h.  */
29995 #ifdef __STDC__
29996 # include <limits.h>
29997 #else
29998 # include <assert.h>
29999 #endif
30000                      Syntax error
30001 _ACEOF
30002 if ac_fn_c_try_cpp "$LINENO"; then :
30003 
30004 else
30005   # Broken: fails on valid input.
30006 continue
30007 fi
30008 rm -f conftest.err conftest.i conftest.$ac_ext
30009 
30010   # OK, works on sane cases.  Now check whether nonexistent headers
30011   # can be detected and how.
30012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30013 /* end confdefs.h.  */
30014 #include <ac_nonexistent.h>
30015 _ACEOF
30016 if ac_fn_c_try_cpp "$LINENO"; then :
30017   # Broken: success on invalid input.
30018 continue
30019 else
30020   # Passes both tests.
30021 ac_preproc_ok=:
30022 break
30023 fi
30024 rm -f conftest.err conftest.i conftest.$ac_ext
30025 
30026 done
30027 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30028 rm -f conftest.i conftest.err conftest.$ac_ext
30029 if $ac_preproc_ok; then :
30030 
30031 else
30032   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30033 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30034 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30035 See \`config.log' for more details" "$LINENO" 5; }
30036 fi
30037 
30038 ac_ext=cpp
30039 ac_cpp='$CXXCPP $CPPFLAGS'
30040 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30041 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30042 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30043 
30044 
30045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30046 
30047   # First separate the path from the arguments. This will split at the first
30048   # space.
30049   complete="$CPP"
30050   path="${complete%% *}"
30051   tmp="$complete EOL"
30052   arguments="${tmp#* }"
30053 
30054   # Input might be given as Windows format, start by converting to
30055   # unix format.
30056   new_path=`$CYGPATH -u "$path"`
30057 
30058   # Now try to locate executable using which
30059   new_path=`$WHICH "$new_path" 2> /dev/null`
30060   # bat and cmd files are not always considered executable in cygwin causing which
30061   # to not find them
30062   if test "x$new_path" = x \
30063       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30064       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30065     new_path=`$CYGPATH -u "$path"`
30066   fi
30067   if test "x$new_path" = x; then
30068     # Oops. Which didn't find the executable.
30069     # The splitting of arguments from the executable at a space might have been incorrect,
30070     # since paths with space are more likely in Windows. Give it another try with the whole
30071     # argument.
30072     path="$complete"
30073     arguments="EOL"
30074     new_path=`$CYGPATH -u "$path"`
30075     new_path=`$WHICH "$new_path" 2> /dev/null`
30076     # bat and cmd files are not always considered executable in cygwin causing which
30077     # to not find them
30078     if test "x$new_path" = x \
30079         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30080         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30081       new_path=`$CYGPATH -u "$path"`
30082     fi
30083     if test "x$new_path" = x; then
30084       # It's still not found. Now this is an unrecoverable error.
30085       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30086 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30087       has_space=`$ECHO "$complete" | $GREP " "`
30088       if test "x$has_space" != x; then
30089         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30090 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30091       fi
30092       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30093     fi
30094   fi
30095 
30096   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30097   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30098   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30099   # "foo.exe" is OK but "foo" is an error.
30100   #
30101   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30102   # It is also a way to make sure we got the proper file name for the real test later on.
30103   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30104   if test "x$test_shortpath" = x; then
30105     # Short path failed, file does not exist as specified.
30106     # Try adding .exe or .cmd
30107     if test -f "${new_path}.exe"; then
30108       input_to_shortpath="${new_path}.exe"
30109     elif test -f "${new_path}.cmd"; then
30110       input_to_shortpath="${new_path}.cmd"
30111     else
30112       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30113 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30114       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30115 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30116       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30117     fi
30118   else
30119     input_to_shortpath="$new_path"
30120   fi
30121 
30122   # Call helper function which possibly converts this using DOS-style short mode.
30123   # If so, the updated path is stored in $new_path.
30124   new_path="$input_to_shortpath"
30125 
30126   input_path="$input_to_shortpath"
30127   # Check if we need to convert this using DOS-style short mode. If the path
30128   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30129   # take no chances and rewrite it.
30130   # Note: m4 eats our [], so we need to use [ and ] instead.
30131   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30132   if test "x$has_forbidden_chars" != x; then
30133     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30134     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30135     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30136     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30137       # Going to short mode and back again did indeed matter. Since short mode is
30138       # case insensitive, let's make it lowercase to improve readability.
30139       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30140       # Now convert it back to Unix-style (cygpath)
30141       input_path=`$CYGPATH -u "$shortmode_path"`
30142       new_path="$input_path"
30143     fi
30144   fi
30145 
30146   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30147   if test "x$test_cygdrive_prefix" = x; then
30148     # As a simple fix, exclude /usr/bin since it's not a real path.
30149     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30150       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30151       # a path prefixed by /cygdrive for fixpath to work.
30152       new_path="$CYGWIN_ROOT_PATH$input_path"
30153     fi
30154   fi
30155 
30156   # remove trailing .exe if any
30157   new_path="${new_path/%.exe/}"
30158 
30159   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30160 
30161   # First separate the path from the arguments. This will split at the first
30162   # space.
30163   complete="$CPP"
30164   path="${complete%% *}"
30165   tmp="$complete EOL"
30166   arguments="${tmp#* }"
30167 
30168   # Input might be given as Windows format, start by converting to
30169   # unix format.
30170   new_path="$path"
30171 
30172   windows_path="$new_path"
30173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30174     unix_path=`$CYGPATH -u "$windows_path"`
30175     new_path="$unix_path"
30176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30177     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30178     new_path="$unix_path"
30179   fi
30180 
30181 
30182   # Now try to locate executable using which
30183   new_path=`$WHICH "$new_path" 2> /dev/null`
30184 
30185   if test "x$new_path" = x; then
30186     # Oops. Which didn't find the executable.
30187     # The splitting of arguments from the executable at a space might have been incorrect,
30188     # since paths with space are more likely in Windows. Give it another try with the whole
30189     # argument.
30190     path="$complete"
30191     arguments="EOL"
30192     new_path="$path"
30193 
30194   windows_path="$new_path"
30195   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30196     unix_path=`$CYGPATH -u "$windows_path"`
30197     new_path="$unix_path"
30198   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30199     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30200     new_path="$unix_path"
30201   fi
30202 
30203 
30204     new_path=`$WHICH "$new_path" 2> /dev/null`
30205     # bat and cmd files are not always considered executable in MSYS causing which
30206     # to not find them
30207     if test "x$new_path" = x \
30208         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30209         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30210       new_path="$path"
30211 
30212   windows_path="$new_path"
30213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30214     unix_path=`$CYGPATH -u "$windows_path"`
30215     new_path="$unix_path"
30216   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30217     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30218     new_path="$unix_path"
30219   fi
30220 
30221     fi
30222 
30223     if test "x$new_path" = x; then
30224       # It's still not found. Now this is an unrecoverable error.
30225       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30226 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30227       has_space=`$ECHO "$complete" | $GREP " "`
30228       if test "x$has_space" != x; then
30229         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30230 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30231       fi
30232       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30233     fi
30234   fi
30235 
30236   # Now new_path has a complete unix path to the binary
30237   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30238     # Keep paths in /bin as-is, but remove trailing .exe if any
30239     new_path="${new_path/%.exe/}"
30240     # Do not save /bin paths to all_fixpath_prefixes!
30241   else
30242     # Not in mixed or Windows style, start by that.
30243     new_path=`cmd //c echo $new_path`
30244 
30245   input_path="$new_path"
30246   # Check if we need to convert this using DOS-style short mode. If the path
30247   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30248   # take no chances and rewrite it.
30249   # Note: m4 eats our [], so we need to use [ and ] instead.
30250   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30251   if test "x$has_forbidden_chars" != x; then
30252     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30253     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30254   fi
30255 
30256     # Output is in $new_path
30257 
30258   windows_path="$new_path"
30259   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30260     unix_path=`$CYGPATH -u "$windows_path"`
30261     new_path="$unix_path"
30262   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30263     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30264     new_path="$unix_path"
30265   fi
30266 
30267     # remove trailing .exe if any
30268     new_path="${new_path/%.exe/}"
30269 
30270     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30271     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30272   fi
30273 
30274   else
30275     # We're on a posix platform. Hooray! :)
30276     # First separate the path from the arguments. This will split at the first
30277     # space.
30278     complete="$CPP"
30279     path="${complete%% *}"
30280     tmp="$complete EOL"
30281     arguments="${tmp#* }"
30282 
30283     # Cannot rely on the command "which" here since it doesn't always work.
30284     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30285     if test -z "$is_absolute_path"; then
30286       # Path to executable is not absolute. Find it.
30287       IFS_save="$IFS"
30288       IFS=:
30289       for p in $PATH; do
30290         if test -f "$p/$path" && test -x "$p/$path"; then
30291           new_path="$p/$path"
30292           break
30293         fi
30294       done
30295       IFS="$IFS_save"
30296     else
30297       # This is an absolute path, we can use it without further modifications.
30298       new_path="$path"
30299     fi
30300 
30301     if test "x$new_path" = x; then
30302       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30303 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30304       has_space=`$ECHO "$complete" | $GREP " "`
30305       if test "x$has_space" != x; then
30306         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30307 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30308       fi
30309       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30310     fi
30311   fi
30312 
30313   # Now join together the path and the arguments once again
30314   if test "x$arguments" != xEOL; then
30315     new_complete="$new_path ${arguments% *}"
30316   else
30317     new_complete="$new_path"
30318   fi
30319 
30320   if test "x$complete" != "x$new_complete"; then
30321     CPP="$new_complete"
30322     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30323 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30324   fi
30325 
30326   ac_ext=cpp
30327 ac_cpp='$CXXCPP $CPPFLAGS'
30328 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30329 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30330 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
30332 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
30333 if test -z "$CXXCPP"; then
30334   if ${ac_cv_prog_CXXCPP+:} false; then :
30335   $as_echo_n "(cached) " >&6
30336 else
30337       # Double quotes because CXXCPP needs to be expanded
30338     for CXXCPP in "$CXX -E" "/lib/cpp"
30339     do
30340       ac_preproc_ok=false
30341 for ac_cxx_preproc_warn_flag in '' yes
30342 do
30343   # Use a header file that comes with gcc, so configuring glibc
30344   # with a fresh cross-compiler works.
30345   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30346   # <limits.h> exists even on freestanding compilers.
30347   # On the NeXT, cc -E runs the code through the compiler's parser,
30348   # not just through cpp. "Syntax error" is here to catch this case.
30349   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30350 /* end confdefs.h.  */
30351 #ifdef __STDC__
30352 # include <limits.h>
30353 #else
30354 # include <assert.h>
30355 #endif
30356                      Syntax error
30357 _ACEOF
30358 if ac_fn_cxx_try_cpp "$LINENO"; then :
30359 
30360 else
30361   # Broken: fails on valid input.
30362 continue
30363 fi
30364 rm -f conftest.err conftest.i conftest.$ac_ext
30365 
30366   # OK, works on sane cases.  Now check whether nonexistent headers
30367   # can be detected and how.
30368   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30369 /* end confdefs.h.  */
30370 #include <ac_nonexistent.h>
30371 _ACEOF
30372 if ac_fn_cxx_try_cpp "$LINENO"; then :
30373   # Broken: success on invalid input.
30374 continue
30375 else
30376   # Passes both tests.
30377 ac_preproc_ok=:
30378 break
30379 fi
30380 rm -f conftest.err conftest.i conftest.$ac_ext
30381 
30382 done
30383 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30384 rm -f conftest.i conftest.err conftest.$ac_ext
30385 if $ac_preproc_ok; then :
30386   break
30387 fi
30388 
30389     done
30390     ac_cv_prog_CXXCPP=$CXXCPP
30391 
30392 fi
30393   CXXCPP=$ac_cv_prog_CXXCPP
30394 else
30395   ac_cv_prog_CXXCPP=$CXXCPP
30396 fi
30397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
30398 $as_echo "$CXXCPP" >&6; }
30399 ac_preproc_ok=false
30400 for ac_cxx_preproc_warn_flag in '' yes
30401 do
30402   # Use a header file that comes with gcc, so configuring glibc
30403   # with a fresh cross-compiler works.
30404   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30405   # <limits.h> exists even on freestanding compilers.
30406   # On the NeXT, cc -E runs the code through the compiler's parser,
30407   # not just through cpp. "Syntax error" is here to catch this case.
30408   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30409 /* end confdefs.h.  */
30410 #ifdef __STDC__
30411 # include <limits.h>
30412 #else
30413 # include <assert.h>
30414 #endif
30415                      Syntax error
30416 _ACEOF
30417 if ac_fn_cxx_try_cpp "$LINENO"; then :
30418 
30419 else
30420   # Broken: fails on valid input.
30421 continue
30422 fi
30423 rm -f conftest.err conftest.i conftest.$ac_ext
30424 
30425   # OK, works on sane cases.  Now check whether nonexistent headers
30426   # can be detected and how.
30427   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30428 /* end confdefs.h.  */
30429 #include <ac_nonexistent.h>
30430 _ACEOF
30431 if ac_fn_cxx_try_cpp "$LINENO"; then :
30432   # Broken: success on invalid input.
30433 continue
30434 else
30435   # Passes both tests.
30436 ac_preproc_ok=:
30437 break
30438 fi
30439 rm -f conftest.err conftest.i conftest.$ac_ext
30440 
30441 done
30442 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30443 rm -f conftest.i conftest.err conftest.$ac_ext
30444 if $ac_preproc_ok; then :
30445 
30446 else
30447   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30448 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30449 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
30450 See \`config.log' for more details" "$LINENO" 5; }
30451 fi
30452 
30453 ac_ext=cpp
30454 ac_cpp='$CXXCPP $CPPFLAGS'
30455 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30456 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30457 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30458 
30459 
30460   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30461 
30462   # First separate the path from the arguments. This will split at the first
30463   # space.
30464   complete="$CXXCPP"
30465   path="${complete%% *}"
30466   tmp="$complete EOL"
30467   arguments="${tmp#* }"
30468 
30469   # Input might be given as Windows format, start by converting to
30470   # unix format.
30471   new_path=`$CYGPATH -u "$path"`
30472 
30473   # Now try to locate executable using which
30474   new_path=`$WHICH "$new_path" 2> /dev/null`
30475   # bat and cmd files are not always considered executable in cygwin causing which
30476   # to not find them
30477   if test "x$new_path" = x \
30478       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30479       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30480     new_path=`$CYGPATH -u "$path"`
30481   fi
30482   if test "x$new_path" = x; then
30483     # Oops. Which didn't find the executable.
30484     # The splitting of arguments from the executable at a space might have been incorrect,
30485     # since paths with space are more likely in Windows. Give it another try with the whole
30486     # argument.
30487     path="$complete"
30488     arguments="EOL"
30489     new_path=`$CYGPATH -u "$path"`
30490     new_path=`$WHICH "$new_path" 2> /dev/null`
30491     # bat and cmd files are not always considered executable in cygwin causing which
30492     # to not find them
30493     if test "x$new_path" = x \
30494         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30495         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30496       new_path=`$CYGPATH -u "$path"`
30497     fi
30498     if test "x$new_path" = x; then
30499       # It's still not found. Now this is an unrecoverable error.
30500       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
30501 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
30502       has_space=`$ECHO "$complete" | $GREP " "`
30503       if test "x$has_space" != x; then
30504         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30505 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30506       fi
30507       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30508     fi
30509   fi
30510 
30511   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30512   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30513   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30514   # "foo.exe" is OK but "foo" is an error.
30515   #
30516   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30517   # It is also a way to make sure we got the proper file name for the real test later on.
30518   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30519   if test "x$test_shortpath" = x; then
30520     # Short path failed, file does not exist as specified.
30521     # Try adding .exe or .cmd
30522     if test -f "${new_path}.exe"; then
30523       input_to_shortpath="${new_path}.exe"
30524     elif test -f "${new_path}.cmd"; then
30525       input_to_shortpath="${new_path}.cmd"
30526     else
30527       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
30528 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
30529       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30530 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30531       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30532     fi
30533   else
30534     input_to_shortpath="$new_path"
30535   fi
30536 
30537   # Call helper function which possibly converts this using DOS-style short mode.
30538   # If so, the updated path is stored in $new_path.
30539   new_path="$input_to_shortpath"
30540 
30541   input_path="$input_to_shortpath"
30542   # Check if we need to convert this using DOS-style short mode. If the path
30543   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30544   # take no chances and rewrite it.
30545   # Note: m4 eats our [], so we need to use [ and ] instead.
30546   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30547   if test "x$has_forbidden_chars" != x; then
30548     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30549     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30550     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30551     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30552       # Going to short mode and back again did indeed matter. Since short mode is
30553       # case insensitive, let's make it lowercase to improve readability.
30554       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30555       # Now convert it back to Unix-style (cygpath)
30556       input_path=`$CYGPATH -u "$shortmode_path"`
30557       new_path="$input_path"
30558     fi
30559   fi
30560 
30561   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30562   if test "x$test_cygdrive_prefix" = x; then
30563     # As a simple fix, exclude /usr/bin since it's not a real path.
30564     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30565       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30566       # a path prefixed by /cygdrive for fixpath to work.
30567       new_path="$CYGWIN_ROOT_PATH$input_path"
30568     fi
30569   fi
30570 
30571   # remove trailing .exe if any
30572   new_path="${new_path/%.exe/}"
30573 
30574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30575 
30576   # First separate the path from the arguments. This will split at the first
30577   # space.
30578   complete="$CXXCPP"
30579   path="${complete%% *}"
30580   tmp="$complete EOL"
30581   arguments="${tmp#* }"
30582 
30583   # Input might be given as Windows format, start by converting to
30584   # unix format.
30585   new_path="$path"
30586 
30587   windows_path="$new_path"
30588   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30589     unix_path=`$CYGPATH -u "$windows_path"`
30590     new_path="$unix_path"
30591   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30592     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30593     new_path="$unix_path"
30594   fi
30595 
30596 
30597   # Now try to locate executable using which
30598   new_path=`$WHICH "$new_path" 2> /dev/null`
30599 
30600   if test "x$new_path" = x; then
30601     # Oops. Which didn't find the executable.
30602     # The splitting of arguments from the executable at a space might have been incorrect,
30603     # since paths with space are more likely in Windows. Give it another try with the whole
30604     # argument.
30605     path="$complete"
30606     arguments="EOL"
30607     new_path="$path"
30608 
30609   windows_path="$new_path"
30610   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30611     unix_path=`$CYGPATH -u "$windows_path"`
30612     new_path="$unix_path"
30613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30614     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30615     new_path="$unix_path"
30616   fi
30617 
30618 
30619     new_path=`$WHICH "$new_path" 2> /dev/null`
30620     # bat and cmd files are not always considered executable in MSYS causing which
30621     # to not find them
30622     if test "x$new_path" = x \
30623         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30624         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30625       new_path="$path"
30626 
30627   windows_path="$new_path"
30628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30629     unix_path=`$CYGPATH -u "$windows_path"`
30630     new_path="$unix_path"
30631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30632     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30633     new_path="$unix_path"
30634   fi
30635 
30636     fi
30637 
30638     if test "x$new_path" = x; then
30639       # It's still not found. Now this is an unrecoverable error.
30640       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
30641 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
30642       has_space=`$ECHO "$complete" | $GREP " "`
30643       if test "x$has_space" != x; then
30644         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30645 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30646       fi
30647       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30648     fi
30649   fi
30650 
30651   # Now new_path has a complete unix path to the binary
30652   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30653     # Keep paths in /bin as-is, but remove trailing .exe if any
30654     new_path="${new_path/%.exe/}"
30655     # Do not save /bin paths to all_fixpath_prefixes!
30656   else
30657     # Not in mixed or Windows style, start by that.
30658     new_path=`cmd //c echo $new_path`
30659 
30660   input_path="$new_path"
30661   # Check if we need to convert this using DOS-style short mode. If the path
30662   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30663   # take no chances and rewrite it.
30664   # Note: m4 eats our [], so we need to use [ and ] instead.
30665   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30666   if test "x$has_forbidden_chars" != x; then
30667     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30668     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30669   fi
30670 
30671     # Output is in $new_path
30672 
30673   windows_path="$new_path"
30674   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30675     unix_path=`$CYGPATH -u "$windows_path"`
30676     new_path="$unix_path"
30677   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30678     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30679     new_path="$unix_path"
30680   fi
30681 
30682     # remove trailing .exe if any
30683     new_path="${new_path/%.exe/}"
30684 
30685     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30686     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30687   fi
30688 
30689   else
30690     # We're on a posix platform. Hooray! :)
30691     # First separate the path from the arguments. This will split at the first
30692     # space.
30693     complete="$CXXCPP"
30694     path="${complete%% *}"
30695     tmp="$complete EOL"
30696     arguments="${tmp#* }"
30697 
30698     # Cannot rely on the command "which" here since it doesn't always work.
30699     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30700     if test -z "$is_absolute_path"; then
30701       # Path to executable is not absolute. Find it.
30702       IFS_save="$IFS"
30703       IFS=:
30704       for p in $PATH; do
30705         if test -f "$p/$path" && test -x "$p/$path"; then
30706           new_path="$p/$path"
30707           break
30708         fi
30709       done
30710       IFS="$IFS_save"
30711     else
30712       # This is an absolute path, we can use it without further modifications.
30713       new_path="$path"
30714     fi
30715 
30716     if test "x$new_path" = x; then
30717       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
30718 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
30719       has_space=`$ECHO "$complete" | $GREP " "`
30720       if test "x$has_space" != x; then
30721         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30722 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30723       fi
30724       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30725     fi
30726   fi
30727 
30728   # Now join together the path and the arguments once again
30729   if test "x$arguments" != xEOL; then
30730     new_complete="$new_path ${arguments% *}"
30731   else
30732     new_complete="$new_path"
30733   fi
30734 
30735   if test "x$complete" != "x$new_complete"; then
30736     CXXCPP="$new_complete"
30737     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
30738 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
30739   fi
30740 
30741 
30742   #
30743   # Setup the linker (LD)
30744   #
30745   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30746     # In the Microsoft toolchain we have a separate LD command "link".
30747     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
30748     # a cygwin program for something completely different.
30749     # Extract the first word of "link", so it can be a program name with args.
30750 set dummy link; ac_word=$2
30751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30752 $as_echo_n "checking for $ac_word... " >&6; }
30753 if ${ac_cv_prog_LD+:} false; then :
30754   $as_echo_n "(cached) " >&6
30755 else
30756   if test -n "$LD"; then
30757   ac_cv_prog_LD="$LD" # Let the user override the test.
30758 else
30759   ac_prog_rejected=no
30760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30761 for as_dir in $PATH
30762 do
30763   IFS=$as_save_IFS
30764   test -z "$as_dir" && as_dir=.
30765     for ac_exec_ext in '' $ac_executable_extensions; do
30766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30767     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
30768        ac_prog_rejected=yes
30769        continue
30770      fi
30771     ac_cv_prog_LD="link"
30772     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30773     break 2
30774   fi
30775 done
30776   done
30777 IFS=$as_save_IFS
30778 
30779 if test $ac_prog_rejected = yes; then
30780   # We found a bogon in the path, so make sure we never use it.
30781   set dummy $ac_cv_prog_LD
30782   shift
30783   if test $# != 0; then
30784     # We chose a different compiler from the bogus one.
30785     # However, it has the same basename, so the bogon will be chosen
30786     # first if we set LD to just the basename; use the full file name.
30787     shift
30788     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
30789   fi
30790 fi
30791 fi
30792 fi
30793 LD=$ac_cv_prog_LD
30794 if test -n "$LD"; then
30795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
30796 $as_echo "$LD" >&6; }
30797 else
30798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30799 $as_echo "no" >&6; }
30800 fi
30801 
30802 
30803 
30804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30805 
30806   # First separate the path from the arguments. This will split at the first
30807   # space.
30808   complete="$LD"
30809   path="${complete%% *}"
30810   tmp="$complete EOL"
30811   arguments="${tmp#* }"
30812 
30813   # Input might be given as Windows format, start by converting to
30814   # unix format.
30815   new_path=`$CYGPATH -u "$path"`
30816 
30817   # Now try to locate executable using which
30818   new_path=`$WHICH "$new_path" 2> /dev/null`
30819   # bat and cmd files are not always considered executable in cygwin causing which
30820   # to not find them
30821   if test "x$new_path" = x \
30822       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30823       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30824     new_path=`$CYGPATH -u "$path"`
30825   fi
30826   if test "x$new_path" = x; then
30827     # Oops. Which didn't find the executable.
30828     # The splitting of arguments from the executable at a space might have been incorrect,
30829     # since paths with space are more likely in Windows. Give it another try with the whole
30830     # argument.
30831     path="$complete"
30832     arguments="EOL"
30833     new_path=`$CYGPATH -u "$path"`
30834     new_path=`$WHICH "$new_path" 2> /dev/null`
30835     # bat and cmd files are not always considered executable in cygwin causing which
30836     # to not find them
30837     if test "x$new_path" = x \
30838         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30839         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30840       new_path=`$CYGPATH -u "$path"`
30841     fi
30842     if test "x$new_path" = x; then
30843       # It's still not found. Now this is an unrecoverable error.
30844       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
30845 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
30846       has_space=`$ECHO "$complete" | $GREP " "`
30847       if test "x$has_space" != x; then
30848         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30849 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30850       fi
30851       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
30852     fi
30853   fi
30854 
30855   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30856   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30857   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30858   # "foo.exe" is OK but "foo" is an error.
30859   #
30860   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30861   # It is also a way to make sure we got the proper file name for the real test later on.
30862   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30863   if test "x$test_shortpath" = x; then
30864     # Short path failed, file does not exist as specified.
30865     # Try adding .exe or .cmd
30866     if test -f "${new_path}.exe"; then
30867       input_to_shortpath="${new_path}.exe"
30868     elif test -f "${new_path}.cmd"; then
30869       input_to_shortpath="${new_path}.cmd"
30870     else
30871       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
30872 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
30873       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30874 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30875       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
30876     fi
30877   else
30878     input_to_shortpath="$new_path"
30879   fi
30880 
30881   # Call helper function which possibly converts this using DOS-style short mode.
30882   # If so, the updated path is stored in $new_path.
30883   new_path="$input_to_shortpath"
30884 
30885   input_path="$input_to_shortpath"
30886   # Check if we need to convert this using DOS-style short mode. If the path
30887   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30888   # take no chances and rewrite it.
30889   # Note: m4 eats our [], so we need to use [ and ] instead.
30890   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30891   if test "x$has_forbidden_chars" != x; then
30892     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30893     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30894     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30895     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30896       # Going to short mode and back again did indeed matter. Since short mode is
30897       # case insensitive, let's make it lowercase to improve readability.
30898       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30899       # Now convert it back to Unix-style (cygpath)
30900       input_path=`$CYGPATH -u "$shortmode_path"`
30901       new_path="$input_path"
30902     fi
30903   fi
30904 
30905   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30906   if test "x$test_cygdrive_prefix" = x; then
30907     # As a simple fix, exclude /usr/bin since it's not a real path.
30908     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30909       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30910       # a path prefixed by /cygdrive for fixpath to work.
30911       new_path="$CYGWIN_ROOT_PATH$input_path"
30912     fi
30913   fi
30914 
30915   # remove trailing .exe if any
30916   new_path="${new_path/%.exe/}"
30917 
30918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30919 
30920   # First separate the path from the arguments. This will split at the first
30921   # space.
30922   complete="$LD"
30923   path="${complete%% *}"
30924   tmp="$complete EOL"
30925   arguments="${tmp#* }"
30926 
30927   # Input might be given as Windows format, start by converting to
30928   # unix format.
30929   new_path="$path"
30930 
30931   windows_path="$new_path"
30932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30933     unix_path=`$CYGPATH -u "$windows_path"`
30934     new_path="$unix_path"
30935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30937     new_path="$unix_path"
30938   fi
30939 
30940 
30941   # Now try to locate executable using which
30942   new_path=`$WHICH "$new_path" 2> /dev/null`
30943 
30944   if test "x$new_path" = x; then
30945     # Oops. Which didn't find the executable.
30946     # The splitting of arguments from the executable at a space might have been incorrect,
30947     # since paths with space are more likely in Windows. Give it another try with the whole
30948     # argument.
30949     path="$complete"
30950     arguments="EOL"
30951     new_path="$path"
30952 
30953   windows_path="$new_path"
30954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30955     unix_path=`$CYGPATH -u "$windows_path"`
30956     new_path="$unix_path"
30957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30958     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30959     new_path="$unix_path"
30960   fi
30961 
30962 
30963     new_path=`$WHICH "$new_path" 2> /dev/null`
30964     # bat and cmd files are not always considered executable in MSYS causing which
30965     # to not find them
30966     if test "x$new_path" = x \
30967         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30968         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30969       new_path="$path"
30970 
30971   windows_path="$new_path"
30972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30973     unix_path=`$CYGPATH -u "$windows_path"`
30974     new_path="$unix_path"
30975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30976     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30977     new_path="$unix_path"
30978   fi
30979 
30980     fi
30981 
30982     if test "x$new_path" = x; then
30983       # It's still not found. Now this is an unrecoverable error.
30984       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
30985 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
30986       has_space=`$ECHO "$complete" | $GREP " "`
30987       if test "x$has_space" != x; then
30988         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30989 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30990       fi
30991       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
30992     fi
30993   fi
30994 
30995   # Now new_path has a complete unix path to the binary
30996   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30997     # Keep paths in /bin as-is, but remove trailing .exe if any
30998     new_path="${new_path/%.exe/}"
30999     # Do not save /bin paths to all_fixpath_prefixes!
31000   else
31001     # Not in mixed or Windows style, start by that.
31002     new_path=`cmd //c echo $new_path`
31003 
31004   input_path="$new_path"
31005   # Check if we need to convert this using DOS-style short mode. If the path
31006   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31007   # take no chances and rewrite it.
31008   # Note: m4 eats our [], so we need to use [ and ] instead.
31009   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31010   if test "x$has_forbidden_chars" != x; then
31011     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31012     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31013   fi
31014 
31015     # Output is in $new_path
31016 
31017   windows_path="$new_path"
31018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31019     unix_path=`$CYGPATH -u "$windows_path"`
31020     new_path="$unix_path"
31021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31022     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31023     new_path="$unix_path"
31024   fi
31025 
31026     # remove trailing .exe if any
31027     new_path="${new_path/%.exe/}"
31028 
31029     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31030     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31031   fi
31032 
31033   else
31034     # We're on a posix platform. Hooray! :)
31035     # First separate the path from the arguments. This will split at the first
31036     # space.
31037     complete="$LD"
31038     path="${complete%% *}"
31039     tmp="$complete EOL"
31040     arguments="${tmp#* }"
31041 
31042     # Cannot rely on the command "which" here since it doesn't always work.
31043     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31044     if test -z "$is_absolute_path"; then
31045       # Path to executable is not absolute. Find it.
31046       IFS_save="$IFS"
31047       IFS=:
31048       for p in $PATH; do
31049         if test -f "$p/$path" && test -x "$p/$path"; then
31050           new_path="$p/$path"
31051           break
31052         fi
31053       done
31054       IFS="$IFS_save"
31055     else
31056       # This is an absolute path, we can use it without further modifications.
31057       new_path="$path"
31058     fi
31059 
31060     if test "x$new_path" = x; then
31061       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31062 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31063       has_space=`$ECHO "$complete" | $GREP " "`
31064       if test "x$has_space" != x; then
31065         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31066 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31067       fi
31068       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31069     fi
31070   fi
31071 
31072   # Now join together the path and the arguments once again
31073   if test "x$arguments" != xEOL; then
31074     new_complete="$new_path ${arguments% *}"
31075   else
31076     new_complete="$new_path"
31077   fi
31078 
31079   if test "x$complete" != "x$new_complete"; then
31080     LD="$new_complete"
31081     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31082 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31083   fi
31084 
31085     # Verify that we indeed succeeded with this trick.
31086     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31087 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31088     "$LD" --version > /dev/null
31089     if test $? -eq 0 ; then
31090       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31091 $as_echo "no" >&6; }
31092       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31093     else
31094       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31095 $as_echo "yes" >&6; }
31096     fi
31097     LDCXX="$LD"
31098   else
31099     # All other toolchains use the compiler to link.
31100     LD="$CC"
31101     LDCXX="$CXX"
31102   fi
31103 
31104   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31105 
31106 
31107   #
31108   # Setup the assembler (AS)
31109   #
31110   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31111     # FIXME: should this really be solaris, or solstudio?
31112 
31113 
31114   # Publish this variable in the help.
31115 
31116 
31117   if test "x$AS" = x; then
31118     # The variable is not set by user, try to locate tool using the code snippet
31119     for ac_prog in as
31120 do
31121   # Extract the first word of "$ac_prog", so it can be a program name with args.
31122 set dummy $ac_prog; ac_word=$2
31123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31124 $as_echo_n "checking for $ac_word... " >&6; }
31125 if ${ac_cv_path_AS+:} false; then :
31126   $as_echo_n "(cached) " >&6
31127 else
31128   case $AS in
31129   [\\/]* | ?:[\\/]*)
31130   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31131   ;;
31132   *)
31133   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31134 for as_dir in $PATH
31135 do
31136   IFS=$as_save_IFS
31137   test -z "$as_dir" && as_dir=.
31138     for ac_exec_ext in '' $ac_executable_extensions; do
31139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31140     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31142     break 2
31143   fi
31144 done
31145   done
31146 IFS=$as_save_IFS
31147 
31148   ;;
31149 esac
31150 fi
31151 AS=$ac_cv_path_AS
31152 if test -n "$AS"; then
31153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31154 $as_echo "$AS" >&6; }
31155 else
31156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31157 $as_echo "no" >&6; }
31158 fi
31159 
31160 
31161   test -n "$AS" && break
31162 done
31163 
31164   else
31165     # The variable is set, but is it from the command line or the environment?
31166 
31167     # Try to remove the string !AS! from our list.
31168     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31169     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31170       # If it failed, the variable was not from the command line. Ignore it,
31171       # but warn the user (except for BASH, which is always set by the calling BASH).
31172       if test "xAS" != xBASH; then
31173         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31174 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31175       fi
31176       # Try to locate tool using the code snippet
31177       for ac_prog in as
31178 do
31179   # Extract the first word of "$ac_prog", so it can be a program name with args.
31180 set dummy $ac_prog; ac_word=$2
31181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31182 $as_echo_n "checking for $ac_word... " >&6; }
31183 if ${ac_cv_path_AS+:} false; then :
31184   $as_echo_n "(cached) " >&6
31185 else
31186   case $AS in
31187   [\\/]* | ?:[\\/]*)
31188   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31189   ;;
31190   *)
31191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31192 for as_dir in $PATH
31193 do
31194   IFS=$as_save_IFS
31195   test -z "$as_dir" && as_dir=.
31196     for ac_exec_ext in '' $ac_executable_extensions; do
31197   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31198     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31200     break 2
31201   fi
31202 done
31203   done
31204 IFS=$as_save_IFS
31205 
31206   ;;
31207 esac
31208 fi
31209 AS=$ac_cv_path_AS
31210 if test -n "$AS"; then
31211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31212 $as_echo "$AS" >&6; }
31213 else
31214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31215 $as_echo "no" >&6; }
31216 fi
31217 
31218 
31219   test -n "$AS" && break
31220 done
31221 
31222     else
31223       # If it succeeded, then it was overridden by the user. We will use it
31224       # for the tool.
31225 
31226       # First remove it from the list of overridden variables, so we can test
31227       # for unknown variables in the end.
31228       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31229 
31230       # Check if the provided tool contains a complete path.
31231       tool_specified="$AS"
31232       tool_basename="${tool_specified##*/}"
31233       if test "x$tool_basename" = "x$tool_specified"; then
31234         # A command without a complete path is provided, search $PATH.
31235         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31236 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31237         # Extract the first word of "$tool_basename", so it can be a program name with args.
31238 set dummy $tool_basename; ac_word=$2
31239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31240 $as_echo_n "checking for $ac_word... " >&6; }
31241 if ${ac_cv_path_AS+:} false; then :
31242   $as_echo_n "(cached) " >&6
31243 else
31244   case $AS in
31245   [\\/]* | ?:[\\/]*)
31246   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31247   ;;
31248   *)
31249   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31250 for as_dir in $PATH
31251 do
31252   IFS=$as_save_IFS
31253   test -z "$as_dir" && as_dir=.
31254     for ac_exec_ext in '' $ac_executable_extensions; do
31255   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31256     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31258     break 2
31259   fi
31260 done
31261   done
31262 IFS=$as_save_IFS
31263 
31264   ;;
31265 esac
31266 fi
31267 AS=$ac_cv_path_AS
31268 if test -n "$AS"; then
31269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31270 $as_echo "$AS" >&6; }
31271 else
31272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31273 $as_echo "no" >&6; }
31274 fi
31275 
31276 
31277         if test "x$AS" = x; then
31278           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31279         fi
31280       else
31281         # Otherwise we believe it is a complete path. Use it as it is.
31282         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31283 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31284         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31285 $as_echo_n "checking for AS... " >&6; }
31286         if test ! -x "$tool_specified"; then
31287           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31288 $as_echo "not found" >&6; }
31289           as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31290         fi
31291         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31292 $as_echo "$tool_specified" >&6; }
31293       fi
31294     fi
31295   fi
31296 
31297 
31298 
31299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31300 
31301   # First separate the path from the arguments. This will split at the first
31302   # space.
31303   complete="$AS"
31304   path="${complete%% *}"
31305   tmp="$complete EOL"
31306   arguments="${tmp#* }"
31307 
31308   # Input might be given as Windows format, start by converting to
31309   # unix format.
31310   new_path=`$CYGPATH -u "$path"`
31311 
31312   # Now try to locate executable using which
31313   new_path=`$WHICH "$new_path" 2> /dev/null`
31314   # bat and cmd files are not always considered executable in cygwin causing which
31315   # to not find them
31316   if test "x$new_path" = x \
31317       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31318       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31319     new_path=`$CYGPATH -u "$path"`
31320   fi
31321   if test "x$new_path" = x; then
31322     # Oops. Which didn't find the executable.
31323     # The splitting of arguments from the executable at a space might have been incorrect,
31324     # since paths with space are more likely in Windows. Give it another try with the whole
31325     # argument.
31326     path="$complete"
31327     arguments="EOL"
31328     new_path=`$CYGPATH -u "$path"`
31329     new_path=`$WHICH "$new_path" 2> /dev/null`
31330     # bat and cmd files are not always considered executable in cygwin causing which
31331     # to not find them
31332     if test "x$new_path" = x \
31333         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31334         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31335       new_path=`$CYGPATH -u "$path"`
31336     fi
31337     if test "x$new_path" = x; then
31338       # It's still not found. Now this is an unrecoverable error.
31339       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31340 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31341       has_space=`$ECHO "$complete" | $GREP " "`
31342       if test "x$has_space" != x; then
31343         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31344 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31345       fi
31346       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31347     fi
31348   fi
31349 
31350   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31351   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31352   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31353   # "foo.exe" is OK but "foo" is an error.
31354   #
31355   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31356   # It is also a way to make sure we got the proper file name for the real test later on.
31357   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31358   if test "x$test_shortpath" = x; then
31359     # Short path failed, file does not exist as specified.
31360     # Try adding .exe or .cmd
31361     if test -f "${new_path}.exe"; then
31362       input_to_shortpath="${new_path}.exe"
31363     elif test -f "${new_path}.cmd"; then
31364       input_to_shortpath="${new_path}.cmd"
31365     else
31366       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
31367 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
31368       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31369 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31370       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31371     fi
31372   else
31373     input_to_shortpath="$new_path"
31374   fi
31375 
31376   # Call helper function which possibly converts this using DOS-style short mode.
31377   # If so, the updated path is stored in $new_path.
31378   new_path="$input_to_shortpath"
31379 
31380   input_path="$input_to_shortpath"
31381   # Check if we need to convert this using DOS-style short mode. If the path
31382   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31383   # take no chances and rewrite it.
31384   # Note: m4 eats our [], so we need to use [ and ] instead.
31385   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31386   if test "x$has_forbidden_chars" != x; then
31387     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31388     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31389     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31390     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31391       # Going to short mode and back again did indeed matter. Since short mode is
31392       # case insensitive, let's make it lowercase to improve readability.
31393       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31394       # Now convert it back to Unix-style (cygpath)
31395       input_path=`$CYGPATH -u "$shortmode_path"`
31396       new_path="$input_path"
31397     fi
31398   fi
31399 
31400   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31401   if test "x$test_cygdrive_prefix" = x; then
31402     # As a simple fix, exclude /usr/bin since it's not a real path.
31403     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31404       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31405       # a path prefixed by /cygdrive for fixpath to work.
31406       new_path="$CYGWIN_ROOT_PATH$input_path"
31407     fi
31408   fi
31409 
31410   # remove trailing .exe if any
31411   new_path="${new_path/%.exe/}"
31412 
31413   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31414 
31415   # First separate the path from the arguments. This will split at the first
31416   # space.
31417   complete="$AS"
31418   path="${complete%% *}"
31419   tmp="$complete EOL"
31420   arguments="${tmp#* }"
31421 
31422   # Input might be given as Windows format, start by converting to
31423   # unix format.
31424   new_path="$path"
31425 
31426   windows_path="$new_path"
31427   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31428     unix_path=`$CYGPATH -u "$windows_path"`
31429     new_path="$unix_path"
31430   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31431     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31432     new_path="$unix_path"
31433   fi
31434 
31435 
31436   # Now try to locate executable using which
31437   new_path=`$WHICH "$new_path" 2> /dev/null`
31438 
31439   if test "x$new_path" = x; then
31440     # Oops. Which didn't find the executable.
31441     # The splitting of arguments from the executable at a space might have been incorrect,
31442     # since paths with space are more likely in Windows. Give it another try with the whole
31443     # argument.
31444     path="$complete"
31445     arguments="EOL"
31446     new_path="$path"
31447 
31448   windows_path="$new_path"
31449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31450     unix_path=`$CYGPATH -u "$windows_path"`
31451     new_path="$unix_path"
31452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31453     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31454     new_path="$unix_path"
31455   fi
31456 
31457 
31458     new_path=`$WHICH "$new_path" 2> /dev/null`
31459     # bat and cmd files are not always considered executable in MSYS causing which
31460     # to not find them
31461     if test "x$new_path" = x \
31462         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31463         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31464       new_path="$path"
31465 
31466   windows_path="$new_path"
31467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31468     unix_path=`$CYGPATH -u "$windows_path"`
31469     new_path="$unix_path"
31470   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31471     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31472     new_path="$unix_path"
31473   fi
31474 
31475     fi
31476 
31477     if test "x$new_path" = x; then
31478       # It's still not found. Now this is an unrecoverable error.
31479       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31480 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31481       has_space=`$ECHO "$complete" | $GREP " "`
31482       if test "x$has_space" != x; then
31483         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31484 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31485       fi
31486       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31487     fi
31488   fi
31489 
31490   # Now new_path has a complete unix path to the binary
31491   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31492     # Keep paths in /bin as-is, but remove trailing .exe if any
31493     new_path="${new_path/%.exe/}"
31494     # Do not save /bin paths to all_fixpath_prefixes!
31495   else
31496     # Not in mixed or Windows style, start by that.
31497     new_path=`cmd //c echo $new_path`
31498 
31499   input_path="$new_path"
31500   # Check if we need to convert this using DOS-style short mode. If the path
31501   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31502   # take no chances and rewrite it.
31503   # Note: m4 eats our [], so we need to use [ and ] instead.
31504   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31505   if test "x$has_forbidden_chars" != x; then
31506     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31507     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31508   fi
31509 
31510     # Output is in $new_path
31511 
31512   windows_path="$new_path"
31513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31514     unix_path=`$CYGPATH -u "$windows_path"`
31515     new_path="$unix_path"
31516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31517     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31518     new_path="$unix_path"
31519   fi
31520 
31521     # remove trailing .exe if any
31522     new_path="${new_path/%.exe/}"
31523 
31524     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31525     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31526   fi
31527 
31528   else
31529     # We're on a posix platform. Hooray! :)
31530     # First separate the path from the arguments. This will split at the first
31531     # space.
31532     complete="$AS"
31533     path="${complete%% *}"
31534     tmp="$complete EOL"
31535     arguments="${tmp#* }"
31536 
31537     # Cannot rely on the command "which" here since it doesn't always work.
31538     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31539     if test -z "$is_absolute_path"; then
31540       # Path to executable is not absolute. Find it.
31541       IFS_save="$IFS"
31542       IFS=:
31543       for p in $PATH; do
31544         if test -f "$p/$path" && test -x "$p/$path"; then
31545           new_path="$p/$path"
31546           break
31547         fi
31548       done
31549       IFS="$IFS_save"
31550     else
31551       # This is an absolute path, we can use it without further modifications.
31552       new_path="$path"
31553     fi
31554 
31555     if test "x$new_path" = x; then
31556       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31557 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31558       has_space=`$ECHO "$complete" | $GREP " "`
31559       if test "x$has_space" != x; then
31560         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31561 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31562       fi
31563       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31564     fi
31565   fi
31566 
31567   # Now join together the path and the arguments once again
31568   if test "x$arguments" != xEOL; then
31569     new_complete="$new_path ${arguments% *}"
31570   else
31571     new_complete="$new_path"
31572   fi
31573 
31574   if test "x$complete" != "x$new_complete"; then
31575     AS="$new_complete"
31576     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
31577 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
31578   fi
31579 
31580   else
31581     # FIXME: is this correct for microsoft?
31582     AS="$CC -c"
31583   fi
31584 
31585 
31586   #
31587   # Setup the archiver (AR)
31588   #
31589   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31590     # The corresponding ar tool is lib.exe (used to create static libraries)
31591     # Extract the first word of "lib", so it can be a program name with args.
31592 set dummy lib; ac_word=$2
31593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31594 $as_echo_n "checking for $ac_word... " >&6; }
31595 if ${ac_cv_prog_AR+:} false; then :
31596   $as_echo_n "(cached) " >&6
31597 else
31598   if test -n "$AR"; then
31599   ac_cv_prog_AR="$AR" # Let the user override the test.
31600 else
31601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31602 for as_dir in $PATH
31603 do
31604   IFS=$as_save_IFS
31605   test -z "$as_dir" && as_dir=.
31606     for ac_exec_ext in '' $ac_executable_extensions; do
31607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31608     ac_cv_prog_AR="lib"
31609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31610     break 2
31611   fi
31612 done
31613   done
31614 IFS=$as_save_IFS
31615 
31616 fi
31617 fi
31618 AR=$ac_cv_prog_AR
31619 if test -n "$AR"; then
31620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31621 $as_echo "$AR" >&6; }
31622 else
31623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31624 $as_echo "no" >&6; }
31625 fi
31626 
31627 
31628   else
31629 
31630 
31631   # Publish this variable in the help.
31632 
31633 
31634   if test "x$AR" = x; then
31635     # The variable is not set by user, try to locate tool using the code snippet
31636     if test -n "$ac_tool_prefix"; then
31637   for ac_prog in ar
31638   do
31639     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31640 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31642 $as_echo_n "checking for $ac_word... " >&6; }
31643 if ${ac_cv_prog_AR+:} false; then :
31644   $as_echo_n "(cached) " >&6
31645 else
31646   if test -n "$AR"; then
31647   ac_cv_prog_AR="$AR" # Let the user override the test.
31648 else
31649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31650 for as_dir in $PATH
31651 do
31652   IFS=$as_save_IFS
31653   test -z "$as_dir" && as_dir=.
31654     for ac_exec_ext in '' $ac_executable_extensions; do
31655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31656     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
31657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31658     break 2
31659   fi
31660 done
31661   done
31662 IFS=$as_save_IFS
31663 
31664 fi
31665 fi
31666 AR=$ac_cv_prog_AR
31667 if test -n "$AR"; then
31668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31669 $as_echo "$AR" >&6; }
31670 else
31671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31672 $as_echo "no" >&6; }
31673 fi
31674 
31675 
31676     test -n "$AR" && break
31677   done
31678 fi
31679 if test -z "$AR"; then
31680   ac_ct_AR=$AR
31681   for ac_prog in ar
31682 do
31683   # Extract the first word of "$ac_prog", so it can be a program name with args.
31684 set dummy $ac_prog; ac_word=$2
31685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31686 $as_echo_n "checking for $ac_word... " >&6; }
31687 if ${ac_cv_prog_ac_ct_AR+:} false; then :
31688   $as_echo_n "(cached) " >&6
31689 else
31690   if test -n "$ac_ct_AR"; then
31691   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
31692 else
31693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31694 for as_dir in $PATH
31695 do
31696   IFS=$as_save_IFS
31697   test -z "$as_dir" && as_dir=.
31698     for ac_exec_ext in '' $ac_executable_extensions; do
31699   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31700     ac_cv_prog_ac_ct_AR="$ac_prog"
31701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31702     break 2
31703   fi
31704 done
31705   done
31706 IFS=$as_save_IFS
31707 
31708 fi
31709 fi
31710 ac_ct_AR=$ac_cv_prog_ac_ct_AR
31711 if test -n "$ac_ct_AR"; then
31712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
31713 $as_echo "$ac_ct_AR" >&6; }
31714 else
31715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31716 $as_echo "no" >&6; }
31717 fi
31718 
31719 
31720   test -n "$ac_ct_AR" && break
31721 done
31722 
31723   if test "x$ac_ct_AR" = x; then
31724     AR=""
31725   else
31726     case $cross_compiling:$ac_tool_warned in
31727 yes:)
31728 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31729 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31730 ac_tool_warned=yes ;;
31731 esac
31732     AR=$ac_ct_AR
31733   fi
31734 fi
31735 
31736   else
31737     # The variable is set, but is it from the command line or the environment?
31738 
31739     # Try to remove the string !AR! from our list.
31740     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
31741     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31742       # If it failed, the variable was not from the command line. Ignore it,
31743       # but warn the user (except for BASH, which is always set by the calling BASH).
31744       if test "xAR" != xBASH; then
31745         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
31746 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
31747       fi
31748       # Try to locate tool using the code snippet
31749       if test -n "$ac_tool_prefix"; then
31750   for ac_prog in ar
31751   do
31752     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31753 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31755 $as_echo_n "checking for $ac_word... " >&6; }
31756 if ${ac_cv_prog_AR+:} false; then :
31757   $as_echo_n "(cached) " >&6
31758 else
31759   if test -n "$AR"; then
31760   ac_cv_prog_AR="$AR" # Let the user override the test.
31761 else
31762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31763 for as_dir in $PATH
31764 do
31765   IFS=$as_save_IFS
31766   test -z "$as_dir" && as_dir=.
31767     for ac_exec_ext in '' $ac_executable_extensions; do
31768   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31769     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
31770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31771     break 2
31772   fi
31773 done
31774   done
31775 IFS=$as_save_IFS
31776 
31777 fi
31778 fi
31779 AR=$ac_cv_prog_AR
31780 if test -n "$AR"; then
31781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31782 $as_echo "$AR" >&6; }
31783 else
31784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31785 $as_echo "no" >&6; }
31786 fi
31787 
31788 
31789     test -n "$AR" && break
31790   done
31791 fi
31792 if test -z "$AR"; then
31793   ac_ct_AR=$AR
31794   for ac_prog in ar
31795 do
31796   # Extract the first word of "$ac_prog", so it can be a program name with args.
31797 set dummy $ac_prog; ac_word=$2
31798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31799 $as_echo_n "checking for $ac_word... " >&6; }
31800 if ${ac_cv_prog_ac_ct_AR+:} false; then :
31801   $as_echo_n "(cached) " >&6
31802 else
31803   if test -n "$ac_ct_AR"; then
31804   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
31805 else
31806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31807 for as_dir in $PATH
31808 do
31809   IFS=$as_save_IFS
31810   test -z "$as_dir" && as_dir=.
31811     for ac_exec_ext in '' $ac_executable_extensions; do
31812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31813     ac_cv_prog_ac_ct_AR="$ac_prog"
31814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31815     break 2
31816   fi
31817 done
31818   done
31819 IFS=$as_save_IFS
31820 
31821 fi
31822 fi
31823 ac_ct_AR=$ac_cv_prog_ac_ct_AR
31824 if test -n "$ac_ct_AR"; then
31825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
31826 $as_echo "$ac_ct_AR" >&6; }
31827 else
31828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31829 $as_echo "no" >&6; }
31830 fi
31831 
31832 
31833   test -n "$ac_ct_AR" && break
31834 done
31835 
31836   if test "x$ac_ct_AR" = x; then
31837     AR=""
31838   else
31839     case $cross_compiling:$ac_tool_warned in
31840 yes:)
31841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31842 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31843 ac_tool_warned=yes ;;
31844 esac
31845     AR=$ac_ct_AR
31846   fi
31847 fi
31848 
31849     else
31850       # If it succeeded, then it was overridden by the user. We will use it
31851       # for the tool.
31852 
31853       # First remove it from the list of overridden variables, so we can test
31854       # for unknown variables in the end.
31855       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31856 
31857       # Check if the provided tool contains a complete path.
31858       tool_specified="$AR"
31859       tool_basename="${tool_specified##*/}"
31860       if test "x$tool_basename" = "x$tool_specified"; then
31861         # A command without a complete path is provided, search $PATH.
31862         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
31863 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
31864         # Extract the first word of "$tool_basename", so it can be a program name with args.
31865 set dummy $tool_basename; ac_word=$2
31866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31867 $as_echo_n "checking for $ac_word... " >&6; }
31868 if ${ac_cv_path_AR+:} false; then :
31869   $as_echo_n "(cached) " >&6
31870 else
31871   case $AR in
31872   [\\/]* | ?:[\\/]*)
31873   ac_cv_path_AR="$AR" # Let the user override the test with a path.
31874   ;;
31875   *)
31876   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31877 for as_dir in $PATH
31878 do
31879   IFS=$as_save_IFS
31880   test -z "$as_dir" && as_dir=.
31881     for ac_exec_ext in '' $ac_executable_extensions; do
31882   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31883     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
31884     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31885     break 2
31886   fi
31887 done
31888   done
31889 IFS=$as_save_IFS
31890 
31891   ;;
31892 esac
31893 fi
31894 AR=$ac_cv_path_AR
31895 if test -n "$AR"; then
31896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31897 $as_echo "$AR" >&6; }
31898 else
31899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31900 $as_echo "no" >&6; }
31901 fi
31902 
31903 
31904         if test "x$AR" = x; then
31905           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31906         fi
31907       else
31908         # Otherwise we believe it is a complete path. Use it as it is.
31909         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
31910 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
31911         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
31912 $as_echo_n "checking for AR... " >&6; }
31913         if test ! -x "$tool_specified"; then
31914           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31915 $as_echo "not found" >&6; }
31916           as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
31917         fi
31918         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31919 $as_echo "$tool_specified" >&6; }
31920       fi
31921     fi
31922   fi
31923 
31924 
31925   fi
31926 
31927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31928 
31929   # First separate the path from the arguments. This will split at the first
31930   # space.
31931   complete="$AR"
31932   path="${complete%% *}"
31933   tmp="$complete EOL"
31934   arguments="${tmp#* }"
31935 
31936   # Input might be given as Windows format, start by converting to
31937   # unix format.
31938   new_path=`$CYGPATH -u "$path"`
31939 
31940   # Now try to locate executable using which
31941   new_path=`$WHICH "$new_path" 2> /dev/null`
31942   # bat and cmd files are not always considered executable in cygwin causing which
31943   # to not find them
31944   if test "x$new_path" = x \
31945       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31946       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31947     new_path=`$CYGPATH -u "$path"`
31948   fi
31949   if test "x$new_path" = x; then
31950     # Oops. Which didn't find the executable.
31951     # The splitting of arguments from the executable at a space might have been incorrect,
31952     # since paths with space are more likely in Windows. Give it another try with the whole
31953     # argument.
31954     path="$complete"
31955     arguments="EOL"
31956     new_path=`$CYGPATH -u "$path"`
31957     new_path=`$WHICH "$new_path" 2> /dev/null`
31958     # bat and cmd files are not always considered executable in cygwin causing which
31959     # to not find them
31960     if test "x$new_path" = x \
31961         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31962         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31963       new_path=`$CYGPATH -u "$path"`
31964     fi
31965     if test "x$new_path" = x; then
31966       # It's still not found. Now this is an unrecoverable error.
31967       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
31968 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
31969       has_space=`$ECHO "$complete" | $GREP " "`
31970       if test "x$has_space" != x; then
31971         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31972 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31973       fi
31974       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
31975     fi
31976   fi
31977 
31978   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31979   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31980   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31981   # "foo.exe" is OK but "foo" is an error.
31982   #
31983   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31984   # It is also a way to make sure we got the proper file name for the real test later on.
31985   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31986   if test "x$test_shortpath" = x; then
31987     # Short path failed, file does not exist as specified.
31988     # Try adding .exe or .cmd
31989     if test -f "${new_path}.exe"; then
31990       input_to_shortpath="${new_path}.exe"
31991     elif test -f "${new_path}.cmd"; then
31992       input_to_shortpath="${new_path}.cmd"
31993     else
31994       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
31995 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
31996       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31997 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31998       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
31999     fi
32000   else
32001     input_to_shortpath="$new_path"
32002   fi
32003 
32004   # Call helper function which possibly converts this using DOS-style short mode.
32005   # If so, the updated path is stored in $new_path.
32006   new_path="$input_to_shortpath"
32007 
32008   input_path="$input_to_shortpath"
32009   # Check if we need to convert this using DOS-style short mode. If the path
32010   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32011   # take no chances and rewrite it.
32012   # Note: m4 eats our [], so we need to use [ and ] instead.
32013   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32014   if test "x$has_forbidden_chars" != x; then
32015     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32016     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32017     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32018     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32019       # Going to short mode and back again did indeed matter. Since short mode is
32020       # case insensitive, let's make it lowercase to improve readability.
32021       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32022       # Now convert it back to Unix-style (cygpath)
32023       input_path=`$CYGPATH -u "$shortmode_path"`
32024       new_path="$input_path"
32025     fi
32026   fi
32027 
32028   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32029   if test "x$test_cygdrive_prefix" = x; then
32030     # As a simple fix, exclude /usr/bin since it's not a real path.
32031     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32032       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32033       # a path prefixed by /cygdrive for fixpath to work.
32034       new_path="$CYGWIN_ROOT_PATH$input_path"
32035     fi
32036   fi
32037 
32038   # remove trailing .exe if any
32039   new_path="${new_path/%.exe/}"
32040 
32041   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32042 
32043   # First separate the path from the arguments. This will split at the first
32044   # space.
32045   complete="$AR"
32046   path="${complete%% *}"
32047   tmp="$complete EOL"
32048   arguments="${tmp#* }"
32049 
32050   # Input might be given as Windows format, start by converting to
32051   # unix format.
32052   new_path="$path"
32053 
32054   windows_path="$new_path"
32055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32056     unix_path=`$CYGPATH -u "$windows_path"`
32057     new_path="$unix_path"
32058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32059     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32060     new_path="$unix_path"
32061   fi
32062 
32063 
32064   # Now try to locate executable using which
32065   new_path=`$WHICH "$new_path" 2> /dev/null`
32066 
32067   if test "x$new_path" = x; then
32068     # Oops. Which didn't find the executable.
32069     # The splitting of arguments from the executable at a space might have been incorrect,
32070     # since paths with space are more likely in Windows. Give it another try with the whole
32071     # argument.
32072     path="$complete"
32073     arguments="EOL"
32074     new_path="$path"
32075 
32076   windows_path="$new_path"
32077   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32078     unix_path=`$CYGPATH -u "$windows_path"`
32079     new_path="$unix_path"
32080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32081     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32082     new_path="$unix_path"
32083   fi
32084 
32085 
32086     new_path=`$WHICH "$new_path" 2> /dev/null`
32087     # bat and cmd files are not always considered executable in MSYS causing which
32088     # to not find them
32089     if test "x$new_path" = x \
32090         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32091         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32092       new_path="$path"
32093 
32094   windows_path="$new_path"
32095   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32096     unix_path=`$CYGPATH -u "$windows_path"`
32097     new_path="$unix_path"
32098   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32099     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32100     new_path="$unix_path"
32101   fi
32102 
32103     fi
32104 
32105     if test "x$new_path" = x; then
32106       # It's still not found. Now this is an unrecoverable error.
32107       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32108 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32109       has_space=`$ECHO "$complete" | $GREP " "`
32110       if test "x$has_space" != x; then
32111         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32112 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32113       fi
32114       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32115     fi
32116   fi
32117 
32118   # Now new_path has a complete unix path to the binary
32119   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32120     # Keep paths in /bin as-is, but remove trailing .exe if any
32121     new_path="${new_path/%.exe/}"
32122     # Do not save /bin paths to all_fixpath_prefixes!
32123   else
32124     # Not in mixed or Windows style, start by that.
32125     new_path=`cmd //c echo $new_path`
32126 
32127   input_path="$new_path"
32128   # Check if we need to convert this using DOS-style short mode. If the path
32129   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32130   # take no chances and rewrite it.
32131   # Note: m4 eats our [], so we need to use [ and ] instead.
32132   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32133   if test "x$has_forbidden_chars" != x; then
32134     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32135     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32136   fi
32137 
32138     # Output is in $new_path
32139 
32140   windows_path="$new_path"
32141   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32142     unix_path=`$CYGPATH -u "$windows_path"`
32143     new_path="$unix_path"
32144   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32145     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32146     new_path="$unix_path"
32147   fi
32148 
32149     # remove trailing .exe if any
32150     new_path="${new_path/%.exe/}"
32151 
32152     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32153     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32154   fi
32155 
32156   else
32157     # We're on a posix platform. Hooray! :)
32158     # First separate the path from the arguments. This will split at the first
32159     # space.
32160     complete="$AR"
32161     path="${complete%% *}"
32162     tmp="$complete EOL"
32163     arguments="${tmp#* }"
32164 
32165     # Cannot rely on the command "which" here since it doesn't always work.
32166     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32167     if test -z "$is_absolute_path"; then
32168       # Path to executable is not absolute. Find it.
32169       IFS_save="$IFS"
32170       IFS=:
32171       for p in $PATH; do
32172         if test -f "$p/$path" && test -x "$p/$path"; then
32173           new_path="$p/$path"
32174           break
32175         fi
32176       done
32177       IFS="$IFS_save"
32178     else
32179       # This is an absolute path, we can use it without further modifications.
32180       new_path="$path"
32181     fi
32182 
32183     if test "x$new_path" = x; then
32184       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32185 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32186       has_space=`$ECHO "$complete" | $GREP " "`
32187       if test "x$has_space" != x; then
32188         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32189 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32190       fi
32191       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32192     fi
32193   fi
32194 
32195   # Now join together the path and the arguments once again
32196   if test "x$arguments" != xEOL; then
32197     new_complete="$new_path ${arguments% *}"
32198   else
32199     new_complete="$new_path"
32200   fi
32201 
32202   if test "x$complete" != "x$new_complete"; then
32203     AR="$new_complete"
32204     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32205 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32206   fi
32207 
32208 
32209 
32210   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32211     ac_ext=m
32212 ac_cpp='$OBJCPP $CPPFLAGS'
32213 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32214 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32215 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32216 if test -n "$ac_tool_prefix"; then
32217   for ac_prog in gcc objcc objc cc CC
32218   do
32219     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32220 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32222 $as_echo_n "checking for $ac_word... " >&6; }
32223 if ${ac_cv_prog_OBJC+:} false; then :
32224   $as_echo_n "(cached) " >&6
32225 else
32226   if test -n "$OBJC"; then
32227   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32228 else
32229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32230 for as_dir in $PATH
32231 do
32232   IFS=$as_save_IFS
32233   test -z "$as_dir" && as_dir=.
32234     for ac_exec_ext in '' $ac_executable_extensions; do
32235   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32236     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32237     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32238     break 2
32239   fi
32240 done
32241   done
32242 IFS=$as_save_IFS
32243 
32244 fi
32245 fi
32246 OBJC=$ac_cv_prog_OBJC
32247 if test -n "$OBJC"; then
32248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32249 $as_echo "$OBJC" >&6; }
32250 else
32251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32252 $as_echo "no" >&6; }
32253 fi
32254 
32255 
32256     test -n "$OBJC" && break
32257   done
32258 fi
32259 if test -z "$OBJC"; then
32260   ac_ct_OBJC=$OBJC
32261   for ac_prog in gcc objcc objc cc CC
32262 do
32263   # Extract the first word of "$ac_prog", so it can be a program name with args.
32264 set dummy $ac_prog; ac_word=$2
32265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32266 $as_echo_n "checking for $ac_word... " >&6; }
32267 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32268   $as_echo_n "(cached) " >&6
32269 else
32270   if test -n "$ac_ct_OBJC"; then
32271   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32272 else
32273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32274 for as_dir in $PATH
32275 do
32276   IFS=$as_save_IFS
32277   test -z "$as_dir" && as_dir=.
32278     for ac_exec_ext in '' $ac_executable_extensions; do
32279   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32280     ac_cv_prog_ac_ct_OBJC="$ac_prog"
32281     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32282     break 2
32283   fi
32284 done
32285   done
32286 IFS=$as_save_IFS
32287 
32288 fi
32289 fi
32290 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32291 if test -n "$ac_ct_OBJC"; then
32292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32293 $as_echo "$ac_ct_OBJC" >&6; }
32294 else
32295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32296 $as_echo "no" >&6; }
32297 fi
32298 
32299 
32300   test -n "$ac_ct_OBJC" && break
32301 done
32302 
32303   if test "x$ac_ct_OBJC" = x; then
32304     OBJC="gcc"
32305   else
32306     case $cross_compiling:$ac_tool_warned in
32307 yes:)
32308 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32309 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32310 ac_tool_warned=yes ;;
32311 esac
32312     OBJC=$ac_ct_OBJC
32313   fi
32314 fi
32315 
32316 # Provide some information about the compiler.
32317 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32318 set X $ac_compile
32319 ac_compiler=$2
32320 for ac_option in --version -v -V -qversion; do
32321   { { ac_try="$ac_compiler $ac_option >&5"
32322 case "(($ac_try" in
32323   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32324   *) ac_try_echo=$ac_try;;
32325 esac
32326 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32327 $as_echo "$ac_try_echo"; } >&5
32328   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32329   ac_status=$?
32330   if test -s conftest.err; then
32331     sed '10a\
32332 ... rest of stderr output deleted ...
32333          10q' conftest.err >conftest.er1
32334     cat conftest.er1 >&5
32335   fi
32336   rm -f conftest.er1 conftest.err
32337   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32338   test $ac_status = 0; }
32339 done
32340 
32341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32342 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32343 if ${ac_cv_objc_compiler_gnu+:} false; then :
32344   $as_echo_n "(cached) " >&6
32345 else
32346   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32347 /* end confdefs.h.  */
32348 
32349 int
32350 main ()
32351 {
32352 #ifndef __GNUC__
32353        choke me
32354 #endif
32355 
32356   ;
32357   return 0;
32358 }
32359 _ACEOF
32360 if ac_fn_objc_try_compile "$LINENO"; then :
32361   ac_compiler_gnu=yes
32362 else
32363   ac_compiler_gnu=no
32364 fi
32365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32366 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32367 
32368 fi
32369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32370 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32371 if test $ac_compiler_gnu = yes; then
32372   GOBJC=yes
32373 else
32374   GOBJC=
32375 fi
32376 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32377 ac_save_OBJCFLAGS=$OBJCFLAGS
32378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32379 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32380 if ${ac_cv_prog_objc_g+:} false; then :
32381   $as_echo_n "(cached) " >&6
32382 else
32383   ac_save_objc_werror_flag=$ac_objc_werror_flag
32384    ac_objc_werror_flag=yes
32385    ac_cv_prog_objc_g=no
32386    OBJCFLAGS="-g"
32387    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32388 /* end confdefs.h.  */
32389 
32390 int
32391 main ()
32392 {
32393 
32394   ;
32395   return 0;
32396 }
32397 _ACEOF
32398 if ac_fn_objc_try_compile "$LINENO"; then :
32399   ac_cv_prog_objc_g=yes
32400 else
32401   OBJCFLAGS=""
32402       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32403 /* end confdefs.h.  */
32404 
32405 int
32406 main ()
32407 {
32408 
32409   ;
32410   return 0;
32411 }
32412 _ACEOF
32413 if ac_fn_objc_try_compile "$LINENO"; then :
32414 
32415 else
32416   ac_objc_werror_flag=$ac_save_objc_werror_flag
32417          OBJCFLAGS="-g"
32418          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32419 /* end confdefs.h.  */
32420 
32421 int
32422 main ()
32423 {
32424 
32425   ;
32426   return 0;
32427 }
32428 _ACEOF
32429 if ac_fn_objc_try_compile "$LINENO"; then :
32430   ac_cv_prog_objc_g=yes
32431 fi
32432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32433 fi
32434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32435 fi
32436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32437    ac_objc_werror_flag=$ac_save_objc_werror_flag
32438 fi
32439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
32440 $as_echo "$ac_cv_prog_objc_g" >&6; }
32441 if test "$ac_test_OBJCFLAGS" = set; then
32442   OBJCFLAGS=$ac_save_OBJCFLAGS
32443 elif test $ac_cv_prog_objc_g = yes; then
32444   if test "$GOBJC" = yes; then
32445     OBJCFLAGS="-g -O2"
32446   else
32447     OBJCFLAGS="-g"
32448   fi
32449 else
32450   if test "$GOBJC" = yes; then
32451     OBJCFLAGS="-O2"
32452   else
32453     OBJCFLAGS=
32454   fi
32455 fi
32456 ac_ext=cpp
32457 ac_cpp='$CXXCPP $CPPFLAGS'
32458 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32459 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32460 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32461 
32462 
32463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32464 
32465   # First separate the path from the arguments. This will split at the first
32466   # space.
32467   complete="$OBJC"
32468   path="${complete%% *}"
32469   tmp="$complete EOL"
32470   arguments="${tmp#* }"
32471 
32472   # Input might be given as Windows format, start by converting to
32473   # unix format.
32474   new_path=`$CYGPATH -u "$path"`
32475 
32476   # Now try to locate executable using which
32477   new_path=`$WHICH "$new_path" 2> /dev/null`
32478   # bat and cmd files are not always considered executable in cygwin causing which
32479   # to not find them
32480   if test "x$new_path" = x \
32481       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32482       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32483     new_path=`$CYGPATH -u "$path"`
32484   fi
32485   if test "x$new_path" = x; then
32486     # Oops. Which didn't find the executable.
32487     # The splitting of arguments from the executable at a space might have been incorrect,
32488     # since paths with space are more likely in Windows. Give it another try with the whole
32489     # argument.
32490     path="$complete"
32491     arguments="EOL"
32492     new_path=`$CYGPATH -u "$path"`
32493     new_path=`$WHICH "$new_path" 2> /dev/null`
32494     # bat and cmd files are not always considered executable in cygwin causing which
32495     # to not find them
32496     if test "x$new_path" = x \
32497         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32498         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32499       new_path=`$CYGPATH -u "$path"`
32500     fi
32501     if test "x$new_path" = x; then
32502       # It's still not found. Now this is an unrecoverable error.
32503       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32504 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32505       has_space=`$ECHO "$complete" | $GREP " "`
32506       if test "x$has_space" != x; then
32507         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32508 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32509       fi
32510       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32511     fi
32512   fi
32513 
32514   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32515   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32516   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32517   # "foo.exe" is OK but "foo" is an error.
32518   #
32519   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32520   # It is also a way to make sure we got the proper file name for the real test later on.
32521   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32522   if test "x$test_shortpath" = x; then
32523     # Short path failed, file does not exist as specified.
32524     # Try adding .exe or .cmd
32525     if test -f "${new_path}.exe"; then
32526       input_to_shortpath="${new_path}.exe"
32527     elif test -f "${new_path}.cmd"; then
32528       input_to_shortpath="${new_path}.cmd"
32529     else
32530       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
32531 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
32532       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32533 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32534       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32535     fi
32536   else
32537     input_to_shortpath="$new_path"
32538   fi
32539 
32540   # Call helper function which possibly converts this using DOS-style short mode.
32541   # If so, the updated path is stored in $new_path.
32542   new_path="$input_to_shortpath"
32543 
32544   input_path="$input_to_shortpath"
32545   # Check if we need to convert this using DOS-style short mode. If the path
32546   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32547   # take no chances and rewrite it.
32548   # Note: m4 eats our [], so we need to use [ and ] instead.
32549   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32550   if test "x$has_forbidden_chars" != x; then
32551     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32552     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32553     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32554     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32555       # Going to short mode and back again did indeed matter. Since short mode is
32556       # case insensitive, let's make it lowercase to improve readability.
32557       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32558       # Now convert it back to Unix-style (cygpath)
32559       input_path=`$CYGPATH -u "$shortmode_path"`
32560       new_path="$input_path"
32561     fi
32562   fi
32563 
32564   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32565   if test "x$test_cygdrive_prefix" = x; then
32566     # As a simple fix, exclude /usr/bin since it's not a real path.
32567     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32568       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32569       # a path prefixed by /cygdrive for fixpath to work.
32570       new_path="$CYGWIN_ROOT_PATH$input_path"
32571     fi
32572   fi
32573 
32574   # remove trailing .exe if any
32575   new_path="${new_path/%.exe/}"
32576 
32577   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32578 
32579   # First separate the path from the arguments. This will split at the first
32580   # space.
32581   complete="$OBJC"
32582   path="${complete%% *}"
32583   tmp="$complete EOL"
32584   arguments="${tmp#* }"
32585 
32586   # Input might be given as Windows format, start by converting to
32587   # unix format.
32588   new_path="$path"
32589 
32590   windows_path="$new_path"
32591   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32592     unix_path=`$CYGPATH -u "$windows_path"`
32593     new_path="$unix_path"
32594   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32595     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32596     new_path="$unix_path"
32597   fi
32598 
32599 
32600   # Now try to locate executable using which
32601   new_path=`$WHICH "$new_path" 2> /dev/null`
32602 
32603   if test "x$new_path" = x; then
32604     # Oops. Which didn't find the executable.
32605     # The splitting of arguments from the executable at a space might have been incorrect,
32606     # since paths with space are more likely in Windows. Give it another try with the whole
32607     # argument.
32608     path="$complete"
32609     arguments="EOL"
32610     new_path="$path"
32611 
32612   windows_path="$new_path"
32613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32614     unix_path=`$CYGPATH -u "$windows_path"`
32615     new_path="$unix_path"
32616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32617     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32618     new_path="$unix_path"
32619   fi
32620 
32621 
32622     new_path=`$WHICH "$new_path" 2> /dev/null`
32623     # bat and cmd files are not always considered executable in MSYS causing which
32624     # to not find them
32625     if test "x$new_path" = x \
32626         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32627         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32628       new_path="$path"
32629 
32630   windows_path="$new_path"
32631   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32632     unix_path=`$CYGPATH -u "$windows_path"`
32633     new_path="$unix_path"
32634   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32635     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32636     new_path="$unix_path"
32637   fi
32638 
32639     fi
32640 
32641     if test "x$new_path" = x; then
32642       # It's still not found. Now this is an unrecoverable error.
32643       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32644 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32645       has_space=`$ECHO "$complete" | $GREP " "`
32646       if test "x$has_space" != x; then
32647         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32648 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32649       fi
32650       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32651     fi
32652   fi
32653 
32654   # Now new_path has a complete unix path to the binary
32655   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32656     # Keep paths in /bin as-is, but remove trailing .exe if any
32657     new_path="${new_path/%.exe/}"
32658     # Do not save /bin paths to all_fixpath_prefixes!
32659   else
32660     # Not in mixed or Windows style, start by that.
32661     new_path=`cmd //c echo $new_path`
32662 
32663   input_path="$new_path"
32664   # Check if we need to convert this using DOS-style short mode. If the path
32665   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32666   # take no chances and rewrite it.
32667   # Note: m4 eats our [], so we need to use [ and ] instead.
32668   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32669   if test "x$has_forbidden_chars" != x; then
32670     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32671     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32672   fi
32673 
32674     # Output is in $new_path
32675 
32676   windows_path="$new_path"
32677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32678     unix_path=`$CYGPATH -u "$windows_path"`
32679     new_path="$unix_path"
32680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32681     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32682     new_path="$unix_path"
32683   fi
32684 
32685     # remove trailing .exe if any
32686     new_path="${new_path/%.exe/}"
32687 
32688     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32689     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32690   fi
32691 
32692   else
32693     # We're on a posix platform. Hooray! :)
32694     # First separate the path from the arguments. This will split at the first
32695     # space.
32696     complete="$OBJC"
32697     path="${complete%% *}"
32698     tmp="$complete EOL"
32699     arguments="${tmp#* }"
32700 
32701     # Cannot rely on the command "which" here since it doesn't always work.
32702     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32703     if test -z "$is_absolute_path"; then
32704       # Path to executable is not absolute. Find it.
32705       IFS_save="$IFS"
32706       IFS=:
32707       for p in $PATH; do
32708         if test -f "$p/$path" && test -x "$p/$path"; then
32709           new_path="$p/$path"
32710           break
32711         fi
32712       done
32713       IFS="$IFS_save"
32714     else
32715       # This is an absolute path, we can use it without further modifications.
32716       new_path="$path"
32717     fi
32718 
32719     if test "x$new_path" = x; then
32720       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32721 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32722       has_space=`$ECHO "$complete" | $GREP " "`
32723       if test "x$has_space" != x; then
32724         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32725 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32726       fi
32727       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32728     fi
32729   fi
32730 
32731   # Now join together the path and the arguments once again
32732   if test "x$arguments" != xEOL; then
32733     new_complete="$new_path ${arguments% *}"
32734   else
32735     new_complete="$new_path"
32736   fi
32737 
32738   if test "x$complete" != "x$new_complete"; then
32739     OBJC="$new_complete"
32740     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
32741 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
32742   fi
32743 
32744 
32745 
32746   # Publish this variable in the help.
32747 
32748 
32749   if test "x$LIPO" = x; then
32750     # The variable is not set by user, try to locate tool using the code snippet
32751     for ac_prog in lipo
32752 do
32753   # Extract the first word of "$ac_prog", so it can be a program name with args.
32754 set dummy $ac_prog; ac_word=$2
32755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32756 $as_echo_n "checking for $ac_word... " >&6; }
32757 if ${ac_cv_path_LIPO+:} false; then :
32758   $as_echo_n "(cached) " >&6
32759 else
32760   case $LIPO in
32761   [\\/]* | ?:[\\/]*)
32762   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
32763   ;;
32764   *)
32765   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32766 for as_dir in $PATH
32767 do
32768   IFS=$as_save_IFS
32769   test -z "$as_dir" && as_dir=.
32770     for ac_exec_ext in '' $ac_executable_extensions; do
32771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32772     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
32773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32774     break 2
32775   fi
32776 done
32777   done
32778 IFS=$as_save_IFS
32779 
32780   ;;
32781 esac
32782 fi
32783 LIPO=$ac_cv_path_LIPO
32784 if test -n "$LIPO"; then
32785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
32786 $as_echo "$LIPO" >&6; }
32787 else
32788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32789 $as_echo "no" >&6; }
32790 fi
32791 
32792 
32793   test -n "$LIPO" && break
32794 done
32795 
32796   else
32797     # The variable is set, but is it from the command line or the environment?
32798 
32799     # Try to remove the string !LIPO! from our list.
32800     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
32801     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32802       # If it failed, the variable was not from the command line. Ignore it,
32803       # but warn the user (except for BASH, which is always set by the calling BASH).
32804       if test "xLIPO" != xBASH; then
32805         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
32806 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
32807       fi
32808       # Try to locate tool using the code snippet
32809       for ac_prog in lipo
32810 do
32811   # Extract the first word of "$ac_prog", so it can be a program name with args.
32812 set dummy $ac_prog; ac_word=$2
32813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32814 $as_echo_n "checking for $ac_word... " >&6; }
32815 if ${ac_cv_path_LIPO+:} false; then :
32816   $as_echo_n "(cached) " >&6
32817 else
32818   case $LIPO in
32819   [\\/]* | ?:[\\/]*)
32820   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
32821   ;;
32822   *)
32823   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32824 for as_dir in $PATH
32825 do
32826   IFS=$as_save_IFS
32827   test -z "$as_dir" && as_dir=.
32828     for ac_exec_ext in '' $ac_executable_extensions; do
32829   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32830     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
32831     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32832     break 2
32833   fi
32834 done
32835   done
32836 IFS=$as_save_IFS
32837 
32838   ;;
32839 esac
32840 fi
32841 LIPO=$ac_cv_path_LIPO
32842 if test -n "$LIPO"; then
32843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
32844 $as_echo "$LIPO" >&6; }
32845 else
32846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32847 $as_echo "no" >&6; }
32848 fi
32849 
32850 
32851   test -n "$LIPO" && break
32852 done
32853 
32854     else
32855       # If it succeeded, then it was overridden by the user. We will use it
32856       # for the tool.
32857 
32858       # First remove it from the list of overridden variables, so we can test
32859       # for unknown variables in the end.
32860       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32861 
32862       # Check if the provided tool contains a complete path.
32863       tool_specified="$LIPO"
32864       tool_basename="${tool_specified##*/}"
32865       if test "x$tool_basename" = "x$tool_specified"; then
32866         # A command without a complete path is provided, search $PATH.
32867         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
32868 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
32869         # Extract the first word of "$tool_basename", so it can be a program name with args.
32870 set dummy $tool_basename; ac_word=$2
32871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32872 $as_echo_n "checking for $ac_word... " >&6; }
32873 if ${ac_cv_path_LIPO+:} false; then :
32874   $as_echo_n "(cached) " >&6
32875 else
32876   case $LIPO in
32877   [\\/]* | ?:[\\/]*)
32878   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
32879   ;;
32880   *)
32881   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32882 for as_dir in $PATH
32883 do
32884   IFS=$as_save_IFS
32885   test -z "$as_dir" && as_dir=.
32886     for ac_exec_ext in '' $ac_executable_extensions; do
32887   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32888     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
32889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32890     break 2
32891   fi
32892 done
32893   done
32894 IFS=$as_save_IFS
32895 
32896   ;;
32897 esac
32898 fi
32899 LIPO=$ac_cv_path_LIPO
32900 if test -n "$LIPO"; then
32901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
32902 $as_echo "$LIPO" >&6; }
32903 else
32904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32905 $as_echo "no" >&6; }
32906 fi
32907 
32908 
32909         if test "x$LIPO" = x; then
32910           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32911         fi
32912       else
32913         # Otherwise we believe it is a complete path. Use it as it is.
32914         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
32915 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
32916         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
32917 $as_echo_n "checking for LIPO... " >&6; }
32918         if test ! -x "$tool_specified"; then
32919           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32920 $as_echo "not found" >&6; }
32921           as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
32922         fi
32923         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32924 $as_echo "$tool_specified" >&6; }
32925       fi
32926     fi
32927   fi
32928 
32929 
32930 
32931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32932 
32933   # First separate the path from the arguments. This will split at the first
32934   # space.
32935   complete="$LIPO"
32936   path="${complete%% *}"
32937   tmp="$complete EOL"
32938   arguments="${tmp#* }"
32939 
32940   # Input might be given as Windows format, start by converting to
32941   # unix format.
32942   new_path=`$CYGPATH -u "$path"`
32943 
32944   # Now try to locate executable using which
32945   new_path=`$WHICH "$new_path" 2> /dev/null`
32946   # bat and cmd files are not always considered executable in cygwin causing which
32947   # to not find them
32948   if test "x$new_path" = x \
32949       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32950       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32951     new_path=`$CYGPATH -u "$path"`
32952   fi
32953   if test "x$new_path" = x; then
32954     # Oops. Which didn't find the executable.
32955     # The splitting of arguments from the executable at a space might have been incorrect,
32956     # since paths with space are more likely in Windows. Give it another try with the whole
32957     # argument.
32958     path="$complete"
32959     arguments="EOL"
32960     new_path=`$CYGPATH -u "$path"`
32961     new_path=`$WHICH "$new_path" 2> /dev/null`
32962     # bat and cmd files are not always considered executable in cygwin causing which
32963     # to not find them
32964     if test "x$new_path" = x \
32965         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32966         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32967       new_path=`$CYGPATH -u "$path"`
32968     fi
32969     if test "x$new_path" = x; then
32970       # It's still not found. Now this is an unrecoverable error.
32971       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
32972 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
32973       has_space=`$ECHO "$complete" | $GREP " "`
32974       if test "x$has_space" != x; then
32975         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32976 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32977       fi
32978       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
32979     fi
32980   fi
32981 
32982   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32983   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32984   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32985   # "foo.exe" is OK but "foo" is an error.
32986   #
32987   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32988   # It is also a way to make sure we got the proper file name for the real test later on.
32989   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32990   if test "x$test_shortpath" = x; then
32991     # Short path failed, file does not exist as specified.
32992     # Try adding .exe or .cmd
32993     if test -f "${new_path}.exe"; then
32994       input_to_shortpath="${new_path}.exe"
32995     elif test -f "${new_path}.cmd"; then
32996       input_to_shortpath="${new_path}.cmd"
32997     else
32998       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
32999 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33000       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33001 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33002       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33003     fi
33004   else
33005     input_to_shortpath="$new_path"
33006   fi
33007 
33008   # Call helper function which possibly converts this using DOS-style short mode.
33009   # If so, the updated path is stored in $new_path.
33010   new_path="$input_to_shortpath"
33011 
33012   input_path="$input_to_shortpath"
33013   # Check if we need to convert this using DOS-style short mode. If the path
33014   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33015   # take no chances and rewrite it.
33016   # Note: m4 eats our [], so we need to use [ and ] instead.
33017   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33018   if test "x$has_forbidden_chars" != x; then
33019     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33020     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33021     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33022     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33023       # Going to short mode and back again did indeed matter. Since short mode is
33024       # case insensitive, let's make it lowercase to improve readability.
33025       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33026       # Now convert it back to Unix-style (cygpath)
33027       input_path=`$CYGPATH -u "$shortmode_path"`
33028       new_path="$input_path"
33029     fi
33030   fi
33031 
33032   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33033   if test "x$test_cygdrive_prefix" = x; then
33034     # As a simple fix, exclude /usr/bin since it's not a real path.
33035     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33036       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33037       # a path prefixed by /cygdrive for fixpath to work.
33038       new_path="$CYGWIN_ROOT_PATH$input_path"
33039     fi
33040   fi
33041 
33042   # remove trailing .exe if any
33043   new_path="${new_path/%.exe/}"
33044 
33045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33046 
33047   # First separate the path from the arguments. This will split at the first
33048   # space.
33049   complete="$LIPO"
33050   path="${complete%% *}"
33051   tmp="$complete EOL"
33052   arguments="${tmp#* }"
33053 
33054   # Input might be given as Windows format, start by converting to
33055   # unix format.
33056   new_path="$path"
33057 
33058   windows_path="$new_path"
33059   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33060     unix_path=`$CYGPATH -u "$windows_path"`
33061     new_path="$unix_path"
33062   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33063     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33064     new_path="$unix_path"
33065   fi
33066 
33067 
33068   # Now try to locate executable using which
33069   new_path=`$WHICH "$new_path" 2> /dev/null`
33070 
33071   if test "x$new_path" = x; then
33072     # Oops. Which didn't find the executable.
33073     # The splitting of arguments from the executable at a space might have been incorrect,
33074     # since paths with space are more likely in Windows. Give it another try with the whole
33075     # argument.
33076     path="$complete"
33077     arguments="EOL"
33078     new_path="$path"
33079 
33080   windows_path="$new_path"
33081   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33082     unix_path=`$CYGPATH -u "$windows_path"`
33083     new_path="$unix_path"
33084   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33085     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33086     new_path="$unix_path"
33087   fi
33088 
33089 
33090     new_path=`$WHICH "$new_path" 2> /dev/null`
33091     # bat and cmd files are not always considered executable in MSYS causing which
33092     # to not find them
33093     if test "x$new_path" = x \
33094         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33095         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33096       new_path="$path"
33097 
33098   windows_path="$new_path"
33099   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33100     unix_path=`$CYGPATH -u "$windows_path"`
33101     new_path="$unix_path"
33102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33103     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33104     new_path="$unix_path"
33105   fi
33106 
33107     fi
33108 
33109     if test "x$new_path" = x; then
33110       # It's still not found. Now this is an unrecoverable error.
33111       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33112 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33113       has_space=`$ECHO "$complete" | $GREP " "`
33114       if test "x$has_space" != x; then
33115         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33116 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33117       fi
33118       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33119     fi
33120   fi
33121 
33122   # Now new_path has a complete unix path to the binary
33123   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33124     # Keep paths in /bin as-is, but remove trailing .exe if any
33125     new_path="${new_path/%.exe/}"
33126     # Do not save /bin paths to all_fixpath_prefixes!
33127   else
33128     # Not in mixed or Windows style, start by that.
33129     new_path=`cmd //c echo $new_path`
33130 
33131   input_path="$new_path"
33132   # Check if we need to convert this using DOS-style short mode. If the path
33133   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33134   # take no chances and rewrite it.
33135   # Note: m4 eats our [], so we need to use [ and ] instead.
33136   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33137   if test "x$has_forbidden_chars" != x; then
33138     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33139     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33140   fi
33141 
33142     # Output is in $new_path
33143 
33144   windows_path="$new_path"
33145   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33146     unix_path=`$CYGPATH -u "$windows_path"`
33147     new_path="$unix_path"
33148   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33149     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33150     new_path="$unix_path"
33151   fi
33152 
33153     # remove trailing .exe if any
33154     new_path="${new_path/%.exe/}"
33155 
33156     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33157     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33158   fi
33159 
33160   else
33161     # We're on a posix platform. Hooray! :)
33162     # First separate the path from the arguments. This will split at the first
33163     # space.
33164     complete="$LIPO"
33165     path="${complete%% *}"
33166     tmp="$complete EOL"
33167     arguments="${tmp#* }"
33168 
33169     # Cannot rely on the command "which" here since it doesn't always work.
33170     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33171     if test -z "$is_absolute_path"; then
33172       # Path to executable is not absolute. Find it.
33173       IFS_save="$IFS"
33174       IFS=:
33175       for p in $PATH; do
33176         if test -f "$p/$path" && test -x "$p/$path"; then
33177           new_path="$p/$path"
33178           break
33179         fi
33180       done
33181       IFS="$IFS_save"
33182     else
33183       # This is an absolute path, we can use it without further modifications.
33184       new_path="$path"
33185     fi
33186 
33187     if test "x$new_path" = x; then
33188       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33189 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33190       has_space=`$ECHO "$complete" | $GREP " "`
33191       if test "x$has_space" != x; then
33192         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33193 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33194       fi
33195       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33196     fi
33197   fi
33198 
33199   # Now join together the path and the arguments once again
33200   if test "x$arguments" != xEOL; then
33201     new_complete="$new_path ${arguments% *}"
33202   else
33203     new_complete="$new_path"
33204   fi
33205 
33206   if test "x$complete" != "x$new_complete"; then
33207     LIPO="$new_complete"
33208     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33209 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33210   fi
33211 
33212   else
33213     OBJC=
33214   fi
33215 
33216   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33217     # Extract the first word of "mt", so it can be a program name with args.
33218 set dummy mt; ac_word=$2
33219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33220 $as_echo_n "checking for $ac_word... " >&6; }
33221 if ${ac_cv_prog_MT+:} false; then :
33222   $as_echo_n "(cached) " >&6
33223 else
33224   if test -n "$MT"; then
33225   ac_cv_prog_MT="$MT" # Let the user override the test.
33226 else
33227   ac_prog_rejected=no
33228 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33229 for as_dir in $PATH
33230 do
33231   IFS=$as_save_IFS
33232   test -z "$as_dir" && as_dir=.
33233     for ac_exec_ext in '' $ac_executable_extensions; do
33234   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33235     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33236        ac_prog_rejected=yes
33237        continue
33238      fi
33239     ac_cv_prog_MT="mt"
33240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33241     break 2
33242   fi
33243 done
33244   done
33245 IFS=$as_save_IFS
33246 
33247 if test $ac_prog_rejected = yes; then
33248   # We found a bogon in the path, so make sure we never use it.
33249   set dummy $ac_cv_prog_MT
33250   shift
33251   if test $# != 0; then
33252     # We chose a different compiler from the bogus one.
33253     # However, it has the same basename, so the bogon will be chosen
33254     # first if we set MT to just the basename; use the full file name.
33255     shift
33256     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33257   fi
33258 fi
33259 fi
33260 fi
33261 MT=$ac_cv_prog_MT
33262 if test -n "$MT"; then
33263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33264 $as_echo "$MT" >&6; }
33265 else
33266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33267 $as_echo "no" >&6; }
33268 fi
33269 
33270 
33271 
33272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33273 
33274   # First separate the path from the arguments. This will split at the first
33275   # space.
33276   complete="$MT"
33277   path="${complete%% *}"
33278   tmp="$complete EOL"
33279   arguments="${tmp#* }"
33280 
33281   # Input might be given as Windows format, start by converting to
33282   # unix format.
33283   new_path=`$CYGPATH -u "$path"`
33284 
33285   # Now try to locate executable using which
33286   new_path=`$WHICH "$new_path" 2> /dev/null`
33287   # bat and cmd files are not always considered executable in cygwin causing which
33288   # to not find them
33289   if test "x$new_path" = x \
33290       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33291       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33292     new_path=`$CYGPATH -u "$path"`
33293   fi
33294   if test "x$new_path" = x; then
33295     # Oops. Which didn't find the executable.
33296     # The splitting of arguments from the executable at a space might have been incorrect,
33297     # since paths with space are more likely in Windows. Give it another try with the whole
33298     # argument.
33299     path="$complete"
33300     arguments="EOL"
33301     new_path=`$CYGPATH -u "$path"`
33302     new_path=`$WHICH "$new_path" 2> /dev/null`
33303     # bat and cmd files are not always considered executable in cygwin causing which
33304     # to not find them
33305     if test "x$new_path" = x \
33306         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33307         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33308       new_path=`$CYGPATH -u "$path"`
33309     fi
33310     if test "x$new_path" = x; then
33311       # It's still not found. Now this is an unrecoverable error.
33312       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33313 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33314       has_space=`$ECHO "$complete" | $GREP " "`
33315       if test "x$has_space" != x; then
33316         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33317 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33318       fi
33319       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33320     fi
33321   fi
33322 
33323   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33324   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33325   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33326   # "foo.exe" is OK but "foo" is an error.
33327   #
33328   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33329   # It is also a way to make sure we got the proper file name for the real test later on.
33330   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33331   if test "x$test_shortpath" = x; then
33332     # Short path failed, file does not exist as specified.
33333     # Try adding .exe or .cmd
33334     if test -f "${new_path}.exe"; then
33335       input_to_shortpath="${new_path}.exe"
33336     elif test -f "${new_path}.cmd"; then
33337       input_to_shortpath="${new_path}.cmd"
33338     else
33339       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33340 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33341       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33342 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33343       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33344     fi
33345   else
33346     input_to_shortpath="$new_path"
33347   fi
33348 
33349   # Call helper function which possibly converts this using DOS-style short mode.
33350   # If so, the updated path is stored in $new_path.
33351   new_path="$input_to_shortpath"
33352 
33353   input_path="$input_to_shortpath"
33354   # Check if we need to convert this using DOS-style short mode. If the path
33355   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33356   # take no chances and rewrite it.
33357   # Note: m4 eats our [], so we need to use [ and ] instead.
33358   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33359   if test "x$has_forbidden_chars" != x; then
33360     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33361     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33362     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33363     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33364       # Going to short mode and back again did indeed matter. Since short mode is
33365       # case insensitive, let's make it lowercase to improve readability.
33366       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33367       # Now convert it back to Unix-style (cygpath)
33368       input_path=`$CYGPATH -u "$shortmode_path"`
33369       new_path="$input_path"
33370     fi
33371   fi
33372 
33373   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33374   if test "x$test_cygdrive_prefix" = x; then
33375     # As a simple fix, exclude /usr/bin since it's not a real path.
33376     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33377       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33378       # a path prefixed by /cygdrive for fixpath to work.
33379       new_path="$CYGWIN_ROOT_PATH$input_path"
33380     fi
33381   fi
33382 
33383   # remove trailing .exe if any
33384   new_path="${new_path/%.exe/}"
33385 
33386   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33387 
33388   # First separate the path from the arguments. This will split at the first
33389   # space.
33390   complete="$MT"
33391   path="${complete%% *}"
33392   tmp="$complete EOL"
33393   arguments="${tmp#* }"
33394 
33395   # Input might be given as Windows format, start by converting to
33396   # unix format.
33397   new_path="$path"
33398 
33399   windows_path="$new_path"
33400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33401     unix_path=`$CYGPATH -u "$windows_path"`
33402     new_path="$unix_path"
33403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33405     new_path="$unix_path"
33406   fi
33407 
33408 
33409   # Now try to locate executable using which
33410   new_path=`$WHICH "$new_path" 2> /dev/null`
33411 
33412   if test "x$new_path" = x; then
33413     # Oops. Which didn't find the executable.
33414     # The splitting of arguments from the executable at a space might have been incorrect,
33415     # since paths with space are more likely in Windows. Give it another try with the whole
33416     # argument.
33417     path="$complete"
33418     arguments="EOL"
33419     new_path="$path"
33420 
33421   windows_path="$new_path"
33422   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33423     unix_path=`$CYGPATH -u "$windows_path"`
33424     new_path="$unix_path"
33425   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33426     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33427     new_path="$unix_path"
33428   fi
33429 
33430 
33431     new_path=`$WHICH "$new_path" 2> /dev/null`
33432     # bat and cmd files are not always considered executable in MSYS causing which
33433     # to not find them
33434     if test "x$new_path" = x \
33435         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33436         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33437       new_path="$path"
33438 
33439   windows_path="$new_path"
33440   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33441     unix_path=`$CYGPATH -u "$windows_path"`
33442     new_path="$unix_path"
33443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33444     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33445     new_path="$unix_path"
33446   fi
33447 
33448     fi
33449 
33450     if test "x$new_path" = x; then
33451       # It's still not found. Now this is an unrecoverable error.
33452       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33453 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33454       has_space=`$ECHO "$complete" | $GREP " "`
33455       if test "x$has_space" != x; then
33456         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33457 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33458       fi
33459       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33460     fi
33461   fi
33462 
33463   # Now new_path has a complete unix path to the binary
33464   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33465     # Keep paths in /bin as-is, but remove trailing .exe if any
33466     new_path="${new_path/%.exe/}"
33467     # Do not save /bin paths to all_fixpath_prefixes!
33468   else
33469     # Not in mixed or Windows style, start by that.
33470     new_path=`cmd //c echo $new_path`
33471 
33472   input_path="$new_path"
33473   # Check if we need to convert this using DOS-style short mode. If the path
33474   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33475   # take no chances and rewrite it.
33476   # Note: m4 eats our [], so we need to use [ and ] instead.
33477   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33478   if test "x$has_forbidden_chars" != x; then
33479     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33480     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33481   fi
33482 
33483     # Output is in $new_path
33484 
33485   windows_path="$new_path"
33486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33487     unix_path=`$CYGPATH -u "$windows_path"`
33488     new_path="$unix_path"
33489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33490     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33491     new_path="$unix_path"
33492   fi
33493 
33494     # remove trailing .exe if any
33495     new_path="${new_path/%.exe/}"
33496 
33497     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33498     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33499   fi
33500 
33501   else
33502     # We're on a posix platform. Hooray! :)
33503     # First separate the path from the arguments. This will split at the first
33504     # space.
33505     complete="$MT"
33506     path="${complete%% *}"
33507     tmp="$complete EOL"
33508     arguments="${tmp#* }"
33509 
33510     # Cannot rely on the command "which" here since it doesn't always work.
33511     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33512     if test -z "$is_absolute_path"; then
33513       # Path to executable is not absolute. Find it.
33514       IFS_save="$IFS"
33515       IFS=:
33516       for p in $PATH; do
33517         if test -f "$p/$path" && test -x "$p/$path"; then
33518           new_path="$p/$path"
33519           break
33520         fi
33521       done
33522       IFS="$IFS_save"
33523     else
33524       # This is an absolute path, we can use it without further modifications.
33525       new_path="$path"
33526     fi
33527 
33528     if test "x$new_path" = x; then
33529       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33530 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33531       has_space=`$ECHO "$complete" | $GREP " "`
33532       if test "x$has_space" != x; then
33533         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33534 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33535       fi
33536       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33537     fi
33538   fi
33539 
33540   # Now join together the path and the arguments once again
33541   if test "x$arguments" != xEOL; then
33542     new_complete="$new_path ${arguments% *}"
33543   else
33544     new_complete="$new_path"
33545   fi
33546 
33547   if test "x$complete" != "x$new_complete"; then
33548     MT="$new_complete"
33549     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
33550 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
33551   fi
33552 
33553     # Setup the resource compiler (RC)
33554     # Extract the first word of "rc", so it can be a program name with args.
33555 set dummy rc; ac_word=$2
33556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33557 $as_echo_n "checking for $ac_word... " >&6; }
33558 if ${ac_cv_prog_RC+:} false; then :
33559   $as_echo_n "(cached) " >&6
33560 else
33561   if test -n "$RC"; then
33562   ac_cv_prog_RC="$RC" # Let the user override the test.
33563 else
33564   ac_prog_rejected=no
33565 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33566 for as_dir in $PATH
33567 do
33568   IFS=$as_save_IFS
33569   test -z "$as_dir" && as_dir=.
33570     for ac_exec_ext in '' $ac_executable_extensions; do
33571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33572     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
33573        ac_prog_rejected=yes
33574        continue
33575      fi
33576     ac_cv_prog_RC="rc"
33577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33578     break 2
33579   fi
33580 done
33581   done
33582 IFS=$as_save_IFS
33583 
33584 if test $ac_prog_rejected = yes; then
33585   # We found a bogon in the path, so make sure we never use it.
33586   set dummy $ac_cv_prog_RC
33587   shift
33588   if test $# != 0; then
33589     # We chose a different compiler from the bogus one.
33590     # However, it has the same basename, so the bogon will be chosen
33591     # first if we set RC to just the basename; use the full file name.
33592     shift
33593     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
33594   fi
33595 fi
33596 fi
33597 fi
33598 RC=$ac_cv_prog_RC
33599 if test -n "$RC"; then
33600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
33601 $as_echo "$RC" >&6; }
33602 else
33603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33604 $as_echo "no" >&6; }
33605 fi
33606 
33607 
33608 
33609   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33610 
33611   # First separate the path from the arguments. This will split at the first
33612   # space.
33613   complete="$RC"
33614   path="${complete%% *}"
33615   tmp="$complete EOL"
33616   arguments="${tmp#* }"
33617 
33618   # Input might be given as Windows format, start by converting to
33619   # unix format.
33620   new_path=`$CYGPATH -u "$path"`
33621 
33622   # Now try to locate executable using which
33623   new_path=`$WHICH "$new_path" 2> /dev/null`
33624   # bat and cmd files are not always considered executable in cygwin causing which
33625   # to not find them
33626   if test "x$new_path" = x \
33627       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33628       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33629     new_path=`$CYGPATH -u "$path"`
33630   fi
33631   if test "x$new_path" = x; then
33632     # Oops. Which didn't find the executable.
33633     # The splitting of arguments from the executable at a space might have been incorrect,
33634     # since paths with space are more likely in Windows. Give it another try with the whole
33635     # argument.
33636     path="$complete"
33637     arguments="EOL"
33638     new_path=`$CYGPATH -u "$path"`
33639     new_path=`$WHICH "$new_path" 2> /dev/null`
33640     # bat and cmd files are not always considered executable in cygwin causing which
33641     # to not find them
33642     if test "x$new_path" = x \
33643         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33644         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33645       new_path=`$CYGPATH -u "$path"`
33646     fi
33647     if test "x$new_path" = x; then
33648       # It's still not found. Now this is an unrecoverable error.
33649       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
33650 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
33651       has_space=`$ECHO "$complete" | $GREP " "`
33652       if test "x$has_space" != x; then
33653         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33654 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33655       fi
33656       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33657     fi
33658   fi
33659 
33660   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33661   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33662   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33663   # "foo.exe" is OK but "foo" is an error.
33664   #
33665   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33666   # It is also a way to make sure we got the proper file name for the real test later on.
33667   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33668   if test "x$test_shortpath" = x; then
33669     # Short path failed, file does not exist as specified.
33670     # Try adding .exe or .cmd
33671     if test -f "${new_path}.exe"; then
33672       input_to_shortpath="${new_path}.exe"
33673     elif test -f "${new_path}.cmd"; then
33674       input_to_shortpath="${new_path}.cmd"
33675     else
33676       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
33677 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
33678       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33679 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33680       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33681     fi
33682   else
33683     input_to_shortpath="$new_path"
33684   fi
33685 
33686   # Call helper function which possibly converts this using DOS-style short mode.
33687   # If so, the updated path is stored in $new_path.
33688   new_path="$input_to_shortpath"
33689 
33690   input_path="$input_to_shortpath"
33691   # Check if we need to convert this using DOS-style short mode. If the path
33692   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33693   # take no chances and rewrite it.
33694   # Note: m4 eats our [], so we need to use [ and ] instead.
33695   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33696   if test "x$has_forbidden_chars" != x; then
33697     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33698     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33699     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33700     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33701       # Going to short mode and back again did indeed matter. Since short mode is
33702       # case insensitive, let's make it lowercase to improve readability.
33703       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33704       # Now convert it back to Unix-style (cygpath)
33705       input_path=`$CYGPATH -u "$shortmode_path"`
33706       new_path="$input_path"
33707     fi
33708   fi
33709 
33710   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33711   if test "x$test_cygdrive_prefix" = x; then
33712     # As a simple fix, exclude /usr/bin since it's not a real path.
33713     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33714       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33715       # a path prefixed by /cygdrive for fixpath to work.
33716       new_path="$CYGWIN_ROOT_PATH$input_path"
33717     fi
33718   fi
33719 
33720   # remove trailing .exe if any
33721   new_path="${new_path/%.exe/}"
33722 
33723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33724 
33725   # First separate the path from the arguments. This will split at the first
33726   # space.
33727   complete="$RC"
33728   path="${complete%% *}"
33729   tmp="$complete EOL"
33730   arguments="${tmp#* }"
33731 
33732   # Input might be given as Windows format, start by converting to
33733   # unix format.
33734   new_path="$path"
33735 
33736   windows_path="$new_path"
33737   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33738     unix_path=`$CYGPATH -u "$windows_path"`
33739     new_path="$unix_path"
33740   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33741     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33742     new_path="$unix_path"
33743   fi
33744 
33745 
33746   # Now try to locate executable using which
33747   new_path=`$WHICH "$new_path" 2> /dev/null`
33748 
33749   if test "x$new_path" = x; then
33750     # Oops. Which didn't find the executable.
33751     # The splitting of arguments from the executable at a space might have been incorrect,
33752     # since paths with space are more likely in Windows. Give it another try with the whole
33753     # argument.
33754     path="$complete"
33755     arguments="EOL"
33756     new_path="$path"
33757 
33758   windows_path="$new_path"
33759   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33760     unix_path=`$CYGPATH -u "$windows_path"`
33761     new_path="$unix_path"
33762   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33763     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33764     new_path="$unix_path"
33765   fi
33766 
33767 
33768     new_path=`$WHICH "$new_path" 2> /dev/null`
33769     # bat and cmd files are not always considered executable in MSYS causing which
33770     # to not find them
33771     if test "x$new_path" = x \
33772         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33773         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33774       new_path="$path"
33775 
33776   windows_path="$new_path"
33777   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33778     unix_path=`$CYGPATH -u "$windows_path"`
33779     new_path="$unix_path"
33780   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33781     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33782     new_path="$unix_path"
33783   fi
33784 
33785     fi
33786 
33787     if test "x$new_path" = x; then
33788       # It's still not found. Now this is an unrecoverable error.
33789       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
33790 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
33791       has_space=`$ECHO "$complete" | $GREP " "`
33792       if test "x$has_space" != x; then
33793         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33794 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33795       fi
33796       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33797     fi
33798   fi
33799 
33800   # Now new_path has a complete unix path to the binary
33801   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33802     # Keep paths in /bin as-is, but remove trailing .exe if any
33803     new_path="${new_path/%.exe/}"
33804     # Do not save /bin paths to all_fixpath_prefixes!
33805   else
33806     # Not in mixed or Windows style, start by that.
33807     new_path=`cmd //c echo $new_path`
33808 
33809   input_path="$new_path"
33810   # Check if we need to convert this using DOS-style short mode. If the path
33811   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33812   # take no chances and rewrite it.
33813   # Note: m4 eats our [], so we need to use [ and ] instead.
33814   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33815   if test "x$has_forbidden_chars" != x; then
33816     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33817     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33818   fi
33819 
33820     # Output is in $new_path
33821 
33822   windows_path="$new_path"
33823   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33824     unix_path=`$CYGPATH -u "$windows_path"`
33825     new_path="$unix_path"
33826   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33827     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33828     new_path="$unix_path"
33829   fi
33830 
33831     # remove trailing .exe if any
33832     new_path="${new_path/%.exe/}"
33833 
33834     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33835     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33836   fi
33837 
33838   else
33839     # We're on a posix platform. Hooray! :)
33840     # First separate the path from the arguments. This will split at the first
33841     # space.
33842     complete="$RC"
33843     path="${complete%% *}"
33844     tmp="$complete EOL"
33845     arguments="${tmp#* }"
33846 
33847     # Cannot rely on the command "which" here since it doesn't always work.
33848     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33849     if test -z "$is_absolute_path"; then
33850       # Path to executable is not absolute. Find it.
33851       IFS_save="$IFS"
33852       IFS=:
33853       for p in $PATH; do
33854         if test -f "$p/$path" && test -x "$p/$path"; then
33855           new_path="$p/$path"
33856           break
33857         fi
33858       done
33859       IFS="$IFS_save"
33860     else
33861       # This is an absolute path, we can use it without further modifications.
33862       new_path="$path"
33863     fi
33864 
33865     if test "x$new_path" = x; then
33866       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
33867 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
33868       has_space=`$ECHO "$complete" | $GREP " "`
33869       if test "x$has_space" != x; then
33870         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33871 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33872       fi
33873       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33874     fi
33875   fi
33876 
33877   # Now join together the path and the arguments once again
33878   if test "x$arguments" != xEOL; then
33879     new_complete="$new_path ${arguments% *}"
33880   else
33881     new_complete="$new_path"
33882   fi
33883 
33884   if test "x$complete" != "x$new_complete"; then
33885     RC="$new_complete"
33886     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
33887 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
33888   fi
33889 
33890     # Extract the first word of "dumpbin", so it can be a program name with args.
33891 set dummy dumpbin; ac_word=$2
33892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33893 $as_echo_n "checking for $ac_word... " >&6; }
33894 if ${ac_cv_prog_DUMPBIN+:} false; then :
33895   $as_echo_n "(cached) " >&6
33896 else
33897   if test -n "$DUMPBIN"; then
33898   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
33899 else
33900 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33901 for as_dir in $PATH
33902 do
33903   IFS=$as_save_IFS
33904   test -z "$as_dir" && as_dir=.
33905     for ac_exec_ext in '' $ac_executable_extensions; do
33906   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33907     ac_cv_prog_DUMPBIN="dumpbin"
33908     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33909     break 2
33910   fi
33911 done
33912   done
33913 IFS=$as_save_IFS
33914 
33915 fi
33916 fi
33917 DUMPBIN=$ac_cv_prog_DUMPBIN
33918 if test -n "$DUMPBIN"; then
33919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
33920 $as_echo "$DUMPBIN" >&6; }
33921 else
33922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33923 $as_echo "no" >&6; }
33924 fi
33925 
33926 
33927 
33928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33929 
33930   # First separate the path from the arguments. This will split at the first
33931   # space.
33932   complete="$DUMPBIN"
33933   path="${complete%% *}"
33934   tmp="$complete EOL"
33935   arguments="${tmp#* }"
33936 
33937   # Input might be given as Windows format, start by converting to
33938   # unix format.
33939   new_path=`$CYGPATH -u "$path"`
33940 
33941   # Now try to locate executable using which
33942   new_path=`$WHICH "$new_path" 2> /dev/null`
33943   # bat and cmd files are not always considered executable in cygwin causing which
33944   # to not find them
33945   if test "x$new_path" = x \
33946       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33947       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33948     new_path=`$CYGPATH -u "$path"`
33949   fi
33950   if test "x$new_path" = x; then
33951     # Oops. Which didn't find the executable.
33952     # The splitting of arguments from the executable at a space might have been incorrect,
33953     # since paths with space are more likely in Windows. Give it another try with the whole
33954     # argument.
33955     path="$complete"
33956     arguments="EOL"
33957     new_path=`$CYGPATH -u "$path"`
33958     new_path=`$WHICH "$new_path" 2> /dev/null`
33959     # bat and cmd files are not always considered executable in cygwin causing which
33960     # to not find them
33961     if test "x$new_path" = x \
33962         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33963         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33964       new_path=`$CYGPATH -u "$path"`
33965     fi
33966     if test "x$new_path" = x; then
33967       # It's still not found. Now this is an unrecoverable error.
33968       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
33969 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
33970       has_space=`$ECHO "$complete" | $GREP " "`
33971       if test "x$has_space" != x; then
33972         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33973 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33974       fi
33975       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
33976     fi
33977   fi
33978 
33979   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33980   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33981   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33982   # "foo.exe" is OK but "foo" is an error.
33983   #
33984   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33985   # It is also a way to make sure we got the proper file name for the real test later on.
33986   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33987   if test "x$test_shortpath" = x; then
33988     # Short path failed, file does not exist as specified.
33989     # Try adding .exe or .cmd
33990     if test -f "${new_path}.exe"; then
33991       input_to_shortpath="${new_path}.exe"
33992     elif test -f "${new_path}.cmd"; then
33993       input_to_shortpath="${new_path}.cmd"
33994     else
33995       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
33996 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
33997       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33998 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33999       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34000     fi
34001   else
34002     input_to_shortpath="$new_path"
34003   fi
34004 
34005   # Call helper function which possibly converts this using DOS-style short mode.
34006   # If so, the updated path is stored in $new_path.
34007   new_path="$input_to_shortpath"
34008 
34009   input_path="$input_to_shortpath"
34010   # Check if we need to convert this using DOS-style short mode. If the path
34011   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34012   # take no chances and rewrite it.
34013   # Note: m4 eats our [], so we need to use [ and ] instead.
34014   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34015   if test "x$has_forbidden_chars" != x; then
34016     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34017     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34018     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34019     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34020       # Going to short mode and back again did indeed matter. Since short mode is
34021       # case insensitive, let's make it lowercase to improve readability.
34022       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34023       # Now convert it back to Unix-style (cygpath)
34024       input_path=`$CYGPATH -u "$shortmode_path"`
34025       new_path="$input_path"
34026     fi
34027   fi
34028 
34029   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34030   if test "x$test_cygdrive_prefix" = x; then
34031     # As a simple fix, exclude /usr/bin since it's not a real path.
34032     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34033       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34034       # a path prefixed by /cygdrive for fixpath to work.
34035       new_path="$CYGWIN_ROOT_PATH$input_path"
34036     fi
34037   fi
34038 
34039   # remove trailing .exe if any
34040   new_path="${new_path/%.exe/}"
34041 
34042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34043 
34044   # First separate the path from the arguments. This will split at the first
34045   # space.
34046   complete="$DUMPBIN"
34047   path="${complete%% *}"
34048   tmp="$complete EOL"
34049   arguments="${tmp#* }"
34050 
34051   # Input might be given as Windows format, start by converting to
34052   # unix format.
34053   new_path="$path"
34054 
34055   windows_path="$new_path"
34056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34057     unix_path=`$CYGPATH -u "$windows_path"`
34058     new_path="$unix_path"
34059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34060     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34061     new_path="$unix_path"
34062   fi
34063 
34064 
34065   # Now try to locate executable using which
34066   new_path=`$WHICH "$new_path" 2> /dev/null`
34067 
34068   if test "x$new_path" = x; then
34069     # Oops. Which didn't find the executable.
34070     # The splitting of arguments from the executable at a space might have been incorrect,
34071     # since paths with space are more likely in Windows. Give it another try with the whole
34072     # argument.
34073     path="$complete"
34074     arguments="EOL"
34075     new_path="$path"
34076 
34077   windows_path="$new_path"
34078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34079     unix_path=`$CYGPATH -u "$windows_path"`
34080     new_path="$unix_path"
34081   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34082     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34083     new_path="$unix_path"
34084   fi
34085 
34086 
34087     new_path=`$WHICH "$new_path" 2> /dev/null`
34088     # bat and cmd files are not always considered executable in MSYS causing which
34089     # to not find them
34090     if test "x$new_path" = x \
34091         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34092         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34093       new_path="$path"
34094 
34095   windows_path="$new_path"
34096   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34097     unix_path=`$CYGPATH -u "$windows_path"`
34098     new_path="$unix_path"
34099   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34100     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34101     new_path="$unix_path"
34102   fi
34103 
34104     fi
34105 
34106     if test "x$new_path" = x; then
34107       # It's still not found. Now this is an unrecoverable error.
34108       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34109 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34110       has_space=`$ECHO "$complete" | $GREP " "`
34111       if test "x$has_space" != x; then
34112         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34113 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34114       fi
34115       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34116     fi
34117   fi
34118 
34119   # Now new_path has a complete unix path to the binary
34120   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34121     # Keep paths in /bin as-is, but remove trailing .exe if any
34122     new_path="${new_path/%.exe/}"
34123     # Do not save /bin paths to all_fixpath_prefixes!
34124   else
34125     # Not in mixed or Windows style, start by that.
34126     new_path=`cmd //c echo $new_path`
34127 
34128   input_path="$new_path"
34129   # Check if we need to convert this using DOS-style short mode. If the path
34130   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34131   # take no chances and rewrite it.
34132   # Note: m4 eats our [], so we need to use [ and ] instead.
34133   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34134   if test "x$has_forbidden_chars" != x; then
34135     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34136     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34137   fi
34138 
34139     # Output is in $new_path
34140 
34141   windows_path="$new_path"
34142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34143     unix_path=`$CYGPATH -u "$windows_path"`
34144     new_path="$unix_path"
34145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34147     new_path="$unix_path"
34148   fi
34149 
34150     # remove trailing .exe if any
34151     new_path="${new_path/%.exe/}"
34152 
34153     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34154     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34155   fi
34156 
34157   else
34158     # We're on a posix platform. Hooray! :)
34159     # First separate the path from the arguments. This will split at the first
34160     # space.
34161     complete="$DUMPBIN"
34162     path="${complete%% *}"
34163     tmp="$complete EOL"
34164     arguments="${tmp#* }"
34165 
34166     # Cannot rely on the command "which" here since it doesn't always work.
34167     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34168     if test -z "$is_absolute_path"; then
34169       # Path to executable is not absolute. Find it.
34170       IFS_save="$IFS"
34171       IFS=:
34172       for p in $PATH; do
34173         if test -f "$p/$path" && test -x "$p/$path"; then
34174           new_path="$p/$path"
34175           break
34176         fi
34177       done
34178       IFS="$IFS_save"
34179     else
34180       # This is an absolute path, we can use it without further modifications.
34181       new_path="$path"
34182     fi
34183 
34184     if test "x$new_path" = x; then
34185       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34186 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34187       has_space=`$ECHO "$complete" | $GREP " "`
34188       if test "x$has_space" != x; then
34189         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34190 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34191       fi
34192       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34193     fi
34194   fi
34195 
34196   # Now join together the path and the arguments once again
34197   if test "x$arguments" != xEOL; then
34198     new_complete="$new_path ${arguments% *}"
34199   else
34200     new_complete="$new_path"
34201   fi
34202 
34203   if test "x$complete" != "x$new_complete"; then
34204     DUMPBIN="$new_complete"
34205     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34206 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34207   fi
34208 
34209     # We need to check for 'msbuild.exe' because at the place where we expect to
34210     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
34211     # won't find the 'msbuild.exe' executable in that case (and the
34212     # 'ac_executable_extensions' is unusable due to performance reasons).
34213     # Notice that we intentionally don't fix up the path to MSBUILD because we
34214     # will call it in a DOS shell during freetype detection on Windows (see
34215     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
34216     # Extract the first word of "msbuild.exe", so it can be a program name with args.
34217 set dummy msbuild.exe; ac_word=$2
34218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34219 $as_echo_n "checking for $ac_word... " >&6; }
34220 if ${ac_cv_prog_MSBUILD+:} false; then :
34221   $as_echo_n "(cached) " >&6
34222 else
34223   if test -n "$MSBUILD"; then
34224   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
34225 else
34226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34227 for as_dir in $PATH
34228 do
34229   IFS=$as_save_IFS
34230   test -z "$as_dir" && as_dir=.
34231     for ac_exec_ext in '' $ac_executable_extensions; do
34232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34233     ac_cv_prog_MSBUILD="msbuild.exe"
34234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34235     break 2
34236   fi
34237 done
34238   done
34239 IFS=$as_save_IFS
34240 
34241 fi
34242 fi
34243 MSBUILD=$ac_cv_prog_MSBUILD
34244 if test -n "$MSBUILD"; then
34245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
34246 $as_echo "$MSBUILD" >&6; }
34247 else
34248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34249 $as_echo "no" >&6; }
34250 fi
34251 
34252 
34253   fi
34254 
34255   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34256 
34257 
34258   # Publish this variable in the help.
34259 
34260 
34261   if test "x$STRIP" = x; then
34262     # The variable is not set by user, try to locate tool using the code snippet
34263     for ac_prog in strip
34264 do
34265   # Extract the first word of "$ac_prog", so it can be a program name with args.
34266 set dummy $ac_prog; ac_word=$2
34267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34268 $as_echo_n "checking for $ac_word... " >&6; }
34269 if ${ac_cv_path_STRIP+:} false; then :
34270   $as_echo_n "(cached) " >&6
34271 else
34272   case $STRIP in
34273   [\\/]* | ?:[\\/]*)
34274   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34275   ;;
34276   *)
34277   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34278 for as_dir in $PATH
34279 do
34280   IFS=$as_save_IFS
34281   test -z "$as_dir" && as_dir=.
34282     for ac_exec_ext in '' $ac_executable_extensions; do
34283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34284     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34286     break 2
34287   fi
34288 done
34289   done
34290 IFS=$as_save_IFS
34291 
34292   ;;
34293 esac
34294 fi
34295 STRIP=$ac_cv_path_STRIP
34296 if test -n "$STRIP"; then
34297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34298 $as_echo "$STRIP" >&6; }
34299 else
34300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34301 $as_echo "no" >&6; }
34302 fi
34303 
34304 
34305   test -n "$STRIP" && break
34306 done
34307 
34308   else
34309     # The variable is set, but is it from the command line or the environment?
34310 
34311     # Try to remove the string !STRIP! from our list.
34312     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34313     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34314       # If it failed, the variable was not from the command line. Ignore it,
34315       # but warn the user (except for BASH, which is always set by the calling BASH).
34316       if test "xSTRIP" != xBASH; then
34317         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34318 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34319       fi
34320       # Try to locate tool using the code snippet
34321       for ac_prog in strip
34322 do
34323   # Extract the first word of "$ac_prog", so it can be a program name with args.
34324 set dummy $ac_prog; ac_word=$2
34325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34326 $as_echo_n "checking for $ac_word... " >&6; }
34327 if ${ac_cv_path_STRIP+:} false; then :
34328   $as_echo_n "(cached) " >&6
34329 else
34330   case $STRIP in
34331   [\\/]* | ?:[\\/]*)
34332   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34333   ;;
34334   *)
34335   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34336 for as_dir in $PATH
34337 do
34338   IFS=$as_save_IFS
34339   test -z "$as_dir" && as_dir=.
34340     for ac_exec_ext in '' $ac_executable_extensions; do
34341   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34342     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34344     break 2
34345   fi
34346 done
34347   done
34348 IFS=$as_save_IFS
34349 
34350   ;;
34351 esac
34352 fi
34353 STRIP=$ac_cv_path_STRIP
34354 if test -n "$STRIP"; then
34355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34356 $as_echo "$STRIP" >&6; }
34357 else
34358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34359 $as_echo "no" >&6; }
34360 fi
34361 
34362 
34363   test -n "$STRIP" && break
34364 done
34365 
34366     else
34367       # If it succeeded, then it was overridden by the user. We will use it
34368       # for the tool.
34369 
34370       # First remove it from the list of overridden variables, so we can test
34371       # for unknown variables in the end.
34372       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34373 
34374       # Check if the provided tool contains a complete path.
34375       tool_specified="$STRIP"
34376       tool_basename="${tool_specified##*/}"
34377       if test "x$tool_basename" = "x$tool_specified"; then
34378         # A command without a complete path is provided, search $PATH.
34379         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34380 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34381         # Extract the first word of "$tool_basename", so it can be a program name with args.
34382 set dummy $tool_basename; ac_word=$2
34383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34384 $as_echo_n "checking for $ac_word... " >&6; }
34385 if ${ac_cv_path_STRIP+:} false; then :
34386   $as_echo_n "(cached) " >&6
34387 else
34388   case $STRIP in
34389   [\\/]* | ?:[\\/]*)
34390   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34391   ;;
34392   *)
34393   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34394 for as_dir in $PATH
34395 do
34396   IFS=$as_save_IFS
34397   test -z "$as_dir" && as_dir=.
34398     for ac_exec_ext in '' $ac_executable_extensions; do
34399   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34400     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34401     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34402     break 2
34403   fi
34404 done
34405   done
34406 IFS=$as_save_IFS
34407 
34408   ;;
34409 esac
34410 fi
34411 STRIP=$ac_cv_path_STRIP
34412 if test -n "$STRIP"; then
34413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34414 $as_echo "$STRIP" >&6; }
34415 else
34416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34417 $as_echo "no" >&6; }
34418 fi
34419 
34420 
34421         if test "x$STRIP" = x; then
34422           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34423         fi
34424       else
34425         # Otherwise we believe it is a complete path. Use it as it is.
34426         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34427 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34428         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34429 $as_echo_n "checking for STRIP... " >&6; }
34430         if test ! -x "$tool_specified"; then
34431           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34432 $as_echo "not found" >&6; }
34433           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34434         fi
34435         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34436 $as_echo "$tool_specified" >&6; }
34437       fi
34438     fi
34439   fi
34440 
34441 
34442 
34443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34444 
34445   # First separate the path from the arguments. This will split at the first
34446   # space.
34447   complete="$STRIP"
34448   path="${complete%% *}"
34449   tmp="$complete EOL"
34450   arguments="${tmp#* }"
34451 
34452   # Input might be given as Windows format, start by converting to
34453   # unix format.
34454   new_path=`$CYGPATH -u "$path"`
34455 
34456   # Now try to locate executable using which
34457   new_path=`$WHICH "$new_path" 2> /dev/null`
34458   # bat and cmd files are not always considered executable in cygwin causing which
34459   # to not find them
34460   if test "x$new_path" = x \
34461       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34462       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34463     new_path=`$CYGPATH -u "$path"`
34464   fi
34465   if test "x$new_path" = x; then
34466     # Oops. Which didn't find the executable.
34467     # The splitting of arguments from the executable at a space might have been incorrect,
34468     # since paths with space are more likely in Windows. Give it another try with the whole
34469     # argument.
34470     path="$complete"
34471     arguments="EOL"
34472     new_path=`$CYGPATH -u "$path"`
34473     new_path=`$WHICH "$new_path" 2> /dev/null`
34474     # bat and cmd files are not always considered executable in cygwin causing which
34475     # to not find them
34476     if test "x$new_path" = x \
34477         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34478         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34479       new_path=`$CYGPATH -u "$path"`
34480     fi
34481     if test "x$new_path" = x; then
34482       # It's still not found. Now this is an unrecoverable error.
34483       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34484 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34485       has_space=`$ECHO "$complete" | $GREP " "`
34486       if test "x$has_space" != x; then
34487         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34488 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34489       fi
34490       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34491     fi
34492   fi
34493 
34494   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34495   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34496   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34497   # "foo.exe" is OK but "foo" is an error.
34498   #
34499   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34500   # It is also a way to make sure we got the proper file name for the real test later on.
34501   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34502   if test "x$test_shortpath" = x; then
34503     # Short path failed, file does not exist as specified.
34504     # Try adding .exe or .cmd
34505     if test -f "${new_path}.exe"; then
34506       input_to_shortpath="${new_path}.exe"
34507     elif test -f "${new_path}.cmd"; then
34508       input_to_shortpath="${new_path}.cmd"
34509     else
34510       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34511 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34512       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34513 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34514       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34515     fi
34516   else
34517     input_to_shortpath="$new_path"
34518   fi
34519 
34520   # Call helper function which possibly converts this using DOS-style short mode.
34521   # If so, the updated path is stored in $new_path.
34522   new_path="$input_to_shortpath"
34523 
34524   input_path="$input_to_shortpath"
34525   # Check if we need to convert this using DOS-style short mode. If the path
34526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34527   # take no chances and rewrite it.
34528   # Note: m4 eats our [], so we need to use [ and ] instead.
34529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34530   if test "x$has_forbidden_chars" != x; then
34531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34532     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34533     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34534     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34535       # Going to short mode and back again did indeed matter. Since short mode is
34536       # case insensitive, let's make it lowercase to improve readability.
34537       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34538       # Now convert it back to Unix-style (cygpath)
34539       input_path=`$CYGPATH -u "$shortmode_path"`
34540       new_path="$input_path"
34541     fi
34542   fi
34543 
34544   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34545   if test "x$test_cygdrive_prefix" = x; then
34546     # As a simple fix, exclude /usr/bin since it's not a real path.
34547     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34548       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34549       # a path prefixed by /cygdrive for fixpath to work.
34550       new_path="$CYGWIN_ROOT_PATH$input_path"
34551     fi
34552   fi
34553 
34554   # remove trailing .exe if any
34555   new_path="${new_path/%.exe/}"
34556 
34557   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34558 
34559   # First separate the path from the arguments. This will split at the first
34560   # space.
34561   complete="$STRIP"
34562   path="${complete%% *}"
34563   tmp="$complete EOL"
34564   arguments="${tmp#* }"
34565 
34566   # Input might be given as Windows format, start by converting to
34567   # unix format.
34568   new_path="$path"
34569 
34570   windows_path="$new_path"
34571   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34572     unix_path=`$CYGPATH -u "$windows_path"`
34573     new_path="$unix_path"
34574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34575     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34576     new_path="$unix_path"
34577   fi
34578 
34579 
34580   # Now try to locate executable using which
34581   new_path=`$WHICH "$new_path" 2> /dev/null`
34582 
34583   if test "x$new_path" = x; then
34584     # Oops. Which didn't find the executable.
34585     # The splitting of arguments from the executable at a space might have been incorrect,
34586     # since paths with space are more likely in Windows. Give it another try with the whole
34587     # argument.
34588     path="$complete"
34589     arguments="EOL"
34590     new_path="$path"
34591 
34592   windows_path="$new_path"
34593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34594     unix_path=`$CYGPATH -u "$windows_path"`
34595     new_path="$unix_path"
34596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34597     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34598     new_path="$unix_path"
34599   fi
34600 
34601 
34602     new_path=`$WHICH "$new_path" 2> /dev/null`
34603     # bat and cmd files are not always considered executable in MSYS causing which
34604     # to not find them
34605     if test "x$new_path" = x \
34606         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34607         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34608       new_path="$path"
34609 
34610   windows_path="$new_path"
34611   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34612     unix_path=`$CYGPATH -u "$windows_path"`
34613     new_path="$unix_path"
34614   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34615     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34616     new_path="$unix_path"
34617   fi
34618 
34619     fi
34620 
34621     if test "x$new_path" = x; then
34622       # It's still not found. Now this is an unrecoverable error.
34623       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34624 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34625       has_space=`$ECHO "$complete" | $GREP " "`
34626       if test "x$has_space" != x; then
34627         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34628 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34629       fi
34630       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34631     fi
34632   fi
34633 
34634   # Now new_path has a complete unix path to the binary
34635   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34636     # Keep paths in /bin as-is, but remove trailing .exe if any
34637     new_path="${new_path/%.exe/}"
34638     # Do not save /bin paths to all_fixpath_prefixes!
34639   else
34640     # Not in mixed or Windows style, start by that.
34641     new_path=`cmd //c echo $new_path`
34642 
34643   input_path="$new_path"
34644   # Check if we need to convert this using DOS-style short mode. If the path
34645   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34646   # take no chances and rewrite it.
34647   # Note: m4 eats our [], so we need to use [ and ] instead.
34648   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34649   if test "x$has_forbidden_chars" != x; then
34650     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34651     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34652   fi
34653 
34654     # Output is in $new_path
34655 
34656   windows_path="$new_path"
34657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34658     unix_path=`$CYGPATH -u "$windows_path"`
34659     new_path="$unix_path"
34660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34661     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34662     new_path="$unix_path"
34663   fi
34664 
34665     # remove trailing .exe if any
34666     new_path="${new_path/%.exe/}"
34667 
34668     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34669     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34670   fi
34671 
34672   else
34673     # We're on a posix platform. Hooray! :)
34674     # First separate the path from the arguments. This will split at the first
34675     # space.
34676     complete="$STRIP"
34677     path="${complete%% *}"
34678     tmp="$complete EOL"
34679     arguments="${tmp#* }"
34680 
34681     # Cannot rely on the command "which" here since it doesn't always work.
34682     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34683     if test -z "$is_absolute_path"; then
34684       # Path to executable is not absolute. Find it.
34685       IFS_save="$IFS"
34686       IFS=:
34687       for p in $PATH; do
34688         if test -f "$p/$path" && test -x "$p/$path"; then
34689           new_path="$p/$path"
34690           break
34691         fi
34692       done
34693       IFS="$IFS_save"
34694     else
34695       # This is an absolute path, we can use it without further modifications.
34696       new_path="$path"
34697     fi
34698 
34699     if test "x$new_path" = x; then
34700       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34701 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34702       has_space=`$ECHO "$complete" | $GREP " "`
34703       if test "x$has_space" != x; then
34704         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34705 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34706       fi
34707       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34708     fi
34709   fi
34710 
34711   # Now join together the path and the arguments once again
34712   if test "x$arguments" != xEOL; then
34713     new_complete="$new_path ${arguments% *}"
34714   else
34715     new_complete="$new_path"
34716   fi
34717 
34718   if test "x$complete" != "x$new_complete"; then
34719     STRIP="$new_complete"
34720     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
34721 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
34722   fi
34723 
34724 
34725 
34726   # Publish this variable in the help.
34727 
34728 
34729   if test "x$NM" = x; then
34730     # The variable is not set by user, try to locate tool using the code snippet
34731     for ac_prog in nm
34732 do
34733   # Extract the first word of "$ac_prog", so it can be a program name with args.
34734 set dummy $ac_prog; ac_word=$2
34735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34736 $as_echo_n "checking for $ac_word... " >&6; }
34737 if ${ac_cv_path_NM+:} false; then :
34738   $as_echo_n "(cached) " >&6
34739 else
34740   case $NM in
34741   [\\/]* | ?:[\\/]*)
34742   ac_cv_path_NM="$NM" # Let the user override the test with a path.
34743   ;;
34744   *)
34745   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34746 for as_dir in $PATH
34747 do
34748   IFS=$as_save_IFS
34749   test -z "$as_dir" && as_dir=.
34750     for ac_exec_ext in '' $ac_executable_extensions; do
34751   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34752     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
34753     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34754     break 2
34755   fi
34756 done
34757   done
34758 IFS=$as_save_IFS
34759 
34760   ;;
34761 esac
34762 fi
34763 NM=$ac_cv_path_NM
34764 if test -n "$NM"; then
34765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
34766 $as_echo "$NM" >&6; }
34767 else
34768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34769 $as_echo "no" >&6; }
34770 fi
34771 
34772 
34773   test -n "$NM" && break
34774 done
34775 
34776   else
34777     # The variable is set, but is it from the command line or the environment?
34778 
34779     # Try to remove the string !NM! from our list.
34780     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
34781     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34782       # If it failed, the variable was not from the command line. Ignore it,
34783       # but warn the user (except for BASH, which is always set by the calling BASH).
34784       if test "xNM" != xBASH; then
34785         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
34786 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
34787       fi
34788       # Try to locate tool using the code snippet
34789       for ac_prog in nm
34790 do
34791   # Extract the first word of "$ac_prog", so it can be a program name with args.
34792 set dummy $ac_prog; ac_word=$2
34793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34794 $as_echo_n "checking for $ac_word... " >&6; }
34795 if ${ac_cv_path_NM+:} false; then :
34796   $as_echo_n "(cached) " >&6
34797 else
34798   case $NM in
34799   [\\/]* | ?:[\\/]*)
34800   ac_cv_path_NM="$NM" # Let the user override the test with a path.
34801   ;;
34802   *)
34803   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34804 for as_dir in $PATH
34805 do
34806   IFS=$as_save_IFS
34807   test -z "$as_dir" && as_dir=.
34808     for ac_exec_ext in '' $ac_executable_extensions; do
34809   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34810     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
34811     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34812     break 2
34813   fi
34814 done
34815   done
34816 IFS=$as_save_IFS
34817 
34818   ;;
34819 esac
34820 fi
34821 NM=$ac_cv_path_NM
34822 if test -n "$NM"; then
34823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
34824 $as_echo "$NM" >&6; }
34825 else
34826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34827 $as_echo "no" >&6; }
34828 fi
34829 
34830 
34831   test -n "$NM" && break
34832 done
34833 
34834     else
34835       # If it succeeded, then it was overridden by the user. We will use it
34836       # for the tool.
34837 
34838       # First remove it from the list of overridden variables, so we can test
34839       # for unknown variables in the end.
34840       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34841 
34842       # Check if the provided tool contains a complete path.
34843       tool_specified="$NM"
34844       tool_basename="${tool_specified##*/}"
34845       if test "x$tool_basename" = "x$tool_specified"; then
34846         # A command without a complete path is provided, search $PATH.
34847         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
34848 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
34849         # Extract the first word of "$tool_basename", so it can be a program name with args.
34850 set dummy $tool_basename; ac_word=$2
34851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34852 $as_echo_n "checking for $ac_word... " >&6; }
34853 if ${ac_cv_path_NM+:} false; then :
34854   $as_echo_n "(cached) " >&6
34855 else
34856   case $NM in
34857   [\\/]* | ?:[\\/]*)
34858   ac_cv_path_NM="$NM" # Let the user override the test with a path.
34859   ;;
34860   *)
34861   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34862 for as_dir in $PATH
34863 do
34864   IFS=$as_save_IFS
34865   test -z "$as_dir" && as_dir=.
34866     for ac_exec_ext in '' $ac_executable_extensions; do
34867   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34868     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
34869     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34870     break 2
34871   fi
34872 done
34873   done
34874 IFS=$as_save_IFS
34875 
34876   ;;
34877 esac
34878 fi
34879 NM=$ac_cv_path_NM
34880 if test -n "$NM"; then
34881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
34882 $as_echo "$NM" >&6; }
34883 else
34884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34885 $as_echo "no" >&6; }
34886 fi
34887 
34888 
34889         if test "x$NM" = x; then
34890           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34891         fi
34892       else
34893         # Otherwise we believe it is a complete path. Use it as it is.
34894         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
34895 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
34896         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
34897 $as_echo_n "checking for NM... " >&6; }
34898         if test ! -x "$tool_specified"; then
34899           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34900 $as_echo "not found" >&6; }
34901           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
34902         fi
34903         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34904 $as_echo "$tool_specified" >&6; }
34905       fi
34906     fi
34907   fi
34908 
34909 
34910 
34911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34912 
34913   # First separate the path from the arguments. This will split at the first
34914   # space.
34915   complete="$NM"
34916   path="${complete%% *}"
34917   tmp="$complete EOL"
34918   arguments="${tmp#* }"
34919 
34920   # Input might be given as Windows format, start by converting to
34921   # unix format.
34922   new_path=`$CYGPATH -u "$path"`
34923 
34924   # Now try to locate executable using which
34925   new_path=`$WHICH "$new_path" 2> /dev/null`
34926   # bat and cmd files are not always considered executable in cygwin causing which
34927   # to not find them
34928   if test "x$new_path" = x \
34929       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34930       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34931     new_path=`$CYGPATH -u "$path"`
34932   fi
34933   if test "x$new_path" = x; then
34934     # Oops. Which didn't find the executable.
34935     # The splitting of arguments from the executable at a space might have been incorrect,
34936     # since paths with space are more likely in Windows. Give it another try with the whole
34937     # argument.
34938     path="$complete"
34939     arguments="EOL"
34940     new_path=`$CYGPATH -u "$path"`
34941     new_path=`$WHICH "$new_path" 2> /dev/null`
34942     # bat and cmd files are not always considered executable in cygwin causing which
34943     # to not find them
34944     if test "x$new_path" = x \
34945         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34946         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34947       new_path=`$CYGPATH -u "$path"`
34948     fi
34949     if test "x$new_path" = x; then
34950       # It's still not found. Now this is an unrecoverable error.
34951       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
34952 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
34953       has_space=`$ECHO "$complete" | $GREP " "`
34954       if test "x$has_space" != x; then
34955         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34956 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34957       fi
34958       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
34959     fi
34960   fi
34961 
34962   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34963   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34964   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34965   # "foo.exe" is OK but "foo" is an error.
34966   #
34967   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34968   # It is also a way to make sure we got the proper file name for the real test later on.
34969   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34970   if test "x$test_shortpath" = x; then
34971     # Short path failed, file does not exist as specified.
34972     # Try adding .exe or .cmd
34973     if test -f "${new_path}.exe"; then
34974       input_to_shortpath="${new_path}.exe"
34975     elif test -f "${new_path}.cmd"; then
34976       input_to_shortpath="${new_path}.cmd"
34977     else
34978       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
34979 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
34980       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34981 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34982       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
34983     fi
34984   else
34985     input_to_shortpath="$new_path"
34986   fi
34987 
34988   # Call helper function which possibly converts this using DOS-style short mode.
34989   # If so, the updated path is stored in $new_path.
34990   new_path="$input_to_shortpath"
34991 
34992   input_path="$input_to_shortpath"
34993   # Check if we need to convert this using DOS-style short mode. If the path
34994   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34995   # take no chances and rewrite it.
34996   # Note: m4 eats our [], so we need to use [ and ] instead.
34997   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34998   if test "x$has_forbidden_chars" != x; then
34999     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35000     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35001     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35002     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35003       # Going to short mode and back again did indeed matter. Since short mode is
35004       # case insensitive, let's make it lowercase to improve readability.
35005       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35006       # Now convert it back to Unix-style (cygpath)
35007       input_path=`$CYGPATH -u "$shortmode_path"`
35008       new_path="$input_path"
35009     fi
35010   fi
35011 
35012   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35013   if test "x$test_cygdrive_prefix" = x; then
35014     # As a simple fix, exclude /usr/bin since it's not a real path.
35015     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35016       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35017       # a path prefixed by /cygdrive for fixpath to work.
35018       new_path="$CYGWIN_ROOT_PATH$input_path"
35019     fi
35020   fi
35021 
35022   # remove trailing .exe if any
35023   new_path="${new_path/%.exe/}"
35024 
35025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35026 
35027   # First separate the path from the arguments. This will split at the first
35028   # space.
35029   complete="$NM"
35030   path="${complete%% *}"
35031   tmp="$complete EOL"
35032   arguments="${tmp#* }"
35033 
35034   # Input might be given as Windows format, start by converting to
35035   # unix format.
35036   new_path="$path"
35037 
35038   windows_path="$new_path"
35039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35040     unix_path=`$CYGPATH -u "$windows_path"`
35041     new_path="$unix_path"
35042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35043     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35044     new_path="$unix_path"
35045   fi
35046 
35047 
35048   # Now try to locate executable using which
35049   new_path=`$WHICH "$new_path" 2> /dev/null`
35050 
35051   if test "x$new_path" = x; then
35052     # Oops. Which didn't find the executable.
35053     # The splitting of arguments from the executable at a space might have been incorrect,
35054     # since paths with space are more likely in Windows. Give it another try with the whole
35055     # argument.
35056     path="$complete"
35057     arguments="EOL"
35058     new_path="$path"
35059 
35060   windows_path="$new_path"
35061   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35062     unix_path=`$CYGPATH -u "$windows_path"`
35063     new_path="$unix_path"
35064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35065     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35066     new_path="$unix_path"
35067   fi
35068 
35069 
35070     new_path=`$WHICH "$new_path" 2> /dev/null`
35071     # bat and cmd files are not always considered executable in MSYS causing which
35072     # to not find them
35073     if test "x$new_path" = x \
35074         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35075         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35076       new_path="$path"
35077 
35078   windows_path="$new_path"
35079   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35080     unix_path=`$CYGPATH -u "$windows_path"`
35081     new_path="$unix_path"
35082   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35083     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35084     new_path="$unix_path"
35085   fi
35086 
35087     fi
35088 
35089     if test "x$new_path" = x; then
35090       # It's still not found. Now this is an unrecoverable error.
35091       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35092 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35093       has_space=`$ECHO "$complete" | $GREP " "`
35094       if test "x$has_space" != x; then
35095         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35096 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35097       fi
35098       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35099     fi
35100   fi
35101 
35102   # Now new_path has a complete unix path to the binary
35103   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35104     # Keep paths in /bin as-is, but remove trailing .exe if any
35105     new_path="${new_path/%.exe/}"
35106     # Do not save /bin paths to all_fixpath_prefixes!
35107   else
35108     # Not in mixed or Windows style, start by that.
35109     new_path=`cmd //c echo $new_path`
35110 
35111   input_path="$new_path"
35112   # Check if we need to convert this using DOS-style short mode. If the path
35113   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35114   # take no chances and rewrite it.
35115   # Note: m4 eats our [], so we need to use [ and ] instead.
35116   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35117   if test "x$has_forbidden_chars" != x; then
35118     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35119     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35120   fi
35121 
35122     # Output is in $new_path
35123 
35124   windows_path="$new_path"
35125   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35126     unix_path=`$CYGPATH -u "$windows_path"`
35127     new_path="$unix_path"
35128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35129     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35130     new_path="$unix_path"
35131   fi
35132 
35133     # remove trailing .exe if any
35134     new_path="${new_path/%.exe/}"
35135 
35136     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35137     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35138   fi
35139 
35140   else
35141     # We're on a posix platform. Hooray! :)
35142     # First separate the path from the arguments. This will split at the first
35143     # space.
35144     complete="$NM"
35145     path="${complete%% *}"
35146     tmp="$complete EOL"
35147     arguments="${tmp#* }"
35148 
35149     # Cannot rely on the command "which" here since it doesn't always work.
35150     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35151     if test -z "$is_absolute_path"; then
35152       # Path to executable is not absolute. Find it.
35153       IFS_save="$IFS"
35154       IFS=:
35155       for p in $PATH; do
35156         if test -f "$p/$path" && test -x "$p/$path"; then
35157           new_path="$p/$path"
35158           break
35159         fi
35160       done
35161       IFS="$IFS_save"
35162     else
35163       # This is an absolute path, we can use it without further modifications.
35164       new_path="$path"
35165     fi
35166 
35167     if test "x$new_path" = x; then
35168       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35169 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35170       has_space=`$ECHO "$complete" | $GREP " "`
35171       if test "x$has_space" != x; then
35172         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35173 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35174       fi
35175       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35176     fi
35177   fi
35178 
35179   # Now join together the path and the arguments once again
35180   if test "x$arguments" != xEOL; then
35181     new_complete="$new_path ${arguments% *}"
35182   else
35183     new_complete="$new_path"
35184   fi
35185 
35186   if test "x$complete" != "x$new_complete"; then
35187     NM="$new_complete"
35188     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35189 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35190   fi
35191 
35192 
35193 
35194   # Publish this variable in the help.
35195 
35196 
35197   if test "x$GNM" = x; then
35198     # The variable is not set by user, try to locate tool using the code snippet
35199     for ac_prog in gnm
35200 do
35201   # Extract the first word of "$ac_prog", so it can be a program name with args.
35202 set dummy $ac_prog; ac_word=$2
35203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35204 $as_echo_n "checking for $ac_word... " >&6; }
35205 if ${ac_cv_path_GNM+:} false; then :
35206   $as_echo_n "(cached) " >&6
35207 else
35208   case $GNM in
35209   [\\/]* | ?:[\\/]*)
35210   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35211   ;;
35212   *)
35213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35214 for as_dir in $PATH
35215 do
35216   IFS=$as_save_IFS
35217   test -z "$as_dir" && as_dir=.
35218     for ac_exec_ext in '' $ac_executable_extensions; do
35219   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35220     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35222     break 2
35223   fi
35224 done
35225   done
35226 IFS=$as_save_IFS
35227 
35228   ;;
35229 esac
35230 fi
35231 GNM=$ac_cv_path_GNM
35232 if test -n "$GNM"; then
35233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35234 $as_echo "$GNM" >&6; }
35235 else
35236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35237 $as_echo "no" >&6; }
35238 fi
35239 
35240 
35241   test -n "$GNM" && break
35242 done
35243 
35244   else
35245     # The variable is set, but is it from the command line or the environment?
35246 
35247     # Try to remove the string !GNM! from our list.
35248     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35249     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35250       # If it failed, the variable was not from the command line. Ignore it,
35251       # but warn the user (except for BASH, which is always set by the calling BASH).
35252       if test "xGNM" != xBASH; then
35253         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35254 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35255       fi
35256       # Try to locate tool using the code snippet
35257       for ac_prog in gnm
35258 do
35259   # Extract the first word of "$ac_prog", so it can be a program name with args.
35260 set dummy $ac_prog; ac_word=$2
35261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35262 $as_echo_n "checking for $ac_word... " >&6; }
35263 if ${ac_cv_path_GNM+:} false; then :
35264   $as_echo_n "(cached) " >&6
35265 else
35266   case $GNM in
35267   [\\/]* | ?:[\\/]*)
35268   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35269   ;;
35270   *)
35271   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35272 for as_dir in $PATH
35273 do
35274   IFS=$as_save_IFS
35275   test -z "$as_dir" && as_dir=.
35276     for ac_exec_ext in '' $ac_executable_extensions; do
35277   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35278     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35280     break 2
35281   fi
35282 done
35283   done
35284 IFS=$as_save_IFS
35285 
35286   ;;
35287 esac
35288 fi
35289 GNM=$ac_cv_path_GNM
35290 if test -n "$GNM"; then
35291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35292 $as_echo "$GNM" >&6; }
35293 else
35294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35295 $as_echo "no" >&6; }
35296 fi
35297 
35298 
35299   test -n "$GNM" && break
35300 done
35301 
35302     else
35303       # If it succeeded, then it was overridden by the user. We will use it
35304       # for the tool.
35305 
35306       # First remove it from the list of overridden variables, so we can test
35307       # for unknown variables in the end.
35308       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35309 
35310       # Check if the provided tool contains a complete path.
35311       tool_specified="$GNM"
35312       tool_basename="${tool_specified##*/}"
35313       if test "x$tool_basename" = "x$tool_specified"; then
35314         # A command without a complete path is provided, search $PATH.
35315         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35316 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35317         # Extract the first word of "$tool_basename", so it can be a program name with args.
35318 set dummy $tool_basename; ac_word=$2
35319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35320 $as_echo_n "checking for $ac_word... " >&6; }
35321 if ${ac_cv_path_GNM+:} false; then :
35322   $as_echo_n "(cached) " >&6
35323 else
35324   case $GNM in
35325   [\\/]* | ?:[\\/]*)
35326   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35327   ;;
35328   *)
35329   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35330 for as_dir in $PATH
35331 do
35332   IFS=$as_save_IFS
35333   test -z "$as_dir" && as_dir=.
35334     for ac_exec_ext in '' $ac_executable_extensions; do
35335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35336     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35338     break 2
35339   fi
35340 done
35341   done
35342 IFS=$as_save_IFS
35343 
35344   ;;
35345 esac
35346 fi
35347 GNM=$ac_cv_path_GNM
35348 if test -n "$GNM"; then
35349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35350 $as_echo "$GNM" >&6; }
35351 else
35352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35353 $as_echo "no" >&6; }
35354 fi
35355 
35356 
35357         if test "x$GNM" = x; then
35358           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35359         fi
35360       else
35361         # Otherwise we believe it is a complete path. Use it as it is.
35362         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35363 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35364         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35365 $as_echo_n "checking for GNM... " >&6; }
35366         if test ! -x "$tool_specified"; then
35367           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35368 $as_echo "not found" >&6; }
35369           as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35370         fi
35371         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35372 $as_echo "$tool_specified" >&6; }
35373       fi
35374     fi
35375   fi
35376 
35377 
35378 
35379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35380 
35381   # First separate the path from the arguments. This will split at the first
35382   # space.
35383   complete="$GNM"
35384   path="${complete%% *}"
35385   tmp="$complete EOL"
35386   arguments="${tmp#* }"
35387 
35388   # Input might be given as Windows format, start by converting to
35389   # unix format.
35390   new_path=`$CYGPATH -u "$path"`
35391 
35392   # Now try to locate executable using which
35393   new_path=`$WHICH "$new_path" 2> /dev/null`
35394   # bat and cmd files are not always considered executable in cygwin causing which
35395   # to not find them
35396   if test "x$new_path" = x \
35397       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35398       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35399     new_path=`$CYGPATH -u "$path"`
35400   fi
35401   if test "x$new_path" = x; then
35402     # Oops. Which didn't find the executable.
35403     # The splitting of arguments from the executable at a space might have been incorrect,
35404     # since paths with space are more likely in Windows. Give it another try with the whole
35405     # argument.
35406     path="$complete"
35407     arguments="EOL"
35408     new_path=`$CYGPATH -u "$path"`
35409     new_path=`$WHICH "$new_path" 2> /dev/null`
35410     # bat and cmd files are not always considered executable in cygwin causing which
35411     # to not find them
35412     if test "x$new_path" = x \
35413         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35414         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35415       new_path=`$CYGPATH -u "$path"`
35416     fi
35417     if test "x$new_path" = x; then
35418       # It's still not found. Now this is an unrecoverable error.
35419       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35420 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35421       has_space=`$ECHO "$complete" | $GREP " "`
35422       if test "x$has_space" != x; then
35423         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35424 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35425       fi
35426       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35427     fi
35428   fi
35429 
35430   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35431   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35432   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35433   # "foo.exe" is OK but "foo" is an error.
35434   #
35435   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35436   # It is also a way to make sure we got the proper file name for the real test later on.
35437   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35438   if test "x$test_shortpath" = x; then
35439     # Short path failed, file does not exist as specified.
35440     # Try adding .exe or .cmd
35441     if test -f "${new_path}.exe"; then
35442       input_to_shortpath="${new_path}.exe"
35443     elif test -f "${new_path}.cmd"; then
35444       input_to_shortpath="${new_path}.cmd"
35445     else
35446       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35447 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35448       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35449 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35450       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35451     fi
35452   else
35453     input_to_shortpath="$new_path"
35454   fi
35455 
35456   # Call helper function which possibly converts this using DOS-style short mode.
35457   # If so, the updated path is stored in $new_path.
35458   new_path="$input_to_shortpath"
35459 
35460   input_path="$input_to_shortpath"
35461   # Check if we need to convert this using DOS-style short mode. If the path
35462   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35463   # take no chances and rewrite it.
35464   # Note: m4 eats our [], so we need to use [ and ] instead.
35465   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35466   if test "x$has_forbidden_chars" != x; then
35467     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35468     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35469     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35470     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35471       # Going to short mode and back again did indeed matter. Since short mode is
35472       # case insensitive, let's make it lowercase to improve readability.
35473       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35474       # Now convert it back to Unix-style (cygpath)
35475       input_path=`$CYGPATH -u "$shortmode_path"`
35476       new_path="$input_path"
35477     fi
35478   fi
35479 
35480   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35481   if test "x$test_cygdrive_prefix" = x; then
35482     # As a simple fix, exclude /usr/bin since it's not a real path.
35483     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35484       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35485       # a path prefixed by /cygdrive for fixpath to work.
35486       new_path="$CYGWIN_ROOT_PATH$input_path"
35487     fi
35488   fi
35489 
35490   # remove trailing .exe if any
35491   new_path="${new_path/%.exe/}"
35492 
35493   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35494 
35495   # First separate the path from the arguments. This will split at the first
35496   # space.
35497   complete="$GNM"
35498   path="${complete%% *}"
35499   tmp="$complete EOL"
35500   arguments="${tmp#* }"
35501 
35502   # Input might be given as Windows format, start by converting to
35503   # unix format.
35504   new_path="$path"
35505 
35506   windows_path="$new_path"
35507   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35508     unix_path=`$CYGPATH -u "$windows_path"`
35509     new_path="$unix_path"
35510   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35511     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35512     new_path="$unix_path"
35513   fi
35514 
35515 
35516   # Now try to locate executable using which
35517   new_path=`$WHICH "$new_path" 2> /dev/null`
35518 
35519   if test "x$new_path" = x; then
35520     # Oops. Which didn't find the executable.
35521     # The splitting of arguments from the executable at a space might have been incorrect,
35522     # since paths with space are more likely in Windows. Give it another try with the whole
35523     # argument.
35524     path="$complete"
35525     arguments="EOL"
35526     new_path="$path"
35527 
35528   windows_path="$new_path"
35529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35530     unix_path=`$CYGPATH -u "$windows_path"`
35531     new_path="$unix_path"
35532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35533     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35534     new_path="$unix_path"
35535   fi
35536 
35537 
35538     new_path=`$WHICH "$new_path" 2> /dev/null`
35539     # bat and cmd files are not always considered executable in MSYS causing which
35540     # to not find them
35541     if test "x$new_path" = x \
35542         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35543         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35544       new_path="$path"
35545 
35546   windows_path="$new_path"
35547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35548     unix_path=`$CYGPATH -u "$windows_path"`
35549     new_path="$unix_path"
35550   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35551     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35552     new_path="$unix_path"
35553   fi
35554 
35555     fi
35556 
35557     if test "x$new_path" = x; then
35558       # It's still not found. Now this is an unrecoverable error.
35559       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35560 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35561       has_space=`$ECHO "$complete" | $GREP " "`
35562       if test "x$has_space" != x; then
35563         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35564 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35565       fi
35566       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35567     fi
35568   fi
35569 
35570   # Now new_path has a complete unix path to the binary
35571   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35572     # Keep paths in /bin as-is, but remove trailing .exe if any
35573     new_path="${new_path/%.exe/}"
35574     # Do not save /bin paths to all_fixpath_prefixes!
35575   else
35576     # Not in mixed or Windows style, start by that.
35577     new_path=`cmd //c echo $new_path`
35578 
35579   input_path="$new_path"
35580   # Check if we need to convert this using DOS-style short mode. If the path
35581   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35582   # take no chances and rewrite it.
35583   # Note: m4 eats our [], so we need to use [ and ] instead.
35584   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35585   if test "x$has_forbidden_chars" != x; then
35586     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35587     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35588   fi
35589 
35590     # Output is in $new_path
35591 
35592   windows_path="$new_path"
35593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35594     unix_path=`$CYGPATH -u "$windows_path"`
35595     new_path="$unix_path"
35596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35597     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35598     new_path="$unix_path"
35599   fi
35600 
35601     # remove trailing .exe if any
35602     new_path="${new_path/%.exe/}"
35603 
35604     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35605     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35606   fi
35607 
35608   else
35609     # We're on a posix platform. Hooray! :)
35610     # First separate the path from the arguments. This will split at the first
35611     # space.
35612     complete="$GNM"
35613     path="${complete%% *}"
35614     tmp="$complete EOL"
35615     arguments="${tmp#* }"
35616 
35617     # Cannot rely on the command "which" here since it doesn't always work.
35618     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35619     if test -z "$is_absolute_path"; then
35620       # Path to executable is not absolute. Find it.
35621       IFS_save="$IFS"
35622       IFS=:
35623       for p in $PATH; do
35624         if test -f "$p/$path" && test -x "$p/$path"; then
35625           new_path="$p/$path"
35626           break
35627         fi
35628       done
35629       IFS="$IFS_save"
35630     else
35631       # This is an absolute path, we can use it without further modifications.
35632       new_path="$path"
35633     fi
35634 
35635     if test "x$new_path" = x; then
35636       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35637 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35638       has_space=`$ECHO "$complete" | $GREP " "`
35639       if test "x$has_space" != x; then
35640         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35641 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35642       fi
35643       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35644     fi
35645   fi
35646 
35647   # Now join together the path and the arguments once again
35648   if test "x$arguments" != xEOL; then
35649     new_complete="$new_path ${arguments% *}"
35650   else
35651     new_complete="$new_path"
35652   fi
35653 
35654   if test "x$complete" != "x$new_complete"; then
35655     GNM="$new_complete"
35656     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
35657 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
35658   fi
35659 
35660 
35661 
35662 
35663   # Publish this variable in the help.
35664 
35665 
35666   if test "x$MCS" = x; then
35667     # The variable is not set by user, try to locate tool using the code snippet
35668     for ac_prog in mcs
35669 do
35670   # Extract the first word of "$ac_prog", so it can be a program name with args.
35671 set dummy $ac_prog; ac_word=$2
35672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35673 $as_echo_n "checking for $ac_word... " >&6; }
35674 if ${ac_cv_path_MCS+:} false; then :
35675   $as_echo_n "(cached) " >&6
35676 else
35677   case $MCS in
35678   [\\/]* | ?:[\\/]*)
35679   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35680   ;;
35681   *)
35682   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35683 for as_dir in $PATH
35684 do
35685   IFS=$as_save_IFS
35686   test -z "$as_dir" && as_dir=.
35687     for ac_exec_ext in '' $ac_executable_extensions; do
35688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35689     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35691     break 2
35692   fi
35693 done
35694   done
35695 IFS=$as_save_IFS
35696 
35697   ;;
35698 esac
35699 fi
35700 MCS=$ac_cv_path_MCS
35701 if test -n "$MCS"; then
35702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
35703 $as_echo "$MCS" >&6; }
35704 else
35705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35706 $as_echo "no" >&6; }
35707 fi
35708 
35709 
35710   test -n "$MCS" && break
35711 done
35712 
35713   else
35714     # The variable is set, but is it from the command line or the environment?
35715 
35716     # Try to remove the string !MCS! from our list.
35717     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
35718     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35719       # If it failed, the variable was not from the command line. Ignore it,
35720       # but warn the user (except for BASH, which is always set by the calling BASH).
35721       if test "xMCS" != xBASH; then
35722         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
35723 $as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
35724       fi
35725       # Try to locate tool using the code snippet
35726       for ac_prog in mcs
35727 do
35728   # Extract the first word of "$ac_prog", so it can be a program name with args.
35729 set dummy $ac_prog; ac_word=$2
35730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35731 $as_echo_n "checking for $ac_word... " >&6; }
35732 if ${ac_cv_path_MCS+:} false; then :
35733   $as_echo_n "(cached) " >&6
35734 else
35735   case $MCS in
35736   [\\/]* | ?:[\\/]*)
35737   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35738   ;;
35739   *)
35740   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35741 for as_dir in $PATH
35742 do
35743   IFS=$as_save_IFS
35744   test -z "$as_dir" && as_dir=.
35745     for ac_exec_ext in '' $ac_executable_extensions; do
35746   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35747     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35749     break 2
35750   fi
35751 done
35752   done
35753 IFS=$as_save_IFS
35754 
35755   ;;
35756 esac
35757 fi
35758 MCS=$ac_cv_path_MCS
35759 if test -n "$MCS"; then
35760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
35761 $as_echo "$MCS" >&6; }
35762 else
35763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35764 $as_echo "no" >&6; }
35765 fi
35766 
35767 
35768   test -n "$MCS" && break
35769 done
35770 
35771     else
35772       # If it succeeded, then it was overridden by the user. We will use it
35773       # for the tool.
35774 
35775       # First remove it from the list of overridden variables, so we can test
35776       # for unknown variables in the end.
35777       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35778 
35779       # Check if the provided tool contains a complete path.
35780       tool_specified="$MCS"
35781       tool_basename="${tool_specified##*/}"
35782       if test "x$tool_basename" = "x$tool_specified"; then
35783         # A command without a complete path is provided, search $PATH.
35784         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
35785 $as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
35786         # Extract the first word of "$tool_basename", so it can be a program name with args.
35787 set dummy $tool_basename; ac_word=$2
35788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35789 $as_echo_n "checking for $ac_word... " >&6; }
35790 if ${ac_cv_path_MCS+:} false; then :
35791   $as_echo_n "(cached) " >&6
35792 else
35793   case $MCS in
35794   [\\/]* | ?:[\\/]*)
35795   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35796   ;;
35797   *)
35798   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35799 for as_dir in $PATH
35800 do
35801   IFS=$as_save_IFS
35802   test -z "$as_dir" && as_dir=.
35803     for ac_exec_ext in '' $ac_executable_extensions; do
35804   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35805     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35807     break 2
35808   fi
35809 done
35810   done
35811 IFS=$as_save_IFS
35812 
35813   ;;
35814 esac
35815 fi
35816 MCS=$ac_cv_path_MCS
35817 if test -n "$MCS"; then
35818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
35819 $as_echo "$MCS" >&6; }
35820 else
35821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35822 $as_echo "no" >&6; }
35823 fi
35824 
35825 
35826         if test "x$MCS" = x; then
35827           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35828         fi
35829       else
35830         # Otherwise we believe it is a complete path. Use it as it is.
35831         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
35832 $as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
35833         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
35834 $as_echo_n "checking for MCS... " >&6; }
35835         if test ! -x "$tool_specified"; then
35836           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35837 $as_echo "not found" >&6; }
35838           as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
35839         fi
35840         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35841 $as_echo "$tool_specified" >&6; }
35842       fi
35843     fi
35844   fi
35845 
35846 
35847 
35848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35849 
35850   # First separate the path from the arguments. This will split at the first
35851   # space.
35852   complete="$MCS"
35853   path="${complete%% *}"
35854   tmp="$complete EOL"
35855   arguments="${tmp#* }"
35856 
35857   # Input might be given as Windows format, start by converting to
35858   # unix format.
35859   new_path=`$CYGPATH -u "$path"`
35860 
35861   # Now try to locate executable using which
35862   new_path=`$WHICH "$new_path" 2> /dev/null`
35863   # bat and cmd files are not always considered executable in cygwin causing which
35864   # to not find them
35865   if test "x$new_path" = x \
35866       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35867       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35868     new_path=`$CYGPATH -u "$path"`
35869   fi
35870   if test "x$new_path" = x; then
35871     # Oops. Which didn't find the executable.
35872     # The splitting of arguments from the executable at a space might have been incorrect,
35873     # since paths with space are more likely in Windows. Give it another try with the whole
35874     # argument.
35875     path="$complete"
35876     arguments="EOL"
35877     new_path=`$CYGPATH -u "$path"`
35878     new_path=`$WHICH "$new_path" 2> /dev/null`
35879     # bat and cmd files are not always considered executable in cygwin causing which
35880     # to not find them
35881     if test "x$new_path" = x \
35882         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35883         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35884       new_path=`$CYGPATH -u "$path"`
35885     fi
35886     if test "x$new_path" = x; then
35887       # It's still not found. Now this is an unrecoverable error.
35888       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
35889 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
35890       has_space=`$ECHO "$complete" | $GREP " "`
35891       if test "x$has_space" != x; then
35892         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35893 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35894       fi
35895       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
35896     fi
35897   fi
35898 
35899   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35900   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35901   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35902   # "foo.exe" is OK but "foo" is an error.
35903   #
35904   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35905   # It is also a way to make sure we got the proper file name for the real test later on.
35906   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35907   if test "x$test_shortpath" = x; then
35908     # Short path failed, file does not exist as specified.
35909     # Try adding .exe or .cmd
35910     if test -f "${new_path}.exe"; then
35911       input_to_shortpath="${new_path}.exe"
35912     elif test -f "${new_path}.cmd"; then
35913       input_to_shortpath="${new_path}.cmd"
35914     else
35915       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
35916 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
35917       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35918 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35919       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
35920     fi
35921   else
35922     input_to_shortpath="$new_path"
35923   fi
35924 
35925   # Call helper function which possibly converts this using DOS-style short mode.
35926   # If so, the updated path is stored in $new_path.
35927   new_path="$input_to_shortpath"
35928 
35929   input_path="$input_to_shortpath"
35930   # Check if we need to convert this using DOS-style short mode. If the path
35931   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35932   # take no chances and rewrite it.
35933   # Note: m4 eats our [], so we need to use [ and ] instead.
35934   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35935   if test "x$has_forbidden_chars" != x; then
35936     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35937     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35938     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35939     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35940       # Going to short mode and back again did indeed matter. Since short mode is
35941       # case insensitive, let's make it lowercase to improve readability.
35942       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35943       # Now convert it back to Unix-style (cygpath)
35944       input_path=`$CYGPATH -u "$shortmode_path"`
35945       new_path="$input_path"
35946     fi
35947   fi
35948 
35949   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35950   if test "x$test_cygdrive_prefix" = x; then
35951     # As a simple fix, exclude /usr/bin since it's not a real path.
35952     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35953       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35954       # a path prefixed by /cygdrive for fixpath to work.
35955       new_path="$CYGWIN_ROOT_PATH$input_path"
35956     fi
35957   fi
35958 
35959   # remove trailing .exe if any
35960   new_path="${new_path/%.exe/}"
35961 
35962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35963 
35964   # First separate the path from the arguments. This will split at the first
35965   # space.
35966   complete="$MCS"
35967   path="${complete%% *}"
35968   tmp="$complete EOL"
35969   arguments="${tmp#* }"
35970 
35971   # Input might be given as Windows format, start by converting to
35972   # unix format.
35973   new_path="$path"
35974 
35975   windows_path="$new_path"
35976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35977     unix_path=`$CYGPATH -u "$windows_path"`
35978     new_path="$unix_path"
35979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35980     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35981     new_path="$unix_path"
35982   fi
35983 
35984 
35985   # Now try to locate executable using which
35986   new_path=`$WHICH "$new_path" 2> /dev/null`
35987 
35988   if test "x$new_path" = x; then
35989     # Oops. Which didn't find the executable.
35990     # The splitting of arguments from the executable at a space might have been incorrect,
35991     # since paths with space are more likely in Windows. Give it another try with the whole
35992     # argument.
35993     path="$complete"
35994     arguments="EOL"
35995     new_path="$path"
35996 
35997   windows_path="$new_path"
35998   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35999     unix_path=`$CYGPATH -u "$windows_path"`
36000     new_path="$unix_path"
36001   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36002     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36003     new_path="$unix_path"
36004   fi
36005 
36006 
36007     new_path=`$WHICH "$new_path" 2> /dev/null`
36008     # bat and cmd files are not always considered executable in MSYS causing which
36009     # to not find them
36010     if test "x$new_path" = x \
36011         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36012         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36013       new_path="$path"
36014 
36015   windows_path="$new_path"
36016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36017     unix_path=`$CYGPATH -u "$windows_path"`
36018     new_path="$unix_path"
36019   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36020     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36021     new_path="$unix_path"
36022   fi
36023 
36024     fi
36025 
36026     if test "x$new_path" = x; then
36027       # It's still not found. Now this is an unrecoverable error.
36028       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36029 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36030       has_space=`$ECHO "$complete" | $GREP " "`
36031       if test "x$has_space" != x; then
36032         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36033 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36034       fi
36035       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36036     fi
36037   fi
36038 
36039   # Now new_path has a complete unix path to the binary
36040   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36041     # Keep paths in /bin as-is, but remove trailing .exe if any
36042     new_path="${new_path/%.exe/}"
36043     # Do not save /bin paths to all_fixpath_prefixes!
36044   else
36045     # Not in mixed or Windows style, start by that.
36046     new_path=`cmd //c echo $new_path`
36047 
36048   input_path="$new_path"
36049   # Check if we need to convert this using DOS-style short mode. If the path
36050   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36051   # take no chances and rewrite it.
36052   # Note: m4 eats our [], so we need to use [ and ] instead.
36053   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36054   if test "x$has_forbidden_chars" != x; then
36055     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36056     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36057   fi
36058 
36059     # Output is in $new_path
36060 
36061   windows_path="$new_path"
36062   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36063     unix_path=`$CYGPATH -u "$windows_path"`
36064     new_path="$unix_path"
36065   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36066     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36067     new_path="$unix_path"
36068   fi
36069 
36070     # remove trailing .exe if any
36071     new_path="${new_path/%.exe/}"
36072 
36073     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36074     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36075   fi
36076 
36077   else
36078     # We're on a posix platform. Hooray! :)
36079     # First separate the path from the arguments. This will split at the first
36080     # space.
36081     complete="$MCS"
36082     path="${complete%% *}"
36083     tmp="$complete EOL"
36084     arguments="${tmp#* }"
36085 
36086     # Cannot rely on the command "which" here since it doesn't always work.
36087     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36088     if test -z "$is_absolute_path"; then
36089       # Path to executable is not absolute. Find it.
36090       IFS_save="$IFS"
36091       IFS=:
36092       for p in $PATH; do
36093         if test -f "$p/$path" && test -x "$p/$path"; then
36094           new_path="$p/$path"
36095           break
36096         fi
36097       done
36098       IFS="$IFS_save"
36099     else
36100       # This is an absolute path, we can use it without further modifications.
36101       new_path="$path"
36102     fi
36103 
36104     if test "x$new_path" = x; then
36105       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36106 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36107       has_space=`$ECHO "$complete" | $GREP " "`
36108       if test "x$has_space" != x; then
36109         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36110 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36111       fi
36112       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36113     fi
36114   fi
36115 
36116   # Now join together the path and the arguments once again
36117   if test "x$arguments" != xEOL; then
36118     new_complete="$new_path ${arguments% *}"
36119   else
36120     new_complete="$new_path"
36121   fi
36122 
36123   if test "x$complete" != "x$new_complete"; then
36124     MCS="$new_complete"
36125     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36126 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36127   fi
36128 
36129   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36130     # FIXME: we should unify this with the solaris case above.
36131 
36132 
36133   # Publish this variable in the help.
36134 
36135 
36136   if test "x$STRIP" = x; then
36137     # The variable is not set by user, try to locate tool using the code snippet
36138     if test -n "$ac_tool_prefix"; then
36139   for ac_prog in strip
36140   do
36141     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36142 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36144 $as_echo_n "checking for $ac_word... " >&6; }
36145 if ${ac_cv_prog_STRIP+:} false; then :
36146   $as_echo_n "(cached) " >&6
36147 else
36148   if test -n "$STRIP"; then
36149   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36150 else
36151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36152 for as_dir in $PATH
36153 do
36154   IFS=$as_save_IFS
36155   test -z "$as_dir" && as_dir=.
36156     for ac_exec_ext in '' $ac_executable_extensions; do
36157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36158     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36160     break 2
36161   fi
36162 done
36163   done
36164 IFS=$as_save_IFS
36165 
36166 fi
36167 fi
36168 STRIP=$ac_cv_prog_STRIP
36169 if test -n "$STRIP"; then
36170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36171 $as_echo "$STRIP" >&6; }
36172 else
36173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36174 $as_echo "no" >&6; }
36175 fi
36176 
36177 
36178     test -n "$STRIP" && break
36179   done
36180 fi
36181 if test -z "$STRIP"; then
36182   ac_ct_STRIP=$STRIP
36183   for ac_prog in strip
36184 do
36185   # Extract the first word of "$ac_prog", so it can be a program name with args.
36186 set dummy $ac_prog; ac_word=$2
36187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36188 $as_echo_n "checking for $ac_word... " >&6; }
36189 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36190   $as_echo_n "(cached) " >&6
36191 else
36192   if test -n "$ac_ct_STRIP"; then
36193   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36194 else
36195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36196 for as_dir in $PATH
36197 do
36198   IFS=$as_save_IFS
36199   test -z "$as_dir" && as_dir=.
36200     for ac_exec_ext in '' $ac_executable_extensions; do
36201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36202     ac_cv_prog_ac_ct_STRIP="$ac_prog"
36203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36204     break 2
36205   fi
36206 done
36207   done
36208 IFS=$as_save_IFS
36209 
36210 fi
36211 fi
36212 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36213 if test -n "$ac_ct_STRIP"; then
36214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36215 $as_echo "$ac_ct_STRIP" >&6; }
36216 else
36217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36218 $as_echo "no" >&6; }
36219 fi
36220 
36221 
36222   test -n "$ac_ct_STRIP" && break
36223 done
36224 
36225   if test "x$ac_ct_STRIP" = x; then
36226     STRIP=""
36227   else
36228     case $cross_compiling:$ac_tool_warned in
36229 yes:)
36230 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36231 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36232 ac_tool_warned=yes ;;
36233 esac
36234     STRIP=$ac_ct_STRIP
36235   fi
36236 fi
36237 
36238   else
36239     # The variable is set, but is it from the command line or the environment?
36240 
36241     # Try to remove the string !STRIP! from our list.
36242     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36243     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36244       # If it failed, the variable was not from the command line. Ignore it,
36245       # but warn the user (except for BASH, which is always set by the calling BASH).
36246       if test "xSTRIP" != xBASH; then
36247         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36248 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36249       fi
36250       # Try to locate tool using the code snippet
36251       if test -n "$ac_tool_prefix"; then
36252   for ac_prog in strip
36253   do
36254     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36255 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36257 $as_echo_n "checking for $ac_word... " >&6; }
36258 if ${ac_cv_prog_STRIP+:} false; then :
36259   $as_echo_n "(cached) " >&6
36260 else
36261   if test -n "$STRIP"; then
36262   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36263 else
36264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36265 for as_dir in $PATH
36266 do
36267   IFS=$as_save_IFS
36268   test -z "$as_dir" && as_dir=.
36269     for ac_exec_ext in '' $ac_executable_extensions; do
36270   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36271     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36273     break 2
36274   fi
36275 done
36276   done
36277 IFS=$as_save_IFS
36278 
36279 fi
36280 fi
36281 STRIP=$ac_cv_prog_STRIP
36282 if test -n "$STRIP"; then
36283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36284 $as_echo "$STRIP" >&6; }
36285 else
36286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36287 $as_echo "no" >&6; }
36288 fi
36289 
36290 
36291     test -n "$STRIP" && break
36292   done
36293 fi
36294 if test -z "$STRIP"; then
36295   ac_ct_STRIP=$STRIP
36296   for ac_prog in strip
36297 do
36298   # Extract the first word of "$ac_prog", so it can be a program name with args.
36299 set dummy $ac_prog; ac_word=$2
36300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36301 $as_echo_n "checking for $ac_word... " >&6; }
36302 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36303   $as_echo_n "(cached) " >&6
36304 else
36305   if test -n "$ac_ct_STRIP"; then
36306   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36307 else
36308 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36309 for as_dir in $PATH
36310 do
36311   IFS=$as_save_IFS
36312   test -z "$as_dir" && as_dir=.
36313     for ac_exec_ext in '' $ac_executable_extensions; do
36314   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36315     ac_cv_prog_ac_ct_STRIP="$ac_prog"
36316     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36317     break 2
36318   fi
36319 done
36320   done
36321 IFS=$as_save_IFS
36322 
36323 fi
36324 fi
36325 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36326 if test -n "$ac_ct_STRIP"; then
36327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36328 $as_echo "$ac_ct_STRIP" >&6; }
36329 else
36330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36331 $as_echo "no" >&6; }
36332 fi
36333 
36334 
36335   test -n "$ac_ct_STRIP" && break
36336 done
36337 
36338   if test "x$ac_ct_STRIP" = x; then
36339     STRIP=""
36340   else
36341     case $cross_compiling:$ac_tool_warned in
36342 yes:)
36343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36344 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36345 ac_tool_warned=yes ;;
36346 esac
36347     STRIP=$ac_ct_STRIP
36348   fi
36349 fi
36350 
36351     else
36352       # If it succeeded, then it was overridden by the user. We will use it
36353       # for the tool.
36354 
36355       # First remove it from the list of overridden variables, so we can test
36356       # for unknown variables in the end.
36357       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36358 
36359       # Check if the provided tool contains a complete path.
36360       tool_specified="$STRIP"
36361       tool_basename="${tool_specified##*/}"
36362       if test "x$tool_basename" = "x$tool_specified"; then
36363         # A command without a complete path is provided, search $PATH.
36364         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36365 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36366         # Extract the first word of "$tool_basename", so it can be a program name with args.
36367 set dummy $tool_basename; ac_word=$2
36368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36369 $as_echo_n "checking for $ac_word... " >&6; }
36370 if ${ac_cv_path_STRIP+:} false; then :
36371   $as_echo_n "(cached) " >&6
36372 else
36373   case $STRIP in
36374   [\\/]* | ?:[\\/]*)
36375   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36376   ;;
36377   *)
36378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36379 for as_dir in $PATH
36380 do
36381   IFS=$as_save_IFS
36382   test -z "$as_dir" && as_dir=.
36383     for ac_exec_ext in '' $ac_executable_extensions; do
36384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36385     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36387     break 2
36388   fi
36389 done
36390   done
36391 IFS=$as_save_IFS
36392 
36393   ;;
36394 esac
36395 fi
36396 STRIP=$ac_cv_path_STRIP
36397 if test -n "$STRIP"; then
36398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36399 $as_echo "$STRIP" >&6; }
36400 else
36401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36402 $as_echo "no" >&6; }
36403 fi
36404 
36405 
36406         if test "x$STRIP" = x; then
36407           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36408         fi
36409       else
36410         # Otherwise we believe it is a complete path. Use it as it is.
36411         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36412 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36413         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36414 $as_echo_n "checking for STRIP... " >&6; }
36415         if test ! -x "$tool_specified"; then
36416           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36417 $as_echo "not found" >&6; }
36418           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36419         fi
36420         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36421 $as_echo "$tool_specified" >&6; }
36422       fi
36423     fi
36424   fi
36425 
36426 
36427 
36428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36429 
36430   # First separate the path from the arguments. This will split at the first
36431   # space.
36432   complete="$STRIP"
36433   path="${complete%% *}"
36434   tmp="$complete EOL"
36435   arguments="${tmp#* }"
36436 
36437   # Input might be given as Windows format, start by converting to
36438   # unix format.
36439   new_path=`$CYGPATH -u "$path"`
36440 
36441   # Now try to locate executable using which
36442   new_path=`$WHICH "$new_path" 2> /dev/null`
36443   # bat and cmd files are not always considered executable in cygwin causing which
36444   # to not find them
36445   if test "x$new_path" = x \
36446       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36447       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36448     new_path=`$CYGPATH -u "$path"`
36449   fi
36450   if test "x$new_path" = x; then
36451     # Oops. Which didn't find the executable.
36452     # The splitting of arguments from the executable at a space might have been incorrect,
36453     # since paths with space are more likely in Windows. Give it another try with the whole
36454     # argument.
36455     path="$complete"
36456     arguments="EOL"
36457     new_path=`$CYGPATH -u "$path"`
36458     new_path=`$WHICH "$new_path" 2> /dev/null`
36459     # bat and cmd files are not always considered executable in cygwin causing which
36460     # to not find them
36461     if test "x$new_path" = x \
36462         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36463         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36464       new_path=`$CYGPATH -u "$path"`
36465     fi
36466     if test "x$new_path" = x; then
36467       # It's still not found. Now this is an unrecoverable error.
36468       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36469 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36470       has_space=`$ECHO "$complete" | $GREP " "`
36471       if test "x$has_space" != x; then
36472         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36473 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36474       fi
36475       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36476     fi
36477   fi
36478 
36479   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36480   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36481   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36482   # "foo.exe" is OK but "foo" is an error.
36483   #
36484   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36485   # It is also a way to make sure we got the proper file name for the real test later on.
36486   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36487   if test "x$test_shortpath" = x; then
36488     # Short path failed, file does not exist as specified.
36489     # Try adding .exe or .cmd
36490     if test -f "${new_path}.exe"; then
36491       input_to_shortpath="${new_path}.exe"
36492     elif test -f "${new_path}.cmd"; then
36493       input_to_shortpath="${new_path}.cmd"
36494     else
36495       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36496 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36497       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36498 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36499       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36500     fi
36501   else
36502     input_to_shortpath="$new_path"
36503   fi
36504 
36505   # Call helper function which possibly converts this using DOS-style short mode.
36506   # If so, the updated path is stored in $new_path.
36507   new_path="$input_to_shortpath"
36508 
36509   input_path="$input_to_shortpath"
36510   # Check if we need to convert this using DOS-style short mode. If the path
36511   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36512   # take no chances and rewrite it.
36513   # Note: m4 eats our [], so we need to use [ and ] instead.
36514   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36515   if test "x$has_forbidden_chars" != x; then
36516     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36517     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36518     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36519     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36520       # Going to short mode and back again did indeed matter. Since short mode is
36521       # case insensitive, let's make it lowercase to improve readability.
36522       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36523       # Now convert it back to Unix-style (cygpath)
36524       input_path=`$CYGPATH -u "$shortmode_path"`
36525       new_path="$input_path"
36526     fi
36527   fi
36528 
36529   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36530   if test "x$test_cygdrive_prefix" = x; then
36531     # As a simple fix, exclude /usr/bin since it's not a real path.
36532     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36533       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36534       # a path prefixed by /cygdrive for fixpath to work.
36535       new_path="$CYGWIN_ROOT_PATH$input_path"
36536     fi
36537   fi
36538 
36539   # remove trailing .exe if any
36540   new_path="${new_path/%.exe/}"
36541 
36542   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36543 
36544   # First separate the path from the arguments. This will split at the first
36545   # space.
36546   complete="$STRIP"
36547   path="${complete%% *}"
36548   tmp="$complete EOL"
36549   arguments="${tmp#* }"
36550 
36551   # Input might be given as Windows format, start by converting to
36552   # unix format.
36553   new_path="$path"
36554 
36555   windows_path="$new_path"
36556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36557     unix_path=`$CYGPATH -u "$windows_path"`
36558     new_path="$unix_path"
36559   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36560     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36561     new_path="$unix_path"
36562   fi
36563 
36564 
36565   # Now try to locate executable using which
36566   new_path=`$WHICH "$new_path" 2> /dev/null`
36567 
36568   if test "x$new_path" = x; then
36569     # Oops. Which didn't find the executable.
36570     # The splitting of arguments from the executable at a space might have been incorrect,
36571     # since paths with space are more likely in Windows. Give it another try with the whole
36572     # argument.
36573     path="$complete"
36574     arguments="EOL"
36575     new_path="$path"
36576 
36577   windows_path="$new_path"
36578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36579     unix_path=`$CYGPATH -u "$windows_path"`
36580     new_path="$unix_path"
36581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36583     new_path="$unix_path"
36584   fi
36585 
36586 
36587     new_path=`$WHICH "$new_path" 2> /dev/null`
36588     # bat and cmd files are not always considered executable in MSYS causing which
36589     # to not find them
36590     if test "x$new_path" = x \
36591         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36592         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36593       new_path="$path"
36594 
36595   windows_path="$new_path"
36596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36597     unix_path=`$CYGPATH -u "$windows_path"`
36598     new_path="$unix_path"
36599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36601     new_path="$unix_path"
36602   fi
36603 
36604     fi
36605 
36606     if test "x$new_path" = x; then
36607       # It's still not found. Now this is an unrecoverable error.
36608       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36609 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36610       has_space=`$ECHO "$complete" | $GREP " "`
36611       if test "x$has_space" != x; then
36612         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36613 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36614       fi
36615       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36616     fi
36617   fi
36618 
36619   # Now new_path has a complete unix path to the binary
36620   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36621     # Keep paths in /bin as-is, but remove trailing .exe if any
36622     new_path="${new_path/%.exe/}"
36623     # Do not save /bin paths to all_fixpath_prefixes!
36624   else
36625     # Not in mixed or Windows style, start by that.
36626     new_path=`cmd //c echo $new_path`
36627 
36628   input_path="$new_path"
36629   # Check if we need to convert this using DOS-style short mode. If the path
36630   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36631   # take no chances and rewrite it.
36632   # Note: m4 eats our [], so we need to use [ and ] instead.
36633   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36634   if test "x$has_forbidden_chars" != x; then
36635     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36636     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36637   fi
36638 
36639     # Output is in $new_path
36640 
36641   windows_path="$new_path"
36642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36643     unix_path=`$CYGPATH -u "$windows_path"`
36644     new_path="$unix_path"
36645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36646     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36647     new_path="$unix_path"
36648   fi
36649 
36650     # remove trailing .exe if any
36651     new_path="${new_path/%.exe/}"
36652 
36653     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36654     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36655   fi
36656 
36657   else
36658     # We're on a posix platform. Hooray! :)
36659     # First separate the path from the arguments. This will split at the first
36660     # space.
36661     complete="$STRIP"
36662     path="${complete%% *}"
36663     tmp="$complete EOL"
36664     arguments="${tmp#* }"
36665 
36666     # Cannot rely on the command "which" here since it doesn't always work.
36667     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36668     if test -z "$is_absolute_path"; then
36669       # Path to executable is not absolute. Find it.
36670       IFS_save="$IFS"
36671       IFS=:
36672       for p in $PATH; do
36673         if test -f "$p/$path" && test -x "$p/$path"; then
36674           new_path="$p/$path"
36675           break
36676         fi
36677       done
36678       IFS="$IFS_save"
36679     else
36680       # This is an absolute path, we can use it without further modifications.
36681       new_path="$path"
36682     fi
36683 
36684     if test "x$new_path" = x; then
36685       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36686 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36687       has_space=`$ECHO "$complete" | $GREP " "`
36688       if test "x$has_space" != x; then
36689         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36690 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36691       fi
36692       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36693     fi
36694   fi
36695 
36696   # Now join together the path and the arguments once again
36697   if test "x$arguments" != xEOL; then
36698     new_complete="$new_path ${arguments% *}"
36699   else
36700     new_complete="$new_path"
36701   fi
36702 
36703   if test "x$complete" != "x$new_complete"; then
36704     STRIP="$new_complete"
36705     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36706 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36707   fi
36708 
36709     # Extract the first word of "otool", so it can be a program name with args.
36710 set dummy otool; ac_word=$2
36711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36712 $as_echo_n "checking for $ac_word... " >&6; }
36713 if ${ac_cv_path_OTOOL+:} false; then :
36714   $as_echo_n "(cached) " >&6
36715 else
36716   case $OTOOL in
36717   [\\/]* | ?:[\\/]*)
36718   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
36719   ;;
36720   *)
36721   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36722 for as_dir in $PATH
36723 do
36724   IFS=$as_save_IFS
36725   test -z "$as_dir" && as_dir=.
36726     for ac_exec_ext in '' $ac_executable_extensions; do
36727   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36728     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
36729     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36730     break 2
36731   fi
36732 done
36733   done
36734 IFS=$as_save_IFS
36735 
36736   ;;
36737 esac
36738 fi
36739 OTOOL=$ac_cv_path_OTOOL
36740 if test -n "$OTOOL"; then
36741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
36742 $as_echo "$OTOOL" >&6; }
36743 else
36744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36745 $as_echo "no" >&6; }
36746 fi
36747 
36748 
36749     if test "x$OTOOL" = "x"; then
36750       OTOOL="true"
36751     fi
36752 
36753 
36754   # Publish this variable in the help.
36755 
36756 
36757   if test "x$NM" = x; then
36758     # The variable is not set by user, try to locate tool using the code snippet
36759     if test -n "$ac_tool_prefix"; then
36760   for ac_prog in nm
36761   do
36762     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36763 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36765 $as_echo_n "checking for $ac_word... " >&6; }
36766 if ${ac_cv_prog_NM+:} false; then :
36767   $as_echo_n "(cached) " >&6
36768 else
36769   if test -n "$NM"; then
36770   ac_cv_prog_NM="$NM" # Let the user override the test.
36771 else
36772 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36773 for as_dir in $PATH
36774 do
36775   IFS=$as_save_IFS
36776   test -z "$as_dir" && as_dir=.
36777     for ac_exec_ext in '' $ac_executable_extensions; do
36778   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36779     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
36780     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36781     break 2
36782   fi
36783 done
36784   done
36785 IFS=$as_save_IFS
36786 
36787 fi
36788 fi
36789 NM=$ac_cv_prog_NM
36790 if test -n "$NM"; then
36791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36792 $as_echo "$NM" >&6; }
36793 else
36794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36795 $as_echo "no" >&6; }
36796 fi
36797 
36798 
36799     test -n "$NM" && break
36800   done
36801 fi
36802 if test -z "$NM"; then
36803   ac_ct_NM=$NM
36804   for ac_prog in nm
36805 do
36806   # Extract the first word of "$ac_prog", so it can be a program name with args.
36807 set dummy $ac_prog; ac_word=$2
36808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36809 $as_echo_n "checking for $ac_word... " >&6; }
36810 if ${ac_cv_prog_ac_ct_NM+:} false; then :
36811   $as_echo_n "(cached) " >&6
36812 else
36813   if test -n "$ac_ct_NM"; then
36814   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
36815 else
36816 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36817 for as_dir in $PATH
36818 do
36819   IFS=$as_save_IFS
36820   test -z "$as_dir" && as_dir=.
36821     for ac_exec_ext in '' $ac_executable_extensions; do
36822   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36823     ac_cv_prog_ac_ct_NM="$ac_prog"
36824     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36825     break 2
36826   fi
36827 done
36828   done
36829 IFS=$as_save_IFS
36830 
36831 fi
36832 fi
36833 ac_ct_NM=$ac_cv_prog_ac_ct_NM
36834 if test -n "$ac_ct_NM"; then
36835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
36836 $as_echo "$ac_ct_NM" >&6; }
36837 else
36838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36839 $as_echo "no" >&6; }
36840 fi
36841 
36842 
36843   test -n "$ac_ct_NM" && break
36844 done
36845 
36846   if test "x$ac_ct_NM" = x; then
36847     NM=""
36848   else
36849     case $cross_compiling:$ac_tool_warned in
36850 yes:)
36851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36852 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36853 ac_tool_warned=yes ;;
36854 esac
36855     NM=$ac_ct_NM
36856   fi
36857 fi
36858 
36859   else
36860     # The variable is set, but is it from the command line or the environment?
36861 
36862     # Try to remove the string !NM! from our list.
36863     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36864     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36865       # If it failed, the variable was not from the command line. Ignore it,
36866       # but warn the user (except for BASH, which is always set by the calling BASH).
36867       if test "xNM" != xBASH; then
36868         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36869 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36870       fi
36871       # Try to locate tool using the code snippet
36872       if test -n "$ac_tool_prefix"; then
36873   for ac_prog in nm
36874   do
36875     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36876 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36878 $as_echo_n "checking for $ac_word... " >&6; }
36879 if ${ac_cv_prog_NM+:} false; then :
36880   $as_echo_n "(cached) " >&6
36881 else
36882   if test -n "$NM"; then
36883   ac_cv_prog_NM="$NM" # Let the user override the test.
36884 else
36885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36886 for as_dir in $PATH
36887 do
36888   IFS=$as_save_IFS
36889   test -z "$as_dir" && as_dir=.
36890     for ac_exec_ext in '' $ac_executable_extensions; do
36891   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36892     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
36893     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36894     break 2
36895   fi
36896 done
36897   done
36898 IFS=$as_save_IFS
36899 
36900 fi
36901 fi
36902 NM=$ac_cv_prog_NM
36903 if test -n "$NM"; then
36904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36905 $as_echo "$NM" >&6; }
36906 else
36907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36908 $as_echo "no" >&6; }
36909 fi
36910 
36911 
36912     test -n "$NM" && break
36913   done
36914 fi
36915 if test -z "$NM"; then
36916   ac_ct_NM=$NM
36917   for ac_prog in nm
36918 do
36919   # Extract the first word of "$ac_prog", so it can be a program name with args.
36920 set dummy $ac_prog; ac_word=$2
36921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36922 $as_echo_n "checking for $ac_word... " >&6; }
36923 if ${ac_cv_prog_ac_ct_NM+:} false; then :
36924   $as_echo_n "(cached) " >&6
36925 else
36926   if test -n "$ac_ct_NM"; then
36927   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
36928 else
36929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36930 for as_dir in $PATH
36931 do
36932   IFS=$as_save_IFS
36933   test -z "$as_dir" && as_dir=.
36934     for ac_exec_ext in '' $ac_executable_extensions; do
36935   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36936     ac_cv_prog_ac_ct_NM="$ac_prog"
36937     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36938     break 2
36939   fi
36940 done
36941   done
36942 IFS=$as_save_IFS
36943 
36944 fi
36945 fi
36946 ac_ct_NM=$ac_cv_prog_ac_ct_NM
36947 if test -n "$ac_ct_NM"; then
36948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
36949 $as_echo "$ac_ct_NM" >&6; }
36950 else
36951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36952 $as_echo "no" >&6; }
36953 fi
36954 
36955 
36956   test -n "$ac_ct_NM" && break
36957 done
36958 
36959   if test "x$ac_ct_NM" = x; then
36960     NM=""
36961   else
36962     case $cross_compiling:$ac_tool_warned in
36963 yes:)
36964 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36965 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36966 ac_tool_warned=yes ;;
36967 esac
36968     NM=$ac_ct_NM
36969   fi
36970 fi
36971 
36972     else
36973       # If it succeeded, then it was overridden by the user. We will use it
36974       # for the tool.
36975 
36976       # First remove it from the list of overridden variables, so we can test
36977       # for unknown variables in the end.
36978       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36979 
36980       # Check if the provided tool contains a complete path.
36981       tool_specified="$NM"
36982       tool_basename="${tool_specified##*/}"
36983       if test "x$tool_basename" = "x$tool_specified"; then
36984         # A command without a complete path is provided, search $PATH.
36985         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36986 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36987         # Extract the first word of "$tool_basename", so it can be a program name with args.
36988 set dummy $tool_basename; ac_word=$2
36989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36990 $as_echo_n "checking for $ac_word... " >&6; }
36991 if ${ac_cv_path_NM+:} false; then :
36992   $as_echo_n "(cached) " >&6
36993 else
36994   case $NM in
36995   [\\/]* | ?:[\\/]*)
36996   ac_cv_path_NM="$NM" # Let the user override the test with a path.
36997   ;;
36998   *)
36999   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37000 for as_dir in $PATH
37001 do
37002   IFS=$as_save_IFS
37003   test -z "$as_dir" && as_dir=.
37004     for ac_exec_ext in '' $ac_executable_extensions; do
37005   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37006     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37007     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37008     break 2
37009   fi
37010 done
37011   done
37012 IFS=$as_save_IFS
37013 
37014   ;;
37015 esac
37016 fi
37017 NM=$ac_cv_path_NM
37018 if test -n "$NM"; then
37019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37020 $as_echo "$NM" >&6; }
37021 else
37022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37023 $as_echo "no" >&6; }
37024 fi
37025 
37026 
37027         if test "x$NM" = x; then
37028           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37029         fi
37030       else
37031         # Otherwise we believe it is a complete path. Use it as it is.
37032         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37033 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37034         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37035 $as_echo_n "checking for NM... " >&6; }
37036         if test ! -x "$tool_specified"; then
37037           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37038 $as_echo "not found" >&6; }
37039           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37040         fi
37041         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37042 $as_echo "$tool_specified" >&6; }
37043       fi
37044     fi
37045   fi
37046 
37047 
37048 
37049   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37050 
37051   # First separate the path from the arguments. This will split at the first
37052   # space.
37053   complete="$NM"
37054   path="${complete%% *}"
37055   tmp="$complete EOL"
37056   arguments="${tmp#* }"
37057 
37058   # Input might be given as Windows format, start by converting to
37059   # unix format.
37060   new_path=`$CYGPATH -u "$path"`
37061 
37062   # Now try to locate executable using which
37063   new_path=`$WHICH "$new_path" 2> /dev/null`
37064   # bat and cmd files are not always considered executable in cygwin causing which
37065   # to not find them
37066   if test "x$new_path" = x \
37067       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37068       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37069     new_path=`$CYGPATH -u "$path"`
37070   fi
37071   if test "x$new_path" = x; then
37072     # Oops. Which didn't find the executable.
37073     # The splitting of arguments from the executable at a space might have been incorrect,
37074     # since paths with space are more likely in Windows. Give it another try with the whole
37075     # argument.
37076     path="$complete"
37077     arguments="EOL"
37078     new_path=`$CYGPATH -u "$path"`
37079     new_path=`$WHICH "$new_path" 2> /dev/null`
37080     # bat and cmd files are not always considered executable in cygwin causing which
37081     # to not find them
37082     if test "x$new_path" = x \
37083         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37084         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37085       new_path=`$CYGPATH -u "$path"`
37086     fi
37087     if test "x$new_path" = x; then
37088       # It's still not found. Now this is an unrecoverable error.
37089       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37090 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37091       has_space=`$ECHO "$complete" | $GREP " "`
37092       if test "x$has_space" != x; then
37093         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37094 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37095       fi
37096       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37097     fi
37098   fi
37099 
37100   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37101   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37102   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37103   # "foo.exe" is OK but "foo" is an error.
37104   #
37105   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37106   # It is also a way to make sure we got the proper file name for the real test later on.
37107   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37108   if test "x$test_shortpath" = x; then
37109     # Short path failed, file does not exist as specified.
37110     # Try adding .exe or .cmd
37111     if test -f "${new_path}.exe"; then
37112       input_to_shortpath="${new_path}.exe"
37113     elif test -f "${new_path}.cmd"; then
37114       input_to_shortpath="${new_path}.cmd"
37115     else
37116       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37117 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37118       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37119 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37120       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37121     fi
37122   else
37123     input_to_shortpath="$new_path"
37124   fi
37125 
37126   # Call helper function which possibly converts this using DOS-style short mode.
37127   # If so, the updated path is stored in $new_path.
37128   new_path="$input_to_shortpath"
37129 
37130   input_path="$input_to_shortpath"
37131   # Check if we need to convert this using DOS-style short mode. If the path
37132   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37133   # take no chances and rewrite it.
37134   # Note: m4 eats our [], so we need to use [ and ] instead.
37135   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37136   if test "x$has_forbidden_chars" != x; then
37137     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37138     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37139     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37140     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37141       # Going to short mode and back again did indeed matter. Since short mode is
37142       # case insensitive, let's make it lowercase to improve readability.
37143       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37144       # Now convert it back to Unix-style (cygpath)
37145       input_path=`$CYGPATH -u "$shortmode_path"`
37146       new_path="$input_path"
37147     fi
37148   fi
37149 
37150   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37151   if test "x$test_cygdrive_prefix" = x; then
37152     # As a simple fix, exclude /usr/bin since it's not a real path.
37153     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37154       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37155       # a path prefixed by /cygdrive for fixpath to work.
37156       new_path="$CYGWIN_ROOT_PATH$input_path"
37157     fi
37158   fi
37159 
37160   # remove trailing .exe if any
37161   new_path="${new_path/%.exe/}"
37162 
37163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37164 
37165   # First separate the path from the arguments. This will split at the first
37166   # space.
37167   complete="$NM"
37168   path="${complete%% *}"
37169   tmp="$complete EOL"
37170   arguments="${tmp#* }"
37171 
37172   # Input might be given as Windows format, start by converting to
37173   # unix format.
37174   new_path="$path"
37175 
37176   windows_path="$new_path"
37177   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37178     unix_path=`$CYGPATH -u "$windows_path"`
37179     new_path="$unix_path"
37180   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37181     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37182     new_path="$unix_path"
37183   fi
37184 
37185 
37186   # Now try to locate executable using which
37187   new_path=`$WHICH "$new_path" 2> /dev/null`
37188 
37189   if test "x$new_path" = x; then
37190     # Oops. Which didn't find the executable.
37191     # The splitting of arguments from the executable at a space might have been incorrect,
37192     # since paths with space are more likely in Windows. Give it another try with the whole
37193     # argument.
37194     path="$complete"
37195     arguments="EOL"
37196     new_path="$path"
37197 
37198   windows_path="$new_path"
37199   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37200     unix_path=`$CYGPATH -u "$windows_path"`
37201     new_path="$unix_path"
37202   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37203     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37204     new_path="$unix_path"
37205   fi
37206 
37207 
37208     new_path=`$WHICH "$new_path" 2> /dev/null`
37209     # bat and cmd files are not always considered executable in MSYS causing which
37210     # to not find them
37211     if test "x$new_path" = x \
37212         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37213         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37214       new_path="$path"
37215 
37216   windows_path="$new_path"
37217   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37218     unix_path=`$CYGPATH -u "$windows_path"`
37219     new_path="$unix_path"
37220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37221     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37222     new_path="$unix_path"
37223   fi
37224 
37225     fi
37226 
37227     if test "x$new_path" = x; then
37228       # It's still not found. Now this is an unrecoverable error.
37229       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37230 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37231       has_space=`$ECHO "$complete" | $GREP " "`
37232       if test "x$has_space" != x; then
37233         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37234 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37235       fi
37236       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37237     fi
37238   fi
37239 
37240   # Now new_path has a complete unix path to the binary
37241   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37242     # Keep paths in /bin as-is, but remove trailing .exe if any
37243     new_path="${new_path/%.exe/}"
37244     # Do not save /bin paths to all_fixpath_prefixes!
37245   else
37246     # Not in mixed or Windows style, start by that.
37247     new_path=`cmd //c echo $new_path`
37248 
37249   input_path="$new_path"
37250   # Check if we need to convert this using DOS-style short mode. If the path
37251   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37252   # take no chances and rewrite it.
37253   # Note: m4 eats our [], so we need to use [ and ] instead.
37254   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37255   if test "x$has_forbidden_chars" != x; then
37256     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37257     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37258   fi
37259 
37260     # Output is in $new_path
37261 
37262   windows_path="$new_path"
37263   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37264     unix_path=`$CYGPATH -u "$windows_path"`
37265     new_path="$unix_path"
37266   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37267     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37268     new_path="$unix_path"
37269   fi
37270 
37271     # remove trailing .exe if any
37272     new_path="${new_path/%.exe/}"
37273 
37274     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37275     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37276   fi
37277 
37278   else
37279     # We're on a posix platform. Hooray! :)
37280     # First separate the path from the arguments. This will split at the first
37281     # space.
37282     complete="$NM"
37283     path="${complete%% *}"
37284     tmp="$complete EOL"
37285     arguments="${tmp#* }"
37286 
37287     # Cannot rely on the command "which" here since it doesn't always work.
37288     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37289     if test -z "$is_absolute_path"; then
37290       # Path to executable is not absolute. Find it.
37291       IFS_save="$IFS"
37292       IFS=:
37293       for p in $PATH; do
37294         if test -f "$p/$path" && test -x "$p/$path"; then
37295           new_path="$p/$path"
37296           break
37297         fi
37298       done
37299       IFS="$IFS_save"
37300     else
37301       # This is an absolute path, we can use it without further modifications.
37302       new_path="$path"
37303     fi
37304 
37305     if test "x$new_path" = x; then
37306       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37307 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37308       has_space=`$ECHO "$complete" | $GREP " "`
37309       if test "x$has_space" != x; then
37310         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37311 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37312       fi
37313       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37314     fi
37315   fi
37316 
37317   # Now join together the path and the arguments once again
37318   if test "x$arguments" != xEOL; then
37319     new_complete="$new_path ${arguments% *}"
37320   else
37321     new_complete="$new_path"
37322   fi
37323 
37324   if test "x$complete" != "x$new_complete"; then
37325     NM="$new_complete"
37326     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37327 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37328   fi
37329 
37330     GNM="$NM"
37331 
37332   fi
37333 
37334   # objcopy is used for moving debug symbols to separate files when
37335   # full debug symbols are enabled.
37336   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37337 
37338 
37339   # Publish this variable in the help.
37340 
37341 
37342   if test "x$OBJCOPY" = x; then
37343     # The variable is not set by user, try to locate tool using the code snippet
37344     if test -n "$ac_tool_prefix"; then
37345   for ac_prog in gobjcopy objcopy
37346   do
37347     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37348 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37350 $as_echo_n "checking for $ac_word... " >&6; }
37351 if ${ac_cv_prog_OBJCOPY+:} false; then :
37352   $as_echo_n "(cached) " >&6
37353 else
37354   if test -n "$OBJCOPY"; then
37355   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37356 else
37357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37358 for as_dir in $PATH
37359 do
37360   IFS=$as_save_IFS
37361   test -z "$as_dir" && as_dir=.
37362     for ac_exec_ext in '' $ac_executable_extensions; do
37363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37364     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37366     break 2
37367   fi
37368 done
37369   done
37370 IFS=$as_save_IFS
37371 
37372 fi
37373 fi
37374 OBJCOPY=$ac_cv_prog_OBJCOPY
37375 if test -n "$OBJCOPY"; then
37376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37377 $as_echo "$OBJCOPY" >&6; }
37378 else
37379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37380 $as_echo "no" >&6; }
37381 fi
37382 
37383 
37384     test -n "$OBJCOPY" && break
37385   done
37386 fi
37387 if test -z "$OBJCOPY"; then
37388   ac_ct_OBJCOPY=$OBJCOPY
37389   for ac_prog in gobjcopy objcopy
37390 do
37391   # Extract the first word of "$ac_prog", so it can be a program name with args.
37392 set dummy $ac_prog; ac_word=$2
37393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37394 $as_echo_n "checking for $ac_word... " >&6; }
37395 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37396   $as_echo_n "(cached) " >&6
37397 else
37398   if test -n "$ac_ct_OBJCOPY"; then
37399   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37400 else
37401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37402 for as_dir in $PATH
37403 do
37404   IFS=$as_save_IFS
37405   test -z "$as_dir" && as_dir=.
37406     for ac_exec_ext in '' $ac_executable_extensions; do
37407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37408     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37410     break 2
37411   fi
37412 done
37413   done
37414 IFS=$as_save_IFS
37415 
37416 fi
37417 fi
37418 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37419 if test -n "$ac_ct_OBJCOPY"; then
37420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37421 $as_echo "$ac_ct_OBJCOPY" >&6; }
37422 else
37423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37424 $as_echo "no" >&6; }
37425 fi
37426 
37427 
37428   test -n "$ac_ct_OBJCOPY" && break
37429 done
37430 
37431   if test "x$ac_ct_OBJCOPY" = x; then
37432     OBJCOPY=""
37433   else
37434     case $cross_compiling:$ac_tool_warned in
37435 yes:)
37436 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37437 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37438 ac_tool_warned=yes ;;
37439 esac
37440     OBJCOPY=$ac_ct_OBJCOPY
37441   fi
37442 fi
37443 
37444   else
37445     # The variable is set, but is it from the command line or the environment?
37446 
37447     # Try to remove the string !OBJCOPY! from our list.
37448     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37449     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37450       # If it failed, the variable was not from the command line. Ignore it,
37451       # but warn the user (except for BASH, which is always set by the calling BASH).
37452       if test "xOBJCOPY" != xBASH; then
37453         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37454 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37455       fi
37456       # Try to locate tool using the code snippet
37457       if test -n "$ac_tool_prefix"; then
37458   for ac_prog in gobjcopy objcopy
37459   do
37460     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37461 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37463 $as_echo_n "checking for $ac_word... " >&6; }
37464 if ${ac_cv_prog_OBJCOPY+:} false; then :
37465   $as_echo_n "(cached) " >&6
37466 else
37467   if test -n "$OBJCOPY"; then
37468   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37469 else
37470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37471 for as_dir in $PATH
37472 do
37473   IFS=$as_save_IFS
37474   test -z "$as_dir" && as_dir=.
37475     for ac_exec_ext in '' $ac_executable_extensions; do
37476   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37477     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37478     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37479     break 2
37480   fi
37481 done
37482   done
37483 IFS=$as_save_IFS
37484 
37485 fi
37486 fi
37487 OBJCOPY=$ac_cv_prog_OBJCOPY
37488 if test -n "$OBJCOPY"; then
37489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37490 $as_echo "$OBJCOPY" >&6; }
37491 else
37492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37493 $as_echo "no" >&6; }
37494 fi
37495 
37496 
37497     test -n "$OBJCOPY" && break
37498   done
37499 fi
37500 if test -z "$OBJCOPY"; then
37501   ac_ct_OBJCOPY=$OBJCOPY
37502   for ac_prog in gobjcopy objcopy
37503 do
37504   # Extract the first word of "$ac_prog", so it can be a program name with args.
37505 set dummy $ac_prog; ac_word=$2
37506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37507 $as_echo_n "checking for $ac_word... " >&6; }
37508 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37509   $as_echo_n "(cached) " >&6
37510 else
37511   if test -n "$ac_ct_OBJCOPY"; then
37512   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37513 else
37514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37515 for as_dir in $PATH
37516 do
37517   IFS=$as_save_IFS
37518   test -z "$as_dir" && as_dir=.
37519     for ac_exec_ext in '' $ac_executable_extensions; do
37520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37521     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37523     break 2
37524   fi
37525 done
37526   done
37527 IFS=$as_save_IFS
37528 
37529 fi
37530 fi
37531 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37532 if test -n "$ac_ct_OBJCOPY"; then
37533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37534 $as_echo "$ac_ct_OBJCOPY" >&6; }
37535 else
37536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37537 $as_echo "no" >&6; }
37538 fi
37539 
37540 
37541   test -n "$ac_ct_OBJCOPY" && break
37542 done
37543 
37544   if test "x$ac_ct_OBJCOPY" = x; then
37545     OBJCOPY=""
37546   else
37547     case $cross_compiling:$ac_tool_warned in
37548 yes:)
37549 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37550 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37551 ac_tool_warned=yes ;;
37552 esac
37553     OBJCOPY=$ac_ct_OBJCOPY
37554   fi
37555 fi
37556 
37557     else
37558       # If it succeeded, then it was overridden by the user. We will use it
37559       # for the tool.
37560 
37561       # First remove it from the list of overridden variables, so we can test
37562       # for unknown variables in the end.
37563       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37564 
37565       # Check if the provided tool contains a complete path.
37566       tool_specified="$OBJCOPY"
37567       tool_basename="${tool_specified##*/}"
37568       if test "x$tool_basename" = "x$tool_specified"; then
37569         # A command without a complete path is provided, search $PATH.
37570         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37571 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37572         # Extract the first word of "$tool_basename", so it can be a program name with args.
37573 set dummy $tool_basename; ac_word=$2
37574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37575 $as_echo_n "checking for $ac_word... " >&6; }
37576 if ${ac_cv_path_OBJCOPY+:} false; then :
37577   $as_echo_n "(cached) " >&6
37578 else
37579   case $OBJCOPY in
37580   [\\/]* | ?:[\\/]*)
37581   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37582   ;;
37583   *)
37584   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37585 for as_dir in $PATH
37586 do
37587   IFS=$as_save_IFS
37588   test -z "$as_dir" && as_dir=.
37589     for ac_exec_ext in '' $ac_executable_extensions; do
37590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37591     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37593     break 2
37594   fi
37595 done
37596   done
37597 IFS=$as_save_IFS
37598 
37599   ;;
37600 esac
37601 fi
37602 OBJCOPY=$ac_cv_path_OBJCOPY
37603 if test -n "$OBJCOPY"; then
37604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37605 $as_echo "$OBJCOPY" >&6; }
37606 else
37607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37608 $as_echo "no" >&6; }
37609 fi
37610 
37611 
37612         if test "x$OBJCOPY" = x; then
37613           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37614         fi
37615       else
37616         # Otherwise we believe it is a complete path. Use it as it is.
37617         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37618 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37619         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37620 $as_echo_n "checking for OBJCOPY... " >&6; }
37621         if test ! -x "$tool_specified"; then
37622           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37623 $as_echo "not found" >&6; }
37624           as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37625         fi
37626         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37627 $as_echo "$tool_specified" >&6; }
37628       fi
37629     fi
37630   fi
37631 
37632 
37633     # Only call fixup if objcopy was found.
37634     if test -n "$OBJCOPY"; then
37635 
37636   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37637 
37638   # First separate the path from the arguments. This will split at the first
37639   # space.
37640   complete="$OBJCOPY"
37641   path="${complete%% *}"
37642   tmp="$complete EOL"
37643   arguments="${tmp#* }"
37644 
37645   # Input might be given as Windows format, start by converting to
37646   # unix format.
37647   new_path=`$CYGPATH -u "$path"`
37648 
37649   # Now try to locate executable using which
37650   new_path=`$WHICH "$new_path" 2> /dev/null`
37651   # bat and cmd files are not always considered executable in cygwin causing which
37652   # to not find them
37653   if test "x$new_path" = x \
37654       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37655       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37656     new_path=`$CYGPATH -u "$path"`
37657   fi
37658   if test "x$new_path" = x; then
37659     # Oops. Which didn't find the executable.
37660     # The splitting of arguments from the executable at a space might have been incorrect,
37661     # since paths with space are more likely in Windows. Give it another try with the whole
37662     # argument.
37663     path="$complete"
37664     arguments="EOL"
37665     new_path=`$CYGPATH -u "$path"`
37666     new_path=`$WHICH "$new_path" 2> /dev/null`
37667     # bat and cmd files are not always considered executable in cygwin causing which
37668     # to not find them
37669     if test "x$new_path" = x \
37670         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37671         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37672       new_path=`$CYGPATH -u "$path"`
37673     fi
37674     if test "x$new_path" = x; then
37675       # It's still not found. Now this is an unrecoverable error.
37676       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37677 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37678       has_space=`$ECHO "$complete" | $GREP " "`
37679       if test "x$has_space" != x; then
37680         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37681 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37682       fi
37683       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37684     fi
37685   fi
37686 
37687   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37688   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37689   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37690   # "foo.exe" is OK but "foo" is an error.
37691   #
37692   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37693   # It is also a way to make sure we got the proper file name for the real test later on.
37694   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37695   if test "x$test_shortpath" = x; then
37696     # Short path failed, file does not exist as specified.
37697     # Try adding .exe or .cmd
37698     if test -f "${new_path}.exe"; then
37699       input_to_shortpath="${new_path}.exe"
37700     elif test -f "${new_path}.cmd"; then
37701       input_to_shortpath="${new_path}.cmd"
37702     else
37703       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
37704 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
37705       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37706 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37707       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37708     fi
37709   else
37710     input_to_shortpath="$new_path"
37711   fi
37712 
37713   # Call helper function which possibly converts this using DOS-style short mode.
37714   # If so, the updated path is stored in $new_path.
37715   new_path="$input_to_shortpath"
37716 
37717   input_path="$input_to_shortpath"
37718   # Check if we need to convert this using DOS-style short mode. If the path
37719   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37720   # take no chances and rewrite it.
37721   # Note: m4 eats our [], so we need to use [ and ] instead.
37722   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37723   if test "x$has_forbidden_chars" != x; then
37724     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37725     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37726     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37727     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37728       # Going to short mode and back again did indeed matter. Since short mode is
37729       # case insensitive, let's make it lowercase to improve readability.
37730       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37731       # Now convert it back to Unix-style (cygpath)
37732       input_path=`$CYGPATH -u "$shortmode_path"`
37733       new_path="$input_path"
37734     fi
37735   fi
37736 
37737   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37738   if test "x$test_cygdrive_prefix" = x; then
37739     # As a simple fix, exclude /usr/bin since it's not a real path.
37740     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37741       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37742       # a path prefixed by /cygdrive for fixpath to work.
37743       new_path="$CYGWIN_ROOT_PATH$input_path"
37744     fi
37745   fi
37746 
37747   # remove trailing .exe if any
37748   new_path="${new_path/%.exe/}"
37749 
37750   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37751 
37752   # First separate the path from the arguments. This will split at the first
37753   # space.
37754   complete="$OBJCOPY"
37755   path="${complete%% *}"
37756   tmp="$complete EOL"
37757   arguments="${tmp#* }"
37758 
37759   # Input might be given as Windows format, start by converting to
37760   # unix format.
37761   new_path="$path"
37762 
37763   windows_path="$new_path"
37764   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37765     unix_path=`$CYGPATH -u "$windows_path"`
37766     new_path="$unix_path"
37767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37768     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37769     new_path="$unix_path"
37770   fi
37771 
37772 
37773   # Now try to locate executable using which
37774   new_path=`$WHICH "$new_path" 2> /dev/null`
37775 
37776   if test "x$new_path" = x; then
37777     # Oops. Which didn't find the executable.
37778     # The splitting of arguments from the executable at a space might have been incorrect,
37779     # since paths with space are more likely in Windows. Give it another try with the whole
37780     # argument.
37781     path="$complete"
37782     arguments="EOL"
37783     new_path="$path"
37784 
37785   windows_path="$new_path"
37786   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37787     unix_path=`$CYGPATH -u "$windows_path"`
37788     new_path="$unix_path"
37789   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37790     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37791     new_path="$unix_path"
37792   fi
37793 
37794 
37795     new_path=`$WHICH "$new_path" 2> /dev/null`
37796     # bat and cmd files are not always considered executable in MSYS causing which
37797     # to not find them
37798     if test "x$new_path" = x \
37799         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37800         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37801       new_path="$path"
37802 
37803   windows_path="$new_path"
37804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37805     unix_path=`$CYGPATH -u "$windows_path"`
37806     new_path="$unix_path"
37807   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37808     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37809     new_path="$unix_path"
37810   fi
37811 
37812     fi
37813 
37814     if test "x$new_path" = x; then
37815       # It's still not found. Now this is an unrecoverable error.
37816       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37817 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37818       has_space=`$ECHO "$complete" | $GREP " "`
37819       if test "x$has_space" != x; then
37820         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37821 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37822       fi
37823       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37824     fi
37825   fi
37826 
37827   # Now new_path has a complete unix path to the binary
37828   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37829     # Keep paths in /bin as-is, but remove trailing .exe if any
37830     new_path="${new_path/%.exe/}"
37831     # Do not save /bin paths to all_fixpath_prefixes!
37832   else
37833     # Not in mixed or Windows style, start by that.
37834     new_path=`cmd //c echo $new_path`
37835 
37836   input_path="$new_path"
37837   # Check if we need to convert this using DOS-style short mode. If the path
37838   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37839   # take no chances and rewrite it.
37840   # Note: m4 eats our [], so we need to use [ and ] instead.
37841   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37842   if test "x$has_forbidden_chars" != x; then
37843     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37844     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37845   fi
37846 
37847     # Output is in $new_path
37848 
37849   windows_path="$new_path"
37850   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37851     unix_path=`$CYGPATH -u "$windows_path"`
37852     new_path="$unix_path"
37853   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37854     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37855     new_path="$unix_path"
37856   fi
37857 
37858     # remove trailing .exe if any
37859     new_path="${new_path/%.exe/}"
37860 
37861     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37862     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37863   fi
37864 
37865   else
37866     # We're on a posix platform. Hooray! :)
37867     # First separate the path from the arguments. This will split at the first
37868     # space.
37869     complete="$OBJCOPY"
37870     path="${complete%% *}"
37871     tmp="$complete EOL"
37872     arguments="${tmp#* }"
37873 
37874     # Cannot rely on the command "which" here since it doesn't always work.
37875     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37876     if test -z "$is_absolute_path"; then
37877       # Path to executable is not absolute. Find it.
37878       IFS_save="$IFS"
37879       IFS=:
37880       for p in $PATH; do
37881         if test -f "$p/$path" && test -x "$p/$path"; then
37882           new_path="$p/$path"
37883           break
37884         fi
37885       done
37886       IFS="$IFS_save"
37887     else
37888       # This is an absolute path, we can use it without further modifications.
37889       new_path="$path"
37890     fi
37891 
37892     if test "x$new_path" = x; then
37893       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37894 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37895       has_space=`$ECHO "$complete" | $GREP " "`
37896       if test "x$has_space" != x; then
37897         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37898 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37899       fi
37900       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37901     fi
37902   fi
37903 
37904   # Now join together the path and the arguments once again
37905   if test "x$arguments" != xEOL; then
37906     new_complete="$new_path ${arguments% *}"
37907   else
37908     new_complete="$new_path"
37909   fi
37910 
37911   if test "x$complete" != "x$new_complete"; then
37912     OBJCOPY="$new_complete"
37913     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
37914 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
37915   fi
37916 
37917     fi
37918   fi
37919 
37920 
37921 
37922   # Publish this variable in the help.
37923 
37924 
37925   if test "x$OBJDUMP" = x; then
37926     # The variable is not set by user, try to locate tool using the code snippet
37927     if test -n "$ac_tool_prefix"; then
37928   for ac_prog in gobjdump objdump
37929   do
37930     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37931 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37933 $as_echo_n "checking for $ac_word... " >&6; }
37934 if ${ac_cv_prog_OBJDUMP+:} false; then :
37935   $as_echo_n "(cached) " >&6
37936 else
37937   if test -n "$OBJDUMP"; then
37938   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
37939 else
37940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37941 for as_dir in $PATH
37942 do
37943   IFS=$as_save_IFS
37944   test -z "$as_dir" && as_dir=.
37945     for ac_exec_ext in '' $ac_executable_extensions; do
37946   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37947     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
37948     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37949     break 2
37950   fi
37951 done
37952   done
37953 IFS=$as_save_IFS
37954 
37955 fi
37956 fi
37957 OBJDUMP=$ac_cv_prog_OBJDUMP
37958 if test -n "$OBJDUMP"; then
37959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
37960 $as_echo "$OBJDUMP" >&6; }
37961 else
37962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37963 $as_echo "no" >&6; }
37964 fi
37965 
37966 
37967     test -n "$OBJDUMP" && break
37968   done
37969 fi
37970 if test -z "$OBJDUMP"; then
37971   ac_ct_OBJDUMP=$OBJDUMP
37972   for ac_prog in gobjdump objdump
37973 do
37974   # Extract the first word of "$ac_prog", so it can be a program name with args.
37975 set dummy $ac_prog; ac_word=$2
37976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37977 $as_echo_n "checking for $ac_word... " >&6; }
37978 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
37979   $as_echo_n "(cached) " >&6
37980 else
37981   if test -n "$ac_ct_OBJDUMP"; then
37982   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
37983 else
37984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37985 for as_dir in $PATH
37986 do
37987   IFS=$as_save_IFS
37988   test -z "$as_dir" && as_dir=.
37989     for ac_exec_ext in '' $ac_executable_extensions; do
37990   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37991     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
37992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37993     break 2
37994   fi
37995 done
37996   done
37997 IFS=$as_save_IFS
37998 
37999 fi
38000 fi
38001 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38002 if test -n "$ac_ct_OBJDUMP"; then
38003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38004 $as_echo "$ac_ct_OBJDUMP" >&6; }
38005 else
38006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38007 $as_echo "no" >&6; }
38008 fi
38009 
38010 
38011   test -n "$ac_ct_OBJDUMP" && break
38012 done
38013 
38014   if test "x$ac_ct_OBJDUMP" = x; then
38015     OBJDUMP=""
38016   else
38017     case $cross_compiling:$ac_tool_warned in
38018 yes:)
38019 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38020 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38021 ac_tool_warned=yes ;;
38022 esac
38023     OBJDUMP=$ac_ct_OBJDUMP
38024   fi
38025 fi
38026 
38027   else
38028     # The variable is set, but is it from the command line or the environment?
38029 
38030     # Try to remove the string !OBJDUMP! from our list.
38031     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38032     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38033       # If it failed, the variable was not from the command line. Ignore it,
38034       # but warn the user (except for BASH, which is always set by the calling BASH).
38035       if test "xOBJDUMP" != xBASH; then
38036         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38037 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38038       fi
38039       # Try to locate tool using the code snippet
38040       if test -n "$ac_tool_prefix"; then
38041   for ac_prog in gobjdump objdump
38042   do
38043     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38044 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38046 $as_echo_n "checking for $ac_word... " >&6; }
38047 if ${ac_cv_prog_OBJDUMP+:} false; then :
38048   $as_echo_n "(cached) " >&6
38049 else
38050   if test -n "$OBJDUMP"; then
38051   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38052 else
38053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38054 for as_dir in $PATH
38055 do
38056   IFS=$as_save_IFS
38057   test -z "$as_dir" && as_dir=.
38058     for ac_exec_ext in '' $ac_executable_extensions; do
38059   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38060     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38062     break 2
38063   fi
38064 done
38065   done
38066 IFS=$as_save_IFS
38067 
38068 fi
38069 fi
38070 OBJDUMP=$ac_cv_prog_OBJDUMP
38071 if test -n "$OBJDUMP"; then
38072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38073 $as_echo "$OBJDUMP" >&6; }
38074 else
38075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38076 $as_echo "no" >&6; }
38077 fi
38078 
38079 
38080     test -n "$OBJDUMP" && break
38081   done
38082 fi
38083 if test -z "$OBJDUMP"; then
38084   ac_ct_OBJDUMP=$OBJDUMP
38085   for ac_prog in gobjdump objdump
38086 do
38087   # Extract the first word of "$ac_prog", so it can be a program name with args.
38088 set dummy $ac_prog; ac_word=$2
38089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38090 $as_echo_n "checking for $ac_word... " >&6; }
38091 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38092   $as_echo_n "(cached) " >&6
38093 else
38094   if test -n "$ac_ct_OBJDUMP"; then
38095   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38096 else
38097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38098 for as_dir in $PATH
38099 do
38100   IFS=$as_save_IFS
38101   test -z "$as_dir" && as_dir=.
38102     for ac_exec_ext in '' $ac_executable_extensions; do
38103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38104     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38106     break 2
38107   fi
38108 done
38109   done
38110 IFS=$as_save_IFS
38111 
38112 fi
38113 fi
38114 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38115 if test -n "$ac_ct_OBJDUMP"; then
38116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38117 $as_echo "$ac_ct_OBJDUMP" >&6; }
38118 else
38119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38120 $as_echo "no" >&6; }
38121 fi
38122 
38123 
38124   test -n "$ac_ct_OBJDUMP" && break
38125 done
38126 
38127   if test "x$ac_ct_OBJDUMP" = x; then
38128     OBJDUMP=""
38129   else
38130     case $cross_compiling:$ac_tool_warned in
38131 yes:)
38132 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38133 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38134 ac_tool_warned=yes ;;
38135 esac
38136     OBJDUMP=$ac_ct_OBJDUMP
38137   fi
38138 fi
38139 
38140     else
38141       # If it succeeded, then it was overridden by the user. We will use it
38142       # for the tool.
38143 
38144       # First remove it from the list of overridden variables, so we can test
38145       # for unknown variables in the end.
38146       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38147 
38148       # Check if the provided tool contains a complete path.
38149       tool_specified="$OBJDUMP"
38150       tool_basename="${tool_specified##*/}"
38151       if test "x$tool_basename" = "x$tool_specified"; then
38152         # A command without a complete path is provided, search $PATH.
38153         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38154 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38155         # Extract the first word of "$tool_basename", so it can be a program name with args.
38156 set dummy $tool_basename; ac_word=$2
38157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38158 $as_echo_n "checking for $ac_word... " >&6; }
38159 if ${ac_cv_path_OBJDUMP+:} false; then :
38160   $as_echo_n "(cached) " >&6
38161 else
38162   case $OBJDUMP in
38163   [\\/]* | ?:[\\/]*)
38164   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38165   ;;
38166   *)
38167   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38168 for as_dir in $PATH
38169 do
38170   IFS=$as_save_IFS
38171   test -z "$as_dir" && as_dir=.
38172     for ac_exec_ext in '' $ac_executable_extensions; do
38173   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38174     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38175     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38176     break 2
38177   fi
38178 done
38179   done
38180 IFS=$as_save_IFS
38181 
38182   ;;
38183 esac
38184 fi
38185 OBJDUMP=$ac_cv_path_OBJDUMP
38186 if test -n "$OBJDUMP"; then
38187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38188 $as_echo "$OBJDUMP" >&6; }
38189 else
38190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38191 $as_echo "no" >&6; }
38192 fi
38193 
38194 
38195         if test "x$OBJDUMP" = x; then
38196           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38197         fi
38198       else
38199         # Otherwise we believe it is a complete path. Use it as it is.
38200         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38201 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38202         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38203 $as_echo_n "checking for OBJDUMP... " >&6; }
38204         if test ! -x "$tool_specified"; then
38205           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38206 $as_echo "not found" >&6; }
38207           as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38208         fi
38209         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38210 $as_echo "$tool_specified" >&6; }
38211       fi
38212     fi
38213   fi
38214 
38215 
38216   if test "x$OBJDUMP" != x; then
38217     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38218     # bails if argument is missing.
38219 
38220   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38221 
38222   # First separate the path from the arguments. This will split at the first
38223   # space.
38224   complete="$OBJDUMP"
38225   path="${complete%% *}"
38226   tmp="$complete EOL"
38227   arguments="${tmp#* }"
38228 
38229   # Input might be given as Windows format, start by converting to
38230   # unix format.
38231   new_path=`$CYGPATH -u "$path"`
38232 
38233   # Now try to locate executable using which
38234   new_path=`$WHICH "$new_path" 2> /dev/null`
38235   # bat and cmd files are not always considered executable in cygwin causing which
38236   # to not find them
38237   if test "x$new_path" = x \
38238       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38239       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38240     new_path=`$CYGPATH -u "$path"`
38241   fi
38242   if test "x$new_path" = x; then
38243     # Oops. Which didn't find the executable.
38244     # The splitting of arguments from the executable at a space might have been incorrect,
38245     # since paths with space are more likely in Windows. Give it another try with the whole
38246     # argument.
38247     path="$complete"
38248     arguments="EOL"
38249     new_path=`$CYGPATH -u "$path"`
38250     new_path=`$WHICH "$new_path" 2> /dev/null`
38251     # bat and cmd files are not always considered executable in cygwin causing which
38252     # to not find them
38253     if test "x$new_path" = x \
38254         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38255         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38256       new_path=`$CYGPATH -u "$path"`
38257     fi
38258     if test "x$new_path" = x; then
38259       # It's still not found. Now this is an unrecoverable error.
38260       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38261 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38262       has_space=`$ECHO "$complete" | $GREP " "`
38263       if test "x$has_space" != x; then
38264         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38265 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38266       fi
38267       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38268     fi
38269   fi
38270 
38271   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38272   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38273   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38274   # "foo.exe" is OK but "foo" is an error.
38275   #
38276   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38277   # It is also a way to make sure we got the proper file name for the real test later on.
38278   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38279   if test "x$test_shortpath" = x; then
38280     # Short path failed, file does not exist as specified.
38281     # Try adding .exe or .cmd
38282     if test -f "${new_path}.exe"; then
38283       input_to_shortpath="${new_path}.exe"
38284     elif test -f "${new_path}.cmd"; then
38285       input_to_shortpath="${new_path}.cmd"
38286     else
38287       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38288 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38289       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38290 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38291       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38292     fi
38293   else
38294     input_to_shortpath="$new_path"
38295   fi
38296 
38297   # Call helper function which possibly converts this using DOS-style short mode.
38298   # If so, the updated path is stored in $new_path.
38299   new_path="$input_to_shortpath"
38300 
38301   input_path="$input_to_shortpath"
38302   # Check if we need to convert this using DOS-style short mode. If the path
38303   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38304   # take no chances and rewrite it.
38305   # Note: m4 eats our [], so we need to use [ and ] instead.
38306   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38307   if test "x$has_forbidden_chars" != x; then
38308     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38309     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38310     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38311     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38312       # Going to short mode and back again did indeed matter. Since short mode is
38313       # case insensitive, let's make it lowercase to improve readability.
38314       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38315       # Now convert it back to Unix-style (cygpath)
38316       input_path=`$CYGPATH -u "$shortmode_path"`
38317       new_path="$input_path"
38318     fi
38319   fi
38320 
38321   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38322   if test "x$test_cygdrive_prefix" = x; then
38323     # As a simple fix, exclude /usr/bin since it's not a real path.
38324     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38325       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38326       # a path prefixed by /cygdrive for fixpath to work.
38327       new_path="$CYGWIN_ROOT_PATH$input_path"
38328     fi
38329   fi
38330 
38331   # remove trailing .exe if any
38332   new_path="${new_path/%.exe/}"
38333 
38334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38335 
38336   # First separate the path from the arguments. This will split at the first
38337   # space.
38338   complete="$OBJDUMP"
38339   path="${complete%% *}"
38340   tmp="$complete EOL"
38341   arguments="${tmp#* }"
38342 
38343   # Input might be given as Windows format, start by converting to
38344   # unix format.
38345   new_path="$path"
38346 
38347   windows_path="$new_path"
38348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38349     unix_path=`$CYGPATH -u "$windows_path"`
38350     new_path="$unix_path"
38351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38352     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38353     new_path="$unix_path"
38354   fi
38355 
38356 
38357   # Now try to locate executable using which
38358   new_path=`$WHICH "$new_path" 2> /dev/null`
38359 
38360   if test "x$new_path" = x; then
38361     # Oops. Which didn't find the executable.
38362     # The splitting of arguments from the executable at a space might have been incorrect,
38363     # since paths with space are more likely in Windows. Give it another try with the whole
38364     # argument.
38365     path="$complete"
38366     arguments="EOL"
38367     new_path="$path"
38368 
38369   windows_path="$new_path"
38370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38371     unix_path=`$CYGPATH -u "$windows_path"`
38372     new_path="$unix_path"
38373   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38374     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38375     new_path="$unix_path"
38376   fi
38377 
38378 
38379     new_path=`$WHICH "$new_path" 2> /dev/null`
38380     # bat and cmd files are not always considered executable in MSYS causing which
38381     # to not find them
38382     if test "x$new_path" = x \
38383         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38384         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38385       new_path="$path"
38386 
38387   windows_path="$new_path"
38388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38389     unix_path=`$CYGPATH -u "$windows_path"`
38390     new_path="$unix_path"
38391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38393     new_path="$unix_path"
38394   fi
38395 
38396     fi
38397 
38398     if test "x$new_path" = x; then
38399       # It's still not found. Now this is an unrecoverable error.
38400       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38401 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38402       has_space=`$ECHO "$complete" | $GREP " "`
38403       if test "x$has_space" != x; then
38404         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38405 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38406       fi
38407       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38408     fi
38409   fi
38410 
38411   # Now new_path has a complete unix path to the binary
38412   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38413     # Keep paths in /bin as-is, but remove trailing .exe if any
38414     new_path="${new_path/%.exe/}"
38415     # Do not save /bin paths to all_fixpath_prefixes!
38416   else
38417     # Not in mixed or Windows style, start by that.
38418     new_path=`cmd //c echo $new_path`
38419 
38420   input_path="$new_path"
38421   # Check if we need to convert this using DOS-style short mode. If the path
38422   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38423   # take no chances and rewrite it.
38424   # Note: m4 eats our [], so we need to use [ and ] instead.
38425   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38426   if test "x$has_forbidden_chars" != x; then
38427     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38428     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38429   fi
38430 
38431     # Output is in $new_path
38432 
38433   windows_path="$new_path"
38434   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38435     unix_path=`$CYGPATH -u "$windows_path"`
38436     new_path="$unix_path"
38437   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38438     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38439     new_path="$unix_path"
38440   fi
38441 
38442     # remove trailing .exe if any
38443     new_path="${new_path/%.exe/}"
38444 
38445     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38446     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38447   fi
38448 
38449   else
38450     # We're on a posix platform. Hooray! :)
38451     # First separate the path from the arguments. This will split at the first
38452     # space.
38453     complete="$OBJDUMP"
38454     path="${complete%% *}"
38455     tmp="$complete EOL"
38456     arguments="${tmp#* }"
38457 
38458     # Cannot rely on the command "which" here since it doesn't always work.
38459     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38460     if test -z "$is_absolute_path"; then
38461       # Path to executable is not absolute. Find it.
38462       IFS_save="$IFS"
38463       IFS=:
38464       for p in $PATH; do
38465         if test -f "$p/$path" && test -x "$p/$path"; then
38466           new_path="$p/$path"
38467           break
38468         fi
38469       done
38470       IFS="$IFS_save"
38471     else
38472       # This is an absolute path, we can use it without further modifications.
38473       new_path="$path"
38474     fi
38475 
38476     if test "x$new_path" = x; then
38477       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38478 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38479       has_space=`$ECHO "$complete" | $GREP " "`
38480       if test "x$has_space" != x; then
38481         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38482 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38483       fi
38484       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38485     fi
38486   fi
38487 
38488   # Now join together the path and the arguments once again
38489   if test "x$arguments" != xEOL; then
38490     new_complete="$new_path ${arguments% *}"
38491   else
38492     new_complete="$new_path"
38493   fi
38494 
38495   if test "x$complete" != "x$new_complete"; then
38496     OBJDUMP="$new_complete"
38497     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38498 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38499   fi
38500 
38501   fi
38502 
38503 
38504   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
38505   # to remain in place. Otherwise the compiler will not work in some situations
38506   # in later configure checks.
38507   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
38508     PATH="$OLD_PATH"
38509   fi
38510 
38511   # Restore the flags to the user specified values.
38512   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38513   CFLAGS="$ORG_CFLAGS"
38514   CXXFLAGS="$ORG_CXXFLAGS"
38515   OBJCFLAGS="$ORG_OBJCFLAGS"
38516 
38517 
38518 # Finally do some processing after the detection phase
38519 
38520   if test "x$COMPILE_TYPE" = "xcross"; then
38521     # Now we need to find a C/C++ compiler that can build executables for the
38522     # build platform. We can't use the AC_PROG_CC macro, since it can only be
38523     # used once. Also, we need to do this without adding a tools dir to the
38524     # path, otherwise we might pick up cross-compilers which don't use standard
38525     # naming.
38526 
38527     # FIXME: we should list the discovered compilers as an exclude pattern!
38528     # If we do that, we can do this detection before POST_DETECTION, and still
38529     # find the build compilers in the tools dir, if needed.
38530 
38531 
38532   # Publish this variable in the help.
38533 
38534 
38535   if test "x$BUILD_CC" = x; then
38536     # The variable is not set by user, try to locate tool using the code snippet
38537     for ac_prog in cl cc gcc
38538 do
38539   # Extract the first word of "$ac_prog", so it can be a program name with args.
38540 set dummy $ac_prog; ac_word=$2
38541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38542 $as_echo_n "checking for $ac_word... " >&6; }
38543 if ${ac_cv_path_BUILD_CC+:} false; then :
38544   $as_echo_n "(cached) " >&6
38545 else
38546   case $BUILD_CC in
38547   [\\/]* | ?:[\\/]*)
38548   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38549   ;;
38550   *)
38551   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38552 for as_dir in $PATH
38553 do
38554   IFS=$as_save_IFS
38555   test -z "$as_dir" && as_dir=.
38556     for ac_exec_ext in '' $ac_executable_extensions; do
38557   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38558     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38559     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38560     break 2
38561   fi
38562 done
38563   done
38564 IFS=$as_save_IFS
38565 
38566   ;;
38567 esac
38568 fi
38569 BUILD_CC=$ac_cv_path_BUILD_CC
38570 if test -n "$BUILD_CC"; then
38571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38572 $as_echo "$BUILD_CC" >&6; }
38573 else
38574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38575 $as_echo "no" >&6; }
38576 fi
38577 
38578 
38579   test -n "$BUILD_CC" && break
38580 done
38581 
38582   else
38583     # The variable is set, but is it from the command line or the environment?
38584 
38585     # Try to remove the string !BUILD_CC! from our list.
38586     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38587     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38588       # If it failed, the variable was not from the command line. Ignore it,
38589       # but warn the user (except for BASH, which is always set by the calling BASH).
38590       if test "xBUILD_CC" != xBASH; then
38591         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38592 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38593       fi
38594       # Try to locate tool using the code snippet
38595       for ac_prog in cl cc gcc
38596 do
38597   # Extract the first word of "$ac_prog", so it can be a program name with args.
38598 set dummy $ac_prog; ac_word=$2
38599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38600 $as_echo_n "checking for $ac_word... " >&6; }
38601 if ${ac_cv_path_BUILD_CC+:} false; then :
38602   $as_echo_n "(cached) " >&6
38603 else
38604   case $BUILD_CC in
38605   [\\/]* | ?:[\\/]*)
38606   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38607   ;;
38608   *)
38609   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38610 for as_dir in $PATH
38611 do
38612   IFS=$as_save_IFS
38613   test -z "$as_dir" && as_dir=.
38614     for ac_exec_ext in '' $ac_executable_extensions; do
38615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38616     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38618     break 2
38619   fi
38620 done
38621   done
38622 IFS=$as_save_IFS
38623 
38624   ;;
38625 esac
38626 fi
38627 BUILD_CC=$ac_cv_path_BUILD_CC
38628 if test -n "$BUILD_CC"; then
38629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38630 $as_echo "$BUILD_CC" >&6; }
38631 else
38632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38633 $as_echo "no" >&6; }
38634 fi
38635 
38636 
38637   test -n "$BUILD_CC" && break
38638 done
38639 
38640     else
38641       # If it succeeded, then it was overridden by the user. We will use it
38642       # for the tool.
38643 
38644       # First remove it from the list of overridden variables, so we can test
38645       # for unknown variables in the end.
38646       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38647 
38648       # Check if the provided tool contains a complete path.
38649       tool_specified="$BUILD_CC"
38650       tool_basename="${tool_specified##*/}"
38651       if test "x$tool_basename" = "x$tool_specified"; then
38652         # A command without a complete path is provided, search $PATH.
38653         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38654 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38655         # Extract the first word of "$tool_basename", so it can be a program name with args.
38656 set dummy $tool_basename; ac_word=$2
38657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38658 $as_echo_n "checking for $ac_word... " >&6; }
38659 if ${ac_cv_path_BUILD_CC+:} false; then :
38660   $as_echo_n "(cached) " >&6
38661 else
38662   case $BUILD_CC in
38663   [\\/]* | ?:[\\/]*)
38664   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38665   ;;
38666   *)
38667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38668 for as_dir in $PATH
38669 do
38670   IFS=$as_save_IFS
38671   test -z "$as_dir" && as_dir=.
38672     for ac_exec_ext in '' $ac_executable_extensions; do
38673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38674     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38676     break 2
38677   fi
38678 done
38679   done
38680 IFS=$as_save_IFS
38681 
38682   ;;
38683 esac
38684 fi
38685 BUILD_CC=$ac_cv_path_BUILD_CC
38686 if test -n "$BUILD_CC"; then
38687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38688 $as_echo "$BUILD_CC" >&6; }
38689 else
38690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38691 $as_echo "no" >&6; }
38692 fi
38693 
38694 
38695         if test "x$BUILD_CC" = x; then
38696           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38697         fi
38698       else
38699         # Otherwise we believe it is a complete path. Use it as it is.
38700         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38701 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38702         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38703 $as_echo_n "checking for BUILD_CC... " >&6; }
38704         if test ! -x "$tool_specified"; then
38705           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38706 $as_echo "not found" >&6; }
38707           as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
38708         fi
38709         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38710 $as_echo "$tool_specified" >&6; }
38711       fi
38712     fi
38713   fi
38714 
38715 
38716 
38717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38718 
38719   # First separate the path from the arguments. This will split at the first
38720   # space.
38721   complete="$BUILD_CC"
38722   path="${complete%% *}"
38723   tmp="$complete EOL"
38724   arguments="${tmp#* }"
38725 
38726   # Input might be given as Windows format, start by converting to
38727   # unix format.
38728   new_path=`$CYGPATH -u "$path"`
38729 
38730   # Now try to locate executable using which
38731   new_path=`$WHICH "$new_path" 2> /dev/null`
38732   # bat and cmd files are not always considered executable in cygwin causing which
38733   # to not find them
38734   if test "x$new_path" = x \
38735       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38736       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38737     new_path=`$CYGPATH -u "$path"`
38738   fi
38739   if test "x$new_path" = x; then
38740     # Oops. Which didn't find the executable.
38741     # The splitting of arguments from the executable at a space might have been incorrect,
38742     # since paths with space are more likely in Windows. Give it another try with the whole
38743     # argument.
38744     path="$complete"
38745     arguments="EOL"
38746     new_path=`$CYGPATH -u "$path"`
38747     new_path=`$WHICH "$new_path" 2> /dev/null`
38748     # bat and cmd files are not always considered executable in cygwin causing which
38749     # to not find them
38750     if test "x$new_path" = x \
38751         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38752         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38753       new_path=`$CYGPATH -u "$path"`
38754     fi
38755     if test "x$new_path" = x; then
38756       # It's still not found. Now this is an unrecoverable error.
38757       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
38758 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
38759       has_space=`$ECHO "$complete" | $GREP " "`
38760       if test "x$has_space" != x; then
38761         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38762 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38763       fi
38764       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38765     fi
38766   fi
38767 
38768   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38769   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38770   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38771   # "foo.exe" is OK but "foo" is an error.
38772   #
38773   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38774   # It is also a way to make sure we got the proper file name for the real test later on.
38775   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38776   if test "x$test_shortpath" = x; then
38777     # Short path failed, file does not exist as specified.
38778     # Try adding .exe or .cmd
38779     if test -f "${new_path}.exe"; then
38780       input_to_shortpath="${new_path}.exe"
38781     elif test -f "${new_path}.cmd"; then
38782       input_to_shortpath="${new_path}.cmd"
38783     else
38784       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
38785 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
38786       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38787 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38788       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38789     fi
38790   else
38791     input_to_shortpath="$new_path"
38792   fi
38793 
38794   # Call helper function which possibly converts this using DOS-style short mode.
38795   # If so, the updated path is stored in $new_path.
38796   new_path="$input_to_shortpath"
38797 
38798   input_path="$input_to_shortpath"
38799   # Check if we need to convert this using DOS-style short mode. If the path
38800   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38801   # take no chances and rewrite it.
38802   # Note: m4 eats our [], so we need to use [ and ] instead.
38803   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38804   if test "x$has_forbidden_chars" != x; then
38805     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38806     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38807     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38808     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38809       # Going to short mode and back again did indeed matter. Since short mode is
38810       # case insensitive, let's make it lowercase to improve readability.
38811       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38812       # Now convert it back to Unix-style (cygpath)
38813       input_path=`$CYGPATH -u "$shortmode_path"`
38814       new_path="$input_path"
38815     fi
38816   fi
38817 
38818   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38819   if test "x$test_cygdrive_prefix" = x; then
38820     # As a simple fix, exclude /usr/bin since it's not a real path.
38821     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38822       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38823       # a path prefixed by /cygdrive for fixpath to work.
38824       new_path="$CYGWIN_ROOT_PATH$input_path"
38825     fi
38826   fi
38827 
38828   # remove trailing .exe if any
38829   new_path="${new_path/%.exe/}"
38830 
38831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38832 
38833   # First separate the path from the arguments. This will split at the first
38834   # space.
38835   complete="$BUILD_CC"
38836   path="${complete%% *}"
38837   tmp="$complete EOL"
38838   arguments="${tmp#* }"
38839 
38840   # Input might be given as Windows format, start by converting to
38841   # unix format.
38842   new_path="$path"
38843 
38844   windows_path="$new_path"
38845   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38846     unix_path=`$CYGPATH -u "$windows_path"`
38847     new_path="$unix_path"
38848   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38849     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38850     new_path="$unix_path"
38851   fi
38852 
38853 
38854   # Now try to locate executable using which
38855   new_path=`$WHICH "$new_path" 2> /dev/null`
38856 
38857   if test "x$new_path" = x; then
38858     # Oops. Which didn't find the executable.
38859     # The splitting of arguments from the executable at a space might have been incorrect,
38860     # since paths with space are more likely in Windows. Give it another try with the whole
38861     # argument.
38862     path="$complete"
38863     arguments="EOL"
38864     new_path="$path"
38865 
38866   windows_path="$new_path"
38867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38868     unix_path=`$CYGPATH -u "$windows_path"`
38869     new_path="$unix_path"
38870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38872     new_path="$unix_path"
38873   fi
38874 
38875 
38876     new_path=`$WHICH "$new_path" 2> /dev/null`
38877     # bat and cmd files are not always considered executable in MSYS causing which
38878     # to not find them
38879     if test "x$new_path" = x \
38880         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38881         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38882       new_path="$path"
38883 
38884   windows_path="$new_path"
38885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38886     unix_path=`$CYGPATH -u "$windows_path"`
38887     new_path="$unix_path"
38888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38890     new_path="$unix_path"
38891   fi
38892 
38893     fi
38894 
38895     if test "x$new_path" = x; then
38896       # It's still not found. Now this is an unrecoverable error.
38897       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
38898 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
38899       has_space=`$ECHO "$complete" | $GREP " "`
38900       if test "x$has_space" != x; then
38901         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38902 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38903       fi
38904       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38905     fi
38906   fi
38907 
38908   # Now new_path has a complete unix path to the binary
38909   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38910     # Keep paths in /bin as-is, but remove trailing .exe if any
38911     new_path="${new_path/%.exe/}"
38912     # Do not save /bin paths to all_fixpath_prefixes!
38913   else
38914     # Not in mixed or Windows style, start by that.
38915     new_path=`cmd //c echo $new_path`
38916 
38917   input_path="$new_path"
38918   # Check if we need to convert this using DOS-style short mode. If the path
38919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38920   # take no chances and rewrite it.
38921   # Note: m4 eats our [], so we need to use [ and ] instead.
38922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38923   if test "x$has_forbidden_chars" != x; then
38924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38925     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38926   fi
38927 
38928     # Output is in $new_path
38929 
38930   windows_path="$new_path"
38931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38932     unix_path=`$CYGPATH -u "$windows_path"`
38933     new_path="$unix_path"
38934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38935     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38936     new_path="$unix_path"
38937   fi
38938 
38939     # remove trailing .exe if any
38940     new_path="${new_path/%.exe/}"
38941 
38942     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38943     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38944   fi
38945 
38946   else
38947     # We're on a posix platform. Hooray! :)
38948     # First separate the path from the arguments. This will split at the first
38949     # space.
38950     complete="$BUILD_CC"
38951     path="${complete%% *}"
38952     tmp="$complete EOL"
38953     arguments="${tmp#* }"
38954 
38955     # Cannot rely on the command "which" here since it doesn't always work.
38956     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38957     if test -z "$is_absolute_path"; then
38958       # Path to executable is not absolute. Find it.
38959       IFS_save="$IFS"
38960       IFS=:
38961       for p in $PATH; do
38962         if test -f "$p/$path" && test -x "$p/$path"; then
38963           new_path="$p/$path"
38964           break
38965         fi
38966       done
38967       IFS="$IFS_save"
38968     else
38969       # This is an absolute path, we can use it without further modifications.
38970       new_path="$path"
38971     fi
38972 
38973     if test "x$new_path" = x; then
38974       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
38975 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
38976       has_space=`$ECHO "$complete" | $GREP " "`
38977       if test "x$has_space" != x; then
38978         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38979 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38980       fi
38981       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38982     fi
38983   fi
38984 
38985   # Now join together the path and the arguments once again
38986   if test "x$arguments" != xEOL; then
38987     new_complete="$new_path ${arguments% *}"
38988   else
38989     new_complete="$new_path"
38990   fi
38991 
38992   if test "x$complete" != "x$new_complete"; then
38993     BUILD_CC="$new_complete"
38994     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
38995 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
38996   fi
38997 
38998 
38999 
39000   # Publish this variable in the help.
39001 
39002 
39003   if test "x$BUILD_CXX" = x; then
39004     # The variable is not set by user, try to locate tool using the code snippet
39005     for ac_prog in cl CC g++
39006 do
39007   # Extract the first word of "$ac_prog", so it can be a program name with args.
39008 set dummy $ac_prog; ac_word=$2
39009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39010 $as_echo_n "checking for $ac_word... " >&6; }
39011 if ${ac_cv_path_BUILD_CXX+:} false; then :
39012   $as_echo_n "(cached) " >&6
39013 else
39014   case $BUILD_CXX in
39015   [\\/]* | ?:[\\/]*)
39016   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39017   ;;
39018   *)
39019   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39020 for as_dir in $PATH
39021 do
39022   IFS=$as_save_IFS
39023   test -z "$as_dir" && as_dir=.
39024     for ac_exec_ext in '' $ac_executable_extensions; do
39025   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39026     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39027     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39028     break 2
39029   fi
39030 done
39031   done
39032 IFS=$as_save_IFS
39033 
39034   ;;
39035 esac
39036 fi
39037 BUILD_CXX=$ac_cv_path_BUILD_CXX
39038 if test -n "$BUILD_CXX"; then
39039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39040 $as_echo "$BUILD_CXX" >&6; }
39041 else
39042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39043 $as_echo "no" >&6; }
39044 fi
39045 
39046 
39047   test -n "$BUILD_CXX" && break
39048 done
39049 
39050   else
39051     # The variable is set, but is it from the command line or the environment?
39052 
39053     # Try to remove the string !BUILD_CXX! from our list.
39054     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39055     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39056       # If it failed, the variable was not from the command line. Ignore it,
39057       # but warn the user (except for BASH, which is always set by the calling BASH).
39058       if test "xBUILD_CXX" != xBASH; then
39059         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39060 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39061       fi
39062       # Try to locate tool using the code snippet
39063       for ac_prog in cl CC g++
39064 do
39065   # Extract the first word of "$ac_prog", so it can be a program name with args.
39066 set dummy $ac_prog; ac_word=$2
39067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39068 $as_echo_n "checking for $ac_word... " >&6; }
39069 if ${ac_cv_path_BUILD_CXX+:} false; then :
39070   $as_echo_n "(cached) " >&6
39071 else
39072   case $BUILD_CXX in
39073   [\\/]* | ?:[\\/]*)
39074   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39075   ;;
39076   *)
39077   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39078 for as_dir in $PATH
39079 do
39080   IFS=$as_save_IFS
39081   test -z "$as_dir" && as_dir=.
39082     for ac_exec_ext in '' $ac_executable_extensions; do
39083   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39084     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39086     break 2
39087   fi
39088 done
39089   done
39090 IFS=$as_save_IFS
39091 
39092   ;;
39093 esac
39094 fi
39095 BUILD_CXX=$ac_cv_path_BUILD_CXX
39096 if test -n "$BUILD_CXX"; then
39097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39098 $as_echo "$BUILD_CXX" >&6; }
39099 else
39100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39101 $as_echo "no" >&6; }
39102 fi
39103 
39104 
39105   test -n "$BUILD_CXX" && break
39106 done
39107 
39108     else
39109       # If it succeeded, then it was overridden by the user. We will use it
39110       # for the tool.
39111 
39112       # First remove it from the list of overridden variables, so we can test
39113       # for unknown variables in the end.
39114       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39115 
39116       # Check if the provided tool contains a complete path.
39117       tool_specified="$BUILD_CXX"
39118       tool_basename="${tool_specified##*/}"
39119       if test "x$tool_basename" = "x$tool_specified"; then
39120         # A command without a complete path is provided, search $PATH.
39121         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39122 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39123         # Extract the first word of "$tool_basename", so it can be a program name with args.
39124 set dummy $tool_basename; ac_word=$2
39125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39126 $as_echo_n "checking for $ac_word... " >&6; }
39127 if ${ac_cv_path_BUILD_CXX+:} false; then :
39128   $as_echo_n "(cached) " >&6
39129 else
39130   case $BUILD_CXX in
39131   [\\/]* | ?:[\\/]*)
39132   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39133   ;;
39134   *)
39135   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39136 for as_dir in $PATH
39137 do
39138   IFS=$as_save_IFS
39139   test -z "$as_dir" && as_dir=.
39140     for ac_exec_ext in '' $ac_executable_extensions; do
39141   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39142     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39143     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39144     break 2
39145   fi
39146 done
39147   done
39148 IFS=$as_save_IFS
39149 
39150   ;;
39151 esac
39152 fi
39153 BUILD_CXX=$ac_cv_path_BUILD_CXX
39154 if test -n "$BUILD_CXX"; then
39155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39156 $as_echo "$BUILD_CXX" >&6; }
39157 else
39158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39159 $as_echo "no" >&6; }
39160 fi
39161 
39162 
39163         if test "x$BUILD_CXX" = x; then
39164           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39165         fi
39166       else
39167         # Otherwise we believe it is a complete path. Use it as it is.
39168         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39169 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39170         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39171 $as_echo_n "checking for BUILD_CXX... " >&6; }
39172         if test ! -x "$tool_specified"; then
39173           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39174 $as_echo "not found" >&6; }
39175           as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39176         fi
39177         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39178 $as_echo "$tool_specified" >&6; }
39179       fi
39180     fi
39181   fi
39182 
39183 
39184 
39185   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39186 
39187   # First separate the path from the arguments. This will split at the first
39188   # space.
39189   complete="$BUILD_CXX"
39190   path="${complete%% *}"
39191   tmp="$complete EOL"
39192   arguments="${tmp#* }"
39193 
39194   # Input might be given as Windows format, start by converting to
39195   # unix format.
39196   new_path=`$CYGPATH -u "$path"`
39197 
39198   # Now try to locate executable using which
39199   new_path=`$WHICH "$new_path" 2> /dev/null`
39200   # bat and cmd files are not always considered executable in cygwin causing which
39201   # to not find them
39202   if test "x$new_path" = x \
39203       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39204       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39205     new_path=`$CYGPATH -u "$path"`
39206   fi
39207   if test "x$new_path" = x; then
39208     # Oops. Which didn't find the executable.
39209     # The splitting of arguments from the executable at a space might have been incorrect,
39210     # since paths with space are more likely in Windows. Give it another try with the whole
39211     # argument.
39212     path="$complete"
39213     arguments="EOL"
39214     new_path=`$CYGPATH -u "$path"`
39215     new_path=`$WHICH "$new_path" 2> /dev/null`
39216     # bat and cmd files are not always considered executable in cygwin causing which
39217     # to not find them
39218     if test "x$new_path" = x \
39219         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39220         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39221       new_path=`$CYGPATH -u "$path"`
39222     fi
39223     if test "x$new_path" = x; then
39224       # It's still not found. Now this is an unrecoverable error.
39225       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39226 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39227       has_space=`$ECHO "$complete" | $GREP " "`
39228       if test "x$has_space" != x; then
39229         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39230 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39231       fi
39232       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39233     fi
39234   fi
39235 
39236   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39237   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39238   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39239   # "foo.exe" is OK but "foo" is an error.
39240   #
39241   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39242   # It is also a way to make sure we got the proper file name for the real test later on.
39243   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39244   if test "x$test_shortpath" = x; then
39245     # Short path failed, file does not exist as specified.
39246     # Try adding .exe or .cmd
39247     if test -f "${new_path}.exe"; then
39248       input_to_shortpath="${new_path}.exe"
39249     elif test -f "${new_path}.cmd"; then
39250       input_to_shortpath="${new_path}.cmd"
39251     else
39252       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39253 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39254       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39255 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39256       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39257     fi
39258   else
39259     input_to_shortpath="$new_path"
39260   fi
39261 
39262   # Call helper function which possibly converts this using DOS-style short mode.
39263   # If so, the updated path is stored in $new_path.
39264   new_path="$input_to_shortpath"
39265 
39266   input_path="$input_to_shortpath"
39267   # Check if we need to convert this using DOS-style short mode. If the path
39268   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39269   # take no chances and rewrite it.
39270   # Note: m4 eats our [], so we need to use [ and ] instead.
39271   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39272   if test "x$has_forbidden_chars" != x; then
39273     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39274     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39275     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39276     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39277       # Going to short mode and back again did indeed matter. Since short mode is
39278       # case insensitive, let's make it lowercase to improve readability.
39279       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39280       # Now convert it back to Unix-style (cygpath)
39281       input_path=`$CYGPATH -u "$shortmode_path"`
39282       new_path="$input_path"
39283     fi
39284   fi
39285 
39286   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39287   if test "x$test_cygdrive_prefix" = x; then
39288     # As a simple fix, exclude /usr/bin since it's not a real path.
39289     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39290       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39291       # a path prefixed by /cygdrive for fixpath to work.
39292       new_path="$CYGWIN_ROOT_PATH$input_path"
39293     fi
39294   fi
39295 
39296   # remove trailing .exe if any
39297   new_path="${new_path/%.exe/}"
39298 
39299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39300 
39301   # First separate the path from the arguments. This will split at the first
39302   # space.
39303   complete="$BUILD_CXX"
39304   path="${complete%% *}"
39305   tmp="$complete EOL"
39306   arguments="${tmp#* }"
39307 
39308   # Input might be given as Windows format, start by converting to
39309   # unix format.
39310   new_path="$path"
39311 
39312   windows_path="$new_path"
39313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39314     unix_path=`$CYGPATH -u "$windows_path"`
39315     new_path="$unix_path"
39316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39317     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39318     new_path="$unix_path"
39319   fi
39320 
39321 
39322   # Now try to locate executable using which
39323   new_path=`$WHICH "$new_path" 2> /dev/null`
39324 
39325   if test "x$new_path" = x; then
39326     # Oops. Which didn't find the executable.
39327     # The splitting of arguments from the executable at a space might have been incorrect,
39328     # since paths with space are more likely in Windows. Give it another try with the whole
39329     # argument.
39330     path="$complete"
39331     arguments="EOL"
39332     new_path="$path"
39333 
39334   windows_path="$new_path"
39335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39336     unix_path=`$CYGPATH -u "$windows_path"`
39337     new_path="$unix_path"
39338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39339     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39340     new_path="$unix_path"
39341   fi
39342 
39343 
39344     new_path=`$WHICH "$new_path" 2> /dev/null`
39345     # bat and cmd files are not always considered executable in MSYS causing which
39346     # to not find them
39347     if test "x$new_path" = x \
39348         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39349         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39350       new_path="$path"
39351 
39352   windows_path="$new_path"
39353   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39354     unix_path=`$CYGPATH -u "$windows_path"`
39355     new_path="$unix_path"
39356   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39357     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39358     new_path="$unix_path"
39359   fi
39360 
39361     fi
39362 
39363     if test "x$new_path" = x; then
39364       # It's still not found. Now this is an unrecoverable error.
39365       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39366 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39367       has_space=`$ECHO "$complete" | $GREP " "`
39368       if test "x$has_space" != x; then
39369         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39370 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39371       fi
39372       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39373     fi
39374   fi
39375 
39376   # Now new_path has a complete unix path to the binary
39377   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39378     # Keep paths in /bin as-is, but remove trailing .exe if any
39379     new_path="${new_path/%.exe/}"
39380     # Do not save /bin paths to all_fixpath_prefixes!
39381   else
39382     # Not in mixed or Windows style, start by that.
39383     new_path=`cmd //c echo $new_path`
39384 
39385   input_path="$new_path"
39386   # Check if we need to convert this using DOS-style short mode. If the path
39387   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39388   # take no chances and rewrite it.
39389   # Note: m4 eats our [], so we need to use [ and ] instead.
39390   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39391   if test "x$has_forbidden_chars" != x; then
39392     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39393     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39394   fi
39395 
39396     # Output is in $new_path
39397 
39398   windows_path="$new_path"
39399   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39400     unix_path=`$CYGPATH -u "$windows_path"`
39401     new_path="$unix_path"
39402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39403     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39404     new_path="$unix_path"
39405   fi
39406 
39407     # remove trailing .exe if any
39408     new_path="${new_path/%.exe/}"
39409 
39410     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39411     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39412   fi
39413 
39414   else
39415     # We're on a posix platform. Hooray! :)
39416     # First separate the path from the arguments. This will split at the first
39417     # space.
39418     complete="$BUILD_CXX"
39419     path="${complete%% *}"
39420     tmp="$complete EOL"
39421     arguments="${tmp#* }"
39422 
39423     # Cannot rely on the command "which" here since it doesn't always work.
39424     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39425     if test -z "$is_absolute_path"; then
39426       # Path to executable is not absolute. Find it.
39427       IFS_save="$IFS"
39428       IFS=:
39429       for p in $PATH; do
39430         if test -f "$p/$path" && test -x "$p/$path"; then
39431           new_path="$p/$path"
39432           break
39433         fi
39434       done
39435       IFS="$IFS_save"
39436     else
39437       # This is an absolute path, we can use it without further modifications.
39438       new_path="$path"
39439     fi
39440 
39441     if test "x$new_path" = x; then
39442       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39443 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39444       has_space=`$ECHO "$complete" | $GREP " "`
39445       if test "x$has_space" != x; then
39446         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39447 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39448       fi
39449       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39450     fi
39451   fi
39452 
39453   # Now join together the path and the arguments once again
39454   if test "x$arguments" != xEOL; then
39455     new_complete="$new_path ${arguments% *}"
39456   else
39457     new_complete="$new_path"
39458   fi
39459 
39460   if test "x$complete" != "x$new_complete"; then
39461     BUILD_CXX="$new_complete"
39462     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39463 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39464   fi
39465 
39466 
39467 
39468   # Publish this variable in the help.
39469 
39470 
39471   if test "x$BUILD_LD" = x; then
39472     # The variable is not set by user, try to locate tool using the code snippet
39473     for ac_prog in ld
39474 do
39475   # Extract the first word of "$ac_prog", so it can be a program name with args.
39476 set dummy $ac_prog; ac_word=$2
39477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39478 $as_echo_n "checking for $ac_word... " >&6; }
39479 if ${ac_cv_path_BUILD_LD+:} false; then :
39480   $as_echo_n "(cached) " >&6
39481 else
39482   case $BUILD_LD in
39483   [\\/]* | ?:[\\/]*)
39484   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39485   ;;
39486   *)
39487   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39488 for as_dir in $PATH
39489 do
39490   IFS=$as_save_IFS
39491   test -z "$as_dir" && as_dir=.
39492     for ac_exec_ext in '' $ac_executable_extensions; do
39493   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39494     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39496     break 2
39497   fi
39498 done
39499   done
39500 IFS=$as_save_IFS
39501 
39502   ;;
39503 esac
39504 fi
39505 BUILD_LD=$ac_cv_path_BUILD_LD
39506 if test -n "$BUILD_LD"; then
39507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39508 $as_echo "$BUILD_LD" >&6; }
39509 else
39510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39511 $as_echo "no" >&6; }
39512 fi
39513 
39514 
39515   test -n "$BUILD_LD" && break
39516 done
39517 
39518   else
39519     # The variable is set, but is it from the command line or the environment?
39520 
39521     # Try to remove the string !BUILD_LD! from our list.
39522     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39523     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39524       # If it failed, the variable was not from the command line. Ignore it,
39525       # but warn the user (except for BASH, which is always set by the calling BASH).
39526       if test "xBUILD_LD" != xBASH; then
39527         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39528 $as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39529       fi
39530       # Try to locate tool using the code snippet
39531       for ac_prog in ld
39532 do
39533   # Extract the first word of "$ac_prog", so it can be a program name with args.
39534 set dummy $ac_prog; ac_word=$2
39535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39536 $as_echo_n "checking for $ac_word... " >&6; }
39537 if ${ac_cv_path_BUILD_LD+:} false; then :
39538   $as_echo_n "(cached) " >&6
39539 else
39540   case $BUILD_LD in
39541   [\\/]* | ?:[\\/]*)
39542   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39543   ;;
39544   *)
39545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39546 for as_dir in $PATH
39547 do
39548   IFS=$as_save_IFS
39549   test -z "$as_dir" && as_dir=.
39550     for ac_exec_ext in '' $ac_executable_extensions; do
39551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39552     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39554     break 2
39555   fi
39556 done
39557   done
39558 IFS=$as_save_IFS
39559 
39560   ;;
39561 esac
39562 fi
39563 BUILD_LD=$ac_cv_path_BUILD_LD
39564 if test -n "$BUILD_LD"; then
39565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39566 $as_echo "$BUILD_LD" >&6; }
39567 else
39568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39569 $as_echo "no" >&6; }
39570 fi
39571 
39572 
39573   test -n "$BUILD_LD" && break
39574 done
39575 
39576     else
39577       # If it succeeded, then it was overridden by the user. We will use it
39578       # for the tool.
39579 
39580       # First remove it from the list of overridden variables, so we can test
39581       # for unknown variables in the end.
39582       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39583 
39584       # Check if the provided tool contains a complete path.
39585       tool_specified="$BUILD_LD"
39586       tool_basename="${tool_specified##*/}"
39587       if test "x$tool_basename" = "x$tool_specified"; then
39588         # A command without a complete path is provided, search $PATH.
39589         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39590 $as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39591         # Extract the first word of "$tool_basename", so it can be a program name with args.
39592 set dummy $tool_basename; ac_word=$2
39593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39594 $as_echo_n "checking for $ac_word... " >&6; }
39595 if ${ac_cv_path_BUILD_LD+:} false; then :
39596   $as_echo_n "(cached) " >&6
39597 else
39598   case $BUILD_LD in
39599   [\\/]* | ?:[\\/]*)
39600   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39601   ;;
39602   *)
39603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39604 for as_dir in $PATH
39605 do
39606   IFS=$as_save_IFS
39607   test -z "$as_dir" && as_dir=.
39608     for ac_exec_ext in '' $ac_executable_extensions; do
39609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39610     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39612     break 2
39613   fi
39614 done
39615   done
39616 IFS=$as_save_IFS
39617 
39618   ;;
39619 esac
39620 fi
39621 BUILD_LD=$ac_cv_path_BUILD_LD
39622 if test -n "$BUILD_LD"; then
39623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39624 $as_echo "$BUILD_LD" >&6; }
39625 else
39626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39627 $as_echo "no" >&6; }
39628 fi
39629 
39630 
39631         if test "x$BUILD_LD" = x; then
39632           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39633         fi
39634       else
39635         # Otherwise we believe it is a complete path. Use it as it is.
39636         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39637 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39638         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39639 $as_echo_n "checking for BUILD_LD... " >&6; }
39640         if test ! -x "$tool_specified"; then
39641           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39642 $as_echo "not found" >&6; }
39643           as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39644         fi
39645         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39646 $as_echo "$tool_specified" >&6; }
39647       fi
39648     fi
39649   fi
39650 
39651 
39652 
39653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39654 
39655   # First separate the path from the arguments. This will split at the first
39656   # space.
39657   complete="$BUILD_LD"
39658   path="${complete%% *}"
39659   tmp="$complete EOL"
39660   arguments="${tmp#* }"
39661 
39662   # Input might be given as Windows format, start by converting to
39663   # unix format.
39664   new_path=`$CYGPATH -u "$path"`
39665 
39666   # Now try to locate executable using which
39667   new_path=`$WHICH "$new_path" 2> /dev/null`
39668   # bat and cmd files are not always considered executable in cygwin causing which
39669   # to not find them
39670   if test "x$new_path" = x \
39671       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39672       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39673     new_path=`$CYGPATH -u "$path"`
39674   fi
39675   if test "x$new_path" = x; then
39676     # Oops. Which didn't find the executable.
39677     # The splitting of arguments from the executable at a space might have been incorrect,
39678     # since paths with space are more likely in Windows. Give it another try with the whole
39679     # argument.
39680     path="$complete"
39681     arguments="EOL"
39682     new_path=`$CYGPATH -u "$path"`
39683     new_path=`$WHICH "$new_path" 2> /dev/null`
39684     # bat and cmd files are not always considered executable in cygwin causing which
39685     # to not find them
39686     if test "x$new_path" = x \
39687         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39688         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39689       new_path=`$CYGPATH -u "$path"`
39690     fi
39691     if test "x$new_path" = x; then
39692       # It's still not found. Now this is an unrecoverable error.
39693       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39694 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39695       has_space=`$ECHO "$complete" | $GREP " "`
39696       if test "x$has_space" != x; then
39697         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39698 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39699       fi
39700       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39701     fi
39702   fi
39703 
39704   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39705   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39706   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39707   # "foo.exe" is OK but "foo" is an error.
39708   #
39709   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39710   # It is also a way to make sure we got the proper file name for the real test later on.
39711   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39712   if test "x$test_shortpath" = x; then
39713     # Short path failed, file does not exist as specified.
39714     # Try adding .exe or .cmd
39715     if test -f "${new_path}.exe"; then
39716       input_to_shortpath="${new_path}.exe"
39717     elif test -f "${new_path}.cmd"; then
39718       input_to_shortpath="${new_path}.cmd"
39719     else
39720       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39721 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39722       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39723 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39724       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39725     fi
39726   else
39727     input_to_shortpath="$new_path"
39728   fi
39729 
39730   # Call helper function which possibly converts this using DOS-style short mode.
39731   # If so, the updated path is stored in $new_path.
39732   new_path="$input_to_shortpath"
39733 
39734   input_path="$input_to_shortpath"
39735   # Check if we need to convert this using DOS-style short mode. If the path
39736   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39737   # take no chances and rewrite it.
39738   # Note: m4 eats our [], so we need to use [ and ] instead.
39739   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39740   if test "x$has_forbidden_chars" != x; then
39741     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39742     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39743     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39744     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39745       # Going to short mode and back again did indeed matter. Since short mode is
39746       # case insensitive, let's make it lowercase to improve readability.
39747       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39748       # Now convert it back to Unix-style (cygpath)
39749       input_path=`$CYGPATH -u "$shortmode_path"`
39750       new_path="$input_path"
39751     fi
39752   fi
39753 
39754   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39755   if test "x$test_cygdrive_prefix" = x; then
39756     # As a simple fix, exclude /usr/bin since it's not a real path.
39757     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39758       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39759       # a path prefixed by /cygdrive for fixpath to work.
39760       new_path="$CYGWIN_ROOT_PATH$input_path"
39761     fi
39762   fi
39763 
39764   # remove trailing .exe if any
39765   new_path="${new_path/%.exe/}"
39766 
39767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39768 
39769   # First separate the path from the arguments. This will split at the first
39770   # space.
39771   complete="$BUILD_LD"
39772   path="${complete%% *}"
39773   tmp="$complete EOL"
39774   arguments="${tmp#* }"
39775 
39776   # Input might be given as Windows format, start by converting to
39777   # unix format.
39778   new_path="$path"
39779 
39780   windows_path="$new_path"
39781   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39782     unix_path=`$CYGPATH -u "$windows_path"`
39783     new_path="$unix_path"
39784   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39785     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39786     new_path="$unix_path"
39787   fi
39788 
39789 
39790   # Now try to locate executable using which
39791   new_path=`$WHICH "$new_path" 2> /dev/null`
39792 
39793   if test "x$new_path" = x; then
39794     # Oops. Which didn't find the executable.
39795     # The splitting of arguments from the executable at a space might have been incorrect,
39796     # since paths with space are more likely in Windows. Give it another try with the whole
39797     # argument.
39798     path="$complete"
39799     arguments="EOL"
39800     new_path="$path"
39801 
39802   windows_path="$new_path"
39803   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39804     unix_path=`$CYGPATH -u "$windows_path"`
39805     new_path="$unix_path"
39806   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39807     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39808     new_path="$unix_path"
39809   fi
39810 
39811 
39812     new_path=`$WHICH "$new_path" 2> /dev/null`
39813     # bat and cmd files are not always considered executable in MSYS causing which
39814     # to not find them
39815     if test "x$new_path" = x \
39816         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39817         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39818       new_path="$path"
39819 
39820   windows_path="$new_path"
39821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39822     unix_path=`$CYGPATH -u "$windows_path"`
39823     new_path="$unix_path"
39824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39825     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39826     new_path="$unix_path"
39827   fi
39828 
39829     fi
39830 
39831     if test "x$new_path" = x; then
39832       # It's still not found. Now this is an unrecoverable error.
39833       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39834 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39835       has_space=`$ECHO "$complete" | $GREP " "`
39836       if test "x$has_space" != x; then
39837         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39838 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39839       fi
39840       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39841     fi
39842   fi
39843 
39844   # Now new_path has a complete unix path to the binary
39845   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39846     # Keep paths in /bin as-is, but remove trailing .exe if any
39847     new_path="${new_path/%.exe/}"
39848     # Do not save /bin paths to all_fixpath_prefixes!
39849   else
39850     # Not in mixed or Windows style, start by that.
39851     new_path=`cmd //c echo $new_path`
39852 
39853   input_path="$new_path"
39854   # Check if we need to convert this using DOS-style short mode. If the path
39855   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39856   # take no chances and rewrite it.
39857   # Note: m4 eats our [], so we need to use [ and ] instead.
39858   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39859   if test "x$has_forbidden_chars" != x; then
39860     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39861     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39862   fi
39863 
39864     # Output is in $new_path
39865 
39866   windows_path="$new_path"
39867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39868     unix_path=`$CYGPATH -u "$windows_path"`
39869     new_path="$unix_path"
39870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39872     new_path="$unix_path"
39873   fi
39874 
39875     # remove trailing .exe if any
39876     new_path="${new_path/%.exe/}"
39877 
39878     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39879     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39880   fi
39881 
39882   else
39883     # We're on a posix platform. Hooray! :)
39884     # First separate the path from the arguments. This will split at the first
39885     # space.
39886     complete="$BUILD_LD"
39887     path="${complete%% *}"
39888     tmp="$complete EOL"
39889     arguments="${tmp#* }"
39890 
39891     # Cannot rely on the command "which" here since it doesn't always work.
39892     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39893     if test -z "$is_absolute_path"; then
39894       # Path to executable is not absolute. Find it.
39895       IFS_save="$IFS"
39896       IFS=:
39897       for p in $PATH; do
39898         if test -f "$p/$path" && test -x "$p/$path"; then
39899           new_path="$p/$path"
39900           break
39901         fi
39902       done
39903       IFS="$IFS_save"
39904     else
39905       # This is an absolute path, we can use it without further modifications.
39906       new_path="$path"
39907     fi
39908 
39909     if test "x$new_path" = x; then
39910       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39911 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39912       has_space=`$ECHO "$complete" | $GREP " "`
39913       if test "x$has_space" != x; then
39914         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39915 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39916       fi
39917       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39918     fi
39919   fi
39920 
39921   # Now join together the path and the arguments once again
39922   if test "x$arguments" != xEOL; then
39923     new_complete="$new_path ${arguments% *}"
39924   else
39925     new_complete="$new_path"
39926   fi
39927 
39928   if test "x$complete" != "x$new_complete"; then
39929     BUILD_LD="$new_complete"
39930     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
39931 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
39932   fi
39933 
39934   else
39935     # If we are not cross compiling, use the normal target compilers for
39936     # building the build platform executables.
39937     BUILD_CC="$CC"
39938     BUILD_CXX="$CXX"
39939     BUILD_LD="$LD"
39940   fi
39941 
39942 
39943   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39944     # For hotspot, we need these in Windows mixed path,
39945     # so rewrite them all. Need added .exe suffix.
39946     HOTSPOT_CXX="$CXX.exe"
39947     HOTSPOT_LD="$LD.exe"
39948     HOTSPOT_MT="$MT.exe"
39949     HOTSPOT_RC="$RC.exe"
39950 
39951   unix_path="$HOTSPOT_CXX"
39952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39953     windows_path=`$CYGPATH -m "$unix_path"`
39954     HOTSPOT_CXX="$windows_path"
39955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39956     windows_path=`cmd //c echo $unix_path`
39957     HOTSPOT_CXX="$windows_path"
39958   fi
39959 
39960 
39961   unix_path="$HOTSPOT_LD"
39962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39963     windows_path=`$CYGPATH -m "$unix_path"`
39964     HOTSPOT_LD="$windows_path"
39965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39966     windows_path=`cmd //c echo $unix_path`
39967     HOTSPOT_LD="$windows_path"
39968   fi
39969 
39970 
39971   unix_path="$HOTSPOT_MT"
39972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39973     windows_path=`$CYGPATH -m "$unix_path"`
39974     HOTSPOT_MT="$windows_path"
39975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39976     windows_path=`cmd //c echo $unix_path`
39977     HOTSPOT_MT="$windows_path"
39978   fi
39979 
39980 
39981   unix_path="$HOTSPOT_RC"
39982   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39983     windows_path=`$CYGPATH -m "$unix_path"`
39984     HOTSPOT_RC="$windows_path"
39985   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39986     windows_path=`cmd //c echo $unix_path`
39987     HOTSPOT_RC="$windows_path"
39988   fi
39989 
39990 
39991 
39992   else
39993     HOTSPOT_CXX="$CXX"
39994     HOTSPOT_LD="$LD"
39995   fi
39996 
39997 
39998 
39999   if test  "x$TOOLCHAIN_TYPE" = xclang; then
40000     USE_CLANG=true
40001   fi
40002 
40003 
40004   # LDEXE is the linker to use, when creating executables. Not really used.
40005   # FIXME: These should just be removed!
40006   LDEXE="$LD"
40007   LDEXECXX="$LDCXX"
40008 
40009 
40010 
40011 
40012   # The package path is used only on macosx?
40013   # FIXME: clean this up, and/or move it elsewhere.
40014   PACKAGE_PATH=/opt/local
40015 
40016 
40017   # Check for extra potential brokenness.
40018   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40019     # On Windows, double-check that we got the right compiler.
40020     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40021     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40022     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40023       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40024         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\" or \"x86\"." "$LINENO" 5
40025       fi
40026     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40027       if test "x$COMPILER_CPU_TEST" != "xx64"; then
40028         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40029       fi
40030     fi
40031   fi
40032 
40033   if test "x$TOOLCHAIN_TYPE" = xgcc; then
40034     # If this is a --hash-style=gnu system, use --hash-style=both, why?
40035     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40036     # This is later checked when setting flags.
40037   fi
40038 
40039   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40040   # in executable.'
40041   USING_BROKEN_SUSE_LD=no
40042   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40043     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40044 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40045     echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40046     echo "int main() { }" > main.c
40047     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40048       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40049 $as_echo "no" >&6; }
40050       USING_BROKEN_SUSE_LD=no
40051     else
40052       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40053 $as_echo "yes" >&6; }
40054       USING_BROKEN_SUSE_LD=yes
40055     fi
40056     rm -rf version-script.map main.c
40057   fi
40058 
40059 
40060 
40061 # Setup the JTReg Regression Test Harness.
40062 
40063 
40064 # Check whether --with-jtreg was given.
40065 if test "${with_jtreg+set}" = set; then :
40066   withval=$with_jtreg;
40067 else
40068   with_jtreg=no
40069 fi
40070 
40071 
40072   if test "x$with_jtreg" = xno; then
40073     # jtreg disabled
40074     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40075 $as_echo_n "checking for jtreg... " >&6; }
40076     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40077 $as_echo "no" >&6; }
40078   else
40079     if test "x$with_jtreg" != xyes; then
40080       # with path specified.
40081       JT_HOME="$with_jtreg"
40082     fi
40083 
40084     if test "x$JT_HOME" != x; then
40085       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40086 $as_echo_n "checking for jtreg... " >&6; }
40087 
40088       # use JT_HOME enviroment var.
40089 
40090   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40091 
40092   # Input might be given as Windows format, start by converting to
40093   # unix format.
40094   path="$JT_HOME"
40095   new_path=`$CYGPATH -u "$path"`
40096 
40097   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40098   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40099   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40100   # "foo.exe" is OK but "foo" is an error.
40101   #
40102   # This test is therefore slightly more accurate than "test -f" to check for file precense.
40103   # It is also a way to make sure we got the proper file name for the real test later on.
40104   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40105   if test "x$test_shortpath" = x; then
40106     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40107 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40108     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40109   fi
40110 
40111   # Call helper function which possibly converts this using DOS-style short mode.
40112   # If so, the updated path is stored in $new_path.
40113 
40114   input_path="$new_path"
40115   # Check if we need to convert this using DOS-style short mode. If the path
40116   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40117   # take no chances and rewrite it.
40118   # Note: m4 eats our [], so we need to use [ and ] instead.
40119   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40120   if test "x$has_forbidden_chars" != x; then
40121     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40122     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40123     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40124     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40125       # Going to short mode and back again did indeed matter. Since short mode is
40126       # case insensitive, let's make it lowercase to improve readability.
40127       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40128       # Now convert it back to Unix-style (cygpath)
40129       input_path=`$CYGPATH -u "$shortmode_path"`
40130       new_path="$input_path"
40131     fi
40132   fi
40133 
40134   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40135   if test "x$test_cygdrive_prefix" = x; then
40136     # As a simple fix, exclude /usr/bin since it's not a real path.
40137     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40138       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40139       # a path prefixed by /cygdrive for fixpath to work.
40140       new_path="$CYGWIN_ROOT_PATH$input_path"
40141     fi
40142   fi
40143 
40144 
40145   if test "x$path" != "x$new_path"; then
40146     JT_HOME="$new_path"
40147     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40148 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40149   fi
40150 
40151   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40152 
40153   path="$JT_HOME"
40154   has_colon=`$ECHO $path | $GREP ^.:`
40155   new_path="$path"
40156   if test "x$has_colon" = x; then
40157     # Not in mixed or Windows style, start by that.
40158     new_path=`cmd //c echo $path`
40159   fi
40160 
40161 
40162   input_path="$new_path"
40163   # Check if we need to convert this using DOS-style short mode. If the path
40164   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40165   # take no chances and rewrite it.
40166   # Note: m4 eats our [], so we need to use [ and ] instead.
40167   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40168   if test "x$has_forbidden_chars" != x; then
40169     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40170     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40171   fi
40172 
40173 
40174   windows_path="$new_path"
40175   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40176     unix_path=`$CYGPATH -u "$windows_path"`
40177     new_path="$unix_path"
40178   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40179     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40180     new_path="$unix_path"
40181   fi
40182 
40183   if test "x$path" != "x$new_path"; then
40184     JT_HOME="$new_path"
40185     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40186 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40187   fi
40188 
40189   # Save the first 10 bytes of this path to the storage, so fixpath can work.
40190   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40191 
40192   else
40193     # We're on a posix platform. Hooray! :)
40194     path="$JT_HOME"
40195     has_space=`$ECHO "$path" | $GREP " "`
40196     if test "x$has_space" != x; then
40197       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40198 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40199       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40200     fi
40201 
40202     # Use eval to expand a potential ~
40203     eval path="$path"
40204     if test ! -f "$path" && test ! -d "$path"; then
40205       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40206     fi
40207 
40208     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40209   fi
40210 
40211 
40212       # jtreg win32 script works for everybody
40213       JTREGEXE="$JT_HOME/bin/jtreg"
40214 
40215       if test ! -f "$JTREGEXE"; then
40216         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40217       fi
40218 
40219       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40220 $as_echo "$JTREGEXE" >&6; }
40221     else
40222       # try to find jtreg on path
40223 
40224 
40225 
40226   # Publish this variable in the help.
40227 
40228 
40229   if test "x$JTREGEXE" = x; then
40230     # The variable is not set by user, try to locate tool using the code snippet
40231     for ac_prog in jtreg
40232 do
40233   # Extract the first word of "$ac_prog", so it can be a program name with args.
40234 set dummy $ac_prog; ac_word=$2
40235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40236 $as_echo_n "checking for $ac_word... " >&6; }
40237 if ${ac_cv_path_JTREGEXE+:} false; then :
40238   $as_echo_n "(cached) " >&6
40239 else
40240   case $JTREGEXE in
40241   [\\/]* | ?:[\\/]*)
40242   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40243   ;;
40244   *)
40245   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40246 for as_dir in $PATH
40247 do
40248   IFS=$as_save_IFS
40249   test -z "$as_dir" && as_dir=.
40250     for ac_exec_ext in '' $ac_executable_extensions; do
40251   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40252     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40253     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40254     break 2
40255   fi
40256 done
40257   done
40258 IFS=$as_save_IFS
40259 
40260   ;;
40261 esac
40262 fi
40263 JTREGEXE=$ac_cv_path_JTREGEXE
40264 if test -n "$JTREGEXE"; then
40265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40266 $as_echo "$JTREGEXE" >&6; }
40267 else
40268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40269 $as_echo "no" >&6; }
40270 fi
40271 
40272 
40273   test -n "$JTREGEXE" && break
40274 done
40275 
40276   else
40277     # The variable is set, but is it from the command line or the environment?
40278 
40279     # Try to remove the string !JTREGEXE! from our list.
40280     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40281     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40282       # If it failed, the variable was not from the command line. Ignore it,
40283       # but warn the user (except for BASH, which is always set by the calling BASH).
40284       if test "xJTREGEXE" != xBASH; then
40285         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40286 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40287       fi
40288       # Try to locate tool using the code snippet
40289       for ac_prog in jtreg
40290 do
40291   # Extract the first word of "$ac_prog", so it can be a program name with args.
40292 set dummy $ac_prog; ac_word=$2
40293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40294 $as_echo_n "checking for $ac_word... " >&6; }
40295 if ${ac_cv_path_JTREGEXE+:} false; then :
40296   $as_echo_n "(cached) " >&6
40297 else
40298   case $JTREGEXE in
40299   [\\/]* | ?:[\\/]*)
40300   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40301   ;;
40302   *)
40303   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40304 for as_dir in $PATH
40305 do
40306   IFS=$as_save_IFS
40307   test -z "$as_dir" && as_dir=.
40308     for ac_exec_ext in '' $ac_executable_extensions; do
40309   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40310     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40311     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40312     break 2
40313   fi
40314 done
40315   done
40316 IFS=$as_save_IFS
40317 
40318   ;;
40319 esac
40320 fi
40321 JTREGEXE=$ac_cv_path_JTREGEXE
40322 if test -n "$JTREGEXE"; then
40323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40324 $as_echo "$JTREGEXE" >&6; }
40325 else
40326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40327 $as_echo "no" >&6; }
40328 fi
40329 
40330 
40331   test -n "$JTREGEXE" && break
40332 done
40333 
40334     else
40335       # If it succeeded, then it was overridden by the user. We will use it
40336       # for the tool.
40337 
40338       # First remove it from the list of overridden variables, so we can test
40339       # for unknown variables in the end.
40340       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40341 
40342       # Check if the provided tool contains a complete path.
40343       tool_specified="$JTREGEXE"
40344       tool_basename="${tool_specified##*/}"
40345       if test "x$tool_basename" = "x$tool_specified"; then
40346         # A command without a complete path is provided, search $PATH.
40347         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40348 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40349         # Extract the first word of "$tool_basename", so it can be a program name with args.
40350 set dummy $tool_basename; ac_word=$2
40351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40352 $as_echo_n "checking for $ac_word... " >&6; }
40353 if ${ac_cv_path_JTREGEXE+:} false; then :
40354   $as_echo_n "(cached) " >&6
40355 else
40356   case $JTREGEXE in
40357   [\\/]* | ?:[\\/]*)
40358   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40359   ;;
40360   *)
40361   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40362 for as_dir in $PATH
40363 do
40364   IFS=$as_save_IFS
40365   test -z "$as_dir" && as_dir=.
40366     for ac_exec_ext in '' $ac_executable_extensions; do
40367   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40368     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40369     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40370     break 2
40371   fi
40372 done
40373   done
40374 IFS=$as_save_IFS
40375 
40376   ;;
40377 esac
40378 fi
40379 JTREGEXE=$ac_cv_path_JTREGEXE
40380 if test -n "$JTREGEXE"; then
40381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40382 $as_echo "$JTREGEXE" >&6; }
40383 else
40384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40385 $as_echo "no" >&6; }
40386 fi
40387 
40388 
40389         if test "x$JTREGEXE" = x; then
40390           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40391         fi
40392       else
40393         # Otherwise we believe it is a complete path. Use it as it is.
40394         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40395 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40396         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40397 $as_echo_n "checking for JTREGEXE... " >&6; }
40398         if test ! -x "$tool_specified"; then
40399           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40400 $as_echo "not found" >&6; }
40401           as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40402         fi
40403         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40404 $as_echo "$tool_specified" >&6; }
40405       fi
40406     fi
40407   fi
40408 
40409 
40410 
40411   if test "x$JTREGEXE" = x; then
40412     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40413   fi
40414 
40415 
40416       JT_HOME="`$DIRNAME $JTREGEXE`"
40417     fi
40418   fi
40419 
40420 
40421 
40422 
40423 
40424 
40425   # Option used to tell the compiler whether to create 32- or 64-bit executables
40426   if test "x$TOOLCHAIN_TYPE" = xxlc; then
40427     COMPILER_TARGET_BITS_FLAG="-q"
40428   else
40429     COMPILER_TARGET_BITS_FLAG="-m"
40430   fi
40431 
40432 
40433   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40434   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40435     ARFLAGS="-r"
40436   elif test "x$OPENJDK_TARGET_OS" = xaix; then
40437     ARFLAGS="-X64"
40438   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40439     # lib.exe is used as AR to create static libraries.
40440     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40441   else
40442     ARFLAGS=""
40443   fi
40444 
40445 
40446   ## Setup strip.
40447   # FIXME: should this really be per platform, or should it be per toolchain type?
40448   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40449   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40450   if test "x$OPENJDK_TARGET_OS" = xlinux; then
40451     STRIPFLAGS="-g"
40452   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40453     STRIPFLAGS="-x"
40454   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40455     STRIPFLAGS="-S"
40456   elif test "x$OPENJDK_TARGET_OS" = xaix; then
40457     STRIPFLAGS="-X32_64"
40458   fi
40459 
40460   if test "x$OPENJDK_TARGET_OS" != xwindows; then
40461     POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40462   fi
40463 
40464 
40465   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40466     # FIXME: break out into MCSFLAGS
40467     POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40468   fi
40469 
40470 
40471   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40472     CC_OUT_OPTION=-Fo
40473     EXE_OUT_OPTION=-out:
40474     LD_OUT_OPTION=-out:
40475     AR_OUT_OPTION=-out:
40476   else
40477     # The option used to specify the target .o,.a or .so file.
40478     # When compiling, how to specify the to be created object file.
40479     CC_OUT_OPTION='-o$(SPACE)'
40480     # When linking, how to specify the to be created executable.
40481     EXE_OUT_OPTION='-o$(SPACE)'
40482     # When linking, how to specify the to be created dynamically linkable library.
40483     LD_OUT_OPTION='-o$(SPACE)'
40484     # When archiving, how to specify the to be create static archive for object files.
40485     AR_OUT_OPTION='rcs$(SPACE)'
40486   fi
40487 
40488 
40489 
40490 
40491 
40492   # On Windows, we need to set RC flags.
40493   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40494     RC_FLAGS="-nologo -l 0x409 -r"
40495     if test "x$VARIANT" = xOPT; then
40496       RC_FLAGS="$RC_FLAGS -d NDEBUG"
40497     fi
40498 
40499     # The version variables used to create RC_FLAGS may be overridden
40500     # in a custom configure script, or possibly the command line.
40501     # Let those variables be expanded at make time in spec.gmk.
40502     # The \$ are escaped to the shell, and the $(...) variables
40503     # are evaluated by make.
40504     RC_FLAGS="$RC_FLAGS \
40505         -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40506         -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40507         -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40508         -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(COOKED_JDK_UPDATE_VERSION).\$(COOKED_BUILD_NUMBER)\" \
40509         -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40510         -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40511         -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40512   fi
40513 
40514 
40515   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40516     # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40517     CCXXFLAGS="$CCXXFLAGS -nologo"
40518   fi
40519 
40520   if test "x$SYSROOT" != "x"; then
40521     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
40522       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40523         # Solaris Studio does not have a concept of sysroot. Instead we must
40524         # make sure the default include and lib dirs are appended to each
40525         # compile and link command line.
40526         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
40527         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
40528             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
40529             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
40530       fi
40531     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
40532       SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
40533       SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
40534     elif test "x$TOOLCHAIN_TYPE" = xclang; then
40535       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
40536       SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
40537     fi
40538     # Propagate the sysroot args to hotspot
40539     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
40540     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
40541     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
40542   fi
40543 
40544 
40545 
40546 
40547 # FIXME: Currently we must test this after toolchain but before flags. Fix!
40548 
40549 # Now we can test some aspects on the target using configure macros.
40550 
40551 
40552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40553 $as_echo_n "checking for ANSI C header files... " >&6; }
40554 if ${ac_cv_header_stdc+:} false; then :
40555   $as_echo_n "(cached) " >&6
40556 else
40557   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40558 /* end confdefs.h.  */
40559 #include <stdlib.h>
40560 #include <stdarg.h>
40561 #include <string.h>
40562 #include <float.h>
40563 
40564 int
40565 main ()
40566 {
40567 
40568   ;
40569   return 0;
40570 }
40571 _ACEOF
40572 if ac_fn_cxx_try_compile "$LINENO"; then :
40573   ac_cv_header_stdc=yes
40574 else
40575   ac_cv_header_stdc=no
40576 fi
40577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40578 
40579 if test $ac_cv_header_stdc = yes; then
40580   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40581   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40582 /* end confdefs.h.  */
40583 #include <string.h>
40584 
40585 _ACEOF
40586 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40587   $EGREP "memchr" >/dev/null 2>&1; then :
40588 
40589 else
40590   ac_cv_header_stdc=no
40591 fi
40592 rm -f conftest*
40593 
40594 fi
40595 
40596 if test $ac_cv_header_stdc = yes; then
40597   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40598   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40599 /* end confdefs.h.  */
40600 #include <stdlib.h>
40601 
40602 _ACEOF
40603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40604   $EGREP "free" >/dev/null 2>&1; then :
40605 
40606 else
40607   ac_cv_header_stdc=no
40608 fi
40609 rm -f conftest*
40610 
40611 fi
40612 
40613 if test $ac_cv_header_stdc = yes; then
40614   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40615   if test "$cross_compiling" = yes; then :
40616   :
40617 else
40618   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40619 /* end confdefs.h.  */
40620 #include <ctype.h>
40621 #include <stdlib.h>
40622 #if ((' ' & 0x0FF) == 0x020)
40623 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40624 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40625 #else
40626 # define ISLOWER(c) \
40627                    (('a' <= (c) && (c) <= 'i') \
40628                      || ('j' <= (c) && (c) <= 'r') \
40629                      || ('s' <= (c) && (c) <= 'z'))
40630 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40631 #endif
40632 
40633 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40634 int
40635 main ()
40636 {
40637   int i;
40638   for (i = 0; i < 256; i++)
40639     if (XOR (islower (i), ISLOWER (i))
40640         || toupper (i) != TOUPPER (i))
40641       return 2;
40642   return 0;
40643 }
40644 _ACEOF
40645 if ac_fn_cxx_try_run "$LINENO"; then :
40646 
40647 else
40648   ac_cv_header_stdc=no
40649 fi
40650 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40651   conftest.$ac_objext conftest.beam conftest.$ac_ext
40652 fi
40653 
40654 fi
40655 fi
40656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40657 $as_echo "$ac_cv_header_stdc" >&6; }
40658 if test $ac_cv_header_stdc = yes; then
40659 
40660 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
40661 
40662 fi
40663 
40664 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
40665 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40666                   inttypes.h stdint.h unistd.h
40667 do :
40668   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40669 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40670 "
40671 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40672   cat >>confdefs.h <<_ACEOF
40673 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40674 _ACEOF
40675 
40676 fi
40677 
40678 done
40679 
40680 
40681 
40682   ###############################################################################
40683   #
40684   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40685   # (The JVM can use 32 or 64 bit Java pointers but that decision
40686   # is made at runtime.)
40687   #
40688 
40689   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40690     # Always specify -m flag on Solaris
40691     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40692 
40693   # When we add flags to the "official" CFLAGS etc, we need to
40694   # keep track of these additions in ADDED_CFLAGS etc. These
40695   # will later be checked to make sure only controlled additions
40696   # have been made to CFLAGS etc.
40697   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40698   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40699   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40700 
40701   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40702   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40703   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40704 
40705   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40706   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40707   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40708 
40709   elif test "x$COMPILE_TYPE" = xreduced; then
40710     if test "x$OPENJDK_TARGET_OS" != xwindows; then
40711       # Specify -m if running reduced on other Posix platforms
40712 
40713   # When we add flags to the "official" CFLAGS etc, we need to
40714   # keep track of these additions in ADDED_CFLAGS etc. These
40715   # will later be checked to make sure only controlled additions
40716   # have been made to CFLAGS etc.
40717   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40718   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40719   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40720 
40721   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40722   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40723   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40724 
40725   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40726   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40727   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40728 
40729     fi
40730   fi
40731 
40732   # Make compilation sanity check
40733   for ac_header in stdio.h
40734 do :
40735   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40736 if test "x$ac_cv_header_stdio_h" = xyes; then :
40737   cat >>confdefs.h <<_ACEOF
40738 #define HAVE_STDIO_H 1
40739 _ACEOF
40740 
40741 else
40742 
40743     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40744 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
40745     if test "x$COMPILE_TYPE" = xreduced; then
40746       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
40747 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
40748     elif test "x$COMPILE_TYPE" = xcross; then
40749       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
40750 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
40751     fi
40752     as_fn_error $? "Cannot continue." "$LINENO" 5
40753 
40754 fi
40755 
40756 done
40757 
40758 
40759   # The cast to long int works around a bug in the HP C Compiler
40760 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40761 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40762 # This bug is HP SR number 8606223364.
40763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40764 $as_echo_n "checking size of int *... " >&6; }
40765 if ${ac_cv_sizeof_int_p+:} false; then :
40766   $as_echo_n "(cached) " >&6
40767 else
40768   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40769 
40770 else
40771   if test "$ac_cv_type_int_p" = yes; then
40772      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40773 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40774 as_fn_error 77 "cannot compute sizeof (int *)
40775 See \`config.log' for more details" "$LINENO" 5; }
40776    else
40777      ac_cv_sizeof_int_p=0
40778    fi
40779 fi
40780 
40781 fi
40782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40783 $as_echo "$ac_cv_sizeof_int_p" >&6; }
40784 
40785 
40786 
40787 cat >>confdefs.h <<_ACEOF
40788 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
40789 _ACEOF
40790 
40791 
40792 
40793   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
40794   if test "x$ac_cv_sizeof_int_p" = x; then
40795     # The test failed, lets stick to the assumed value.
40796     { $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
40797 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
40798   else
40799     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40800 
40801     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40802       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
40803       # Let's try to implicitely set the compilers target architecture and retry the test
40804       { $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
40805 $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;}
40806       { $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
40807 $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;}
40808 
40809   # When we add flags to the "official" CFLAGS etc, we need to
40810   # keep track of these additions in ADDED_CFLAGS etc. These
40811   # will later be checked to make sure only controlled additions
40812   # have been made to CFLAGS etc.
40813   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40814   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40815   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40816 
40817   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40818   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40819   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40820 
40821   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40822   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40823   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40824 
40825 
40826       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
40827       unset ac_cv_sizeof_int_p
40828       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
40829       cat >>confdefs.h <<_ACEOF
40830 #undef SIZEOF_INT_P
40831 _ACEOF
40832 
40833       # The cast to long int works around a bug in the HP C Compiler
40834 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40835 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40836 # This bug is HP SR number 8606223364.
40837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40838 $as_echo_n "checking size of int *... " >&6; }
40839 if ${ac_cv_sizeof_int_p+:} false; then :
40840   $as_echo_n "(cached) " >&6
40841 else
40842   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40843 
40844 else
40845   if test "$ac_cv_type_int_p" = yes; then
40846      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40847 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40848 as_fn_error 77 "cannot compute sizeof (int *)
40849 See \`config.log' for more details" "$LINENO" 5; }
40850    else
40851      ac_cv_sizeof_int_p=0
40852    fi
40853 fi
40854 
40855 fi
40856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40857 $as_echo "$ac_cv_sizeof_int_p" >&6; }
40858 
40859 
40860 
40861 cat >>confdefs.h <<_ACEOF
40862 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
40863 _ACEOF
40864 
40865 
40866 
40867       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40868 
40869       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40870         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
40871       fi
40872     fi
40873   fi
40874 
40875   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
40876 $as_echo_n "checking for target address size... " >&6; }
40877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
40878 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
40879 
40880 
40881   ###############################################################################
40882   #
40883   # Is the target little of big endian?
40884   #
40885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
40886 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
40887 if ${ac_cv_c_bigendian+:} false; then :
40888   $as_echo_n "(cached) " >&6
40889 else
40890   ac_cv_c_bigendian=unknown
40891     # See if we're dealing with a universal compiler.
40892     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40893 /* end confdefs.h.  */
40894 #ifndef __APPLE_CC__
40895                not a universal capable compiler
40896              #endif
40897              typedef int dummy;
40898 
40899 _ACEOF
40900 if ac_fn_cxx_try_compile "$LINENO"; then :
40901 
40902         # Check for potential -arch flags.  It is not universal unless
40903         # there are at least two -arch flags with different values.
40904         ac_arch=
40905         ac_prev=
40906         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
40907          if test -n "$ac_prev"; then
40908            case $ac_word in
40909              i?86 | x86_64 | ppc | ppc64)
40910                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
40911                  ac_arch=$ac_word
40912                else
40913                  ac_cv_c_bigendian=universal
40914                  break
40915                fi
40916                ;;
40917            esac
40918            ac_prev=
40919          elif test "x$ac_word" = "x-arch"; then
40920            ac_prev=arch
40921          fi
40922        done
40923 fi
40924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40925     if test $ac_cv_c_bigendian = unknown; then
40926       # See if sys/param.h defines the BYTE_ORDER macro.
40927       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40928 /* end confdefs.h.  */
40929 #include <sys/types.h>
40930              #include <sys/param.h>
40931 
40932 int
40933 main ()
40934 {
40935 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
40936                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
40937                      && LITTLE_ENDIAN)
40938               bogus endian macros
40939              #endif
40940 
40941   ;
40942   return 0;
40943 }
40944 _ACEOF
40945 if ac_fn_cxx_try_compile "$LINENO"; then :
40946   # It does; now see whether it defined to BIG_ENDIAN or not.
40947          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40948 /* end confdefs.h.  */
40949 #include <sys/types.h>
40950                 #include <sys/param.h>
40951 
40952 int
40953 main ()
40954 {
40955 #if BYTE_ORDER != BIG_ENDIAN
40956                  not big endian
40957                 #endif
40958 
40959   ;
40960   return 0;
40961 }
40962 _ACEOF
40963 if ac_fn_cxx_try_compile "$LINENO"; then :
40964   ac_cv_c_bigendian=yes
40965 else
40966   ac_cv_c_bigendian=no
40967 fi
40968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40969 fi
40970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40971     fi
40972     if test $ac_cv_c_bigendian = unknown; then
40973       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
40974       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40975 /* end confdefs.h.  */
40976 #include <limits.h>
40977 
40978 int
40979 main ()
40980 {
40981 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
40982               bogus endian macros
40983              #endif
40984 
40985   ;
40986   return 0;
40987 }
40988 _ACEOF
40989 if ac_fn_cxx_try_compile "$LINENO"; then :
40990   # It does; now see whether it defined to _BIG_ENDIAN or not.
40991          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40992 /* end confdefs.h.  */
40993 #include <limits.h>
40994 
40995 int
40996 main ()
40997 {
40998 #ifndef _BIG_ENDIAN
40999                  not big endian
41000                 #endif
41001 
41002   ;
41003   return 0;
41004 }
41005 _ACEOF
41006 if ac_fn_cxx_try_compile "$LINENO"; then :
41007   ac_cv_c_bigendian=yes
41008 else
41009   ac_cv_c_bigendian=no
41010 fi
41011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41012 fi
41013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41014     fi
41015     if test $ac_cv_c_bigendian = unknown; then
41016       # Compile a test program.
41017       if test "$cross_compiling" = yes; then :
41018   # Try to guess by grepping values from an object file.
41019          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41020 /* end confdefs.h.  */
41021 short int ascii_mm[] =
41022                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41023                 short int ascii_ii[] =
41024                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41025                 int use_ascii (int i) {
41026                   return ascii_mm[i] + ascii_ii[i];
41027                 }
41028                 short int ebcdic_ii[] =
41029                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41030                 short int ebcdic_mm[] =
41031                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41032                 int use_ebcdic (int i) {
41033                   return ebcdic_mm[i] + ebcdic_ii[i];
41034                 }
41035                 extern int foo;
41036 
41037 int
41038 main ()
41039 {
41040 return use_ascii (foo) == use_ebcdic (foo);
41041   ;
41042   return 0;
41043 }
41044 _ACEOF
41045 if ac_fn_cxx_try_compile "$LINENO"; then :
41046   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41047               ac_cv_c_bigendian=yes
41048             fi
41049             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41050               if test "$ac_cv_c_bigendian" = unknown; then
41051                 ac_cv_c_bigendian=no
41052               else
41053                 # finding both strings is unlikely to happen, but who knows?
41054                 ac_cv_c_bigendian=unknown
41055               fi
41056             fi
41057 fi
41058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41059 else
41060   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41061 /* end confdefs.h.  */
41062 $ac_includes_default
41063 int
41064 main ()
41065 {
41066 
41067              /* Are we little or big endian?  From Harbison&Steele.  */
41068              union
41069              {
41070                long int l;
41071                char c[sizeof (long int)];
41072              } u;
41073              u.l = 1;
41074              return u.c[sizeof (long int) - 1] == 1;
41075 
41076   ;
41077   return 0;
41078 }
41079 _ACEOF
41080 if ac_fn_cxx_try_run "$LINENO"; then :
41081   ac_cv_c_bigendian=no
41082 else
41083   ac_cv_c_bigendian=yes
41084 fi
41085 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41086   conftest.$ac_objext conftest.beam conftest.$ac_ext
41087 fi
41088 
41089     fi
41090 fi
41091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41092 $as_echo "$ac_cv_c_bigendian" >&6; }
41093  case $ac_cv_c_bigendian in #(
41094    yes)
41095      ENDIAN="big";; #(
41096    no)
41097      ENDIAN="little" ;; #(
41098    universal)
41099      ENDIAN="universal_endianness"
41100      ;; #(
41101    *)
41102      ENDIAN="unknown" ;;
41103  esac
41104 
41105 
41106   if test "x$ENDIAN" = xuniversal_endianness; then
41107     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41108   fi
41109   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41110     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
41111   fi
41112 
41113 
41114 # Configure flags for the tools
41115 
41116   ###############################################################################
41117   #
41118   # How to compile shared libraries.
41119   #
41120 
41121   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41122     PICFLAG="-fPIC"
41123     C_FLAG_REORDER=''
41124     CXX_FLAG_REORDER=''
41125 
41126     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41127       # Linking is different on MacOSX
41128       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41129       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41130       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41131       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41132       SET_SHARED_LIBRARY_MAPFILE=''
41133     else
41134       # Default works for linux, might work on other platforms as well.
41135       SHARED_LIBRARY_FLAGS='-shared'
41136       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41137       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41138       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41139       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41140     fi
41141   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41142     PICFLAG="-KPIC"
41143     C_FLAG_REORDER='-xF'
41144     CXX_FLAG_REORDER='-xF'
41145     SHARED_LIBRARY_FLAGS="-G"
41146     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41147     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41148     SET_SHARED_LIBRARY_NAME=''
41149     SET_SHARED_LIBRARY_MAPFILE='-M$1'
41150   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41151     PICFLAG="-qpic=large"
41152     C_FLAG_REORDER=''
41153     CXX_FLAG_REORDER=''
41154     SHARED_LIBRARY_FLAGS="-qmkshrobj"
41155     SET_EXECUTABLE_ORIGIN=""
41156     SET_SHARED_LIBRARY_ORIGIN=''
41157     SET_SHARED_LIBRARY_NAME=''
41158     SET_SHARED_LIBRARY_MAPFILE=''
41159   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41160     PICFLAG=""
41161     C_FLAG_REORDER=''
41162     CXX_FLAG_REORDER=''
41163     SHARED_LIBRARY_FLAGS="-LD"
41164     SET_EXECUTABLE_ORIGIN=''
41165     SET_SHARED_LIBRARY_ORIGIN=''
41166     SET_SHARED_LIBRARY_NAME=''
41167     SET_SHARED_LIBRARY_MAPFILE=''
41168   fi
41169 
41170 
41171 
41172 
41173 
41174 
41175 
41176 
41177 
41178   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41179     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41180     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41181     CFLAGS_JDKLIB_EXTRA='-xstrconst'
41182   fi
41183   # The (cross) compiler is now configured, we can now test capabilities
41184   # of the target platform.
41185 
41186 
41187 
41188   ###############################################################################
41189   #
41190   # Setup the opt flags for different compilers
41191   # and different operating systems.
41192   #
41193 
41194   # FIXME: this was indirectly the old default, but just inherited.
41195   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41196   #   C_FLAG_DEPS="-MMD -MF"
41197   # fi
41198 
41199   # Generate make dependency files
41200   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41201     C_FLAG_DEPS="-MMD -MF"
41202   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41203     C_FLAG_DEPS="-xMMD -xMF"
41204   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41205     C_FLAG_DEPS="-qmakedep=gcc -MF"
41206   fi
41207   CXX_FLAG_DEPS="$C_FLAG_DEPS"
41208 
41209 
41210 
41211   # Debug symbols
41212   #
41213   # By default don't set any specific assembler debug
41214   # info flags for toolchains unless we know they work.
41215   # See JDK-8207057.
41216   ASFLAGS_DEBUG_SYMBOLS=""
41217   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41218     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41219       CFLAGS_DEBUG_SYMBOLS="-g1"
41220       CXXFLAGS_DEBUG_SYMBOLS="-g1"
41221     else
41222       CFLAGS_DEBUG_SYMBOLS="-g"
41223       CXXFLAGS_DEBUG_SYMBOLS="-g"
41224     fi
41225     ASFLAGS_DEBUG_SYMBOLS="-g"
41226   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41227     CFLAGS_DEBUG_SYMBOLS="-g -xs"
41228     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41229   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41230     CFLAGS_DEBUG_SYMBOLS="-g"
41231     CXXFLAGS_DEBUG_SYMBOLS="-g"
41232   fi
41233 
41234 
41235 
41236 
41237   # Optimization levels
41238   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41239     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xalias_level=basic -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41240 
41241     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41242       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41243       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
41244       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41245       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41246       C_O_FLAG_NONE="-xregs=no%frameptr"
41247       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41248       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41249       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41250       CXX_O_FLAG_NONE="-xregs=no%frameptr"
41251       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41252         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41253         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41254       fi
41255     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41256       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41257       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41258       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41259       C_O_FLAG_NONE=""
41260       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41261       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41262       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41263       CXX_O_FLAG_NONE=""
41264     fi
41265   else
41266     # The remaining toolchains share opt flags between CC and CXX;
41267     # setup for C and duplicate afterwards.
41268     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41269       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41270         # On MacOSX we optimize for size, something
41271         # we should do for all platforms?
41272         C_O_FLAG_HIGHEST="-Os"
41273         C_O_FLAG_HI="-Os"
41274         C_O_FLAG_NORM="-Os"
41275         C_O_FLAG_NONE=""
41276       else
41277         C_O_FLAG_HIGHEST="-O3"
41278         C_O_FLAG_HI="-O3"
41279         C_O_FLAG_NORM="-O2"
41280         C_O_FLAG_NONE="-O0"
41281       fi
41282     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41283       C_O_FLAG_HIGHEST="-O3"
41284       C_O_FLAG_HI="-O3 -qstrict"
41285       C_O_FLAG_NORM="-O2"
41286       C_O_FLAG_NONE=""
41287     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41288       C_O_FLAG_HIGHEST="-O2"
41289       C_O_FLAG_HI="-O1"
41290       C_O_FLAG_NORM="-O1"
41291       C_O_FLAG_NONE="-Od"
41292     fi
41293     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41294     CXX_O_FLAG_HI="$C_O_FLAG_HI"
41295     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41296     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41297   fi
41298 
41299 
41300 
41301 
41302 
41303 
41304 
41305 
41306 
41307 
41308 
41309   # Special extras...
41310   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41311     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41312       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41313       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41314     fi
41315   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41316     LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41317     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41318     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41319   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41320     CXXSTD_CXXFLAG="-std=gnu++98"
41321 
41322   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
41323 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
41324   supports=yes
41325 
41326   saved_cxxflags="$CXXFLAGS"
41327   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
41328   ac_ext=cpp
41329 ac_cpp='$CXXCPP $CPPFLAGS'
41330 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41331 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41332 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41333 
41334   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41335 /* end confdefs.h.  */
41336 int i;
41337 _ACEOF
41338 if ac_fn_cxx_try_compile "$LINENO"; then :
41339 
41340 else
41341   supports=no
41342 fi
41343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41344   ac_ext=cpp
41345 ac_cpp='$CXXCPP $CPPFLAGS'
41346 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41347 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41348 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41349 
41350   CXXFLAGS="$saved_cxxflags"
41351 
41352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41353 $as_echo "$supports" >&6; }
41354   if test "x$supports" = "xyes" ; then
41355     :
41356   else
41357     CXXSTD_CXXFLAG=""
41358   fi
41359 
41360     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
41361     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
41362 
41363   fi
41364 
41365   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41366     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41367 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41368   fi
41369 
41370   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41371     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41372 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41373   fi
41374 
41375   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41376     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41377 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41378   fi
41379 
41380 
41381 # Check whether --with-extra-cflags was given.
41382 if test "${with_extra_cflags+set}" = set; then :
41383   withval=$with_extra_cflags;
41384 fi
41385 
41386 
41387 
41388 # Check whether --with-extra-cxxflags was given.
41389 if test "${with_extra_cxxflags+set}" = set; then :
41390   withval=$with_extra_cxxflags;
41391 fi
41392 
41393 
41394 
41395 # Check whether --with-extra-ldflags was given.
41396 if test "${with_extra_ldflags+set}" = set; then :
41397   withval=$with_extra_ldflags;
41398 fi
41399 
41400 
41401   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41402   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41403   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41404 
41405   # Hotspot needs these set in their legacy form
41406   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
41407   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
41408   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
41409 
41410 
41411 
41412 
41413 
41414   ###############################################################################
41415   #
41416   # Now setup the CFLAGS and LDFLAGS for the JDK build.
41417   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41418   #
41419 
41420   # Setup compiler/platform specific flags to CFLAGS_JDK,
41421   # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41422   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41423     # these options are used for both C and C++ compiles
41424     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41425         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41426     case $OPENJDK_TARGET_CPU_ARCH in
41427       arm )
41428         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41429         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41430         ;;
41431       ppc )
41432         # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41433         ;;
41434       * )
41435         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41436         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41437         ;;
41438     esac
41439 
41440   REFERENCE_VERSION=6
41441 
41442   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
41443     as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
41444   fi
41445 
41446   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
41447     as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only parts < 99999 is supported" "$LINENO" 5
41448   fi
41449 
41450   # Version comparison method inspired by http://stackoverflow.com/a/24067243
41451   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
41452 
41453   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
41454 
41455   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
41456   # runs afoul of the more aggressive versions of these optimisations.
41457   # Notably, value range propagation now assumes that the this pointer of C++
41458   # member functions is non-null.
41459   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
41460 
41461 
41462   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
41463 $as_echo_n "checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
41464   supports=yes
41465 
41466   saved_cflags="$CFLAGS"
41467   CFLAGS="$CFLAGS $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
41468   ac_ext=c
41469 ac_cpp='$CPP $CPPFLAGS'
41470 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41471 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41472 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41473 
41474 
41475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41476 /* end confdefs.h.  */
41477 int i;
41478 _ACEOF
41479 if ac_fn_c_try_compile "$LINENO"; then :
41480 
41481 else
41482   supports=no
41483 fi
41484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41485   ac_ext=cpp
41486 ac_cpp='$CXXCPP $CPPFLAGS'
41487 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41488 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41489 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41490 
41491   CFLAGS="$saved_cflags"
41492 
41493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41494 $as_echo "$supports" >&6; }
41495   if test "x$supports" = "xyes" ; then
41496     C_COMP_SUPPORTS="yes"
41497   else
41498     C_COMP_SUPPORTS="no"
41499   fi
41500 
41501 
41502   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
41503 $as_echo_n "checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
41504   supports=yes
41505 
41506   saved_cxxflags="$CXXFLAGS"
41507   CXXFLAGS="$CXXFLAG $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
41508   ac_ext=cpp
41509 ac_cpp='$CXXCPP $CPPFLAGS'
41510 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41511 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41512 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41513 
41514   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41515 /* end confdefs.h.  */
41516 int i;
41517 _ACEOF
41518 if ac_fn_cxx_try_compile "$LINENO"; then :
41519 
41520 else
41521   supports=no
41522 fi
41523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41524   ac_ext=cpp
41525 ac_cpp='$CXXCPP $CPPFLAGS'
41526 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41527 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41528 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41529 
41530   CXXFLAGS="$saved_cxxflags"
41531 
41532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41533 $as_echo "$supports" >&6; }
41534   if test "x$supports" = "xyes" ; then
41535     CXX_COMP_SUPPORTS="yes"
41536   else
41537     CXX_COMP_SUPPORTS="no"
41538   fi
41539 
41540 
41541   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
41542 $as_echo_n "checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
41543   supports=no
41544   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
41545 
41546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41547 $as_echo "$supports" >&6; }
41548   if test "x$supports" = "xyes" ; then
41549     :
41550   else
41551     NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""
41552   fi
41553 
41554 
41555   NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
41556 
41557 
41558   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
41559 $as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
41560   supports=yes
41561 
41562   saved_cflags="$CFLAGS"
41563   CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
41564   ac_ext=c
41565 ac_cpp='$CPP $CPPFLAGS'
41566 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41567 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41568 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41569 
41570   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41571 /* end confdefs.h.  */
41572 int i;
41573 _ACEOF
41574 if ac_fn_c_try_compile "$LINENO"; then :
41575 
41576 else
41577   supports=no
41578 fi
41579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41580   ac_ext=cpp
41581 ac_cpp='$CXXCPP $CPPFLAGS'
41582 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41583 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41584 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41585 
41586   CFLAGS="$saved_cflags"
41587 
41588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41589 $as_echo "$supports" >&6; }
41590   if test "x$supports" = "xyes" ; then
41591     C_COMP_SUPPORTS="yes"
41592   else
41593     C_COMP_SUPPORTS="no"
41594   fi
41595 
41596 
41597   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
41598 $as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
41599   supports=yes
41600 
41601   saved_cxxflags="$CXXFLAGS"
41602   CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
41603   ac_ext=cpp
41604 ac_cpp='$CXXCPP $CPPFLAGS'
41605 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41606 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41607 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41608 
41609   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41610 /* end confdefs.h.  */
41611 int i;
41612 _ACEOF
41613 if ac_fn_cxx_try_compile "$LINENO"; then :
41614 
41615 else
41616   supports=no
41617 fi
41618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41619   ac_ext=cpp
41620 ac_cpp='$CXXCPP $CPPFLAGS'
41621 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41622 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41623 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41624 
41625   CXXFLAGS="$saved_cxxflags"
41626 
41627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41628 $as_echo "$supports" >&6; }
41629   if test "x$supports" = "xyes" ; then
41630     CXX_COMP_SUPPORTS="yes"
41631   else
41632     CXX_COMP_SUPPORTS="no"
41633   fi
41634 
41635 
41636   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
41637 $as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
41638   supports=no
41639   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
41640 
41641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41642 $as_echo "$supports" >&6; }
41643   if test "x$supports" = "xyes" ; then
41644     :
41645   else
41646     NO_LIFETIME_DSE_CFLAG=""
41647   fi
41648 
41649   CFLAGS_JDK="${CFLAGS_JDK} ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
41650 
41651 
41652 
41653   else
41654     :
41655   fi
41656 
41657   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41658     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41659     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41660       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41661       CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41662     fi
41663 
41664     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41665     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41666   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41667     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41668     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41669   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41670     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK \
41671         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41672         -DWIN32_LEAN_AND_MEAN \
41673         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41674         -DWIN32 -DIAL"
41675     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41676       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41677     else
41678       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41679     fi
41680     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
41681     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
41682     # studio.
41683     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
41684       CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41685           -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
41686     fi
41687   fi
41688 
41689   ###############################################################################
41690 
41691   # Adjust flags according to debug level.
41692   case $DEBUG_LEVEL in
41693     fastdebug )
41694       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41695       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41696       C_O_FLAG_HI="$C_O_FLAG_NORM"
41697       C_O_FLAG_NORM="$C_O_FLAG_NORM"
41698       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41699       CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41700       JAVAC_FLAGS="$JAVAC_FLAGS -g"
41701       ;;
41702     slowdebug )
41703       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41704       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41705       C_O_FLAG_HI="$C_O_FLAG_NONE"
41706       C_O_FLAG_NORM="$C_O_FLAG_NONE"
41707       CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41708       CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41709       JAVAC_FLAGS="$JAVAC_FLAGS -g"
41710       ;;
41711   esac
41712 
41713   # Setup LP64
41714   CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41715 
41716   # Set some common defines. These works for all compilers, but assume
41717   # -D is universally accepted.
41718 
41719   # Setup endianness
41720   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41721     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41722     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41723     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41724     #   Note: -Dmacro         is the same as    #define macro 1
41725     #         -Dmacro=        is the same as    #define macro
41726     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41727       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41728     else
41729       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41730     fi
41731   else
41732     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
41733     # are defined in the system?
41734     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41735       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN="
41736     else
41737       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41738     fi
41739   fi
41740   if test "x$OPENJDK_TARGET_CPU" = xppc64le; then
41741     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DABI_ELFv2"
41742   fi
41743 
41744   # Setup target OS define. Use OS target name but in upper case.
41745   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41746   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41747 
41748   # Setup target CPU
41749   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41750 
41751   # Setup debug/release defines
41752   if test "x$DEBUG_LEVEL" = xrelease; then
41753     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41754     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41755       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41756     fi
41757   else
41758     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41759   fi
41760 
41761   # Setup release name
41762   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41763 
41764 
41765   # Set some additional per-OS defines.
41766   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41767     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41768   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41769     # FIXME: PPC64 should not be here.
41770     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41771   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41772     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41773   fi
41774 
41775   # Additional macosx handling
41776   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41777     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41778       # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41779       # FIXME: clean this up, and/or move it elsewhere.
41780 
41781       # Setting these parameters makes it an error to link to macosx APIs that are
41782       # newer than the given OS version and makes the linked binaries compatible
41783       # even if built on a newer version of the OS.
41784       # The expected format is X.Y.Z
41785       MACOSX_VERSION_MIN=10.7.0
41786 
41787 
41788       # The macro takes the version with no dots, ex: 1070
41789       # Let the flags variables get resolved in make for easier override on make
41790       # command line.
41791       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41792       LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41793     fi
41794   fi
41795 
41796   # Setup some hard coded includes
41797   CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41798       -I${JDK_OUTPUTDIR}/include \
41799       -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41800       -I${JDK_TOPDIR}/src/share/javavm/export \
41801       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41802       -I${JDK_TOPDIR}/src/share/native/common \
41803       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41804 
41805   # The shared libraries are compiled using the picflag.
41806   CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41807   CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41808 
41809   # Executable flags
41810   CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41811   CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41812 
41813 
41814 
41815 
41816 
41817 
41818   # Setup LDFLAGS et al.
41819   #
41820   # Now this is odd. The JDK native libraries have to link against libjvm.so
41821   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41822   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41823   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41824   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41825   # libraries will link to whatever is in memory. Yuck.
41826   #
41827   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41828   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41829     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41830     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41831       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41832     fi
41833     # TODO: make -debug optional "--disable-full-debug-symbols"
41834     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41835     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41836     LDFLAGS_JDKLIB_SUFFIX=""
41837     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41838       LDFLAGS_STACK_SIZE=1048576
41839     else
41840       LDFLAGS_STACK_SIZE=327680
41841     fi
41842     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41843   else
41844     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41845       # If this is a --hash-style=gnu system, use --hash-style=both, why?
41846       # We have previously set HAS_GNU_HASH if this is the case
41847       if test -n "$HAS_GNU_HASH"; then
41848         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41849       fi
41850       if test "x$OPENJDK_TARGET_OS" = xlinux; then
41851         # And since we now know that the linker is gnu, then add:
41852         #   -z defs, to forbid undefined symbols in object files
41853         #   -z noexecstack, to mark stack regions as non-executable
41854         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack"
41855         if test "x$DEBUG_LEVEL" = "xrelease"; then
41856           # When building release libraries, tell the linker optimize them.
41857           # Should this be supplied to the OSS linker as well?
41858           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41859         fi
41860       fi
41861     fi
41862 
41863     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41864       LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41865       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41866     fi
41867 
41868     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41869         -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41870 
41871     # On some platforms (mac) the linker warns about non existing -L dirs.
41872     # Add server first if available. Linking aginst client does not always produce the same results.
41873     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41874     # Default to server for other variants.
41875     if test "x$JVM_VARIANT_SERVER" = xtrue; then
41876       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41877     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41878       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41879     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41880       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41881     else
41882       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41883     fi
41884 
41885     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41886     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41887       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41888     fi
41889 
41890     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41891     if test "x$OPENJDK_TARGET_OS" = xlinux; then
41892       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41893     fi
41894   fi
41895 
41896 
41897 
41898 
41899 
41900 
41901 
41902   # Some Zero and Shark settings.
41903   # ZERO_ARCHFLAG tells the compiler which mode to build for
41904   case "${OPENJDK_TARGET_CPU}" in
41905     s390)
41906       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41907       ;;
41908     *)
41909       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41910   esac
41911 
41912 
41913   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
41914 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41915   supports=yes
41916 
41917   saved_cflags="$CFLAGS"
41918   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41919   ac_ext=c
41920 ac_cpp='$CPP $CPPFLAGS'
41921 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41922 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41923 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41924 
41925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41926 /* end confdefs.h.  */
41927 int i;
41928 _ACEOF
41929 if ac_fn_c_try_compile "$LINENO"; then :
41930 
41931 else
41932   supports=no
41933 fi
41934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41935   ac_ext=cpp
41936 ac_cpp='$CXXCPP $CPPFLAGS'
41937 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41938 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41939 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41940 
41941   CFLAGS="$saved_cflags"
41942 
41943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41944 $as_echo "$supports" >&6; }
41945   if test "x$supports" = "xyes" ; then
41946     C_COMP_SUPPORTS="yes"
41947   else
41948     C_COMP_SUPPORTS="no"
41949   fi
41950 
41951 
41952   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
41953 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41954   supports=yes
41955 
41956   saved_cxxflags="$CXXFLAGS"
41957   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
41958   ac_ext=cpp
41959 ac_cpp='$CXXCPP $CPPFLAGS'
41960 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41961 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41962 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41963 
41964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41965 /* end confdefs.h.  */
41966 int i;
41967 _ACEOF
41968 if ac_fn_cxx_try_compile "$LINENO"; then :
41969 
41970 else
41971   supports=no
41972 fi
41973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41974   ac_ext=cpp
41975 ac_cpp='$CXXCPP $CPPFLAGS'
41976 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41977 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41978 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41979 
41980   CXXFLAGS="$saved_cxxflags"
41981 
41982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41983 $as_echo "$supports" >&6; }
41984   if test "x$supports" = "xyes" ; then
41985     CXX_COMP_SUPPORTS="yes"
41986   else
41987     CXX_COMP_SUPPORTS="no"
41988   fi
41989 
41990 
41991   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
41992 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
41993   supports=no
41994   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
41995 
41996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41997 $as_echo "$supports" >&6; }
41998   if test "x$supports" = "xyes" ; then
41999     :
42000   else
42001     ZERO_ARCHFLAG=""
42002   fi
42003 
42004 
42005 
42006   # Check that the compiler supports -mX (or -qX on AIX) flags
42007   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42008 
42009 
42010   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42011 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42012   supports=yes
42013 
42014   saved_cflags="$CFLAGS"
42015   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42016   ac_ext=c
42017 ac_cpp='$CPP $CPPFLAGS'
42018 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42019 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42020 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42021 
42022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42023 /* end confdefs.h.  */
42024 int i;
42025 _ACEOF
42026 if ac_fn_c_try_compile "$LINENO"; then :
42027 
42028 else
42029   supports=no
42030 fi
42031 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42032   ac_ext=cpp
42033 ac_cpp='$CXXCPP $CPPFLAGS'
42034 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42035 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42036 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42037 
42038   CFLAGS="$saved_cflags"
42039 
42040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42041 $as_echo "$supports" >&6; }
42042   if test "x$supports" = "xyes" ; then
42043     C_COMP_SUPPORTS="yes"
42044   else
42045     C_COMP_SUPPORTS="no"
42046   fi
42047 
42048 
42049   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42050 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42051   supports=yes
42052 
42053   saved_cxxflags="$CXXFLAGS"
42054   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42055   ac_ext=cpp
42056 ac_cpp='$CXXCPP $CPPFLAGS'
42057 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42058 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42059 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42060 
42061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42062 /* end confdefs.h.  */
42063 int i;
42064 _ACEOF
42065 if ac_fn_cxx_try_compile "$LINENO"; then :
42066 
42067 else
42068   supports=no
42069 fi
42070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42071   ac_ext=cpp
42072 ac_cpp='$CXXCPP $CPPFLAGS'
42073 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42074 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42075 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42076 
42077   CXXFLAGS="$saved_cxxflags"
42078 
42079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42080 $as_echo "$supports" >&6; }
42081   if test "x$supports" = "xyes" ; then
42082     CXX_COMP_SUPPORTS="yes"
42083   else
42084     CXX_COMP_SUPPORTS="no"
42085   fi
42086 
42087 
42088   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42089 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42090   supports=no
42091   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
42092 
42093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42094 $as_echo "$supports" >&6; }
42095   if test "x$supports" = "xyes" ; then
42096     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42097   else
42098     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42099   fi
42100 
42101 
42102 
42103 
42104 # Setup debug symbols (need objcopy from the toolchain for that)
42105 
42106   # Backwards compatibility. --with-native-debug-symbols is preferred post JDK-8207234,
42107   # but if somebody does not specify it via configure, we still want to preserve old
42108   # behaviour of --disable-debug-symbols
42109   #
42110   # ENABLE_DEBUG_SYMBOLS
42111   # This must be done after the toolchain is setup, since we're looking at objcopy.
42112   #
42113   # Check whether --enable-debug-symbols was given.
42114 if test "${enable_debug_symbols+set}" = set; then :
42115   enableval=$enable_debug_symbols;
42116 fi
42117 
42118 
42119   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42120 $as_echo_n "checking if we should generate debug symbols... " >&6; }
42121 
42122   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42123     # explicit enabling of enable-debug-symbols and can't find objcopy
42124     #   this is an error
42125     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42126   fi
42127 
42128   if test "x$enable_debug_symbols" = "xyes"; then
42129     ENABLE_DEBUG_SYMBOLS=true
42130   elif test "x$enable_debug_symbols" = "xno"; then
42131     ENABLE_DEBUG_SYMBOLS=false
42132   else
42133     # Default is on if objcopy is found
42134     if test "x$OBJCOPY" != x; then
42135       ENABLE_DEBUG_SYMBOLS=true
42136     # MacOS X and Windows don't use objcopy but default is on for those OSes
42137     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42138       ENABLE_DEBUG_SYMBOLS=true
42139     else
42140       ENABLE_DEBUG_SYMBOLS=false
42141     fi
42142   fi
42143 
42144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42145 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42146 
42147   # Backwards compatibility. --with-native-debug-symbols is preferred post JDK-8207234,
42148   # but if somebody does not specify it via configure, we still want to preserve old
42149   # behaviour of --disable-zip-debug-info.
42150   #
42151   # ZIP_DEBUGINFO_FILES
42152   #
42153   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42154 $as_echo_n "checking if we should zip debug-info files... " >&6; }
42155   # Check whether --enable-zip-debug-info was given.
42156 if test "${enable_zip_debug_info+set}" = set; then :
42157   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42158 else
42159   enable_zip_debug_info="yes"
42160 fi
42161 
42162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42163 $as_echo "${enable_zip_debug_info}" >&6; }
42164 
42165   if test "x${enable_zip_debug_info}" = "xno"; then
42166     ZIP_DEBUGINFO_FILES=false
42167   elif test "x${enable_zip_debug_info}" = "xyes"; then
42168     ZIP_DEBUGINFO_FILES=true
42169   fi
42170 
42171   #
42172   # NATIVE_DEBUG_SYMBOLS
42173   # This must be done after the toolchain is setup, since we're looking at objcopy.
42174   # In addition, this must be done after ENABLE_DEBUG_SYMBOLS and ZIP_DEBUGINFO_FILES
42175   # checking in order to preserve backwards compatibility post JDK-8207234.
42176   #
42177   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use (this will override previous settings)" >&5
42178 $as_echo_n "checking what type of native debug symbols to use (this will override previous settings)... " >&6; }
42179 
42180 # Check whether --with-native-debug-symbols was given.
42181 if test "${with_native_debug_symbols+set}" = set; then :
42182   withval=$with_native_debug_symbols;
42183         if test "x$OPENJDK_TARGET_OS" = xaix; then
42184           if test "x$with_native_debug_symbols" = xexternal || test "x$with_native_debug_symbols" = xzipped; then
42185             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
42186           fi
42187         fi
42188 
42189 else
42190 
42191         # Default to unset for backwards compatibility
42192         with_native_debug_symbols=""
42193 
42194 fi
42195 
42196   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
42197   if test "x$NATIVE_DEBUG_SYMBOLS" = x; then
42198     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not specified" >&5
42199 $as_echo "not specified" >&6; }
42200   else
42201     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
42202 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
42203   fi
42204   # Default is empty
42205   DEBUG_BINARIES=
42206   # Default is min_strip. Possible values are min_strip, all_strip, no_strip
42207   STRIP_POLICY=min_strip
42208 
42209   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
42210 
42211     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42212       if test "x$OBJCOPY" = x; then
42213         # enabling of enable-debug-symbols and can't find objcopy
42214         # this is an error
42215         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
42216       fi
42217     fi
42218 
42219     ENABLE_DEBUG_SYMBOLS=true
42220     STRIP_POLICY=min_strip
42221     ZIP_DEBUGINFO_FILES=true
42222   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
42223     ENABLE_DEBUG_SYMBOLS=false
42224     STRIP_POLICY=min_strip
42225     ZIP_DEBUGINFO_FILES=false
42226   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
42227     ENABLE_DEBUG_SYMBOLS=true
42228     STRIP_POLICY=no_strip
42229     ZIP_DEBUGINFO_FILES=false
42230     POST_STRIP_CMD=
42231     DEBUG_BINARIES=true
42232   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
42233 
42234     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42235       if test "x$OBJCOPY" = x; then
42236         # enabling of enable-debug-symbols and can't find objcopy
42237         # this is an error
42238         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
42239       fi
42240     fi
42241 
42242     ENABLE_DEBUG_SYMBOLS=true
42243     STRIP_POLICY=min_strip
42244     ZIP_DEBUGINFO_FILES=false
42245   elif test "x$NATIVE_DEBUG_SYMBOLS" != x; then
42246     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
42247   else
42248     { $as_echo "$as_me:${as_lineno-$LINENO}: --with-native-debug-symbols not specified. Using values from --disable-debug-symbols and --disable-zip-debug-info" >&5
42249 $as_echo "$as_me: --with-native-debug-symbols not specified. Using values from --disable-debug-symbols and --disable-zip-debug-info" >&6;}
42250   fi
42251 
42252 
42253 
42254 
42255 
42256 
42257 
42258 
42259 ###############################################################################
42260 #
42261 # Check dependencies for external and internal libraries.
42262 #
42263 ###############################################################################
42264 
42265 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42266 
42267   # When using cygwin or msys, we need a wrapper binary that renames
42268   # /cygdrive/c/ arguments into c:/ arguments and peeks into
42269   # @files and rewrites these too! This wrapper binary is
42270   # called fixpath.
42271   FIXPATH=
42272   if test "x$OPENJDK_BUILD_OS" = xwindows; then
42273     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42274 $as_echo_n "checking if fixpath can be created... " >&6; }
42275     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42276     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42277     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42278       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42279       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42280       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42281       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42282     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42283       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42284       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42285 
42286       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42287       # @ was chosen as separator to minimize risk of other tools messing around with it
42288       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42289       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42290 
42291       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42292     fi
42293     rm -f $OUTPUT_ROOT/fixpath*
42294     cd $OUTPUT_ROOT
42295     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42296     cd $CURDIR
42297 
42298     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42299       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42300 $as_echo "no" >&6; }
42301       cat $OUTPUT_ROOT/fixpath1.log
42302       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42303     fi
42304     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42305 $as_echo "yes" >&6; }
42306     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42307 $as_echo_n "checking if fixpath.exe works... " >&6; }
42308     cd $OUTPUT_ROOT
42309     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42310     cd $CURDIR
42311     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42312       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42313 $as_echo "no" >&6; }
42314       cat $OUTPUT_ROOT/fixpath2.log
42315       as_fn_error $? "fixpath did not work!" "$LINENO" 5
42316     fi
42317     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42318 $as_echo "yes" >&6; }
42319     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42320   fi
42321 
42322 
42323 
42324 
42325 
42326 
42327   ###############################################################################
42328   #
42329   # OS specific settings that we never will need to probe.
42330   #
42331   if test "x$OPENJDK_TARGET_OS" = xlinux; then
42332     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42333 $as_echo_n "checking what is not needed on Linux?... " >&6; }
42334     PULSE_NOT_NEEDED=yes
42335     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42336 $as_echo "pulse" >&6; }
42337   fi
42338 
42339   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42340     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42341 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
42342     ALSA_NOT_NEEDED=yes
42343     PULSE_NOT_NEEDED=yes
42344     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42345 $as_echo "alsa pulse" >&6; }
42346   fi
42347 
42348   if test "x$OPENJDK_TARGET_OS" = xaix; then
42349     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42350 $as_echo_n "checking what is not needed on AIX?... " >&6; }
42351     ALSA_NOT_NEEDED=yes
42352     PULSE_NOT_NEEDED=yes
42353     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42354 $as_echo "alsa pulse" >&6; }
42355   fi
42356 
42357 
42358   if test "x$OPENJDK_TARGET_OS" = xwindows; then
42359     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42360 $as_echo_n "checking what is not needed on Windows?... " >&6; }
42361     CUPS_NOT_NEEDED=yes
42362     ALSA_NOT_NEEDED=yes
42363     PULSE_NOT_NEEDED=yes
42364     X11_NOT_NEEDED=yes
42365     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42366 $as_echo "alsa cups pulse x11" >&6; }
42367   fi
42368 
42369   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42370     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42371 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42372     ALSA_NOT_NEEDED=yes
42373     PULSE_NOT_NEEDED=yes
42374     X11_NOT_NEEDED=yes
42375     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42376 $as_echo "alsa pulse x11" >&6; }
42377   fi
42378 
42379   if test "x$OPENJDK_TARGET_OS" = xbsd; then
42380     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42381 $as_echo_n "checking what is not needed on bsd?... " >&6; }
42382     ALSA_NOT_NEEDED=yes
42383     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42384 $as_echo "alsa" >&6; }
42385   fi
42386 
42387   if test "x$OPENJDK" = "xfalse"; then
42388     FREETYPE_NOT_NEEDED=yes
42389   fi
42390 
42391   if test "x$SUPPORT_HEADFUL" = xno; then
42392     X11_NOT_NEEDED=yes
42393   fi
42394 
42395   # Deprecated and now ignored
42396 
42397   # Check whether --enable-macosx-runtime-support was given.
42398 if test "${enable_macosx_runtime_support+set}" = set; then :
42399   enableval=$enable_macosx_runtime_support;
42400 fi
42401 
42402   if test "x$enable_macosx_runtime_support" != x; then
42403     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42404 $as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42405   fi
42406 
42407 
42408 
42409 
42410   ###############################################################################
42411   #
42412   # Check for X Windows
42413   #
42414 
42415   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42416   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42417   # --x-libraries for the sysroot, if that seems to be correct.
42418   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42419     if test "x$SYSROOT" != "x"; then
42420       if test "x$x_includes" = xNONE; then
42421         if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42422           x_includes="$SYSROOT/usr/X11R6/include"
42423         elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42424           x_includes="$SYSROOT/usr/include"
42425         fi
42426       fi
42427       if test "x$x_libraries" = xNONE; then
42428         if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42429           x_libraries="$SYSROOT/usr/X11R6/lib"
42430         elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42431           x_libraries="$SYSROOT/usr/lib64"
42432         elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42433           x_libraries="$SYSROOT/usr/lib"
42434         fi
42435       fi
42436     fi
42437   fi
42438 
42439   # Now let autoconf do it's magic
42440   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42441 $as_echo_n "checking for X... " >&6; }
42442 
42443 
42444 # Check whether --with-x was given.
42445 if test "${with_x+set}" = set; then :
42446   withval=$with_x;
42447 fi
42448 
42449 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42450 if test "x$with_x" = xno; then
42451   # The user explicitly disabled X.
42452   have_x=disabled
42453 else
42454   case $x_includes,$x_libraries in #(
42455     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42456     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42457   $as_echo_n "(cached) " >&6
42458 else
42459   # One or both of the vars are not set, and there is no cached value.
42460 ac_x_includes=no ac_x_libraries=no
42461 rm -f -r conftest.dir
42462 if mkdir conftest.dir; then
42463   cd conftest.dir
42464   cat >Imakefile <<'_ACEOF'
42465 incroot:
42466         @echo incroot='${INCROOT}'
42467 usrlibdir:
42468         @echo usrlibdir='${USRLIBDIR}'
42469 libdir:
42470         @echo libdir='${LIBDIR}'
42471 _ACEOF
42472   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42473     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42474     for ac_var in incroot usrlibdir libdir; do
42475       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42476     done
42477     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42478     for ac_extension in a so sl dylib la dll; do
42479       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42480          test -f "$ac_im_libdir/libX11.$ac_extension"; then
42481         ac_im_usrlibdir=$ac_im_libdir; break
42482       fi
42483     done
42484     # Screen out bogus values from the imake configuration.  They are
42485     # bogus both because they are the default anyway, and because
42486     # using them would break gcc on systems where it needs fixed includes.
42487     case $ac_im_incroot in
42488         /usr/include) ac_x_includes= ;;
42489         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42490     esac
42491     case $ac_im_usrlibdir in
42492         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
42493         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42494     esac
42495   fi
42496   cd ..
42497   rm -f -r conftest.dir
42498 fi
42499 
42500 # Standard set of common directories for X headers.
42501 # Check X11 before X11Rn because it is often a symlink to the current release.
42502 ac_x_header_dirs='
42503 /usr/X11/include
42504 /usr/X11R7/include
42505 /usr/X11R6/include
42506 /usr/X11R5/include
42507 /usr/X11R4/include
42508 
42509 /usr/include/X11
42510 /usr/include/X11R7
42511 /usr/include/X11R6
42512 /usr/include/X11R5
42513 /usr/include/X11R4
42514 
42515 /usr/local/X11/include
42516 /usr/local/X11R7/include
42517 /usr/local/X11R6/include
42518 /usr/local/X11R5/include
42519 /usr/local/X11R4/include
42520 
42521 /usr/local/include/X11
42522 /usr/local/include/X11R7
42523 /usr/local/include/X11R6
42524 /usr/local/include/X11R5
42525 /usr/local/include/X11R4
42526 
42527 /usr/X386/include
42528 /usr/x386/include
42529 /usr/XFree86/include/X11
42530 
42531 /usr/include
42532 /usr/local/include
42533 /usr/unsupported/include
42534 /usr/athena/include
42535 /usr/local/x11r5/include
42536 /usr/lpp/Xamples/include
42537 
42538 /usr/openwin/include
42539 /usr/openwin/share/include'
42540 
42541 if test "$ac_x_includes" = no; then
42542   # Guess where to find include files, by looking for Xlib.h.
42543   # First, try using that file with no special directory specified.
42544   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42545 /* end confdefs.h.  */
42546 #include <X11/Xlib.h>
42547 _ACEOF
42548 if ac_fn_cxx_try_cpp "$LINENO"; then :
42549   # We can compile using X headers with no special include directory.
42550 ac_x_includes=
42551 else
42552   for ac_dir in $ac_x_header_dirs; do
42553   if test -r "$ac_dir/X11/Xlib.h"; then
42554     ac_x_includes=$ac_dir
42555     break
42556   fi
42557 done
42558 fi
42559 rm -f conftest.err conftest.i conftest.$ac_ext
42560 fi # $ac_x_includes = no
42561 
42562 if test "$ac_x_libraries" = no; then
42563   # Check for the libraries.
42564   # See if we find them without any special options.
42565   # Don't add to $LIBS permanently.
42566   ac_save_LIBS=$LIBS
42567   LIBS="-lX11 $LIBS"
42568   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42569 /* end confdefs.h.  */
42570 #include <X11/Xlib.h>
42571 int
42572 main ()
42573 {
42574 XrmInitialize ()
42575   ;
42576   return 0;
42577 }
42578 _ACEOF
42579 if ac_fn_cxx_try_link "$LINENO"; then :
42580   LIBS=$ac_save_LIBS
42581 # We can link X programs with no special library path.
42582 ac_x_libraries=
42583 else
42584   LIBS=$ac_save_LIBS
42585 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42586 do
42587   # Don't even attempt the hair of trying to link an X program!
42588   for ac_extension in a so sl dylib la dll; do
42589     if test -r "$ac_dir/libX11.$ac_extension"; then
42590       ac_x_libraries=$ac_dir
42591       break 2
42592     fi
42593   done
42594 done
42595 fi
42596 rm -f core conftest.err conftest.$ac_objext \
42597     conftest$ac_exeext conftest.$ac_ext
42598 fi # $ac_x_libraries = no
42599 
42600 case $ac_x_includes,$ac_x_libraries in #(
42601   no,* | *,no | *\'*)
42602     # Didn't find X, or a directory has "'" in its name.
42603     ac_cv_have_x="have_x=no";; #(
42604   *)
42605     # Record where we found X for the cache.
42606     ac_cv_have_x="have_x=yes\
42607         ac_x_includes='$ac_x_includes'\
42608         ac_x_libraries='$ac_x_libraries'"
42609 esac
42610 fi
42611 ;; #(
42612     *) have_x=yes;;
42613   esac
42614   eval "$ac_cv_have_x"
42615 fi # $with_x != no
42616 
42617 if test "$have_x" != yes; then
42618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42619 $as_echo "$have_x" >&6; }
42620   no_x=yes
42621 else
42622   # If each of the values was on the command line, it overrides each guess.
42623   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42624   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42625   # Update the cache value to reflect the command line values.
42626   ac_cv_have_x="have_x=yes\
42627         ac_x_includes='$x_includes'\
42628         ac_x_libraries='$x_libraries'"
42629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42630 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42631 fi
42632 
42633   if test "$no_x" = yes; then
42634   # Not all programs may use this symbol, but it does not hurt to define it.
42635 
42636 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42637 
42638   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42639 else
42640   if test -n "$x_includes"; then
42641     X_CFLAGS="$X_CFLAGS -I$x_includes"
42642   fi
42643 
42644   # It would also be nice to do this for all -L options, not just this one.
42645   if test -n "$x_libraries"; then
42646     X_LIBS="$X_LIBS -L$x_libraries"
42647     # For Solaris; some versions of Sun CC require a space after -R and
42648     # others require no space.  Words are not sufficient . . . .
42649     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42650 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
42651     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42652     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42653     ac_cxx_werror_flag=yes
42654     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42655 /* end confdefs.h.  */
42656 
42657 int
42658 main ()
42659 {
42660 
42661   ;
42662   return 0;
42663 }
42664 _ACEOF
42665 if ac_fn_cxx_try_link "$LINENO"; then :
42666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42667 $as_echo "no" >&6; }
42668        X_LIBS="$X_LIBS -R$x_libraries"
42669 else
42670   LIBS="$ac_xsave_LIBS -R $x_libraries"
42671        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42672 /* end confdefs.h.  */
42673 
42674 int
42675 main ()
42676 {
42677 
42678   ;
42679   return 0;
42680 }
42681 _ACEOF
42682 if ac_fn_cxx_try_link "$LINENO"; then :
42683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42684 $as_echo "yes" >&6; }
42685           X_LIBS="$X_LIBS -R $x_libraries"
42686 else
42687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42688 $as_echo "neither works" >&6; }
42689 fi
42690 rm -f core conftest.err conftest.$ac_objext \
42691     conftest$ac_exeext conftest.$ac_ext
42692 fi
42693 rm -f core conftest.err conftest.$ac_objext \
42694     conftest$ac_exeext conftest.$ac_ext
42695     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42696     LIBS=$ac_xsave_LIBS
42697   fi
42698 
42699   # Check for system-dependent libraries X programs must link with.
42700   # Do this before checking for the system-independent R6 libraries
42701   # (-lICE), since we may need -lsocket or whatever for X linking.
42702 
42703   if test "$ISC" = yes; then
42704     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42705   else
42706     # Martyn Johnson says this is needed for Ultrix, if the X
42707     # libraries were built with DECnet support.  And Karl Berry says
42708     # the Alpha needs dnet_stub (dnet does not exist).
42709     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42710     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42711 /* end confdefs.h.  */
42712 
42713 /* Override any GCC internal prototype to avoid an error.
42714    Use char because int might match the return type of a GCC
42715    builtin and then its argument prototype would still apply.  */
42716 #ifdef __cplusplus
42717 extern "C"
42718 #endif
42719 char XOpenDisplay ();
42720 int
42721 main ()
42722 {
42723 return XOpenDisplay ();
42724   ;
42725   return 0;
42726 }
42727 _ACEOF
42728 if ac_fn_cxx_try_link "$LINENO"; then :
42729 
42730 else
42731   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42732 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42733 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42734   $as_echo_n "(cached) " >&6
42735 else
42736   ac_check_lib_save_LIBS=$LIBS
42737 LIBS="-ldnet  $LIBS"
42738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42739 /* end confdefs.h.  */
42740 
42741 /* Override any GCC internal prototype to avoid an error.
42742    Use char because int might match the return type of a GCC
42743    builtin and then its argument prototype would still apply.  */
42744 #ifdef __cplusplus
42745 extern "C"
42746 #endif
42747 char dnet_ntoa ();
42748 int
42749 main ()
42750 {
42751 return dnet_ntoa ();
42752   ;
42753   return 0;
42754 }
42755 _ACEOF
42756 if ac_fn_cxx_try_link "$LINENO"; then :
42757   ac_cv_lib_dnet_dnet_ntoa=yes
42758 else
42759   ac_cv_lib_dnet_dnet_ntoa=no
42760 fi
42761 rm -f core conftest.err conftest.$ac_objext \
42762     conftest$ac_exeext conftest.$ac_ext
42763 LIBS=$ac_check_lib_save_LIBS
42764 fi
42765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42766 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42767 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42768   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42769 fi
42770 
42771     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42772       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42773 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42774 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42775   $as_echo_n "(cached) " >&6
42776 else
42777   ac_check_lib_save_LIBS=$LIBS
42778 LIBS="-ldnet_stub  $LIBS"
42779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42780 /* end confdefs.h.  */
42781 
42782 /* Override any GCC internal prototype to avoid an error.
42783    Use char because int might match the return type of a GCC
42784    builtin and then its argument prototype would still apply.  */
42785 #ifdef __cplusplus
42786 extern "C"
42787 #endif
42788 char dnet_ntoa ();
42789 int
42790 main ()
42791 {
42792 return dnet_ntoa ();
42793   ;
42794   return 0;
42795 }
42796 _ACEOF
42797 if ac_fn_cxx_try_link "$LINENO"; then :
42798   ac_cv_lib_dnet_stub_dnet_ntoa=yes
42799 else
42800   ac_cv_lib_dnet_stub_dnet_ntoa=no
42801 fi
42802 rm -f core conftest.err conftest.$ac_objext \
42803     conftest$ac_exeext conftest.$ac_ext
42804 LIBS=$ac_check_lib_save_LIBS
42805 fi
42806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42807 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42808 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42809   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42810 fi
42811 
42812     fi
42813 fi
42814 rm -f core conftest.err conftest.$ac_objext \
42815     conftest$ac_exeext conftest.$ac_ext
42816     LIBS="$ac_xsave_LIBS"
42817 
42818     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42819     # to get the SysV transport functions.
42820     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42821     # needs -lnsl.
42822     # The nsl library prevents programs from opening the X display
42823     # on Irix 5.2, according to T.E. Dickey.
42824     # The functions gethostbyname, getservbyname, and inet_addr are
42825     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42826     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42827 if test "x$ac_cv_func_gethostbyname" = xyes; then :
42828 
42829 fi
42830 
42831     if test $ac_cv_func_gethostbyname = no; then
42832       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42833 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42834 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42835   $as_echo_n "(cached) " >&6
42836 else
42837   ac_check_lib_save_LIBS=$LIBS
42838 LIBS="-lnsl  $LIBS"
42839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42840 /* end confdefs.h.  */
42841 
42842 /* Override any GCC internal prototype to avoid an error.
42843    Use char because int might match the return type of a GCC
42844    builtin and then its argument prototype would still apply.  */
42845 #ifdef __cplusplus
42846 extern "C"
42847 #endif
42848 char gethostbyname ();
42849 int
42850 main ()
42851 {
42852 return gethostbyname ();
42853   ;
42854   return 0;
42855 }
42856 _ACEOF
42857 if ac_fn_cxx_try_link "$LINENO"; then :
42858   ac_cv_lib_nsl_gethostbyname=yes
42859 else
42860   ac_cv_lib_nsl_gethostbyname=no
42861 fi
42862 rm -f core conftest.err conftest.$ac_objext \
42863     conftest$ac_exeext conftest.$ac_ext
42864 LIBS=$ac_check_lib_save_LIBS
42865 fi
42866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42867 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42868 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42869   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42870 fi
42871 
42872       if test $ac_cv_lib_nsl_gethostbyname = no; then
42873         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42874 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42875 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42876   $as_echo_n "(cached) " >&6
42877 else
42878   ac_check_lib_save_LIBS=$LIBS
42879 LIBS="-lbsd  $LIBS"
42880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42881 /* end confdefs.h.  */
42882 
42883 /* Override any GCC internal prototype to avoid an error.
42884    Use char because int might match the return type of a GCC
42885    builtin and then its argument prototype would still apply.  */
42886 #ifdef __cplusplus
42887 extern "C"
42888 #endif
42889 char gethostbyname ();
42890 int
42891 main ()
42892 {
42893 return gethostbyname ();
42894   ;
42895   return 0;
42896 }
42897 _ACEOF
42898 if ac_fn_cxx_try_link "$LINENO"; then :
42899   ac_cv_lib_bsd_gethostbyname=yes
42900 else
42901   ac_cv_lib_bsd_gethostbyname=no
42902 fi
42903 rm -f core conftest.err conftest.$ac_objext \
42904     conftest$ac_exeext conftest.$ac_ext
42905 LIBS=$ac_check_lib_save_LIBS
42906 fi
42907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42908 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42909 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42910   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42911 fi
42912 
42913       fi
42914     fi
42915 
42916     # lieder@skyler.mavd.honeywell.com says without -lsocket,
42917     # socket/setsockopt and other routines are undefined under SCO ODT
42918     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42919     # on later versions), says Simon Leinen: it contains gethostby*
42920     # variants that don't use the name server (or something).  -lsocket
42921     # must be given before -lnsl if both are needed.  We assume that
42922     # if connect needs -lnsl, so does gethostbyname.
42923     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42924 if test "x$ac_cv_func_connect" = xyes; then :
42925 
42926 fi
42927 
42928     if test $ac_cv_func_connect = no; then
42929       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42930 $as_echo_n "checking for connect in -lsocket... " >&6; }
42931 if ${ac_cv_lib_socket_connect+:} false; then :
42932   $as_echo_n "(cached) " >&6
42933 else
42934   ac_check_lib_save_LIBS=$LIBS
42935 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42937 /* end confdefs.h.  */
42938 
42939 /* Override any GCC internal prototype to avoid an error.
42940    Use char because int might match the return type of a GCC
42941    builtin and then its argument prototype would still apply.  */
42942 #ifdef __cplusplus
42943 extern "C"
42944 #endif
42945 char connect ();
42946 int
42947 main ()
42948 {
42949 return connect ();
42950   ;
42951   return 0;
42952 }
42953 _ACEOF
42954 if ac_fn_cxx_try_link "$LINENO"; then :
42955   ac_cv_lib_socket_connect=yes
42956 else
42957   ac_cv_lib_socket_connect=no
42958 fi
42959 rm -f core conftest.err conftest.$ac_objext \
42960     conftest$ac_exeext conftest.$ac_ext
42961 LIBS=$ac_check_lib_save_LIBS
42962 fi
42963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42964 $as_echo "$ac_cv_lib_socket_connect" >&6; }
42965 if test "x$ac_cv_lib_socket_connect" = xyes; then :
42966   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42967 fi
42968 
42969     fi
42970 
42971     # Guillermo Gomez says -lposix is necessary on A/UX.
42972     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42973 if test "x$ac_cv_func_remove" = xyes; then :
42974 
42975 fi
42976 
42977     if test $ac_cv_func_remove = no; then
42978       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42979 $as_echo_n "checking for remove in -lposix... " >&6; }
42980 if ${ac_cv_lib_posix_remove+:} false; then :
42981   $as_echo_n "(cached) " >&6
42982 else
42983   ac_check_lib_save_LIBS=$LIBS
42984 LIBS="-lposix  $LIBS"
42985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42986 /* end confdefs.h.  */
42987 
42988 /* Override any GCC internal prototype to avoid an error.
42989    Use char because int might match the return type of a GCC
42990    builtin and then its argument prototype would still apply.  */
42991 #ifdef __cplusplus
42992 extern "C"
42993 #endif
42994 char remove ();
42995 int
42996 main ()
42997 {
42998 return remove ();
42999   ;
43000   return 0;
43001 }
43002 _ACEOF
43003 if ac_fn_cxx_try_link "$LINENO"; then :
43004   ac_cv_lib_posix_remove=yes
43005 else
43006   ac_cv_lib_posix_remove=no
43007 fi
43008 rm -f core conftest.err conftest.$ac_objext \
43009     conftest$ac_exeext conftest.$ac_ext
43010 LIBS=$ac_check_lib_save_LIBS
43011 fi
43012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43013 $as_echo "$ac_cv_lib_posix_remove" >&6; }
43014 if test "x$ac_cv_lib_posix_remove" = xyes; then :
43015   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43016 fi
43017 
43018     fi
43019 
43020     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43021     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43022 if test "x$ac_cv_func_shmat" = xyes; then :
43023 
43024 fi
43025 
43026     if test $ac_cv_func_shmat = no; then
43027       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43028 $as_echo_n "checking for shmat in -lipc... " >&6; }
43029 if ${ac_cv_lib_ipc_shmat+:} false; then :
43030   $as_echo_n "(cached) " >&6
43031 else
43032   ac_check_lib_save_LIBS=$LIBS
43033 LIBS="-lipc  $LIBS"
43034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43035 /* end confdefs.h.  */
43036 
43037 /* Override any GCC internal prototype to avoid an error.
43038    Use char because int might match the return type of a GCC
43039    builtin and then its argument prototype would still apply.  */
43040 #ifdef __cplusplus
43041 extern "C"
43042 #endif
43043 char shmat ();
43044 int
43045 main ()
43046 {
43047 return shmat ();
43048   ;
43049   return 0;
43050 }
43051 _ACEOF
43052 if ac_fn_cxx_try_link "$LINENO"; then :
43053   ac_cv_lib_ipc_shmat=yes
43054 else
43055   ac_cv_lib_ipc_shmat=no
43056 fi
43057 rm -f core conftest.err conftest.$ac_objext \
43058     conftest$ac_exeext conftest.$ac_ext
43059 LIBS=$ac_check_lib_save_LIBS
43060 fi
43061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43062 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43063 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43064   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43065 fi
43066 
43067     fi
43068   fi
43069 
43070   # Check for libraries that X11R6 Xt/Xaw programs need.
43071   ac_save_LDFLAGS=$LDFLAGS
43072   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43073   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43074   # check for ICE first), but we must link in the order -lSM -lICE or
43075   # we get undefined symbols.  So assume we have SM if we have ICE.
43076   # These have to be linked with before -lX11, unlike the other
43077   # libraries we check for below, so use a different variable.
43078   # John Interrante, Karl Berry
43079   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43080 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43081 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43082   $as_echo_n "(cached) " >&6
43083 else
43084   ac_check_lib_save_LIBS=$LIBS
43085 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43087 /* end confdefs.h.  */
43088 
43089 /* Override any GCC internal prototype to avoid an error.
43090    Use char because int might match the return type of a GCC
43091    builtin and then its argument prototype would still apply.  */
43092 #ifdef __cplusplus
43093 extern "C"
43094 #endif
43095 char IceConnectionNumber ();
43096 int
43097 main ()
43098 {
43099 return IceConnectionNumber ();
43100   ;
43101   return 0;
43102 }
43103 _ACEOF
43104 if ac_fn_cxx_try_link "$LINENO"; then :
43105   ac_cv_lib_ICE_IceConnectionNumber=yes
43106 else
43107   ac_cv_lib_ICE_IceConnectionNumber=no
43108 fi
43109 rm -f core conftest.err conftest.$ac_objext \
43110     conftest$ac_exeext conftest.$ac_ext
43111 LIBS=$ac_check_lib_save_LIBS
43112 fi
43113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43114 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43115 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43116   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43117 fi
43118 
43119   LDFLAGS=$ac_save_LDFLAGS
43120 
43121 fi
43122 
43123 
43124   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43125   # this doesn't make sense so we remove it.
43126   if test "x$COMPILE_TYPE" = xcross; then
43127     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43128   fi
43129 
43130   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43131 
43132   # Print a helpful message on how to acquire the necessary build dependency.
43133   # x11 is the help tag: freetype, cups, pulse, alsa etc
43134   MISSING_DEPENDENCY=x11
43135 
43136   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43137     cygwin_help $MISSING_DEPENDENCY
43138   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43139     msys_help $MISSING_DEPENDENCY
43140   else
43141     PKGHANDLER_COMMAND=
43142 
43143     case $PKGHANDLER in
43144       apt-get)
43145         apt_help     $MISSING_DEPENDENCY ;;
43146       yum)
43147         yum_help     $MISSING_DEPENDENCY ;;
43148       port)
43149         port_help    $MISSING_DEPENDENCY ;;
43150       pkgutil)
43151         pkgutil_help $MISSING_DEPENDENCY ;;
43152       pkgadd)
43153         pkgadd_help  $MISSING_DEPENDENCY ;;
43154     esac
43155 
43156     if test "x$PKGHANDLER_COMMAND" != x; then
43157       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43158     fi
43159   fi
43160 
43161     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43162   fi
43163 
43164 
43165   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43166     OPENWIN_HOME="/usr/openwin"
43167     X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43168     X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43169         -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43170         -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43171         -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43172   fi
43173 
43174   #
43175   # Weird Sol10 something check...TODO change to try compile
43176   #
43177   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43178     if test "`uname -r`" = "5.10"; then
43179       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43180         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43181       fi
43182     fi
43183   fi
43184 
43185   ac_ext=c
43186 ac_cpp='$CPP $CPPFLAGS'
43187 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43188 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43189 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43190 
43191   OLD_CFLAGS="$CFLAGS"
43192   CFLAGS="$CFLAGS $X_CFLAGS"
43193 
43194   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43195   for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43196 do :
43197   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43198 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43199         # include <X11/Xlib.h>
43200         # include <X11/Xutil.h>
43201 
43202 
43203 "
43204 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43205   cat >>confdefs.h <<_ACEOF
43206 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43207 _ACEOF
43208  X11_A_OK=yes
43209 else
43210   X11_A_OK=no; break
43211 fi
43212 
43213 done
43214 
43215 
43216   CFLAGS="$OLD_CFLAGS"
43217   ac_ext=cpp
43218 ac_cpp='$CXXCPP $CPPFLAGS'
43219 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43220 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43221 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43222 
43223 
43224   if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43225 
43226   # Print a helpful message on how to acquire the necessary build dependency.
43227   # x11 is the help tag: freetype, cups, pulse, alsa etc
43228   MISSING_DEPENDENCY=x11
43229 
43230   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43231     cygwin_help $MISSING_DEPENDENCY
43232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43233     msys_help $MISSING_DEPENDENCY
43234   else
43235     PKGHANDLER_COMMAND=
43236 
43237     case $PKGHANDLER in
43238       apt-get)
43239         apt_help     $MISSING_DEPENDENCY ;;
43240       yum)
43241         yum_help     $MISSING_DEPENDENCY ;;
43242       port)
43243         port_help    $MISSING_DEPENDENCY ;;
43244       pkgutil)
43245         pkgutil_help $MISSING_DEPENDENCY ;;
43246       pkgadd)
43247         pkgadd_help  $MISSING_DEPENDENCY ;;
43248     esac
43249 
43250     if test "x$PKGHANDLER_COMMAND" != x; then
43251       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43252     fi
43253   fi
43254 
43255     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43256   fi
43257 
43258 
43259 
43260 
43261 
43262 
43263   ###############################################################################
43264   #
43265   # The common unix printing system cups is used to print from java.
43266   #
43267 
43268 # Check whether --with-cups was given.
43269 if test "${with_cups+set}" = set; then :
43270   withval=$with_cups;
43271 fi
43272 
43273 
43274 # Check whether --with-cups-include was given.
43275 if test "${with_cups_include+set}" = set; then :
43276   withval=$with_cups_include;
43277 fi
43278 
43279 
43280   if test "x$CUPS_NOT_NEEDED" = xyes; then
43281     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43282       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43283 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43284     fi
43285     CUPS_CFLAGS=
43286   else
43287     CUPS_FOUND=no
43288 
43289     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43290       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43291     fi
43292 
43293     if test "x${with_cups}" != x; then
43294       CUPS_CFLAGS="-I${with_cups}/include"
43295       CUPS_FOUND=yes
43296     fi
43297     if test "x${with_cups_include}" != x; then
43298       CUPS_CFLAGS="-I${with_cups_include}"
43299       CUPS_FOUND=yes
43300     fi
43301     if test "x$CUPS_FOUND" = xno; then
43302 
43303 
43304   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43305     # Source the builddeps file again, to make sure it uses the latest variables!
43306     . $builddepsfile
43307     # Look for a target and build machine specific resource!
43308     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43309     if test "x$resource" = x; then
43310       # Ok, lets instead look for a target specific resource
43311       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43312     fi
43313     if test "x$resource" = x; then
43314       # Ok, lets instead look for a build specific resource
43315       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43316     fi
43317     if test "x$resource" = x; then
43318       # Ok, lets instead look for a generic resource
43319       # (The cups comes from M4 and not the shell, thus no need for eval here.)
43320       resource=${builddep_cups}
43321     fi
43322     if test "x$resource" != x; then
43323       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43324 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43325       # If the resource in the builddeps.conf file is an existing directory,
43326       # for example /java/linux/cups
43327       if test -d ${resource}; then
43328         depdir=${resource}
43329       else
43330 
43331   # cups is for example mymodule
43332   # $resource is for example libs/general/libmymod_1_2_3.zip
43333   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43334   # $with_builddeps_dir is for example /localhome/builddeps
43335   # depdir is the name of the variable into which we store the depdir, eg MYMOD
43336   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43337   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43338   filename=`basename $resource`
43339   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43340   filebase=${filename%%.*}
43341   extension=${filename#*.}
43342   installdir=$with_builddeps_dir/$filebase
43343   if test ! -f $installdir/$filename.unpacked; then
43344     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43345 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43346     if test ! -d $installdir; then
43347       mkdir -p $installdir
43348     fi
43349     if test ! -d $installdir; then
43350       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43351     fi
43352     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43353     touch $tmpfile
43354     if test ! -f $tmpfile; then
43355       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43356     fi
43357 
43358   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43359   # $tmpfile is the local file name for the downloaded file.
43360   VALID_TOOL=no
43361   if test "x$BDEPS_FTP" = xwget; then
43362     VALID_TOOL=yes
43363     wget -O $tmpfile $with_builddeps_server/$resource
43364   fi
43365   if test "x$BDEPS_FTP" = xlftp; then
43366     VALID_TOOL=yes
43367     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43368   fi
43369   if test "x$BDEPS_FTP" = xftp; then
43370     VALID_TOOL=yes
43371     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43372     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43373     FTPUSERPWD=${FTPSERVER%%@*}
43374     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43375       FTPUSER=${userpwd%%:*}
43376       FTPPWD=${userpwd#*@}
43377       FTPSERVER=${FTPSERVER#*@}
43378     else
43379       FTPUSER=ftp
43380       FTPPWD=ftp
43381     fi
43382     # the "pass" command does not work on some
43383     # ftp clients (read ftp.exe) but if it works,
43384     # passive mode is better!
43385     ( \
43386         echo "user $FTPUSER $FTPPWD"        ; \
43387         echo "pass"                         ; \
43388         echo "bin"                          ; \
43389         echo "get $FTPPATH $tmpfile"              ; \
43390     ) | ftp -in $FTPSERVER
43391   fi
43392   if test "x$VALID_TOOL" != xyes; then
43393     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43394   fi
43395 
43396     mv $tmpfile $installdir/$filename
43397     if test ! -s $installdir/$filename; then
43398       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43399     fi
43400     case "$extension" in
43401       zip)  echo "Unzipping $installdir/$filename..."
43402         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43403         ;;
43404       tar.gz) echo "Untaring $installdir/$filename..."
43405         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43406         ;;
43407       tgz) echo "Untaring $installdir/$filename..."
43408         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43409         ;;
43410       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43411         ;;
43412     esac
43413   fi
43414   if test -f $installdir/$filename.unpacked; then
43415     depdir=$installdir
43416   fi
43417 
43418       fi
43419       # Source the builddeps file again, because in the previous command, the depdir
43420       # was updated to point at the current build dependency install directory.
43421       . $builddepsfile
43422       # Now extract variables from the builddeps.conf files.
43423       theroot=${builddep_cups_ROOT}
43424       thecflags=${builddep_cups_CFLAGS}
43425       thelibs=${builddep_cups_LIBS}
43426       if test "x$depdir" = x; then
43427         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43428       fi
43429       CUPS=$depdir
43430       if test "x$theroot" != x; then
43431         CUPS="$theroot"
43432       fi
43433       if test "x$thecflags" != x; then
43434         CUPS_CFLAGS="$thecflags"
43435       fi
43436       if test "x$thelibs" != x; then
43437         CUPS_LIBS="$thelibs"
43438       fi
43439       CUPS_FOUND=yes
43440 
43441     fi
43442 
43443   fi
43444 
43445     fi
43446     if test "x$CUPS_FOUND" = xno; then
43447       # Are the cups headers installed in the default /usr/include location?
43448       for ac_header in cups/cups.h cups/ppd.h
43449 do :
43450   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43451 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43452 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43453   cat >>confdefs.h <<_ACEOF
43454 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43455 _ACEOF
43456 
43457             CUPS_FOUND=yes
43458             CUPS_CFLAGS=
43459             DEFAULT_CUPS=yes
43460 
43461 
43462 fi
43463 
43464 done
43465 
43466     fi
43467     if test "x$CUPS_FOUND" = xno; then
43468       # Getting nervous now? Lets poke around for standard Solaris third-party
43469       # package installation locations.
43470       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43471 $as_echo_n "checking for cups headers... " >&6; }
43472       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43473         # An SFW package seems to be installed!
43474         CUPS_FOUND=yes
43475         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43476       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43477         # A CSW package seems to be installed!
43478         CUPS_FOUND=yes
43479         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43480       fi
43481       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43482 $as_echo "$CUPS_FOUND" >&6; }
43483     fi
43484     if test "x$CUPS_FOUND" = xno; then
43485 
43486   # Print a helpful message on how to acquire the necessary build dependency.
43487   # cups is the help tag: freetype, cups, pulse, alsa etc
43488   MISSING_DEPENDENCY=cups
43489 
43490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43491     cygwin_help $MISSING_DEPENDENCY
43492   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43493     msys_help $MISSING_DEPENDENCY
43494   else
43495     PKGHANDLER_COMMAND=
43496 
43497     case $PKGHANDLER in
43498       apt-get)
43499         apt_help     $MISSING_DEPENDENCY ;;
43500       yum)
43501         yum_help     $MISSING_DEPENDENCY ;;
43502       port)
43503         port_help    $MISSING_DEPENDENCY ;;
43504       pkgutil)
43505         pkgutil_help $MISSING_DEPENDENCY ;;
43506       pkgadd)
43507         pkgadd_help  $MISSING_DEPENDENCY ;;
43508     esac
43509 
43510     if test "x$PKGHANDLER_COMMAND" != x; then
43511       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43512     fi
43513   fi
43514 
43515       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43516     fi
43517   fi
43518 
43519 
43520 
43521 
43522 
43523 
43524   ###############################################################################
43525   #
43526   # The ubiquitous freetype library is used to render fonts.
43527   #
43528 
43529 # Check whether --with-freetype was given.
43530 if test "${with_freetype+set}" = set; then :
43531   withval=$with_freetype;
43532 fi
43533 
43534 
43535 # Check whether --with-freetype-include was given.
43536 if test "${with_freetype_include+set}" = set; then :
43537   withval=$with_freetype_include;
43538 fi
43539 
43540 
43541 # Check whether --with-freetype-lib was given.
43542 if test "${with_freetype_lib+set}" = set; then :
43543   withval=$with_freetype_lib;
43544 fi
43545 
43546 
43547 # Check whether --with-freetype-src was given.
43548 if test "${with_freetype_src+set}" = set; then :
43549   withval=$with_freetype_src;
43550 fi
43551 
43552   # Check whether --enable-freetype-bundling was given.
43553 if test "${enable_freetype_bundling+set}" = set; then :
43554   enableval=$enable_freetype_bundling;
43555 fi
43556 
43557 
43558   FREETYPE_CFLAGS=
43559   FREETYPE_LIBS=
43560   FREETYPE_BUNDLE_LIB_PATH=
43561 
43562   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43563     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
43564       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43565 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43566     fi
43567     if test "x$enable_freetype_bundling" != x; then
43568       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43569 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43570     fi
43571   else
43572     # freetype is needed to build; go get it!
43573 
43574     BUNDLE_FREETYPE="$enable_freetype_bundling"
43575 
43576     if  test "x$with_freetype_src" != x; then
43577       if test "x$OPENJDK_TARGET_OS" = xwindows; then
43578         # Try to build freetype if --with-freetype-src was given on Windows
43579 
43580   FREETYPE_SRC_PATH="$with_freetype_src"
43581   BUILD_FREETYPE=yes
43582 
43583   # Check if the freetype sources are acessible..
43584   if ! test -d $FREETYPE_SRC_PATH; then
43585     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
43586 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
43587     BUILD_FREETYPE=no
43588   fi
43589   # ..and contain a vc2010 project file
43590   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
43591   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
43592     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
43593 $as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
43594     BUILD_FREETYPE=no
43595   fi
43596   # Now check if configure found a version of 'msbuild.exe'
43597   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
43598     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
43599 $as_echo "$as_me: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
43600     BUILD_FREETYPE=no
43601   fi
43602 
43603   # Ready to go..
43604   if test "x$BUILD_FREETYPE" = xyes; then
43605 
43606     # msbuild requires trailing slashes for output directories
43607     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
43608     freetype_lib_path_unix="$freetype_lib_path"
43609     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
43610 
43611   unix_path="$vcxproj_path"
43612   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43613     windows_path=`$CYGPATH -m "$unix_path"`
43614     vcxproj_path="$windows_path"
43615   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43616     windows_path=`cmd //c echo $unix_path`
43617     vcxproj_path="$windows_path"
43618   fi
43619 
43620 
43621   unix_path="$freetype_lib_path"
43622   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43623     windows_path=`$CYGPATH -m "$unix_path"`
43624     freetype_lib_path="$windows_path"
43625   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43626     windows_path=`cmd //c echo $unix_path`
43627     freetype_lib_path="$windows_path"
43628   fi
43629 
43630 
43631   unix_path="$freetype_obj_path"
43632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43633     windows_path=`$CYGPATH -m "$unix_path"`
43634     freetype_obj_path="$windows_path"
43635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43636     windows_path=`cmd //c echo $unix_path`
43637     freetype_obj_path="$windows_path"
43638   fi
43639 
43640     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43641       freetype_platform=x64
43642     else
43643       freetype_platform=win32
43644     fi
43645 
43646     # The original freetype project file is for VS 2010 (i.e. 'v100'),
43647     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
43648     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
43649     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
43650     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
43651 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
43652 
43653     # First we try to build the freetype.dll
43654     $ECHO -e "@echo off\n"\
43655              "$MSBUILD $vcxproj_path "\
43656                        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
43657                        "/p:Configuration=\"Release Multithreaded\" "\
43658                        "/p:Platform=$freetype_platform "\
43659                        "/p:ConfigurationType=DynamicLibrary "\
43660                        "/p:TargetName=freetype "\
43661                        "/p:OutDir=\"$freetype_lib_path\" "\
43662                        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
43663     cmd /c freetype.bat
43664 
43665     if test -s "$freetype_lib_path_unix/freetype.dll"; then
43666       # If that succeeds we also build freetype.lib
43667       $ECHO -e "@echo off\n"\
43668                "$MSBUILD $vcxproj_path "\
43669                          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
43670                          "/p:Configuration=\"Release Multithreaded\" "\
43671                          "/p:Platform=$freetype_platform "\
43672                          "/p:ConfigurationType=StaticLibrary "\
43673                          "/p:TargetName=freetype "\
43674                          "/p:OutDir=\"$freetype_lib_path\" "\
43675                          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
43676       cmd /c freetype.bat
43677 
43678       if test -s "$freetype_lib_path_unix/freetype.lib"; then
43679         # Once we build both, lib and dll, set freetype lib and include path appropriately
43680         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
43681         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
43682         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
43683 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
43684       else
43685         BUILD_FREETYPE=no
43686       fi
43687     else
43688       BUILD_FREETYPE=no
43689     fi
43690   fi
43691 
43692         if test "x$BUILD_FREETYPE" = xyes; then
43693           # Okay, we built it. Check that it works.
43694 
43695   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43696   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43697   METHOD="--with-freetype-src"
43698 
43699   # First check if the files exists.
43700   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43701     # We found an arbitrary include file. That's a good sign.
43702     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43703 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43704     FOUND_FREETYPE=yes
43705 
43706     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43707     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43708       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43709 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43710       FOUND_FREETYPE=no
43711     else
43712       if test "x$OPENJDK_TARGET_OS" = xwindows; then
43713         # On Windows, we will need both .lib and .dll file.
43714         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43715           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43716 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43717           FOUND_FREETYPE=no
43718         fi
43719       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
43720         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43721         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43722       fi
43723     fi
43724   fi
43725 
43726   if test "x$FOUND_FREETYPE" = xyes; then
43727 
43728   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43729 
43730   # Input might be given as Windows format, start by converting to
43731   # unix format.
43732   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43733   new_path=`$CYGPATH -u "$path"`
43734 
43735   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43736   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43737   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43738   # "foo.exe" is OK but "foo" is an error.
43739   #
43740   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43741   # It is also a way to make sure we got the proper file name for the real test later on.
43742   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43743   if test "x$test_shortpath" = x; then
43744     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43745 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43746     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43747   fi
43748 
43749   # Call helper function which possibly converts this using DOS-style short mode.
43750   # If so, the updated path is stored in $new_path.
43751 
43752   input_path="$new_path"
43753   # Check if we need to convert this using DOS-style short mode. If the path
43754   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43755   # take no chances and rewrite it.
43756   # Note: m4 eats our [], so we need to use [ and ] instead.
43757   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43758   if test "x$has_forbidden_chars" != x; then
43759     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43760     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43761     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43762     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43763       # Going to short mode and back again did indeed matter. Since short mode is
43764       # case insensitive, let's make it lowercase to improve readability.
43765       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43766       # Now convert it back to Unix-style (cygpath)
43767       input_path=`$CYGPATH -u "$shortmode_path"`
43768       new_path="$input_path"
43769     fi
43770   fi
43771 
43772   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43773   if test "x$test_cygdrive_prefix" = x; then
43774     # As a simple fix, exclude /usr/bin since it's not a real path.
43775     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43776       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43777       # a path prefixed by /cygdrive for fixpath to work.
43778       new_path="$CYGWIN_ROOT_PATH$input_path"
43779     fi
43780   fi
43781 
43782 
43783   if test "x$path" != "x$new_path"; then
43784     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43785     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43786 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43787   fi
43788 
43789   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43790 
43791   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43792   has_colon=`$ECHO $path | $GREP ^.:`
43793   new_path="$path"
43794   if test "x$has_colon" = x; then
43795     # Not in mixed or Windows style, start by that.
43796     new_path=`cmd //c echo $path`
43797   fi
43798 
43799 
43800   input_path="$new_path"
43801   # Check if we need to convert this using DOS-style short mode. If the path
43802   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43803   # take no chances and rewrite it.
43804   # Note: m4 eats our [], so we need to use [ and ] instead.
43805   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43806   if test "x$has_forbidden_chars" != x; then
43807     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43808     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43809   fi
43810 
43811 
43812   windows_path="$new_path"
43813   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43814     unix_path=`$CYGPATH -u "$windows_path"`
43815     new_path="$unix_path"
43816   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43817     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43818     new_path="$unix_path"
43819   fi
43820 
43821   if test "x$path" != "x$new_path"; then
43822     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43823     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43824 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43825   fi
43826 
43827   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43828   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43829 
43830   else
43831     # We're on a posix platform. Hooray! :)
43832     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43833     has_space=`$ECHO "$path" | $GREP " "`
43834     if test "x$has_space" != x; then
43835       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43836 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43837       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43838     fi
43839 
43840     # Use eval to expand a potential ~
43841     eval path="$path"
43842     if test ! -f "$path" && test ! -d "$path"; then
43843       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43844     fi
43845 
43846     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43847   fi
43848 
43849 
43850   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43851 
43852   # Input might be given as Windows format, start by converting to
43853   # unix format.
43854   path="$POTENTIAL_FREETYPE_LIB_PATH"
43855   new_path=`$CYGPATH -u "$path"`
43856 
43857   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43858   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43859   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43860   # "foo.exe" is OK but "foo" is an error.
43861   #
43862   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43863   # It is also a way to make sure we got the proper file name for the real test later on.
43864   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43865   if test "x$test_shortpath" = x; then
43866     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43867 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43868     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43869   fi
43870 
43871   # Call helper function which possibly converts this using DOS-style short mode.
43872   # If so, the updated path is stored in $new_path.
43873 
43874   input_path="$new_path"
43875   # Check if we need to convert this using DOS-style short mode. If the path
43876   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43877   # take no chances and rewrite it.
43878   # Note: m4 eats our [], so we need to use [ and ] instead.
43879   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43880   if test "x$has_forbidden_chars" != x; then
43881     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43882     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43883     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43884     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43885       # Going to short mode and back again did indeed matter. Since short mode is
43886       # case insensitive, let's make it lowercase to improve readability.
43887       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43888       # Now convert it back to Unix-style (cygpath)
43889       input_path=`$CYGPATH -u "$shortmode_path"`
43890       new_path="$input_path"
43891     fi
43892   fi
43893 
43894   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43895   if test "x$test_cygdrive_prefix" = x; then
43896     # As a simple fix, exclude /usr/bin since it's not a real path.
43897     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43898       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43899       # a path prefixed by /cygdrive for fixpath to work.
43900       new_path="$CYGWIN_ROOT_PATH$input_path"
43901     fi
43902   fi
43903 
43904 
43905   if test "x$path" != "x$new_path"; then
43906     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43907     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43908 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43909   fi
43910 
43911   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43912 
43913   path="$POTENTIAL_FREETYPE_LIB_PATH"
43914   has_colon=`$ECHO $path | $GREP ^.:`
43915   new_path="$path"
43916   if test "x$has_colon" = x; then
43917     # Not in mixed or Windows style, start by that.
43918     new_path=`cmd //c echo $path`
43919   fi
43920 
43921 
43922   input_path="$new_path"
43923   # Check if we need to convert this using DOS-style short mode. If the path
43924   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43925   # take no chances and rewrite it.
43926   # Note: m4 eats our [], so we need to use [ and ] instead.
43927   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43928   if test "x$has_forbidden_chars" != x; then
43929     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43930     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43931   fi
43932 
43933 
43934   windows_path="$new_path"
43935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43936     unix_path=`$CYGPATH -u "$windows_path"`
43937     new_path="$unix_path"
43938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43939     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43940     new_path="$unix_path"
43941   fi
43942 
43943   if test "x$path" != "x$new_path"; then
43944     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43945     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43946 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43947   fi
43948 
43949   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43950   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43951 
43952   else
43953     # We're on a posix platform. Hooray! :)
43954     path="$POTENTIAL_FREETYPE_LIB_PATH"
43955     has_space=`$ECHO "$path" | $GREP " "`
43956     if test "x$has_space" != x; then
43957       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43958 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43959       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43960     fi
43961 
43962     # Use eval to expand a potential ~
43963     eval path="$path"
43964     if test ! -f "$path" && test ! -d "$path"; then
43965       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43966     fi
43967 
43968     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43969   fi
43970 
43971 
43972     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43973     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43974 $as_echo_n "checking for freetype includes... " >&6; }
43975     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43976 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43977     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43978     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43979 $as_echo_n "checking for freetype libraries... " >&6; }
43980     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43981 $as_echo "$FREETYPE_LIB_PATH" >&6; }
43982   fi
43983 
43984           if test "x$FOUND_FREETYPE" != xyes; then
43985             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
43986           fi
43987         else
43988           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
43989 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
43990           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
43991         fi
43992       else
43993         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
43994 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
43995       fi
43996     fi
43997 
43998     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43999       # User has specified settings
44000 
44001       if test "x$BUNDLE_FREETYPE" = x; then
44002         # If not specified, default is to bundle freetype
44003         BUNDLE_FREETYPE=yes
44004       fi
44005 
44006       if test "x$with_freetype" != x; then
44007         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44008         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44009       fi
44010 
44011       # Allow --with-freetype-lib and --with-freetype-include to override
44012       if test "x$with_freetype_include" != x; then
44013         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44014       fi
44015       if test "x$with_freetype_lib" != x; then
44016         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44017       fi
44018 
44019       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44020         # Okay, we got it. Check that it works.
44021 
44022   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44023   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44024   METHOD="--with-freetype"
44025 
44026   # First check if the files exists.
44027   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44028     # We found an arbitrary include file. That's a good sign.
44029     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44030 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44031     FOUND_FREETYPE=yes
44032 
44033     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44034     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44035       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44036 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44037       FOUND_FREETYPE=no
44038     else
44039       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44040         # On Windows, we will need both .lib and .dll file.
44041         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44042           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44043 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44044           FOUND_FREETYPE=no
44045         fi
44046       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
44047         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44048         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44049       fi
44050     fi
44051   fi
44052 
44053   if test "x$FOUND_FREETYPE" = xyes; then
44054 
44055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44056 
44057   # Input might be given as Windows format, start by converting to
44058   # unix format.
44059   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44060   new_path=`$CYGPATH -u "$path"`
44061 
44062   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44063   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44064   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44065   # "foo.exe" is OK but "foo" is an error.
44066   #
44067   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44068   # It is also a way to make sure we got the proper file name for the real test later on.
44069   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44070   if test "x$test_shortpath" = x; then
44071     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44072 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44073     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44074   fi
44075 
44076   # Call helper function which possibly converts this using DOS-style short mode.
44077   # If so, the updated path is stored in $new_path.
44078 
44079   input_path="$new_path"
44080   # Check if we need to convert this using DOS-style short mode. If the path
44081   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44082   # take no chances and rewrite it.
44083   # Note: m4 eats our [], so we need to use [ and ] instead.
44084   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44085   if test "x$has_forbidden_chars" != x; then
44086     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44087     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44088     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44089     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44090       # Going to short mode and back again did indeed matter. Since short mode is
44091       # case insensitive, let's make it lowercase to improve readability.
44092       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44093       # Now convert it back to Unix-style (cygpath)
44094       input_path=`$CYGPATH -u "$shortmode_path"`
44095       new_path="$input_path"
44096     fi
44097   fi
44098 
44099   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44100   if test "x$test_cygdrive_prefix" = x; then
44101     # As a simple fix, exclude /usr/bin since it's not a real path.
44102     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44103       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44104       # a path prefixed by /cygdrive for fixpath to work.
44105       new_path="$CYGWIN_ROOT_PATH$input_path"
44106     fi
44107   fi
44108 
44109 
44110   if test "x$path" != "x$new_path"; then
44111     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44112     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44113 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44114   fi
44115 
44116   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44117 
44118   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44119   has_colon=`$ECHO $path | $GREP ^.:`
44120   new_path="$path"
44121   if test "x$has_colon" = x; then
44122     # Not in mixed or Windows style, start by that.
44123     new_path=`cmd //c echo $path`
44124   fi
44125 
44126 
44127   input_path="$new_path"
44128   # Check if we need to convert this using DOS-style short mode. If the path
44129   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44130   # take no chances and rewrite it.
44131   # Note: m4 eats our [], so we need to use [ and ] instead.
44132   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44133   if test "x$has_forbidden_chars" != x; then
44134     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44135     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44136   fi
44137 
44138 
44139   windows_path="$new_path"
44140   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44141     unix_path=`$CYGPATH -u "$windows_path"`
44142     new_path="$unix_path"
44143   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44144     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44145     new_path="$unix_path"
44146   fi
44147 
44148   if test "x$path" != "x$new_path"; then
44149     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44150     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44151 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44152   fi
44153 
44154   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44155   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44156 
44157   else
44158     # We're on a posix platform. Hooray! :)
44159     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44160     has_space=`$ECHO "$path" | $GREP " "`
44161     if test "x$has_space" != x; then
44162       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44163 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44164       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44165     fi
44166 
44167     # Use eval to expand a potential ~
44168     eval path="$path"
44169     if test ! -f "$path" && test ! -d "$path"; then
44170       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44171     fi
44172 
44173     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44174   fi
44175 
44176 
44177   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44178 
44179   # Input might be given as Windows format, start by converting to
44180   # unix format.
44181   path="$POTENTIAL_FREETYPE_LIB_PATH"
44182   new_path=`$CYGPATH -u "$path"`
44183 
44184   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44185   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44186   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44187   # "foo.exe" is OK but "foo" is an error.
44188   #
44189   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44190   # It is also a way to make sure we got the proper file name for the real test later on.
44191   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44192   if test "x$test_shortpath" = x; then
44193     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44194 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44195     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44196   fi
44197 
44198   # Call helper function which possibly converts this using DOS-style short mode.
44199   # If so, the updated path is stored in $new_path.
44200 
44201   input_path="$new_path"
44202   # Check if we need to convert this using DOS-style short mode. If the path
44203   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44204   # take no chances and rewrite it.
44205   # Note: m4 eats our [], so we need to use [ and ] instead.
44206   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44207   if test "x$has_forbidden_chars" != x; then
44208     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44209     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44210     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44211     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44212       # Going to short mode and back again did indeed matter. Since short mode is
44213       # case insensitive, let's make it lowercase to improve readability.
44214       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44215       # Now convert it back to Unix-style (cygpath)
44216       input_path=`$CYGPATH -u "$shortmode_path"`
44217       new_path="$input_path"
44218     fi
44219   fi
44220 
44221   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44222   if test "x$test_cygdrive_prefix" = x; then
44223     # As a simple fix, exclude /usr/bin since it's not a real path.
44224     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44225       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44226       # a path prefixed by /cygdrive for fixpath to work.
44227       new_path="$CYGWIN_ROOT_PATH$input_path"
44228     fi
44229   fi
44230 
44231 
44232   if test "x$path" != "x$new_path"; then
44233     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44234     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44235 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44236   fi
44237 
44238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44239 
44240   path="$POTENTIAL_FREETYPE_LIB_PATH"
44241   has_colon=`$ECHO $path | $GREP ^.:`
44242   new_path="$path"
44243   if test "x$has_colon" = x; then
44244     # Not in mixed or Windows style, start by that.
44245     new_path=`cmd //c echo $path`
44246   fi
44247 
44248 
44249   input_path="$new_path"
44250   # Check if we need to convert this using DOS-style short mode. If the path
44251   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44252   # take no chances and rewrite it.
44253   # Note: m4 eats our [], so we need to use [ and ] instead.
44254   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44255   if test "x$has_forbidden_chars" != x; then
44256     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44257     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44258   fi
44259 
44260 
44261   windows_path="$new_path"
44262   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44263     unix_path=`$CYGPATH -u "$windows_path"`
44264     new_path="$unix_path"
44265   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44266     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44267     new_path="$unix_path"
44268   fi
44269 
44270   if test "x$path" != "x$new_path"; then
44271     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44272     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44273 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44274   fi
44275 
44276   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44277   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44278 
44279   else
44280     # We're on a posix platform. Hooray! :)
44281     path="$POTENTIAL_FREETYPE_LIB_PATH"
44282     has_space=`$ECHO "$path" | $GREP " "`
44283     if test "x$has_space" != x; then
44284       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44285 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44286       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44287     fi
44288 
44289     # Use eval to expand a potential ~
44290     eval path="$path"
44291     if test ! -f "$path" && test ! -d "$path"; then
44292       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44293     fi
44294 
44295     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44296   fi
44297 
44298 
44299     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44300     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44301 $as_echo_n "checking for freetype includes... " >&6; }
44302     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44303 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44304     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44305     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44306 $as_echo_n "checking for freetype libraries... " >&6; }
44307     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44308 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44309   fi
44310 
44311         if test "x$FOUND_FREETYPE" != xyes; then
44312           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44313         fi
44314       else
44315         # User specified only one of lib or include. This is an error.
44316         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44317           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44318 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44319           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44320         else
44321           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44322 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44323           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44324         fi
44325       fi
44326     else
44327       # User did not specify settings, but we need freetype. Try to locate it.
44328 
44329       if test "x$BUNDLE_FREETYPE" = x; then
44330         # If not specified, default is to bundle freetype only on windows
44331         if test "x$OPENJDK_TARGET_OS" = xwindows; then
44332           BUNDLE_FREETYPE=yes
44333         else
44334           BUNDLE_FREETYPE=no
44335         fi
44336       fi
44337 
44338       if test "x$FOUND_FREETYPE" != xyes; then
44339         # Check builddeps
44340 
44341 
44342   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44343     # Source the builddeps file again, to make sure it uses the latest variables!
44344     . $builddepsfile
44345     # Look for a target and build machine specific resource!
44346     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44347     if test "x$resource" = x; then
44348       # Ok, lets instead look for a target specific resource
44349       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44350     fi
44351     if test "x$resource" = x; then
44352       # Ok, lets instead look for a build specific resource
44353       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44354     fi
44355     if test "x$resource" = x; then
44356       # Ok, lets instead look for a generic resource
44357       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44358       resource=${builddep_freetype2}
44359     fi
44360     if test "x$resource" != x; then
44361       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44362 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44363       # If the resource in the builddeps.conf file is an existing directory,
44364       # for example /java/linux/cups
44365       if test -d ${resource}; then
44366         depdir=${resource}
44367       else
44368 
44369   # freetype2 is for example mymodule
44370   # $resource is for example libs/general/libmymod_1_2_3.zip
44371   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44372   # $with_builddeps_dir is for example /localhome/builddeps
44373   # depdir is the name of the variable into which we store the depdir, eg MYMOD
44374   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44375   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44376   filename=`basename $resource`
44377   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44378   filebase=${filename%%.*}
44379   extension=${filename#*.}
44380   installdir=$with_builddeps_dir/$filebase
44381   if test ! -f $installdir/$filename.unpacked; then
44382     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44383 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44384     if test ! -d $installdir; then
44385       mkdir -p $installdir
44386     fi
44387     if test ! -d $installdir; then
44388       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44389     fi
44390     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44391     touch $tmpfile
44392     if test ! -f $tmpfile; then
44393       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44394     fi
44395 
44396   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44397   # $tmpfile is the local file name for the downloaded file.
44398   VALID_TOOL=no
44399   if test "x$BDEPS_FTP" = xwget; then
44400     VALID_TOOL=yes
44401     wget -O $tmpfile $with_builddeps_server/$resource
44402   fi
44403   if test "x$BDEPS_FTP" = xlftp; then
44404     VALID_TOOL=yes
44405     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44406   fi
44407   if test "x$BDEPS_FTP" = xftp; then
44408     VALID_TOOL=yes
44409     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44410     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44411     FTPUSERPWD=${FTPSERVER%%@*}
44412     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44413       FTPUSER=${userpwd%%:*}
44414       FTPPWD=${userpwd#*@}
44415       FTPSERVER=${FTPSERVER#*@}
44416     else
44417       FTPUSER=ftp
44418       FTPPWD=ftp
44419     fi
44420     # the "pass" command does not work on some
44421     # ftp clients (read ftp.exe) but if it works,
44422     # passive mode is better!
44423     ( \
44424         echo "user $FTPUSER $FTPPWD"        ; \
44425         echo "pass"                         ; \
44426         echo "bin"                          ; \
44427         echo "get $FTPPATH $tmpfile"              ; \
44428     ) | ftp -in $FTPSERVER
44429   fi
44430   if test "x$VALID_TOOL" != xyes; then
44431     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44432   fi
44433 
44434     mv $tmpfile $installdir/$filename
44435     if test ! -s $installdir/$filename; then
44436       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44437     fi
44438     case "$extension" in
44439       zip)  echo "Unzipping $installdir/$filename..."
44440         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44441         ;;
44442       tar.gz) echo "Untaring $installdir/$filename..."
44443         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44444         ;;
44445       tgz) echo "Untaring $installdir/$filename..."
44446         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44447         ;;
44448       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44449         ;;
44450     esac
44451   fi
44452   if test -f $installdir/$filename.unpacked; then
44453     depdir=$installdir
44454   fi
44455 
44456       fi
44457       # Source the builddeps file again, because in the previous command, the depdir
44458       # was updated to point at the current build dependency install directory.
44459       . $builddepsfile
44460       # Now extract variables from the builddeps.conf files.
44461       theroot=${builddep_freetype2_ROOT}
44462       thecflags=${builddep_freetype2_CFLAGS}
44463       thelibs=${builddep_freetype2_LIBS}
44464       if test "x$depdir" = x; then
44465         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44466       fi
44467       FREETYPE=$depdir
44468       if test "x$theroot" != x; then
44469         FREETYPE="$theroot"
44470       fi
44471       if test "x$thecflags" != x; then
44472         FREETYPE_CFLAGS="$thecflags"
44473       fi
44474       if test "x$thelibs" != x; then
44475         FREETYPE_LIBS="$thelibs"
44476       fi
44477       FOUND_FREETYPE=yes
44478       else FOUND_FREETYPE=no
44479 
44480     fi
44481     else FOUND_FREETYPE=no
44482 
44483   fi
44484 
44485         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44486         if test "x$FOUND_FREETYPE" = xyes; then
44487           if test "x$BUNDLE_FREETYPE" = xyes; then
44488             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44489 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
44490             FOUND_FREETYPE=no
44491           else
44492             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44493 $as_echo_n "checking for freetype... " >&6; }
44494             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
44495 $as_echo "yes (using builddeps)" >&6; }
44496           fi
44497         fi
44498       fi
44499 
44500       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
44501       if test "x$SYSROOT" = x; then
44502         if test "x$FOUND_FREETYPE" != xyes; then
44503           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
44504           if test "x$PKG_CONFIG" != x; then
44505 
44506 pkg_failed=no
44507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
44508 $as_echo_n "checking for FREETYPE... " >&6; }
44509 
44510 if test -n "$FREETYPE_CFLAGS"; then
44511     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
44512  elif test -n "$PKG_CONFIG"; then
44513     if test -n "$PKG_CONFIG" && \
44514     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44515   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44516   ac_status=$?
44517   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44518   test $ac_status = 0; }; then
44519   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
44520 else
44521   pkg_failed=yes
44522 fi
44523  else
44524     pkg_failed=untried
44525 fi
44526 if test -n "$FREETYPE_LIBS"; then
44527     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
44528  elif test -n "$PKG_CONFIG"; then
44529     if test -n "$PKG_CONFIG" && \
44530     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44531   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44532   ac_status=$?
44533   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44534   test $ac_status = 0; }; then
44535   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44536 else
44537   pkg_failed=yes
44538 fi
44539  else
44540     pkg_failed=untried
44541 fi
44542 
44543 
44544 
44545 if test $pkg_failed = yes; then
44546 
44547 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44548         _pkg_short_errors_supported=yes
44549 else
44550         _pkg_short_errors_supported=no
44551 fi
44552         if test $_pkg_short_errors_supported = yes; then
44553                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44554         else
44555                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44556         fi
44557         # Put the nasty error message in config.log where it belongs
44558         echo "$FREETYPE_PKG_ERRORS" >&5
44559 
44560         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44561 $as_echo "no" >&6; }
44562                 FOUND_FREETYPE=no
44563 elif test $pkg_failed = untried; then
44564         FOUND_FREETYPE=no
44565 else
44566         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44567         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44568         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44569 $as_echo "yes" >&6; }
44570         FOUND_FREETYPE=yes
44571 fi
44572             if test "x$FOUND_FREETYPE" = xyes; then
44573               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44574               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44575               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44576               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44577                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44578               fi
44579               # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44580               if test "x$BUNDLE_FREETYPE" = xyes; then
44581                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44582 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44583                 FOUND_FREETYPE=no
44584               else
44585                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44586 $as_echo_n "checking for freetype... " >&6; }
44587                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44588 $as_echo "yes (using pkg-config)" >&6; }
44589               fi
44590             fi
44591           fi
44592         fi
44593       fi
44594 
44595       if test "x$FOUND_FREETYPE" != xyes; then
44596         # Check in well-known locations
44597         if test "x$OPENJDK_TARGET_OS" = xwindows; then
44598           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44599 
44600   windows_path="$FREETYPE_BASE_DIR"
44601   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44602     unix_path=`$CYGPATH -u "$windows_path"`
44603     FREETYPE_BASE_DIR="$unix_path"
44604   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44605     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44606     FREETYPE_BASE_DIR="$unix_path"
44607   fi
44608 
44609 
44610   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44611   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44612   METHOD="well-known location"
44613 
44614   # First check if the files exists.
44615   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44616     # We found an arbitrary include file. That's a good sign.
44617     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44618 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44619     FOUND_FREETYPE=yes
44620 
44621     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44622     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44623       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44624 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44625       FOUND_FREETYPE=no
44626     else
44627       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44628         # On Windows, we will need both .lib and .dll file.
44629         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44630           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44631 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44632           FOUND_FREETYPE=no
44633         fi
44634       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
44635         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44636         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44637       fi
44638     fi
44639   fi
44640 
44641   if test "x$FOUND_FREETYPE" = xyes; then
44642 
44643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44644 
44645   # Input might be given as Windows format, start by converting to
44646   # unix format.
44647   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44648   new_path=`$CYGPATH -u "$path"`
44649 
44650   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44651   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44652   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44653   # "foo.exe" is OK but "foo" is an error.
44654   #
44655   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44656   # It is also a way to make sure we got the proper file name for the real test later on.
44657   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44658   if test "x$test_shortpath" = x; then
44659     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44660 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44661     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44662   fi
44663 
44664   # Call helper function which possibly converts this using DOS-style short mode.
44665   # If so, the updated path is stored in $new_path.
44666 
44667   input_path="$new_path"
44668   # Check if we need to convert this using DOS-style short mode. If the path
44669   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44670   # take no chances and rewrite it.
44671   # Note: m4 eats our [], so we need to use [ and ] instead.
44672   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44673   if test "x$has_forbidden_chars" != x; then
44674     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44675     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44676     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44677     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44678       # Going to short mode and back again did indeed matter. Since short mode is
44679       # case insensitive, let's make it lowercase to improve readability.
44680       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44681       # Now convert it back to Unix-style (cygpath)
44682       input_path=`$CYGPATH -u "$shortmode_path"`
44683       new_path="$input_path"
44684     fi
44685   fi
44686 
44687   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44688   if test "x$test_cygdrive_prefix" = x; then
44689     # As a simple fix, exclude /usr/bin since it's not a real path.
44690     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44691       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44692       # a path prefixed by /cygdrive for fixpath to work.
44693       new_path="$CYGWIN_ROOT_PATH$input_path"
44694     fi
44695   fi
44696 
44697 
44698   if test "x$path" != "x$new_path"; then
44699     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44700     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44701 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44702   fi
44703 
44704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44705 
44706   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44707   has_colon=`$ECHO $path | $GREP ^.:`
44708   new_path="$path"
44709   if test "x$has_colon" = x; then
44710     # Not in mixed or Windows style, start by that.
44711     new_path=`cmd //c echo $path`
44712   fi
44713 
44714 
44715   input_path="$new_path"
44716   # Check if we need to convert this using DOS-style short mode. If the path
44717   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44718   # take no chances and rewrite it.
44719   # Note: m4 eats our [], so we need to use [ and ] instead.
44720   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44721   if test "x$has_forbidden_chars" != x; then
44722     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44723     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44724   fi
44725 
44726 
44727   windows_path="$new_path"
44728   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44729     unix_path=`$CYGPATH -u "$windows_path"`
44730     new_path="$unix_path"
44731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44732     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44733     new_path="$unix_path"
44734   fi
44735 
44736   if test "x$path" != "x$new_path"; then
44737     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44738     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44739 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44740   fi
44741 
44742   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44743   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44744 
44745   else
44746     # We're on a posix platform. Hooray! :)
44747     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44748     has_space=`$ECHO "$path" | $GREP " "`
44749     if test "x$has_space" != x; then
44750       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44751 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44752       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44753     fi
44754 
44755     # Use eval to expand a potential ~
44756     eval path="$path"
44757     if test ! -f "$path" && test ! -d "$path"; then
44758       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44759     fi
44760 
44761     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44762   fi
44763 
44764 
44765   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44766 
44767   # Input might be given as Windows format, start by converting to
44768   # unix format.
44769   path="$POTENTIAL_FREETYPE_LIB_PATH"
44770   new_path=`$CYGPATH -u "$path"`
44771 
44772   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44773   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44774   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44775   # "foo.exe" is OK but "foo" is an error.
44776   #
44777   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44778   # It is also a way to make sure we got the proper file name for the real test later on.
44779   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44780   if test "x$test_shortpath" = x; then
44781     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44782 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44783     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44784   fi
44785 
44786   # Call helper function which possibly converts this using DOS-style short mode.
44787   # If so, the updated path is stored in $new_path.
44788 
44789   input_path="$new_path"
44790   # Check if we need to convert this using DOS-style short mode. If the path
44791   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44792   # take no chances and rewrite it.
44793   # Note: m4 eats our [], so we need to use [ and ] instead.
44794   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44795   if test "x$has_forbidden_chars" != x; then
44796     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44797     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44798     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44799     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44800       # Going to short mode and back again did indeed matter. Since short mode is
44801       # case insensitive, let's make it lowercase to improve readability.
44802       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44803       # Now convert it back to Unix-style (cygpath)
44804       input_path=`$CYGPATH -u "$shortmode_path"`
44805       new_path="$input_path"
44806     fi
44807   fi
44808 
44809   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44810   if test "x$test_cygdrive_prefix" = x; then
44811     # As a simple fix, exclude /usr/bin since it's not a real path.
44812     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44813       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44814       # a path prefixed by /cygdrive for fixpath to work.
44815       new_path="$CYGWIN_ROOT_PATH$input_path"
44816     fi
44817   fi
44818 
44819 
44820   if test "x$path" != "x$new_path"; then
44821     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44822     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44823 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44824   fi
44825 
44826   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44827 
44828   path="$POTENTIAL_FREETYPE_LIB_PATH"
44829   has_colon=`$ECHO $path | $GREP ^.:`
44830   new_path="$path"
44831   if test "x$has_colon" = x; then
44832     # Not in mixed or Windows style, start by that.
44833     new_path=`cmd //c echo $path`
44834   fi
44835 
44836 
44837   input_path="$new_path"
44838   # Check if we need to convert this using DOS-style short mode. If the path
44839   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44840   # take no chances and rewrite it.
44841   # Note: m4 eats our [], so we need to use [ and ] instead.
44842   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44843   if test "x$has_forbidden_chars" != x; then
44844     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44845     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44846   fi
44847 
44848 
44849   windows_path="$new_path"
44850   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44851     unix_path=`$CYGPATH -u "$windows_path"`
44852     new_path="$unix_path"
44853   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44854     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44855     new_path="$unix_path"
44856   fi
44857 
44858   if test "x$path" != "x$new_path"; then
44859     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44860     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44861 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44862   fi
44863 
44864   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44865   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44866 
44867   else
44868     # We're on a posix platform. Hooray! :)
44869     path="$POTENTIAL_FREETYPE_LIB_PATH"
44870     has_space=`$ECHO "$path" | $GREP " "`
44871     if test "x$has_space" != x; then
44872       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44873 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44874       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44875     fi
44876 
44877     # Use eval to expand a potential ~
44878     eval path="$path"
44879     if test ! -f "$path" && test ! -d "$path"; then
44880       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44881     fi
44882 
44883     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44884   fi
44885 
44886 
44887     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44888     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44889 $as_echo_n "checking for freetype includes... " >&6; }
44890     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44891 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44892     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44893     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44894 $as_echo_n "checking for freetype libraries... " >&6; }
44895     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44896 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44897   fi
44898 
44899           if test "x$FOUND_FREETYPE" != xyes; then
44900             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44901 
44902   windows_path="$FREETYPE_BASE_DIR"
44903   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44904     unix_path=`$CYGPATH -u "$windows_path"`
44905     FREETYPE_BASE_DIR="$unix_path"
44906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44907     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44908     FREETYPE_BASE_DIR="$unix_path"
44909   fi
44910 
44911 
44912   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44913   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44914   METHOD="well-known location"
44915 
44916   # First check if the files exists.
44917   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44918     # We found an arbitrary include file. That's a good sign.
44919     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44920 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44921     FOUND_FREETYPE=yes
44922 
44923     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44924     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44925       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44926 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44927       FOUND_FREETYPE=no
44928     else
44929       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44930         # On Windows, we will need both .lib and .dll file.
44931         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44932           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44933 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44934           FOUND_FREETYPE=no
44935         fi
44936       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
44937         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44938         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44939       fi
44940     fi
44941   fi
44942 
44943   if test "x$FOUND_FREETYPE" = xyes; then
44944 
44945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44946 
44947   # Input might be given as Windows format, start by converting to
44948   # unix format.
44949   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44950   new_path=`$CYGPATH -u "$path"`
44951 
44952   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44953   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44954   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44955   # "foo.exe" is OK but "foo" is an error.
44956   #
44957   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44958   # It is also a way to make sure we got the proper file name for the real test later on.
44959   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44960   if test "x$test_shortpath" = x; then
44961     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44962 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44963     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44964   fi
44965 
44966   # Call helper function which possibly converts this using DOS-style short mode.
44967   # If so, the updated path is stored in $new_path.
44968 
44969   input_path="$new_path"
44970   # Check if we need to convert this using DOS-style short mode. If the path
44971   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44972   # take no chances and rewrite it.
44973   # Note: m4 eats our [], so we need to use [ and ] instead.
44974   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44975   if test "x$has_forbidden_chars" != x; then
44976     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44977     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44978     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44979     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44980       # Going to short mode and back again did indeed matter. Since short mode is
44981       # case insensitive, let's make it lowercase to improve readability.
44982       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44983       # Now convert it back to Unix-style (cygpath)
44984       input_path=`$CYGPATH -u "$shortmode_path"`
44985       new_path="$input_path"
44986     fi
44987   fi
44988 
44989   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44990   if test "x$test_cygdrive_prefix" = x; then
44991     # As a simple fix, exclude /usr/bin since it's not a real path.
44992     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44993       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44994       # a path prefixed by /cygdrive for fixpath to work.
44995       new_path="$CYGWIN_ROOT_PATH$input_path"
44996     fi
44997   fi
44998 
44999 
45000   if test "x$path" != "x$new_path"; then
45001     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45002     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45003 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45004   fi
45005 
45006   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45007 
45008   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45009   has_colon=`$ECHO $path | $GREP ^.:`
45010   new_path="$path"
45011   if test "x$has_colon" = x; then
45012     # Not in mixed or Windows style, start by that.
45013     new_path=`cmd //c echo $path`
45014   fi
45015 
45016 
45017   input_path="$new_path"
45018   # Check if we need to convert this using DOS-style short mode. If the path
45019   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45020   # take no chances and rewrite it.
45021   # Note: m4 eats our [], so we need to use [ and ] instead.
45022   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45023   if test "x$has_forbidden_chars" != x; then
45024     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45025     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45026   fi
45027 
45028 
45029   windows_path="$new_path"
45030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45031     unix_path=`$CYGPATH -u "$windows_path"`
45032     new_path="$unix_path"
45033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45034     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45035     new_path="$unix_path"
45036   fi
45037 
45038   if test "x$path" != "x$new_path"; then
45039     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45040     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45041 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45042   fi
45043 
45044   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45045   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45046 
45047   else
45048     # We're on a posix platform. Hooray! :)
45049     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45050     has_space=`$ECHO "$path" | $GREP " "`
45051     if test "x$has_space" != x; then
45052       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45053 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45054       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45055     fi
45056 
45057     # Use eval to expand a potential ~
45058     eval path="$path"
45059     if test ! -f "$path" && test ! -d "$path"; then
45060       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45061     fi
45062 
45063     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45064   fi
45065 
45066 
45067   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45068 
45069   # Input might be given as Windows format, start by converting to
45070   # unix format.
45071   path="$POTENTIAL_FREETYPE_LIB_PATH"
45072   new_path=`$CYGPATH -u "$path"`
45073 
45074   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45075   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45076   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45077   # "foo.exe" is OK but "foo" is an error.
45078   #
45079   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45080   # It is also a way to make sure we got the proper file name for the real test later on.
45081   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45082   if test "x$test_shortpath" = x; then
45083     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45084 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45085     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45086   fi
45087 
45088   # Call helper function which possibly converts this using DOS-style short mode.
45089   # If so, the updated path is stored in $new_path.
45090 
45091   input_path="$new_path"
45092   # Check if we need to convert this using DOS-style short mode. If the path
45093   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45094   # take no chances and rewrite it.
45095   # Note: m4 eats our [], so we need to use [ and ] instead.
45096   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45097   if test "x$has_forbidden_chars" != x; then
45098     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45099     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45100     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45101     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45102       # Going to short mode and back again did indeed matter. Since short mode is
45103       # case insensitive, let's make it lowercase to improve readability.
45104       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45105       # Now convert it back to Unix-style (cygpath)
45106       input_path=`$CYGPATH -u "$shortmode_path"`
45107       new_path="$input_path"
45108     fi
45109   fi
45110 
45111   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45112   if test "x$test_cygdrive_prefix" = x; then
45113     # As a simple fix, exclude /usr/bin since it's not a real path.
45114     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45115       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45116       # a path prefixed by /cygdrive for fixpath to work.
45117       new_path="$CYGWIN_ROOT_PATH$input_path"
45118     fi
45119   fi
45120 
45121 
45122   if test "x$path" != "x$new_path"; then
45123     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45124     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45125 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45126   fi
45127 
45128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45129 
45130   path="$POTENTIAL_FREETYPE_LIB_PATH"
45131   has_colon=`$ECHO $path | $GREP ^.:`
45132   new_path="$path"
45133   if test "x$has_colon" = x; then
45134     # Not in mixed or Windows style, start by that.
45135     new_path=`cmd //c echo $path`
45136   fi
45137 
45138 
45139   input_path="$new_path"
45140   # Check if we need to convert this using DOS-style short mode. If the path
45141   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45142   # take no chances and rewrite it.
45143   # Note: m4 eats our [], so we need to use [ and ] instead.
45144   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45145   if test "x$has_forbidden_chars" != x; then
45146     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45147     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45148   fi
45149 
45150 
45151   windows_path="$new_path"
45152   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45153     unix_path=`$CYGPATH -u "$windows_path"`
45154     new_path="$unix_path"
45155   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45156     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45157     new_path="$unix_path"
45158   fi
45159 
45160   if test "x$path" != "x$new_path"; then
45161     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45162     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45163 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45164   fi
45165 
45166   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45167   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45168 
45169   else
45170     # We're on a posix platform. Hooray! :)
45171     path="$POTENTIAL_FREETYPE_LIB_PATH"
45172     has_space=`$ECHO "$path" | $GREP " "`
45173     if test "x$has_space" != x; then
45174       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45175 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45176       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45177     fi
45178 
45179     # Use eval to expand a potential ~
45180     eval path="$path"
45181     if test ! -f "$path" && test ! -d "$path"; then
45182       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45183     fi
45184 
45185     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45186   fi
45187 
45188 
45189     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45190     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45191 $as_echo_n "checking for freetype includes... " >&6; }
45192     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45193 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45194     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45195     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45196 $as_echo_n "checking for freetype libraries... " >&6; }
45197     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45198 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45199   fi
45200 
45201           fi
45202         else
45203           FREETYPE_BASE_DIR="$SYSROOT/usr"
45204 
45205   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45206   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45207   METHOD="well-known location"
45208 
45209   # First check if the files exists.
45210   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45211     # We found an arbitrary include file. That's a good sign.
45212     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45213 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45214     FOUND_FREETYPE=yes
45215 
45216     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45217     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45218       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45219 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45220       FOUND_FREETYPE=no
45221     else
45222       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45223         # On Windows, we will need both .lib and .dll file.
45224         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45225           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45226 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45227           FOUND_FREETYPE=no
45228         fi
45229       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
45230         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45231         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45232       fi
45233     fi
45234   fi
45235 
45236   if test "x$FOUND_FREETYPE" = xyes; then
45237 
45238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45239 
45240   # Input might be given as Windows format, start by converting to
45241   # unix format.
45242   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45243   new_path=`$CYGPATH -u "$path"`
45244 
45245   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45246   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45247   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45248   # "foo.exe" is OK but "foo" is an error.
45249   #
45250   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45251   # It is also a way to make sure we got the proper file name for the real test later on.
45252   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45253   if test "x$test_shortpath" = x; then
45254     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45255 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45256     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45257   fi
45258 
45259   # Call helper function which possibly converts this using DOS-style short mode.
45260   # If so, the updated path is stored in $new_path.
45261 
45262   input_path="$new_path"
45263   # Check if we need to convert this using DOS-style short mode. If the path
45264   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45265   # take no chances and rewrite it.
45266   # Note: m4 eats our [], so we need to use [ and ] instead.
45267   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45268   if test "x$has_forbidden_chars" != x; then
45269     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45270     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45271     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45272     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45273       # Going to short mode and back again did indeed matter. Since short mode is
45274       # case insensitive, let's make it lowercase to improve readability.
45275       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45276       # Now convert it back to Unix-style (cygpath)
45277       input_path=`$CYGPATH -u "$shortmode_path"`
45278       new_path="$input_path"
45279     fi
45280   fi
45281 
45282   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45283   if test "x$test_cygdrive_prefix" = x; then
45284     # As a simple fix, exclude /usr/bin since it's not a real path.
45285     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45286       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45287       # a path prefixed by /cygdrive for fixpath to work.
45288       new_path="$CYGWIN_ROOT_PATH$input_path"
45289     fi
45290   fi
45291 
45292 
45293   if test "x$path" != "x$new_path"; then
45294     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45295     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45296 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45297   fi
45298 
45299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45300 
45301   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45302   has_colon=`$ECHO $path | $GREP ^.:`
45303   new_path="$path"
45304   if test "x$has_colon" = x; then
45305     # Not in mixed or Windows style, start by that.
45306     new_path=`cmd //c echo $path`
45307   fi
45308 
45309 
45310   input_path="$new_path"
45311   # Check if we need to convert this using DOS-style short mode. If the path
45312   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45313   # take no chances and rewrite it.
45314   # Note: m4 eats our [], so we need to use [ and ] instead.
45315   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45316   if test "x$has_forbidden_chars" != x; then
45317     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45318     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45319   fi
45320 
45321 
45322   windows_path="$new_path"
45323   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45324     unix_path=`$CYGPATH -u "$windows_path"`
45325     new_path="$unix_path"
45326   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45327     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45328     new_path="$unix_path"
45329   fi
45330 
45331   if test "x$path" != "x$new_path"; then
45332     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45333     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45334 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45335   fi
45336 
45337   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45338   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45339 
45340   else
45341     # We're on a posix platform. Hooray! :)
45342     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45343     has_space=`$ECHO "$path" | $GREP " "`
45344     if test "x$has_space" != x; then
45345       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45346 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45347       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45348     fi
45349 
45350     # Use eval to expand a potential ~
45351     eval path="$path"
45352     if test ! -f "$path" && test ! -d "$path"; then
45353       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45354     fi
45355 
45356     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45357   fi
45358 
45359 
45360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45361 
45362   # Input might be given as Windows format, start by converting to
45363   # unix format.
45364   path="$POTENTIAL_FREETYPE_LIB_PATH"
45365   new_path=`$CYGPATH -u "$path"`
45366 
45367   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45368   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45369   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45370   # "foo.exe" is OK but "foo" is an error.
45371   #
45372   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45373   # It is also a way to make sure we got the proper file name for the real test later on.
45374   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45375   if test "x$test_shortpath" = x; then
45376     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45377 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45378     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45379   fi
45380 
45381   # Call helper function which possibly converts this using DOS-style short mode.
45382   # If so, the updated path is stored in $new_path.
45383 
45384   input_path="$new_path"
45385   # Check if we need to convert this using DOS-style short mode. If the path
45386   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45387   # take no chances and rewrite it.
45388   # Note: m4 eats our [], so we need to use [ and ] instead.
45389   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45390   if test "x$has_forbidden_chars" != x; then
45391     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45392     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45393     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45394     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45395       # Going to short mode and back again did indeed matter. Since short mode is
45396       # case insensitive, let's make it lowercase to improve readability.
45397       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45398       # Now convert it back to Unix-style (cygpath)
45399       input_path=`$CYGPATH -u "$shortmode_path"`
45400       new_path="$input_path"
45401     fi
45402   fi
45403 
45404   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45405   if test "x$test_cygdrive_prefix" = x; then
45406     # As a simple fix, exclude /usr/bin since it's not a real path.
45407     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45408       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45409       # a path prefixed by /cygdrive for fixpath to work.
45410       new_path="$CYGWIN_ROOT_PATH$input_path"
45411     fi
45412   fi
45413 
45414 
45415   if test "x$path" != "x$new_path"; then
45416     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45417     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45418 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45419   fi
45420 
45421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45422 
45423   path="$POTENTIAL_FREETYPE_LIB_PATH"
45424   has_colon=`$ECHO $path | $GREP ^.:`
45425   new_path="$path"
45426   if test "x$has_colon" = x; then
45427     # Not in mixed or Windows style, start by that.
45428     new_path=`cmd //c echo $path`
45429   fi
45430 
45431 
45432   input_path="$new_path"
45433   # Check if we need to convert this using DOS-style short mode. If the path
45434   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45435   # take no chances and rewrite it.
45436   # Note: m4 eats our [], so we need to use [ and ] instead.
45437   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45438   if test "x$has_forbidden_chars" != x; then
45439     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45440     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45441   fi
45442 
45443 
45444   windows_path="$new_path"
45445   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45446     unix_path=`$CYGPATH -u "$windows_path"`
45447     new_path="$unix_path"
45448   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45449     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45450     new_path="$unix_path"
45451   fi
45452 
45453   if test "x$path" != "x$new_path"; then
45454     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45455     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45456 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45457   fi
45458 
45459   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45460   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45461 
45462   else
45463     # We're on a posix platform. Hooray! :)
45464     path="$POTENTIAL_FREETYPE_LIB_PATH"
45465     has_space=`$ECHO "$path" | $GREP " "`
45466     if test "x$has_space" != x; then
45467       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45468 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45469       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45470     fi
45471 
45472     # Use eval to expand a potential ~
45473     eval path="$path"
45474     if test ! -f "$path" && test ! -d "$path"; then
45475       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45476     fi
45477 
45478     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45479   fi
45480 
45481 
45482     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45483     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45484 $as_echo_n "checking for freetype includes... " >&6; }
45485     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45486 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45487     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45488     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45489 $as_echo_n "checking for freetype libraries... " >&6; }
45490     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45491 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45492   fi
45493 
45494 
45495           if test "x$FOUND_FREETYPE" != xyes; then
45496             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
45497 
45498   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45499   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45500   METHOD="well-known location"
45501 
45502   # First check if the files exists.
45503   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45504     # We found an arbitrary include file. That's a good sign.
45505     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45506 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45507     FOUND_FREETYPE=yes
45508 
45509     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45510     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45511       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45512 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45513       FOUND_FREETYPE=no
45514     else
45515       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45516         # On Windows, we will need both .lib and .dll file.
45517         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45518           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45519 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45520           FOUND_FREETYPE=no
45521         fi
45522       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
45523         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45524         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45525       fi
45526     fi
45527   fi
45528 
45529   if test "x$FOUND_FREETYPE" = xyes; then
45530 
45531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45532 
45533   # Input might be given as Windows format, start by converting to
45534   # unix format.
45535   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45536   new_path=`$CYGPATH -u "$path"`
45537 
45538   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45539   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45540   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45541   # "foo.exe" is OK but "foo" is an error.
45542   #
45543   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45544   # It is also a way to make sure we got the proper file name for the real test later on.
45545   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45546   if test "x$test_shortpath" = x; then
45547     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45548 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45549     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45550   fi
45551 
45552   # Call helper function which possibly converts this using DOS-style short mode.
45553   # If so, the updated path is stored in $new_path.
45554 
45555   input_path="$new_path"
45556   # Check if we need to convert this using DOS-style short mode. If the path
45557   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45558   # take no chances and rewrite it.
45559   # Note: m4 eats our [], so we need to use [ and ] instead.
45560   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45561   if test "x$has_forbidden_chars" != x; then
45562     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45563     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45564     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45565     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45566       # Going to short mode and back again did indeed matter. Since short mode is
45567       # case insensitive, let's make it lowercase to improve readability.
45568       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45569       # Now convert it back to Unix-style (cygpath)
45570       input_path=`$CYGPATH -u "$shortmode_path"`
45571       new_path="$input_path"
45572     fi
45573   fi
45574 
45575   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45576   if test "x$test_cygdrive_prefix" = x; then
45577     # As a simple fix, exclude /usr/bin since it's not a real path.
45578     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45579       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45580       # a path prefixed by /cygdrive for fixpath to work.
45581       new_path="$CYGWIN_ROOT_PATH$input_path"
45582     fi
45583   fi
45584 
45585 
45586   if test "x$path" != "x$new_path"; then
45587     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45588     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45589 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45590   fi
45591 
45592   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45593 
45594   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45595   has_colon=`$ECHO $path | $GREP ^.:`
45596   new_path="$path"
45597   if test "x$has_colon" = x; then
45598     # Not in mixed or Windows style, start by that.
45599     new_path=`cmd //c echo $path`
45600   fi
45601 
45602 
45603   input_path="$new_path"
45604   # Check if we need to convert this using DOS-style short mode. If the path
45605   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45606   # take no chances and rewrite it.
45607   # Note: m4 eats our [], so we need to use [ and ] instead.
45608   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45609   if test "x$has_forbidden_chars" != x; then
45610     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45611     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45612   fi
45613 
45614 
45615   windows_path="$new_path"
45616   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45617     unix_path=`$CYGPATH -u "$windows_path"`
45618     new_path="$unix_path"
45619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45620     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45621     new_path="$unix_path"
45622   fi
45623 
45624   if test "x$path" != "x$new_path"; then
45625     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45626     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45627 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45628   fi
45629 
45630   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45631   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45632 
45633   else
45634     # We're on a posix platform. Hooray! :)
45635     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45636     has_space=`$ECHO "$path" | $GREP " "`
45637     if test "x$has_space" != x; then
45638       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45639 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45640       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45641     fi
45642 
45643     # Use eval to expand a potential ~
45644     eval path="$path"
45645     if test ! -f "$path" && test ! -d "$path"; then
45646       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45647     fi
45648 
45649     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45650   fi
45651 
45652 
45653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45654 
45655   # Input might be given as Windows format, start by converting to
45656   # unix format.
45657   path="$POTENTIAL_FREETYPE_LIB_PATH"
45658   new_path=`$CYGPATH -u "$path"`
45659 
45660   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45661   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45662   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45663   # "foo.exe" is OK but "foo" is an error.
45664   #
45665   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45666   # It is also a way to make sure we got the proper file name for the real test later on.
45667   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45668   if test "x$test_shortpath" = x; then
45669     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45670 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45671     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45672   fi
45673 
45674   # Call helper function which possibly converts this using DOS-style short mode.
45675   # If so, the updated path is stored in $new_path.
45676 
45677   input_path="$new_path"
45678   # Check if we need to convert this using DOS-style short mode. If the path
45679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45680   # take no chances and rewrite it.
45681   # Note: m4 eats our [], so we need to use [ and ] instead.
45682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45683   if test "x$has_forbidden_chars" != x; then
45684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45685     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45686     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45687     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45688       # Going to short mode and back again did indeed matter. Since short mode is
45689       # case insensitive, let's make it lowercase to improve readability.
45690       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45691       # Now convert it back to Unix-style (cygpath)
45692       input_path=`$CYGPATH -u "$shortmode_path"`
45693       new_path="$input_path"
45694     fi
45695   fi
45696 
45697   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45698   if test "x$test_cygdrive_prefix" = x; then
45699     # As a simple fix, exclude /usr/bin since it's not a real path.
45700     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45701       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45702       # a path prefixed by /cygdrive for fixpath to work.
45703       new_path="$CYGWIN_ROOT_PATH$input_path"
45704     fi
45705   fi
45706 
45707 
45708   if test "x$path" != "x$new_path"; then
45709     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45710     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45711 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45712   fi
45713 
45714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45715 
45716   path="$POTENTIAL_FREETYPE_LIB_PATH"
45717   has_colon=`$ECHO $path | $GREP ^.:`
45718   new_path="$path"
45719   if test "x$has_colon" = x; then
45720     # Not in mixed or Windows style, start by that.
45721     new_path=`cmd //c echo $path`
45722   fi
45723 
45724 
45725   input_path="$new_path"
45726   # Check if we need to convert this using DOS-style short mode. If the path
45727   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45728   # take no chances and rewrite it.
45729   # Note: m4 eats our [], so we need to use [ and ] instead.
45730   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45731   if test "x$has_forbidden_chars" != x; then
45732     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45733     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45734   fi
45735 
45736 
45737   windows_path="$new_path"
45738   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45739     unix_path=`$CYGPATH -u "$windows_path"`
45740     new_path="$unix_path"
45741   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45742     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45743     new_path="$unix_path"
45744   fi
45745 
45746   if test "x$path" != "x$new_path"; then
45747     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45748     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45749 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45750   fi
45751 
45752   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45753   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45754 
45755   else
45756     # We're on a posix platform. Hooray! :)
45757     path="$POTENTIAL_FREETYPE_LIB_PATH"
45758     has_space=`$ECHO "$path" | $GREP " "`
45759     if test "x$has_space" != x; then
45760       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45761 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45762       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45763     fi
45764 
45765     # Use eval to expand a potential ~
45766     eval path="$path"
45767     if test ! -f "$path" && test ! -d "$path"; then
45768       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45769     fi
45770 
45771     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45772   fi
45773 
45774 
45775     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45776     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45777 $as_echo_n "checking for freetype includes... " >&6; }
45778     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45779 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45780     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45781     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45782 $as_echo_n "checking for freetype libraries... " >&6; }
45783     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45784 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45785   fi
45786 
45787           fi
45788 
45789           if test "x$FOUND_FREETYPE" != xyes; then
45790             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
45791 
45792   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45793   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45794   METHOD="well-known location"
45795 
45796   # First check if the files exists.
45797   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45798     # We found an arbitrary include file. That's a good sign.
45799     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45800 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45801     FOUND_FREETYPE=yes
45802 
45803     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45804     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45805       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45806 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45807       FOUND_FREETYPE=no
45808     else
45809       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45810         # On Windows, we will need both .lib and .dll file.
45811         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45812           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45813 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45814           FOUND_FREETYPE=no
45815         fi
45816       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
45817         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45818         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45819       fi
45820     fi
45821   fi
45822 
45823   if test "x$FOUND_FREETYPE" = xyes; then
45824 
45825   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45826 
45827   # Input might be given as Windows format, start by converting to
45828   # unix format.
45829   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45830   new_path=`$CYGPATH -u "$path"`
45831 
45832   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45833   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45834   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45835   # "foo.exe" is OK but "foo" is an error.
45836   #
45837   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45838   # It is also a way to make sure we got the proper file name for the real test later on.
45839   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45840   if test "x$test_shortpath" = x; then
45841     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45842 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45843     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45844   fi
45845 
45846   # Call helper function which possibly converts this using DOS-style short mode.
45847   # If so, the updated path is stored in $new_path.
45848 
45849   input_path="$new_path"
45850   # Check if we need to convert this using DOS-style short mode. If the path
45851   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45852   # take no chances and rewrite it.
45853   # Note: m4 eats our [], so we need to use [ and ] instead.
45854   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45855   if test "x$has_forbidden_chars" != x; then
45856     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45857     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45858     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45859     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45860       # Going to short mode and back again did indeed matter. Since short mode is
45861       # case insensitive, let's make it lowercase to improve readability.
45862       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45863       # Now convert it back to Unix-style (cygpath)
45864       input_path=`$CYGPATH -u "$shortmode_path"`
45865       new_path="$input_path"
45866     fi
45867   fi
45868 
45869   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45870   if test "x$test_cygdrive_prefix" = x; then
45871     # As a simple fix, exclude /usr/bin since it's not a real path.
45872     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45873       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45874       # a path prefixed by /cygdrive for fixpath to work.
45875       new_path="$CYGWIN_ROOT_PATH$input_path"
45876     fi
45877   fi
45878 
45879 
45880   if test "x$path" != "x$new_path"; then
45881     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45882     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45883 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45884   fi
45885 
45886   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45887 
45888   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45889   has_colon=`$ECHO $path | $GREP ^.:`
45890   new_path="$path"
45891   if test "x$has_colon" = x; then
45892     # Not in mixed or Windows style, start by that.
45893     new_path=`cmd //c echo $path`
45894   fi
45895 
45896 
45897   input_path="$new_path"
45898   # Check if we need to convert this using DOS-style short mode. If the path
45899   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45900   # take no chances and rewrite it.
45901   # Note: m4 eats our [], so we need to use [ and ] instead.
45902   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45903   if test "x$has_forbidden_chars" != x; then
45904     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45905     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45906   fi
45907 
45908 
45909   windows_path="$new_path"
45910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45911     unix_path=`$CYGPATH -u "$windows_path"`
45912     new_path="$unix_path"
45913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45915     new_path="$unix_path"
45916   fi
45917 
45918   if test "x$path" != "x$new_path"; then
45919     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45920     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45921 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45922   fi
45923 
45924   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45925   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45926 
45927   else
45928     # We're on a posix platform. Hooray! :)
45929     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45930     has_space=`$ECHO "$path" | $GREP " "`
45931     if test "x$has_space" != x; then
45932       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45933 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45934       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45935     fi
45936 
45937     # Use eval to expand a potential ~
45938     eval path="$path"
45939     if test ! -f "$path" && test ! -d "$path"; then
45940       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45941     fi
45942 
45943     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45944   fi
45945 
45946 
45947   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45948 
45949   # Input might be given as Windows format, start by converting to
45950   # unix format.
45951   path="$POTENTIAL_FREETYPE_LIB_PATH"
45952   new_path=`$CYGPATH -u "$path"`
45953 
45954   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45955   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45956   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45957   # "foo.exe" is OK but "foo" is an error.
45958   #
45959   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45960   # It is also a way to make sure we got the proper file name for the real test later on.
45961   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45962   if test "x$test_shortpath" = x; then
45963     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45964 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45965     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45966   fi
45967 
45968   # Call helper function which possibly converts this using DOS-style short mode.
45969   # If so, the updated path is stored in $new_path.
45970 
45971   input_path="$new_path"
45972   # Check if we need to convert this using DOS-style short mode. If the path
45973   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45974   # take no chances and rewrite it.
45975   # Note: m4 eats our [], so we need to use [ and ] instead.
45976   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45977   if test "x$has_forbidden_chars" != x; then
45978     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45979     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45980     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45981     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45982       # Going to short mode and back again did indeed matter. Since short mode is
45983       # case insensitive, let's make it lowercase to improve readability.
45984       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45985       # Now convert it back to Unix-style (cygpath)
45986       input_path=`$CYGPATH -u "$shortmode_path"`
45987       new_path="$input_path"
45988     fi
45989   fi
45990 
45991   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45992   if test "x$test_cygdrive_prefix" = x; then
45993     # As a simple fix, exclude /usr/bin since it's not a real path.
45994     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45995       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45996       # a path prefixed by /cygdrive for fixpath to work.
45997       new_path="$CYGWIN_ROOT_PATH$input_path"
45998     fi
45999   fi
46000 
46001 
46002   if test "x$path" != "x$new_path"; then
46003     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46004     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46005 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46006   fi
46007 
46008   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46009 
46010   path="$POTENTIAL_FREETYPE_LIB_PATH"
46011   has_colon=`$ECHO $path | $GREP ^.:`
46012   new_path="$path"
46013   if test "x$has_colon" = x; then
46014     # Not in mixed or Windows style, start by that.
46015     new_path=`cmd //c echo $path`
46016   fi
46017 
46018 
46019   input_path="$new_path"
46020   # Check if we need to convert this using DOS-style short mode. If the path
46021   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46022   # take no chances and rewrite it.
46023   # Note: m4 eats our [], so we need to use [ and ] instead.
46024   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46025   if test "x$has_forbidden_chars" != x; then
46026     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46027     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46028   fi
46029 
46030 
46031   windows_path="$new_path"
46032   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46033     unix_path=`$CYGPATH -u "$windows_path"`
46034     new_path="$unix_path"
46035   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46036     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46037     new_path="$unix_path"
46038   fi
46039 
46040   if test "x$path" != "x$new_path"; then
46041     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46042     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46043 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46044   fi
46045 
46046   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46047   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46048 
46049   else
46050     # We're on a posix platform. Hooray! :)
46051     path="$POTENTIAL_FREETYPE_LIB_PATH"
46052     has_space=`$ECHO "$path" | $GREP " "`
46053     if test "x$has_space" != x; then
46054       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46055 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46056       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46057     fi
46058 
46059     # Use eval to expand a potential ~
46060     eval path="$path"
46061     if test ! -f "$path" && test ! -d "$path"; then
46062       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46063     fi
46064 
46065     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46066   fi
46067 
46068 
46069     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46070     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46071 $as_echo_n "checking for freetype includes... " >&6; }
46072     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46073 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46074     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46075     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46076 $as_echo_n "checking for freetype libraries... " >&6; }
46077     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46078 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46079   fi
46080 
46081           fi
46082 
46083           if test "x$FOUND_FREETYPE" != xyes; then
46084             FREETYPE_BASE_DIR="$SYSROOT/usr"
46085             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46086 
46087   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46088   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46089   METHOD="well-known location"
46090 
46091   # First check if the files exists.
46092   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46093     # We found an arbitrary include file. That's a good sign.
46094     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46095 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46096     FOUND_FREETYPE=yes
46097 
46098     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46099     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46100       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46101 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46102       FOUND_FREETYPE=no
46103     else
46104       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46105         # On Windows, we will need both .lib and .dll file.
46106         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46107           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46108 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46109           FOUND_FREETYPE=no
46110         fi
46111       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
46112         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46113         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46114       fi
46115     fi
46116   fi
46117 
46118   if test "x$FOUND_FREETYPE" = xyes; then
46119 
46120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46121 
46122   # Input might be given as Windows format, start by converting to
46123   # unix format.
46124   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46125   new_path=`$CYGPATH -u "$path"`
46126 
46127   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46128   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46129   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46130   # "foo.exe" is OK but "foo" is an error.
46131   #
46132   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46133   # It is also a way to make sure we got the proper file name for the real test later on.
46134   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46135   if test "x$test_shortpath" = x; then
46136     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46137 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46138     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46139   fi
46140 
46141   # Call helper function which possibly converts this using DOS-style short mode.
46142   # If so, the updated path is stored in $new_path.
46143 
46144   input_path="$new_path"
46145   # Check if we need to convert this using DOS-style short mode. If the path
46146   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46147   # take no chances and rewrite it.
46148   # Note: m4 eats our [], so we need to use [ and ] instead.
46149   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46150   if test "x$has_forbidden_chars" != x; then
46151     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46152     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46153     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46154     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46155       # Going to short mode and back again did indeed matter. Since short mode is
46156       # case insensitive, let's make it lowercase to improve readability.
46157       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46158       # Now convert it back to Unix-style (cygpath)
46159       input_path=`$CYGPATH -u "$shortmode_path"`
46160       new_path="$input_path"
46161     fi
46162   fi
46163 
46164   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46165   if test "x$test_cygdrive_prefix" = x; then
46166     # As a simple fix, exclude /usr/bin since it's not a real path.
46167     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46168       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46169       # a path prefixed by /cygdrive for fixpath to work.
46170       new_path="$CYGWIN_ROOT_PATH$input_path"
46171     fi
46172   fi
46173 
46174 
46175   if test "x$path" != "x$new_path"; then
46176     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46177     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46178 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46179   fi
46180 
46181   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46182 
46183   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46184   has_colon=`$ECHO $path | $GREP ^.:`
46185   new_path="$path"
46186   if test "x$has_colon" = x; then
46187     # Not in mixed or Windows style, start by that.
46188     new_path=`cmd //c echo $path`
46189   fi
46190 
46191 
46192   input_path="$new_path"
46193   # Check if we need to convert this using DOS-style short mode. If the path
46194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46195   # take no chances and rewrite it.
46196   # Note: m4 eats our [], so we need to use [ and ] instead.
46197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46198   if test "x$has_forbidden_chars" != x; then
46199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46200     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46201   fi
46202 
46203 
46204   windows_path="$new_path"
46205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46206     unix_path=`$CYGPATH -u "$windows_path"`
46207     new_path="$unix_path"
46208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46209     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46210     new_path="$unix_path"
46211   fi
46212 
46213   if test "x$path" != "x$new_path"; then
46214     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46215     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46216 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46217   fi
46218 
46219   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46220   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46221 
46222   else
46223     # We're on a posix platform. Hooray! :)
46224     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46225     has_space=`$ECHO "$path" | $GREP " "`
46226     if test "x$has_space" != x; then
46227       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46228 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46229       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46230     fi
46231 
46232     # Use eval to expand a potential ~
46233     eval path="$path"
46234     if test ! -f "$path" && test ! -d "$path"; then
46235       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46236     fi
46237 
46238     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46239   fi
46240 
46241 
46242   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46243 
46244   # Input might be given as Windows format, start by converting to
46245   # unix format.
46246   path="$POTENTIAL_FREETYPE_LIB_PATH"
46247   new_path=`$CYGPATH -u "$path"`
46248 
46249   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46250   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46251   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46252   # "foo.exe" is OK but "foo" is an error.
46253   #
46254   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46255   # It is also a way to make sure we got the proper file name for the real test later on.
46256   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46257   if test "x$test_shortpath" = x; then
46258     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46259 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46260     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46261   fi
46262 
46263   # Call helper function which possibly converts this using DOS-style short mode.
46264   # If so, the updated path is stored in $new_path.
46265 
46266   input_path="$new_path"
46267   # Check if we need to convert this using DOS-style short mode. If the path
46268   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46269   # take no chances and rewrite it.
46270   # Note: m4 eats our [], so we need to use [ and ] instead.
46271   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46272   if test "x$has_forbidden_chars" != x; then
46273     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46274     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46275     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46276     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46277       # Going to short mode and back again did indeed matter. Since short mode is
46278       # case insensitive, let's make it lowercase to improve readability.
46279       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46280       # Now convert it back to Unix-style (cygpath)
46281       input_path=`$CYGPATH -u "$shortmode_path"`
46282       new_path="$input_path"
46283     fi
46284   fi
46285 
46286   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46287   if test "x$test_cygdrive_prefix" = x; then
46288     # As a simple fix, exclude /usr/bin since it's not a real path.
46289     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46290       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46291       # a path prefixed by /cygdrive for fixpath to work.
46292       new_path="$CYGWIN_ROOT_PATH$input_path"
46293     fi
46294   fi
46295 
46296 
46297   if test "x$path" != "x$new_path"; then
46298     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46299     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46300 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46301   fi
46302 
46303   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46304 
46305   path="$POTENTIAL_FREETYPE_LIB_PATH"
46306   has_colon=`$ECHO $path | $GREP ^.:`
46307   new_path="$path"
46308   if test "x$has_colon" = x; then
46309     # Not in mixed or Windows style, start by that.
46310     new_path=`cmd //c echo $path`
46311   fi
46312 
46313 
46314   input_path="$new_path"
46315   # Check if we need to convert this using DOS-style short mode. If the path
46316   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46317   # take no chances and rewrite it.
46318   # Note: m4 eats our [], so we need to use [ and ] instead.
46319   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46320   if test "x$has_forbidden_chars" != x; then
46321     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46322     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46323   fi
46324 
46325 
46326   windows_path="$new_path"
46327   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46328     unix_path=`$CYGPATH -u "$windows_path"`
46329     new_path="$unix_path"
46330   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46331     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46332     new_path="$unix_path"
46333   fi
46334 
46335   if test "x$path" != "x$new_path"; then
46336     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46337     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46338 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46339   fi
46340 
46341   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46342   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46343 
46344   else
46345     # We're on a posix platform. Hooray! :)
46346     path="$POTENTIAL_FREETYPE_LIB_PATH"
46347     has_space=`$ECHO "$path" | $GREP " "`
46348     if test "x$has_space" != x; then
46349       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46350 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46351       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46352     fi
46353 
46354     # Use eval to expand a potential ~
46355     eval path="$path"
46356     if test ! -f "$path" && test ! -d "$path"; then
46357       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46358     fi
46359 
46360     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46361   fi
46362 
46363 
46364     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46365     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46366 $as_echo_n "checking for freetype includes... " >&6; }
46367     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46368 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46369     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46370     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46371 $as_echo_n "checking for freetype libraries... " >&6; }
46372     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46373 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46374   fi
46375 
46376             else
46377 
46378   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46379   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
46380   METHOD="well-known location"
46381 
46382   # First check if the files exists.
46383   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46384     # We found an arbitrary include file. That's a good sign.
46385     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46386 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46387     FOUND_FREETYPE=yes
46388 
46389     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46390     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46391       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46392 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46393       FOUND_FREETYPE=no
46394     else
46395       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46396         # On Windows, we will need both .lib and .dll file.
46397         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46398           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46399 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46400           FOUND_FREETYPE=no
46401         fi
46402       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
46403         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46404         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46405       fi
46406     fi
46407   fi
46408 
46409   if test "x$FOUND_FREETYPE" = xyes; then
46410 
46411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46412 
46413   # Input might be given as Windows format, start by converting to
46414   # unix format.
46415   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46416   new_path=`$CYGPATH -u "$path"`
46417 
46418   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46419   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46420   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46421   # "foo.exe" is OK but "foo" is an error.
46422   #
46423   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46424   # It is also a way to make sure we got the proper file name for the real test later on.
46425   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46426   if test "x$test_shortpath" = x; then
46427     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46428 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46429     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46430   fi
46431 
46432   # Call helper function which possibly converts this using DOS-style short mode.
46433   # If so, the updated path is stored in $new_path.
46434 
46435   input_path="$new_path"
46436   # Check if we need to convert this using DOS-style short mode. If the path
46437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46438   # take no chances and rewrite it.
46439   # Note: m4 eats our [], so we need to use [ and ] instead.
46440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46441   if test "x$has_forbidden_chars" != x; then
46442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46443     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46444     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46445     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46446       # Going to short mode and back again did indeed matter. Since short mode is
46447       # case insensitive, let's make it lowercase to improve readability.
46448       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46449       # Now convert it back to Unix-style (cygpath)
46450       input_path=`$CYGPATH -u "$shortmode_path"`
46451       new_path="$input_path"
46452     fi
46453   fi
46454 
46455   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46456   if test "x$test_cygdrive_prefix" = x; then
46457     # As a simple fix, exclude /usr/bin since it's not a real path.
46458     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46459       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46460       # a path prefixed by /cygdrive for fixpath to work.
46461       new_path="$CYGWIN_ROOT_PATH$input_path"
46462     fi
46463   fi
46464 
46465 
46466   if test "x$path" != "x$new_path"; then
46467     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46468     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46469 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46470   fi
46471 
46472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46473 
46474   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46475   has_colon=`$ECHO $path | $GREP ^.:`
46476   new_path="$path"
46477   if test "x$has_colon" = x; then
46478     # Not in mixed or Windows style, start by that.
46479     new_path=`cmd //c echo $path`
46480   fi
46481 
46482 
46483   input_path="$new_path"
46484   # Check if we need to convert this using DOS-style short mode. If the path
46485   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46486   # take no chances and rewrite it.
46487   # Note: m4 eats our [], so we need to use [ and ] instead.
46488   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46489   if test "x$has_forbidden_chars" != x; then
46490     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46491     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46492   fi
46493 
46494 
46495   windows_path="$new_path"
46496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46497     unix_path=`$CYGPATH -u "$windows_path"`
46498     new_path="$unix_path"
46499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46500     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46501     new_path="$unix_path"
46502   fi
46503 
46504   if test "x$path" != "x$new_path"; then
46505     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46506     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46507 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46508   fi
46509 
46510   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46511   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46512 
46513   else
46514     # We're on a posix platform. Hooray! :)
46515     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46516     has_space=`$ECHO "$path" | $GREP " "`
46517     if test "x$has_space" != x; then
46518       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46519 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46520       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46521     fi
46522 
46523     # Use eval to expand a potential ~
46524     eval path="$path"
46525     if test ! -f "$path" && test ! -d "$path"; then
46526       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46527     fi
46528 
46529     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46530   fi
46531 
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="$POTENTIAL_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 POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46550 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46551     as_fn_error $? "Cannot locate the the path of POTENTIAL_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-style (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     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46590     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46591 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46592   fi
46593 
46594   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46595 
46596   path="$POTENTIAL_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     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46628     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46629 $as_echo "$as_me: Rewriting POTENTIAL_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="$POTENTIAL_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 POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46641 $as_echo "$as_me: The path of POTENTIAL_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 POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46649     fi
46650 
46651     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46652   fi
46653 
46654 
46655     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46656     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46657 $as_echo_n "checking for freetype includes... " >&6; }
46658     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46659 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46660     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46661     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46662 $as_echo_n "checking for freetype libraries... " >&6; }
46663     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46664 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46665   fi
46666 
46667               if test "x$FOUND_FREETYPE" != xyes; then
46668 
46669   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46670   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46671   METHOD="well-known location"
46672 
46673   # First check if the files exists.
46674   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46675     # We found an arbitrary include file. That's a good sign.
46676     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46677 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46678     FOUND_FREETYPE=yes
46679 
46680     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46681     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46682       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46683 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46684       FOUND_FREETYPE=no
46685     else
46686       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46687         # On Windows, we will need both .lib and .dll file.
46688         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46689           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46690 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46691           FOUND_FREETYPE=no
46692         fi
46693       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
46694         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46695         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46696       fi
46697     fi
46698   fi
46699 
46700   if test "x$FOUND_FREETYPE" = xyes; then
46701 
46702   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46703 
46704   # Input might be given as Windows format, start by converting to
46705   # unix format.
46706   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46707   new_path=`$CYGPATH -u "$path"`
46708 
46709   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46710   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46711   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46712   # "foo.exe" is OK but "foo" is an error.
46713   #
46714   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46715   # It is also a way to make sure we got the proper file name for the real test later on.
46716   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46717   if test "x$test_shortpath" = x; then
46718     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46719 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46720     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46721   fi
46722 
46723   # Call helper function which possibly converts this using DOS-style short mode.
46724   # If so, the updated path is stored in $new_path.
46725 
46726   input_path="$new_path"
46727   # Check if we need to convert this using DOS-style short mode. If the path
46728   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46729   # take no chances and rewrite it.
46730   # Note: m4 eats our [], so we need to use [ and ] instead.
46731   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46732   if test "x$has_forbidden_chars" != x; then
46733     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46734     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46735     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46736     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46737       # Going to short mode and back again did indeed matter. Since short mode is
46738       # case insensitive, let's make it lowercase to improve readability.
46739       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46740       # Now convert it back to Unix-style (cygpath)
46741       input_path=`$CYGPATH -u "$shortmode_path"`
46742       new_path="$input_path"
46743     fi
46744   fi
46745 
46746   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46747   if test "x$test_cygdrive_prefix" = x; then
46748     # As a simple fix, exclude /usr/bin since it's not a real path.
46749     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46750       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46751       # a path prefixed by /cygdrive for fixpath to work.
46752       new_path="$CYGWIN_ROOT_PATH$input_path"
46753     fi
46754   fi
46755 
46756 
46757   if test "x$path" != "x$new_path"; then
46758     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46759     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46760 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46761   fi
46762 
46763   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46764 
46765   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46766   has_colon=`$ECHO $path | $GREP ^.:`
46767   new_path="$path"
46768   if test "x$has_colon" = x; then
46769     # Not in mixed or Windows style, start by that.
46770     new_path=`cmd //c echo $path`
46771   fi
46772 
46773 
46774   input_path="$new_path"
46775   # Check if we need to convert this using DOS-style short mode. If the path
46776   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46777   # take no chances and rewrite it.
46778   # Note: m4 eats our [], so we need to use [ and ] instead.
46779   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46780   if test "x$has_forbidden_chars" != x; then
46781     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46782     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46783   fi
46784 
46785 
46786   windows_path="$new_path"
46787   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46788     unix_path=`$CYGPATH -u "$windows_path"`
46789     new_path="$unix_path"
46790   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46791     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46792     new_path="$unix_path"
46793   fi
46794 
46795   if test "x$path" != "x$new_path"; then
46796     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46797     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46798 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46799   fi
46800 
46801   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46802   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46803 
46804   else
46805     # We're on a posix platform. Hooray! :)
46806     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46807     has_space=`$ECHO "$path" | $GREP " "`
46808     if test "x$has_space" != x; then
46809       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46810 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46811       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46812     fi
46813 
46814     # Use eval to expand a potential ~
46815     eval path="$path"
46816     if test ! -f "$path" && test ! -d "$path"; then
46817       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46818     fi
46819 
46820     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46821   fi
46822 
46823 
46824   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46825 
46826   # Input might be given as Windows format, start by converting to
46827   # unix format.
46828   path="$POTENTIAL_FREETYPE_LIB_PATH"
46829   new_path=`$CYGPATH -u "$path"`
46830 
46831   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46832   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46833   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46834   # "foo.exe" is OK but "foo" is an error.
46835   #
46836   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46837   # It is also a way to make sure we got the proper file name for the real test later on.
46838   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46839   if test "x$test_shortpath" = x; then
46840     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46841 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46842     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46843   fi
46844 
46845   # Call helper function which possibly converts this using DOS-style short mode.
46846   # If so, the updated path is stored in $new_path.
46847 
46848   input_path="$new_path"
46849   # Check if we need to convert this using DOS-style short mode. If the path
46850   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46851   # take no chances and rewrite it.
46852   # Note: m4 eats our [], so we need to use [ and ] instead.
46853   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46854   if test "x$has_forbidden_chars" != x; then
46855     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46856     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46857     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46858     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46859       # Going to short mode and back again did indeed matter. Since short mode is
46860       # case insensitive, let's make it lowercase to improve readability.
46861       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46862       # Now convert it back to Unix-style (cygpath)
46863       input_path=`$CYGPATH -u "$shortmode_path"`
46864       new_path="$input_path"
46865     fi
46866   fi
46867 
46868   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46869   if test "x$test_cygdrive_prefix" = x; then
46870     # As a simple fix, exclude /usr/bin since it's not a real path.
46871     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46872       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46873       # a path prefixed by /cygdrive for fixpath to work.
46874       new_path="$CYGWIN_ROOT_PATH$input_path"
46875     fi
46876   fi
46877 
46878 
46879   if test "x$path" != "x$new_path"; then
46880     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46881     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46882 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46883   fi
46884 
46885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46886 
46887   path="$POTENTIAL_FREETYPE_LIB_PATH"
46888   has_colon=`$ECHO $path | $GREP ^.:`
46889   new_path="$path"
46890   if test "x$has_colon" = x; then
46891     # Not in mixed or Windows style, start by that.
46892     new_path=`cmd //c echo $path`
46893   fi
46894 
46895 
46896   input_path="$new_path"
46897   # Check if we need to convert this using DOS-style short mode. If the path
46898   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46899   # take no chances and rewrite it.
46900   # Note: m4 eats our [], so we need to use [ and ] instead.
46901   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46902   if test "x$has_forbidden_chars" != x; then
46903     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46904     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46905   fi
46906 
46907 
46908   windows_path="$new_path"
46909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46910     unix_path=`$CYGPATH -u "$windows_path"`
46911     new_path="$unix_path"
46912   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46913     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46914     new_path="$unix_path"
46915   fi
46916 
46917   if test "x$path" != "x$new_path"; then
46918     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46919     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46920 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46921   fi
46922 
46923   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46924   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46925 
46926   else
46927     # We're on a posix platform. Hooray! :)
46928     path="$POTENTIAL_FREETYPE_LIB_PATH"
46929     has_space=`$ECHO "$path" | $GREP " "`
46930     if test "x$has_space" != x; then
46931       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46932 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46933       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46934     fi
46935 
46936     # Use eval to expand a potential ~
46937     eval path="$path"
46938     if test ! -f "$path" && test ! -d "$path"; then
46939       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46940     fi
46941 
46942     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46943   fi
46944 
46945 
46946     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46947     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46948 $as_echo_n "checking for freetype includes... " >&6; }
46949     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46950 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46951     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46952     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46953 $as_echo_n "checking for freetype libraries... " >&6; }
46954     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46955 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46956   fi
46957 
46958               fi
46959             fi
46960           fi
46961         fi
46962       fi # end check in well-known locations
46963 
46964       if test "x$FOUND_FREETYPE" != xyes; then
46965 
46966   # Print a helpful message on how to acquire the necessary build dependency.
46967   # freetype is the help tag: freetype, cups, pulse, alsa etc
46968   MISSING_DEPENDENCY=freetype
46969 
46970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46971     cygwin_help $MISSING_DEPENDENCY
46972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46973     msys_help $MISSING_DEPENDENCY
46974   else
46975     PKGHANDLER_COMMAND=
46976 
46977     case $PKGHANDLER in
46978       apt-get)
46979         apt_help     $MISSING_DEPENDENCY ;;
46980       yum)
46981         yum_help     $MISSING_DEPENDENCY ;;
46982       port)
46983         port_help    $MISSING_DEPENDENCY ;;
46984       pkgutil)
46985         pkgutil_help $MISSING_DEPENDENCY ;;
46986       pkgadd)
46987         pkgadd_help  $MISSING_DEPENDENCY ;;
46988     esac
46989 
46990     if test "x$PKGHANDLER_COMMAND" != x; then
46991       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46992     fi
46993   fi
46994 
46995         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46996       fi
46997     fi # end user specified settings
46998 
46999     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47000     if test "x$FREETYPE_CFLAGS" = x; then
47001 
47002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47003 
47004   # Input might be given as Windows format, start by converting to
47005   # unix format.
47006   path="$FREETYPE_INCLUDE_PATH"
47007   new_path=`$CYGPATH -u "$path"`
47008 
47009   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47010   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47011   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47012   # "foo.exe" is OK but "foo" is an error.
47013   #
47014   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47015   # It is also a way to make sure we got the proper file name for the real test later on.
47016   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47017   if test "x$test_shortpath" = x; then
47018     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47019 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47020     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47021   fi
47022 
47023   # Call helper function which possibly converts this using DOS-style short mode.
47024   # If so, the updated path is stored in $new_path.
47025 
47026   input_path="$new_path"
47027   # Check if we need to convert this using DOS-style short mode. If the path
47028   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47029   # take no chances and rewrite it.
47030   # Note: m4 eats our [], so we need to use [ and ] instead.
47031   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47032   if test "x$has_forbidden_chars" != x; then
47033     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47034     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47035     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47036     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47037       # Going to short mode and back again did indeed matter. Since short mode is
47038       # case insensitive, let's make it lowercase to improve readability.
47039       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47040       # Now convert it back to Unix-style (cygpath)
47041       input_path=`$CYGPATH -u "$shortmode_path"`
47042       new_path="$input_path"
47043     fi
47044   fi
47045 
47046   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47047   if test "x$test_cygdrive_prefix" = x; then
47048     # As a simple fix, exclude /usr/bin since it's not a real path.
47049     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47050       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47051       # a path prefixed by /cygdrive for fixpath to work.
47052       new_path="$CYGWIN_ROOT_PATH$input_path"
47053     fi
47054   fi
47055 
47056 
47057   if test "x$path" != "x$new_path"; then
47058     FREETYPE_INCLUDE_PATH="$new_path"
47059     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47060 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47061   fi
47062 
47063   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47064 
47065   path="$FREETYPE_INCLUDE_PATH"
47066   has_colon=`$ECHO $path | $GREP ^.:`
47067   new_path="$path"
47068   if test "x$has_colon" = x; then
47069     # Not in mixed or Windows style, start by that.
47070     new_path=`cmd //c echo $path`
47071   fi
47072 
47073 
47074   input_path="$new_path"
47075   # Check if we need to convert this using DOS-style short mode. If the path
47076   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47077   # take no chances and rewrite it.
47078   # Note: m4 eats our [], so we need to use [ and ] instead.
47079   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47080   if test "x$has_forbidden_chars" != x; then
47081     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47082     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47083   fi
47084 
47085 
47086   windows_path="$new_path"
47087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47088     unix_path=`$CYGPATH -u "$windows_path"`
47089     new_path="$unix_path"
47090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47091     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47092     new_path="$unix_path"
47093   fi
47094 
47095   if test "x$path" != "x$new_path"; then
47096     FREETYPE_INCLUDE_PATH="$new_path"
47097     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47098 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47099   fi
47100 
47101   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47102   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47103 
47104   else
47105     # We're on a posix platform. Hooray! :)
47106     path="$FREETYPE_INCLUDE_PATH"
47107     has_space=`$ECHO "$path" | $GREP " "`
47108     if test "x$has_space" != x; then
47109       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47110 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47111       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47112     fi
47113 
47114     # Use eval to expand a potential ~
47115     eval path="$path"
47116     if test ! -f "$path" && test ! -d "$path"; then
47117       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47118     fi
47119 
47120     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47121   fi
47122 
47123       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47124         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47125       else
47126         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47127       fi
47128     fi
47129 
47130     if test "x$FREETYPE_LIBS" = x; then
47131 
47132   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47133 
47134   # Input might be given as Windows format, start by converting to
47135   # unix format.
47136   path="$FREETYPE_LIB_PATH"
47137   new_path=`$CYGPATH -u "$path"`
47138 
47139   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47140   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47141   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47142   # "foo.exe" is OK but "foo" is an error.
47143   #
47144   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47145   # It is also a way to make sure we got the proper file name for the real test later on.
47146   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47147   if test "x$test_shortpath" = x; then
47148     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47149 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47150     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
47151   fi
47152 
47153   # Call helper function which possibly converts this using DOS-style short mode.
47154   # If so, the updated path is stored in $new_path.
47155 
47156   input_path="$new_path"
47157   # Check if we need to convert this using DOS-style short mode. If the path
47158   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47159   # take no chances and rewrite it.
47160   # Note: m4 eats our [], so we need to use [ and ] instead.
47161   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47162   if test "x$has_forbidden_chars" != x; then
47163     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47164     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47165     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47166     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47167       # Going to short mode and back again did indeed matter. Since short mode is
47168       # case insensitive, let's make it lowercase to improve readability.
47169       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47170       # Now convert it back to Unix-style (cygpath)
47171       input_path=`$CYGPATH -u "$shortmode_path"`
47172       new_path="$input_path"
47173     fi
47174   fi
47175 
47176   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47177   if test "x$test_cygdrive_prefix" = x; then
47178     # As a simple fix, exclude /usr/bin since it's not a real path.
47179     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47180       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47181       # a path prefixed by /cygdrive for fixpath to work.
47182       new_path="$CYGWIN_ROOT_PATH$input_path"
47183     fi
47184   fi
47185 
47186 
47187   if test "x$path" != "x$new_path"; then
47188     FREETYPE_LIB_PATH="$new_path"
47189     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47190 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47191   fi
47192 
47193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47194 
47195   path="$FREETYPE_LIB_PATH"
47196   has_colon=`$ECHO $path | $GREP ^.:`
47197   new_path="$path"
47198   if test "x$has_colon" = x; then
47199     # Not in mixed or Windows style, start by that.
47200     new_path=`cmd //c echo $path`
47201   fi
47202 
47203 
47204   input_path="$new_path"
47205   # Check if we need to convert this using DOS-style short mode. If the path
47206   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47207   # take no chances and rewrite it.
47208   # Note: m4 eats our [], so we need to use [ and ] instead.
47209   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47210   if test "x$has_forbidden_chars" != x; then
47211     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47212     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47213   fi
47214 
47215 
47216   windows_path="$new_path"
47217   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47218     unix_path=`$CYGPATH -u "$windows_path"`
47219     new_path="$unix_path"
47220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47221     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47222     new_path="$unix_path"
47223   fi
47224 
47225   if test "x$path" != "x$new_path"; then
47226     FREETYPE_LIB_PATH="$new_path"
47227     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47228 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47229   fi
47230 
47231   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47232   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47233 
47234   else
47235     # We're on a posix platform. Hooray! :)
47236     path="$FREETYPE_LIB_PATH"
47237     has_space=`$ECHO "$path" | $GREP " "`
47238     if test "x$has_space" != x; then
47239       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47240 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47241       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47242     fi
47243 
47244     # Use eval to expand a potential ~
47245     eval path="$path"
47246     if test ! -f "$path" && test ! -d "$path"; then
47247       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47248     fi
47249 
47250     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47251   fi
47252 
47253       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47254         FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
47255       else
47256         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
47257       fi
47258     fi
47259 
47260     # Try to compile it
47261     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
47262 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
47263     ac_ext=cpp
47264 ac_cpp='$CXXCPP $CPPFLAGS'
47265 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47266 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47267 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47268 
47269     PREV_CXXCFLAGS="$CXXFLAGS"
47270     PREV_LIBS="$LIBS"
47271     PREV_CXX="$CXX"
47272     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
47273     LIBS="$LIBS $FREETYPE_LIBS"
47274     CXX="$FIXPATH $CXX"
47275     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47276 /* end confdefs.h.  */
47277 
47278           #include<ft2build.h>
47279           #include FT_FREETYPE_H
47280           int main () {
47281             FT_Init_FreeType(NULL);
47282             return 0;
47283           }
47284 
47285 _ACEOF
47286 if ac_fn_cxx_try_link "$LINENO"; then :
47287 
47288           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47289 $as_echo "yes" >&6; }
47290 
47291 else
47292 
47293           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47294 $as_echo "no" >&6; }
47295           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
47296 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
47297           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
47298 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
47299 
47300 
47301   # Print a helpful message on how to acquire the necessary build dependency.
47302   # freetype is the help tag: freetype, cups, pulse, alsa etc
47303   MISSING_DEPENDENCY=freetype
47304 
47305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47306     cygwin_help $MISSING_DEPENDENCY
47307   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47308     msys_help $MISSING_DEPENDENCY
47309   else
47310     PKGHANDLER_COMMAND=
47311 
47312     case $PKGHANDLER in
47313       apt-get)
47314         apt_help     $MISSING_DEPENDENCY ;;
47315       yum)
47316         yum_help     $MISSING_DEPENDENCY ;;
47317       port)
47318         port_help    $MISSING_DEPENDENCY ;;
47319       pkgutil)
47320         pkgutil_help $MISSING_DEPENDENCY ;;
47321       pkgadd)
47322         pkgadd_help  $MISSING_DEPENDENCY ;;
47323     esac
47324 
47325     if test "x$PKGHANDLER_COMMAND" != x; then
47326       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47327     fi
47328   fi
47329 
47330 
47331           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
47332 
47333 
47334 fi
47335 rm -f core conftest.err conftest.$ac_objext \
47336     conftest$ac_exeext conftest.$ac_ext
47337     CXXCFLAGS="$PREV_CXXFLAGS"
47338     LIBS="$PREV_LIBS"
47339     CXX="$PREV_CXX"
47340     ac_ext=cpp
47341 ac_cpp='$CXXCPP $CPPFLAGS'
47342 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47343 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47344 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47345 
47346 
47347     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
47348 $as_echo_n "checking if we should bundle freetype... " >&6; }
47349     if test "x$BUNDLE_FREETYPE" = xyes; then
47350       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
47351     fi
47352     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
47353 $as_echo "$BUNDLE_FREETYPE" >&6; }
47354 
47355   fi # end freetype needed
47356 
47357 
47358 
47359 
47360 
47361 
47362 
47363   ###############################################################################
47364   #
47365   # Check for alsa headers and libraries. Used on Linux/GNU systems.
47366   #
47367 
47368 # Check whether --with-alsa was given.
47369 if test "${with_alsa+set}" = set; then :
47370   withval=$with_alsa;
47371 fi
47372 
47373 
47374 # Check whether --with-alsa-include was given.
47375 if test "${with_alsa_include+set}" = set; then :
47376   withval=$with_alsa_include;
47377 fi
47378 
47379 
47380 # Check whether --with-alsa-lib was given.
47381 if test "${with_alsa_lib+set}" = set; then :
47382   withval=$with_alsa_lib;
47383 fi
47384 
47385 
47386   if test "x$ALSA_NOT_NEEDED" = xyes; then
47387     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
47388       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
47389 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
47390     fi
47391     ALSA_CFLAGS=
47392     ALSA_LIBS=
47393   else
47394     ALSA_FOUND=no
47395 
47396     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
47397       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
47398     fi
47399 
47400     if test "x${with_alsa}" != x; then
47401       ALSA_LIBS="-L${with_alsa}/lib -lasound"
47402       ALSA_CFLAGS="-I${with_alsa}/include"
47403       ALSA_FOUND=yes
47404     fi
47405     if test "x${with_alsa_include}" != x; then
47406       ALSA_CFLAGS="-I${with_alsa_include}"
47407       ALSA_FOUND=yes
47408     fi
47409     if test "x${with_alsa_lib}" != x; then
47410       ALSA_LIBS="-L${with_alsa_lib} -lasound"
47411       ALSA_FOUND=yes
47412     fi
47413     if test "x$ALSA_FOUND" = xno; then
47414 
47415 
47416   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
47417     # Source the builddeps file again, to make sure it uses the latest variables!
47418     . $builddepsfile
47419     # Look for a target and build machine specific resource!
47420     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
47421     if test "x$resource" = x; then
47422       # Ok, lets instead look for a target specific resource
47423       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
47424     fi
47425     if test "x$resource" = x; then
47426       # Ok, lets instead look for a build specific resource
47427       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
47428     fi
47429     if test "x$resource" = x; then
47430       # Ok, lets instead look for a generic resource
47431       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
47432       resource=${builddep_alsa}
47433     fi
47434     if test "x$resource" != x; then
47435       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
47436 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
47437       # If the resource in the builddeps.conf file is an existing directory,
47438       # for example /java/linux/cups
47439       if test -d ${resource}; then
47440         depdir=${resource}
47441       else
47442 
47443   # alsa is for example mymodule
47444   # $resource is for example libs/general/libmymod_1_2_3.zip
47445   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
47446   # $with_builddeps_dir is for example /localhome/builddeps
47447   # depdir is the name of the variable into which we store the depdir, eg MYMOD
47448   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
47449   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
47450   filename=`basename $resource`
47451   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
47452   filebase=${filename%%.*}
47453   extension=${filename#*.}
47454   installdir=$with_builddeps_dir/$filebase
47455   if test ! -f $installdir/$filename.unpacked; then
47456     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
47457 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
47458     if test ! -d $installdir; then
47459       mkdir -p $installdir
47460     fi
47461     if test ! -d $installdir; then
47462       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
47463     fi
47464     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
47465     touch $tmpfile
47466     if test ! -f $tmpfile; then
47467       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
47468     fi
47469 
47470   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
47471   # $tmpfile is the local file name for the downloaded file.
47472   VALID_TOOL=no
47473   if test "x$BDEPS_FTP" = xwget; then
47474     VALID_TOOL=yes
47475     wget -O $tmpfile $with_builddeps_server/$resource
47476   fi
47477   if test "x$BDEPS_FTP" = xlftp; then
47478     VALID_TOOL=yes
47479     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
47480   fi
47481   if test "x$BDEPS_FTP" = xftp; then
47482     VALID_TOOL=yes
47483     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
47484     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
47485     FTPUSERPWD=${FTPSERVER%%@*}
47486     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
47487       FTPUSER=${userpwd%%:*}
47488       FTPPWD=${userpwd#*@}
47489       FTPSERVER=${FTPSERVER#*@}
47490     else
47491       FTPUSER=ftp
47492       FTPPWD=ftp
47493     fi
47494     # the "pass" command does not work on some
47495     # ftp clients (read ftp.exe) but if it works,
47496     # passive mode is better!
47497     ( \
47498         echo "user $FTPUSER $FTPPWD"        ; \
47499         echo "pass"                         ; \
47500         echo "bin"                          ; \
47501         echo "get $FTPPATH $tmpfile"              ; \
47502     ) | ftp -in $FTPSERVER
47503   fi
47504   if test "x$VALID_TOOL" != xyes; then
47505     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
47506   fi
47507 
47508     mv $tmpfile $installdir/$filename
47509     if test ! -s $installdir/$filename; then
47510       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
47511     fi
47512     case "$extension" in
47513       zip)  echo "Unzipping $installdir/$filename..."
47514         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
47515         ;;
47516       tar.gz) echo "Untaring $installdir/$filename..."
47517         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47518         ;;
47519       tgz) echo "Untaring $installdir/$filename..."
47520         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47521         ;;
47522       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
47523         ;;
47524     esac
47525   fi
47526   if test -f $installdir/$filename.unpacked; then
47527     depdir=$installdir
47528   fi
47529 
47530       fi
47531       # Source the builddeps file again, because in the previous command, the depdir
47532       # was updated to point at the current build dependency install directory.
47533       . $builddepsfile
47534       # Now extract variables from the builddeps.conf files.
47535       theroot=${builddep_alsa_ROOT}
47536       thecflags=${builddep_alsa_CFLAGS}
47537       thelibs=${builddep_alsa_LIBS}
47538       if test "x$depdir" = x; then
47539         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
47540       fi
47541       ALSA=$depdir
47542       if test "x$theroot" != x; then
47543         ALSA="$theroot"
47544       fi
47545       if test "x$thecflags" != x; then
47546         ALSA_CFLAGS="$thecflags"
47547       fi
47548       if test "x$thelibs" != x; then
47549         ALSA_LIBS="$thelibs"
47550       fi
47551       ALSA_FOUND=yes
47552       else ALSA_FOUND=no
47553 
47554     fi
47555     else ALSA_FOUND=no
47556 
47557   fi
47558 
47559     fi
47560     # Do not try pkg-config if we have a sysroot set.
47561     if test "x$SYSROOT" = x; then
47562       if test "x$ALSA_FOUND" = xno; then
47563 
47564 pkg_failed=no
47565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
47566 $as_echo_n "checking for ALSA... " >&6; }
47567 
47568 if test -n "$ALSA_CFLAGS"; then
47569     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
47570  elif test -n "$PKG_CONFIG"; then
47571     if test -n "$PKG_CONFIG" && \
47572     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47573   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47574   ac_status=$?
47575   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47576   test $ac_status = 0; }; then
47577   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
47578 else
47579   pkg_failed=yes
47580 fi
47581  else
47582     pkg_failed=untried
47583 fi
47584 if test -n "$ALSA_LIBS"; then
47585     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
47586  elif test -n "$PKG_CONFIG"; then
47587     if test -n "$PKG_CONFIG" && \
47588     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47589   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47590   ac_status=$?
47591   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47592   test $ac_status = 0; }; then
47593   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
47594 else
47595   pkg_failed=yes
47596 fi
47597  else
47598     pkg_failed=untried
47599 fi
47600 
47601 
47602 
47603 if test $pkg_failed = yes; then
47604 
47605 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47606         _pkg_short_errors_supported=yes
47607 else
47608         _pkg_short_errors_supported=no
47609 fi
47610         if test $_pkg_short_errors_supported = yes; then
47611                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
47612         else
47613                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47614         fi
47615         # Put the nasty error message in config.log where it belongs
47616         echo "$ALSA_PKG_ERRORS" >&5
47617 
47618         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47619 $as_echo "no" >&6; }
47620                 ALSA_FOUND=no
47621 elif test $pkg_failed = untried; then
47622         ALSA_FOUND=no
47623 else
47624         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47625         ALSA_LIBS=$pkg_cv_ALSA_LIBS
47626         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47627 $as_echo "yes" >&6; }
47628         ALSA_FOUND=yes
47629 fi
47630       fi
47631     fi
47632     if test "x$ALSA_FOUND" = xno; then
47633       for ac_header in alsa/asoundlib.h
47634 do :
47635   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47636 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47637   cat >>confdefs.h <<_ACEOF
47638 #define HAVE_ALSA_ASOUNDLIB_H 1
47639 _ACEOF
47640 
47641             ALSA_FOUND=yes
47642             ALSA_CFLAGS=-Iignoreme
47643             ALSA_LIBS=-lasound
47644             DEFAULT_ALSA=yes
47645 
47646 else
47647   ALSA_FOUND=no
47648 fi
47649 
47650 done
47651 
47652     fi
47653     if test "x$ALSA_FOUND" = xno; then
47654 
47655   # Print a helpful message on how to acquire the necessary build dependency.
47656   # alsa is the help tag: freetype, cups, pulse, alsa etc
47657   MISSING_DEPENDENCY=alsa
47658 
47659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47660     cygwin_help $MISSING_DEPENDENCY
47661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47662     msys_help $MISSING_DEPENDENCY
47663   else
47664     PKGHANDLER_COMMAND=
47665 
47666     case $PKGHANDLER in
47667       apt-get)
47668         apt_help     $MISSING_DEPENDENCY ;;
47669       yum)
47670         yum_help     $MISSING_DEPENDENCY ;;
47671       port)
47672         port_help    $MISSING_DEPENDENCY ;;
47673       pkgutil)
47674         pkgutil_help $MISSING_DEPENDENCY ;;
47675       pkgadd)
47676         pkgadd_help  $MISSING_DEPENDENCY ;;
47677     esac
47678 
47679     if test "x$PKGHANDLER_COMMAND" != x; then
47680       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47681     fi
47682   fi
47683 
47684       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47685     fi
47686   fi
47687 
47688 
47689 
47690 
47691 
47692 
47693   ###############################################################################
47694   #
47695   # Check for the jpeg library
47696   #
47697 
47698   USE_EXTERNAL_LIBJPEG=true
47699   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
47700 $as_echo_n "checking for main in -ljpeg... " >&6; }
47701 if ${ac_cv_lib_jpeg_main+:} false; then :
47702   $as_echo_n "(cached) " >&6
47703 else
47704   ac_check_lib_save_LIBS=$LIBS
47705 LIBS="-ljpeg  $LIBS"
47706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47707 /* end confdefs.h.  */
47708 
47709 
47710 int
47711 main ()
47712 {
47713 return main ();
47714   ;
47715   return 0;
47716 }
47717 _ACEOF
47718 if ac_fn_cxx_try_link "$LINENO"; then :
47719   ac_cv_lib_jpeg_main=yes
47720 else
47721   ac_cv_lib_jpeg_main=no
47722 fi
47723 rm -f core conftest.err conftest.$ac_objext \
47724     conftest$ac_exeext conftest.$ac_ext
47725 LIBS=$ac_check_lib_save_LIBS
47726 fi
47727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
47728 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
47729 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
47730   cat >>confdefs.h <<_ACEOF
47731 #define HAVE_LIBJPEG 1
47732 _ACEOF
47733 
47734   LIBS="-ljpeg $LIBS"
47735 
47736 else
47737    USE_EXTERNAL_LIBJPEG=false
47738       { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
47739 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
47740 
47741 fi
47742 
47743 
47744 
47745   ###############################################################################
47746   #
47747   # Check for the gif library
47748   #
47749 
47750 
47751 # Check whether --with-giflib was given.
47752 if test "${with_giflib+set}" = set; then :
47753   withval=$with_giflib;
47754 fi
47755 
47756 
47757 
47758   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47759 $as_echo_n "checking for which giflib to use... " >&6; }
47760 
47761   # default is bundled
47762   DEFAULT_GIFLIB=bundled
47763 
47764   #
47765   # if user didn't specify, use DEFAULT_GIFLIB
47766   #
47767   if test "x${with_giflib}" = "x"; then
47768     with_giflib=${DEFAULT_GIFLIB}
47769   fi
47770 
47771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47772 $as_echo "${with_giflib}" >&6; }
47773 
47774   if test "x${with_giflib}" = "xbundled"; then
47775     USE_EXTERNAL_LIBGIF=false
47776   elif test "x${with_giflib}" = "xsystem"; then
47777     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47778 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47779 
47780 else
47781    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47782 fi
47783 
47784 
47785     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47786 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47787 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47788   $as_echo_n "(cached) " >&6
47789 else
47790   ac_check_lib_save_LIBS=$LIBS
47791 LIBS="-lgif  $LIBS"
47792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47793 /* end confdefs.h.  */
47794 
47795 /* Override any GCC internal prototype to avoid an error.
47796    Use char because int might match the return type of a GCC
47797    builtin and then its argument prototype would still apply.  */
47798 #ifdef __cplusplus
47799 extern "C"
47800 #endif
47801 char DGifGetCode ();
47802 int
47803 main ()
47804 {
47805 return DGifGetCode ();
47806   ;
47807   return 0;
47808 }
47809 _ACEOF
47810 if ac_fn_cxx_try_link "$LINENO"; then :
47811   ac_cv_lib_gif_DGifGetCode=yes
47812 else
47813   ac_cv_lib_gif_DGifGetCode=no
47814 fi
47815 rm -f core conftest.err conftest.$ac_objext \
47816     conftest$ac_exeext conftest.$ac_ext
47817 LIBS=$ac_check_lib_save_LIBS
47818 fi
47819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47820 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47821 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47822   cat >>confdefs.h <<_ACEOF
47823 #define HAVE_LIBGIF 1
47824 _ACEOF
47825 
47826   LIBS="-lgif $LIBS"
47827 
47828 else
47829    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47830 fi
47831 
47832 
47833     USE_EXTERNAL_LIBGIF=true
47834   else
47835     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47836   fi
47837 
47838 
47839   ###############################################################################
47840   #
47841   # Check for the zlib library
47842   #
47843 
47844 
47845 # Check whether --with-zlib was given.
47846 if test "${with_zlib+set}" = set; then :
47847   withval=$with_zlib;
47848 fi
47849 
47850 
47851   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47852 $as_echo_n "checking for compress in -lz... " >&6; }
47853 if ${ac_cv_lib_z_compress+:} false; then :
47854   $as_echo_n "(cached) " >&6
47855 else
47856   ac_check_lib_save_LIBS=$LIBS
47857 LIBS="-lz  $LIBS"
47858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47859 /* end confdefs.h.  */
47860 
47861 /* Override any GCC internal prototype to avoid an error.
47862    Use char because int might match the return type of a GCC
47863    builtin and then its argument prototype would still apply.  */
47864 #ifdef __cplusplus
47865 extern "C"
47866 #endif
47867 char compress ();
47868 int
47869 main ()
47870 {
47871 return compress ();
47872   ;
47873   return 0;
47874 }
47875 _ACEOF
47876 if ac_fn_cxx_try_link "$LINENO"; then :
47877   ac_cv_lib_z_compress=yes
47878 else
47879   ac_cv_lib_z_compress=no
47880 fi
47881 rm -f core conftest.err conftest.$ac_objext \
47882     conftest$ac_exeext conftest.$ac_ext
47883 LIBS=$ac_check_lib_save_LIBS
47884 fi
47885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47886 $as_echo "$ac_cv_lib_z_compress" >&6; }
47887 if test "x$ac_cv_lib_z_compress" = xyes; then :
47888    ZLIB_FOUND=yes
47889 else
47890    ZLIB_FOUND=no
47891 fi
47892 
47893 
47894   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47895 $as_echo_n "checking for which zlib to use... " >&6; }
47896 
47897   DEFAULT_ZLIB=bundled
47898   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47899     #
47900     # On macosx default is system...on others default is
47901     #
47902     DEFAULT_ZLIB=system
47903   fi
47904 
47905   if test "x${ZLIB_FOUND}" != "xyes"; then
47906     #
47907     # If we don't find any system...set default to bundled
47908     #
47909     DEFAULT_ZLIB=bundled
47910   fi
47911 
47912   #
47913   # If user didn't specify, use DEFAULT_ZLIB
47914   #
47915   if test "x${with_zlib}" = "x"; then
47916     with_zlib=${DEFAULT_ZLIB}
47917   fi
47918 
47919   if test "x${with_zlib}" = "xbundled"; then
47920     USE_EXTERNAL_LIBZ=false
47921     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47922 $as_echo "bundled" >&6; }
47923   elif test "x${with_zlib}" = "xsystem"; then
47924     if test "x${ZLIB_FOUND}" = "xyes"; then
47925       USE_EXTERNAL_LIBZ=true
47926       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47927 $as_echo "system" >&6; }
47928     else
47929       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47930 $as_echo "system not found" >&6; }
47931       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47932     fi
47933   else
47934     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47935   fi
47936 
47937 
47938 
47939   ###############################################################################
47940   LIBZIP_CAN_USE_MMAP=true
47941 
47942 
47943 
47944   ###############################################################################
47945   #
47946   # Check if altzone exists in time.h
47947   #
47948 
47949   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47950 /* end confdefs.h.  */
47951 #include <time.h>
47952 int
47953 main ()
47954 {
47955 return (int)altzone;
47956   ;
47957   return 0;
47958 }
47959 _ACEOF
47960 if ac_fn_cxx_try_link "$LINENO"; then :
47961   has_altzone=yes
47962 else
47963   has_altzone=no
47964 fi
47965 rm -f core conftest.err conftest.$ac_objext \
47966     conftest$ac_exeext conftest.$ac_ext
47967   if test "x$has_altzone" = xyes; then
47968 
47969 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47970 
47971   fi
47972 
47973   ###############################################################################
47974   #
47975   # Check the maths library
47976   #
47977 
47978   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47979 $as_echo_n "checking for cos in -lm... " >&6; }
47980 if ${ac_cv_lib_m_cos+:} false; then :
47981   $as_echo_n "(cached) " >&6
47982 else
47983   ac_check_lib_save_LIBS=$LIBS
47984 LIBS="-lm  $LIBS"
47985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47986 /* end confdefs.h.  */
47987 
47988 /* Override any GCC internal prototype to avoid an error.
47989    Use char because int might match the return type of a GCC
47990    builtin and then its argument prototype would still apply.  */
47991 #ifdef __cplusplus
47992 extern "C"
47993 #endif
47994 char cos ();
47995 int
47996 main ()
47997 {
47998 return cos ();
47999   ;
48000   return 0;
48001 }
48002 _ACEOF
48003 if ac_fn_cxx_try_link "$LINENO"; then :
48004   ac_cv_lib_m_cos=yes
48005 else
48006   ac_cv_lib_m_cos=no
48007 fi
48008 rm -f core conftest.err conftest.$ac_objext \
48009     conftest$ac_exeext conftest.$ac_ext
48010 LIBS=$ac_check_lib_save_LIBS
48011 fi
48012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
48013 $as_echo "$ac_cv_lib_m_cos" >&6; }
48014 if test "x$ac_cv_lib_m_cos" = xyes; then :
48015   cat >>confdefs.h <<_ACEOF
48016 #define HAVE_LIBM 1
48017 _ACEOF
48018 
48019   LIBS="-lm $LIBS"
48020 
48021 else
48022 
48023         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
48024 $as_echo "$as_me: Maths library was not found" >&6;}
48025 
48026 
48027 fi
48028 
48029 
48030 
48031   ###############################################################################
48032   #
48033   # Check for libdl.so
48034 
48035   save_LIBS="$LIBS"
48036   LIBS=""
48037   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
48038 $as_echo_n "checking for dlopen in -ldl... " >&6; }
48039 if ${ac_cv_lib_dl_dlopen+:} false; then :
48040   $as_echo_n "(cached) " >&6
48041 else
48042   ac_check_lib_save_LIBS=$LIBS
48043 LIBS="-ldl  $LIBS"
48044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48045 /* end confdefs.h.  */
48046 
48047 /* Override any GCC internal prototype to avoid an error.
48048    Use char because int might match the return type of a GCC
48049    builtin and then its argument prototype would still apply.  */
48050 #ifdef __cplusplus
48051 extern "C"
48052 #endif
48053 char dlopen ();
48054 int
48055 main ()
48056 {
48057 return dlopen ();
48058   ;
48059   return 0;
48060 }
48061 _ACEOF
48062 if ac_fn_cxx_try_link "$LINENO"; then :
48063   ac_cv_lib_dl_dlopen=yes
48064 else
48065   ac_cv_lib_dl_dlopen=no
48066 fi
48067 rm -f core conftest.err conftest.$ac_objext \
48068     conftest$ac_exeext conftest.$ac_ext
48069 LIBS=$ac_check_lib_save_LIBS
48070 fi
48071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
48072 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
48073 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
48074   cat >>confdefs.h <<_ACEOF
48075 #define HAVE_LIBDL 1
48076 _ACEOF
48077 
48078   LIBS="-ldl $LIBS"
48079 
48080 fi
48081 
48082   LIBDL="$LIBS"
48083 
48084   LIBS="$save_LIBS"
48085 
48086 
48087   ###############################################################################
48088   #
48089   # statically link libstdc++ before C++ ABI is stablized on Linux unless
48090   # dynamic build is configured on command line.
48091   #
48092 
48093 # Check whether --with-stdc++lib was given.
48094 if test "${with_stdc__lib+set}" = set; then :
48095   withval=$with_stdc__lib;
48096         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
48097                 && test "x$with_stdc__lib" != xdefault; then
48098           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
48099         fi
48100 
48101 else
48102   with_stdc__lib=default
48103 
48104 fi
48105 
48106 
48107   if test "x$OPENJDK_TARGET_OS" = xlinux; then
48108     # Test if -lstdc++ works.
48109     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
48110 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
48111     ac_ext=cpp
48112 ac_cpp='$CXXCPP $CPPFLAGS'
48113 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48114 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48115 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48116 
48117     OLD_CXXFLAGS="$CXXFLAGS"
48118     CXXFLAGS="$CXXFLAGS -lstdc++"
48119     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48120 /* end confdefs.h.  */
48121 
48122 int
48123 main ()
48124 {
48125 return 0;
48126   ;
48127   return 0;
48128 }
48129 _ACEOF
48130 if ac_fn_cxx_try_link "$LINENO"; then :
48131   has_dynamic_libstdcxx=yes
48132 else
48133   has_dynamic_libstdcxx=no
48134 fi
48135 rm -f core conftest.err conftest.$ac_objext \
48136     conftest$ac_exeext conftest.$ac_ext
48137     CXXFLAGS="$OLD_CXXFLAGS"
48138     ac_ext=cpp
48139 ac_cpp='$CXXCPP $CPPFLAGS'
48140 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48141 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48142 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48143 
48144     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
48145 $as_echo "$has_dynamic_libstdcxx" >&6; }
48146 
48147     # Test if stdc++ can be linked statically.
48148     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
48149 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
48150     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
48151     ac_ext=cpp
48152 ac_cpp='$CXXCPP $CPPFLAGS'
48153 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48154 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48155 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48156 
48157     OLD_LIBS="$LIBS"
48158     OLD_CXX="$CXX"
48159     LIBS="$STATIC_STDCXX_FLAGS"
48160     CXX="$CC"
48161     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48162 /* end confdefs.h.  */
48163 
48164 int
48165 main ()
48166 {
48167 return 0;
48168   ;
48169   return 0;
48170 }
48171 _ACEOF
48172 if ac_fn_cxx_try_link "$LINENO"; then :
48173   has_static_libstdcxx=yes
48174 else
48175   has_static_libstdcxx=no
48176 fi
48177 rm -f core conftest.err conftest.$ac_objext \
48178     conftest$ac_exeext conftest.$ac_ext
48179     LIBS="$OLD_LIBS"
48180     CXX="$OLD_CXX"
48181     ac_ext=cpp
48182 ac_cpp='$CXXCPP $CPPFLAGS'
48183 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48184 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48185 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48186 
48187     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48188 $as_echo "$has_static_libstdcxx" >&6; }
48189 
48190     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
48191       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
48192     fi
48193 
48194     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
48195       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
48196     fi
48197 
48198     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
48199       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
48200     fi
48201 
48202     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
48203 $as_echo_n "checking how to link with libstdc++... " >&6; }
48204     # If dynamic was requested, it's available since it would fail above otherwise.
48205     # If dynamic wasn't requested, go with static unless it isn't available.
48206     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48207       LIBCXX="$LIBCXX -lstdc++"
48208       LDCXX="$CXX"
48209       STATIC_CXX_SETTING="STATIC_CXX=false"
48210       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
48211 $as_echo "dynamic" >&6; }
48212     else
48213       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
48214       LDCXX="$CC"
48215       STATIC_CXX_SETTING="STATIC_CXX=true"
48216       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
48217 $as_echo "static" >&6; }
48218     fi
48219   fi
48220 
48221 
48222   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48223     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
48224 
48225 pkg_failed=no
48226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
48227 $as_echo_n "checking for LIBFFI... " >&6; }
48228 
48229 if test -n "$LIBFFI_CFLAGS"; then
48230     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
48231  elif test -n "$PKG_CONFIG"; then
48232     if test -n "$PKG_CONFIG" && \
48233     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
48234   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
48235   ac_status=$?
48236   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48237   test $ac_status = 0; }; then
48238   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
48239 else
48240   pkg_failed=yes
48241 fi
48242  else
48243     pkg_failed=untried
48244 fi
48245 if test -n "$LIBFFI_LIBS"; then
48246     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
48247  elif test -n "$PKG_CONFIG"; then
48248     if test -n "$PKG_CONFIG" && \
48249     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
48250   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
48251   ac_status=$?
48252   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48253   test $ac_status = 0; }; then
48254   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
48255 else
48256   pkg_failed=yes
48257 fi
48258  else
48259     pkg_failed=untried
48260 fi
48261 
48262 
48263 
48264 if test $pkg_failed = yes; then
48265 
48266 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48267         _pkg_short_errors_supported=yes
48268 else
48269         _pkg_short_errors_supported=no
48270 fi
48271         if test $_pkg_short_errors_supported = yes; then
48272                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
48273         else
48274                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
48275         fi
48276         # Put the nasty error message in config.log where it belongs
48277         echo "$LIBFFI_PKG_ERRORS" >&5
48278 
48279         as_fn_error $? "Package requirements (libffi) were not met:
48280 
48281 $LIBFFI_PKG_ERRORS
48282 
48283 Consider adjusting the PKG_CONFIG_PATH environment variable if you
48284 installed software in a non-standard prefix.
48285 
48286 Alternatively, you may set the environment variables LIBFFI_CFLAGS
48287 and LIBFFI_LIBS to avoid the need to call pkg-config.
48288 See the pkg-config man page for more details.
48289 " "$LINENO" 5
48290 elif test $pkg_failed = untried; then
48291         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48292 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48293 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
48294 is in your PATH or set the PKG_CONFIG environment variable to the full
48295 path to pkg-config.
48296 
48297 Alternatively, you may set the environment variables LIBFFI_CFLAGS
48298 and LIBFFI_LIBS to avoid the need to call pkg-config.
48299 See the pkg-config man page for more details.
48300 
48301 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
48302 See \`config.log' for more details" "$LINENO" 5; }
48303 else
48304         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
48305         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
48306         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48307 $as_echo "yes" >&6; }
48308         :
48309 fi
48310 
48311   fi
48312 
48313   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48314     # Extract the first word of "llvm-config", so it can be a program name with args.
48315 set dummy llvm-config; ac_word=$2
48316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48317 $as_echo_n "checking for $ac_word... " >&6; }
48318 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
48319   $as_echo_n "(cached) " >&6
48320 else
48321   if test -n "$LLVM_CONFIG"; then
48322   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
48323 else
48324 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48325 for as_dir in $PATH
48326 do
48327   IFS=$as_save_IFS
48328   test -z "$as_dir" && as_dir=.
48329     for ac_exec_ext in '' $ac_executable_extensions; do
48330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48331     ac_cv_prog_LLVM_CONFIG="llvm-config"
48332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48333     break 2
48334   fi
48335 done
48336   done
48337 IFS=$as_save_IFS
48338 
48339 fi
48340 fi
48341 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
48342 if test -n "$LLVM_CONFIG"; then
48343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
48344 $as_echo "$LLVM_CONFIG" >&6; }
48345 else
48346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48347 $as_echo "no" >&6; }
48348 fi
48349 
48350 
48351 
48352     if test "x$LLVM_CONFIG" != xllvm-config; then
48353       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
48354     fi
48355 
48356     llvm_components="jit mcjit engine nativecodegen native"
48357     unset LLVM_CFLAGS
48358     for flag in $("$LLVM_CONFIG" --cxxflags); do
48359       if echo "${flag}" | grep -q '^-[ID]'; then
48360         if test "${flag}" != "-D_DEBUG" ; then
48361           if test "${LLVM_CFLAGS}" != "" ; then
48362             LLVM_CFLAGS="${LLVM_CFLAGS} "
48363           fi
48364           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
48365         fi
48366       fi
48367     done
48368     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
48369     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
48370 
48371     unset LLVM_LDFLAGS
48372     for flag in $("${LLVM_CONFIG}" --ldflags); do
48373       if echo "${flag}" | grep -q '^-L'; then
48374         if test "${LLVM_LDFLAGS}" != ""; then
48375           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
48376         fi
48377         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
48378       fi
48379     done
48380 
48381     unset LLVM_LIBS
48382     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
48383       if echo "${flag}" | grep -q '^-l'; then
48384         if test "${LLVM_LIBS}" != ""; then
48385           LLVM_LIBS="${LLVM_LIBS} "
48386         fi
48387         LLVM_LIBS="${LLVM_LIBS}${flag}"
48388       fi
48389     done
48390 
48391 
48392 
48393 
48394   fi
48395 
48396   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48397   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48398     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48399   fi
48400 
48401   # TODO better (platform agnostic) test
48402   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48403     LIBCXX="-lstdc++"
48404   fi
48405 
48406 
48407 
48408 
48409   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48410 
48411 
48412 # Check whether --with-msvcr-dll was given.
48413 if test "${with_msvcr_dll+set}" = set; then :
48414   withval=$with_msvcr_dll;
48415 fi
48416 
48417 
48418   if test "x$with_msvcr_dll" != x; then
48419     # If given explicitely by user, do not probe. If not present, fail directly.
48420 
48421   DLL_NAME="$MSVCR_NAME"
48422   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
48423   METHOD="--with-msvcr-dll"
48424   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48425     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48426 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48427 
48428     # Need to check if the found msvcr is correct architecture
48429     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48430 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48431     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48432     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48433       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48434       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48435       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48436         CORRECT_MSVCR_ARCH="PE32 executable"
48437       else
48438         CORRECT_MSVCR_ARCH="PE32+ executable"
48439       fi
48440     else
48441       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48442         CORRECT_MSVCR_ARCH=386
48443       else
48444         CORRECT_MSVCR_ARCH=x86-64
48445       fi
48446     fi
48447     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48448       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48449 $as_echo "ok" >&6; }
48450       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48451 
48452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48453 
48454   # Input might be given as Windows format, start by converting to
48455   # unix format.
48456   path="$MSVC_DLL"
48457   new_path=`$CYGPATH -u "$path"`
48458 
48459   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48460   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48461   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48462   # "foo.exe" is OK but "foo" is an error.
48463   #
48464   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48465   # It is also a way to make sure we got the proper file name for the real test later on.
48466   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48467   if test "x$test_shortpath" = x; then
48468     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48469 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48470     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48471   fi
48472 
48473   # Call helper function which possibly converts this using DOS-style short mode.
48474   # If so, the updated path is stored in $new_path.
48475 
48476   input_path="$new_path"
48477   # Check if we need to convert this using DOS-style short mode. If the path
48478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48479   # take no chances and rewrite it.
48480   # Note: m4 eats our [], so we need to use [ and ] instead.
48481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48482   if test "x$has_forbidden_chars" != x; then
48483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48484     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48485     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48486     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48487       # Going to short mode and back again did indeed matter. Since short mode is
48488       # case insensitive, let's make it lowercase to improve readability.
48489       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48490       # Now convert it back to Unix-style (cygpath)
48491       input_path=`$CYGPATH -u "$shortmode_path"`
48492       new_path="$input_path"
48493     fi
48494   fi
48495 
48496   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48497   if test "x$test_cygdrive_prefix" = x; then
48498     # As a simple fix, exclude /usr/bin since it's not a real path.
48499     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48500       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48501       # a path prefixed by /cygdrive for fixpath to work.
48502       new_path="$CYGWIN_ROOT_PATH$input_path"
48503     fi
48504   fi
48505 
48506 
48507   if test "x$path" != "x$new_path"; then
48508     MSVC_DLL="$new_path"
48509     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48510 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48511   fi
48512 
48513   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48514 
48515   path="$MSVC_DLL"
48516   has_colon=`$ECHO $path | $GREP ^.:`
48517   new_path="$path"
48518   if test "x$has_colon" = x; then
48519     # Not in mixed or Windows style, start by that.
48520     new_path=`cmd //c echo $path`
48521   fi
48522 
48523 
48524   input_path="$new_path"
48525   # Check if we need to convert this using DOS-style short mode. If the path
48526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48527   # take no chances and rewrite it.
48528   # Note: m4 eats our [], so we need to use [ and ] instead.
48529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48530   if test "x$has_forbidden_chars" != x; then
48531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48533   fi
48534 
48535 
48536   windows_path="$new_path"
48537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48538     unix_path=`$CYGPATH -u "$windows_path"`
48539     new_path="$unix_path"
48540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48542     new_path="$unix_path"
48543   fi
48544 
48545   if test "x$path" != "x$new_path"; then
48546     MSVC_DLL="$new_path"
48547     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48548 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48549   fi
48550 
48551   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48552   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48553 
48554   else
48555     # We're on a posix platform. Hooray! :)
48556     path="$MSVC_DLL"
48557     has_space=`$ECHO "$path" | $GREP " "`
48558     if test "x$has_space" != x; then
48559       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48560 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48561       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48562     fi
48563 
48564     # Use eval to expand a potential ~
48565     eval path="$path"
48566     if test ! -f "$path" && test ! -d "$path"; then
48567       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48568     fi
48569 
48570     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48571   fi
48572 
48573       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48574 $as_echo_n "checking for $DLL_NAME... " >&6; }
48575       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48576 $as_echo "$MSVC_DLL" >&6; }
48577     else
48578       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48579 $as_echo "incorrect, ignoring" >&6; }
48580       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48581 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48582     fi
48583   fi
48584 
48585     if test "x$MSVC_DLL" = x; then
48586       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
48587     fi
48588     MSVCR_DLL="$MSVC_DLL"
48589   elif test "x$DEVKIT_MSVCR_DLL" != x; then
48590 
48591   DLL_NAME="$MSVCR_NAME"
48592   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
48593   METHOD="devkit"
48594   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48595     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48596 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48597 
48598     # Need to check if the found msvcr is correct architecture
48599     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48600 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48601     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48602     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48603       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48604       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48605       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48606         CORRECT_MSVCR_ARCH="PE32 executable"
48607       else
48608         CORRECT_MSVCR_ARCH="PE32+ executable"
48609       fi
48610     else
48611       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48612         CORRECT_MSVCR_ARCH=386
48613       else
48614         CORRECT_MSVCR_ARCH=x86-64
48615       fi
48616     fi
48617     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48618       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48619 $as_echo "ok" >&6; }
48620       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48621 
48622   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48623 
48624   # Input might be given as Windows format, start by converting to
48625   # unix format.
48626   path="$MSVC_DLL"
48627   new_path=`$CYGPATH -u "$path"`
48628 
48629   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48630   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48631   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48632   # "foo.exe" is OK but "foo" is an error.
48633   #
48634   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48635   # It is also a way to make sure we got the proper file name for the real test later on.
48636   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48637   if test "x$test_shortpath" = x; then
48638     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48639 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48640     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48641   fi
48642 
48643   # Call helper function which possibly converts this using DOS-style short mode.
48644   # If so, the updated path is stored in $new_path.
48645 
48646   input_path="$new_path"
48647   # Check if we need to convert this using DOS-style short mode. If the path
48648   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48649   # take no chances and rewrite it.
48650   # Note: m4 eats our [], so we need to use [ and ] instead.
48651   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48652   if test "x$has_forbidden_chars" != x; then
48653     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48654     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48655     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48656     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48657       # Going to short mode and back again did indeed matter. Since short mode is
48658       # case insensitive, let's make it lowercase to improve readability.
48659       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48660       # Now convert it back to Unix-style (cygpath)
48661       input_path=`$CYGPATH -u "$shortmode_path"`
48662       new_path="$input_path"
48663     fi
48664   fi
48665 
48666   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48667   if test "x$test_cygdrive_prefix" = x; then
48668     # As a simple fix, exclude /usr/bin since it's not a real path.
48669     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48670       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48671       # a path prefixed by /cygdrive for fixpath to work.
48672       new_path="$CYGWIN_ROOT_PATH$input_path"
48673     fi
48674   fi
48675 
48676 
48677   if test "x$path" != "x$new_path"; then
48678     MSVC_DLL="$new_path"
48679     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48680 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48681   fi
48682 
48683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48684 
48685   path="$MSVC_DLL"
48686   has_colon=`$ECHO $path | $GREP ^.:`
48687   new_path="$path"
48688   if test "x$has_colon" = x; then
48689     # Not in mixed or Windows style, start by that.
48690     new_path=`cmd //c echo $path`
48691   fi
48692 
48693 
48694   input_path="$new_path"
48695   # Check if we need to convert this using DOS-style short mode. If the path
48696   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48697   # take no chances and rewrite it.
48698   # Note: m4 eats our [], so we need to use [ and ] instead.
48699   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48700   if test "x$has_forbidden_chars" != x; then
48701     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48702     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48703   fi
48704 
48705 
48706   windows_path="$new_path"
48707   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48708     unix_path=`$CYGPATH -u "$windows_path"`
48709     new_path="$unix_path"
48710   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48711     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48712     new_path="$unix_path"
48713   fi
48714 
48715   if test "x$path" != "x$new_path"; then
48716     MSVC_DLL="$new_path"
48717     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48718 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48719   fi
48720 
48721   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48722   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48723 
48724   else
48725     # We're on a posix platform. Hooray! :)
48726     path="$MSVC_DLL"
48727     has_space=`$ECHO "$path" | $GREP " "`
48728     if test "x$has_space" != x; then
48729       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48730 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48731       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48732     fi
48733 
48734     # Use eval to expand a potential ~
48735     eval path="$path"
48736     if test ! -f "$path" && test ! -d "$path"; then
48737       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48738     fi
48739 
48740     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48741   fi
48742 
48743       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48744 $as_echo_n "checking for $DLL_NAME... " >&6; }
48745       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48746 $as_echo "$MSVC_DLL" >&6; }
48747     else
48748       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48749 $as_echo "incorrect, ignoring" >&6; }
48750       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48751 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48752     fi
48753   fi
48754 
48755     if test "x$MSVC_DLL" = x; then
48756       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
48757     fi
48758     MSVCR_DLL="$MSVC_DLL"
48759   else
48760 
48761   DLL_NAME="${MSVCR_NAME}"
48762   MSVC_DLL=
48763 
48764   if test "x$MSVC_DLL" = x; then
48765     if test "x$VCINSTALLDIR" != x; then
48766       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48767 
48768   windows_path="$CYGWIN_VC_INSTALL_DIR"
48769   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48770     unix_path=`$CYGPATH -u "$windows_path"`
48771     CYGWIN_VC_INSTALL_DIR="$unix_path"
48772   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48773     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48774     CYGWIN_VC_INSTALL_DIR="$unix_path"
48775   fi
48776 
48777       if test "$VS_VERSION" -lt 2017; then
48778         # Probe: Using well-known location from Visual Studio 12.0 and older
48779         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48780           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48781         else
48782           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48783         fi
48784       else
48785         # Probe: Using well-known location from VS 2017
48786         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48787           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
48788         else
48789           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
48790         fi
48791       fi
48792       # In case any of the above finds more than one file, loop over them.
48793       for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
48794         $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
48795 
48796   DLL_NAME="$DLL_NAME"
48797   POSSIBLE_MSVC_DLL="$possible_msvc_dll"
48798   METHOD="well-known location in VCINSTALLDIR"
48799   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48800     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48801 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48802 
48803     # Need to check if the found msvcr is correct architecture
48804     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48805 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48806     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48807     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48808       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48809       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48810       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48811         CORRECT_MSVCR_ARCH="PE32 executable"
48812       else
48813         CORRECT_MSVCR_ARCH="PE32+ executable"
48814       fi
48815     else
48816       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48817         CORRECT_MSVCR_ARCH=386
48818       else
48819         CORRECT_MSVCR_ARCH=x86-64
48820       fi
48821     fi
48822     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48823       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48824 $as_echo "ok" >&6; }
48825       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48826 
48827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48828 
48829   # Input might be given as Windows format, start by converting to
48830   # unix format.
48831   path="$MSVC_DLL"
48832   new_path=`$CYGPATH -u "$path"`
48833 
48834   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48835   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48836   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48837   # "foo.exe" is OK but "foo" is an error.
48838   #
48839   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48840   # It is also a way to make sure we got the proper file name for the real test later on.
48841   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48842   if test "x$test_shortpath" = x; then
48843     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48844 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48845     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48846   fi
48847 
48848   # Call helper function which possibly converts this using DOS-style short mode.
48849   # If so, the updated path is stored in $new_path.
48850 
48851   input_path="$new_path"
48852   # Check if we need to convert this using DOS-style short mode. If the path
48853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48854   # take no chances and rewrite it.
48855   # Note: m4 eats our [], so we need to use [ and ] instead.
48856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48857   if test "x$has_forbidden_chars" != x; then
48858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48859     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48860     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48861     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48862       # Going to short mode and back again did indeed matter. Since short mode is
48863       # case insensitive, let's make it lowercase to improve readability.
48864       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48865       # Now convert it back to Unix-style (cygpath)
48866       input_path=`$CYGPATH -u "$shortmode_path"`
48867       new_path="$input_path"
48868     fi
48869   fi
48870 
48871   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48872   if test "x$test_cygdrive_prefix" = x; then
48873     # As a simple fix, exclude /usr/bin since it's not a real path.
48874     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48875       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48876       # a path prefixed by /cygdrive for fixpath to work.
48877       new_path="$CYGWIN_ROOT_PATH$input_path"
48878     fi
48879   fi
48880 
48881 
48882   if test "x$path" != "x$new_path"; then
48883     MSVC_DLL="$new_path"
48884     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48885 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48886   fi
48887 
48888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48889 
48890   path="$MSVC_DLL"
48891   has_colon=`$ECHO $path | $GREP ^.:`
48892   new_path="$path"
48893   if test "x$has_colon" = x; then
48894     # Not in mixed or Windows style, start by that.
48895     new_path=`cmd //c echo $path`
48896   fi
48897 
48898 
48899   input_path="$new_path"
48900   # Check if we need to convert this using DOS-style short mode. If the path
48901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48902   # take no chances and rewrite it.
48903   # Note: m4 eats our [], so we need to use [ and ] instead.
48904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48905   if test "x$has_forbidden_chars" != x; then
48906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48907     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48908   fi
48909 
48910 
48911   windows_path="$new_path"
48912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48913     unix_path=`$CYGPATH -u "$windows_path"`
48914     new_path="$unix_path"
48915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48917     new_path="$unix_path"
48918   fi
48919 
48920   if test "x$path" != "x$new_path"; then
48921     MSVC_DLL="$new_path"
48922     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48923 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48924   fi
48925 
48926   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48927   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48928 
48929   else
48930     # We're on a posix platform. Hooray! :)
48931     path="$MSVC_DLL"
48932     has_space=`$ECHO "$path" | $GREP " "`
48933     if test "x$has_space" != x; then
48934       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48935 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48936       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48937     fi
48938 
48939     # Use eval to expand a potential ~
48940     eval path="$path"
48941     if test ! -f "$path" && test ! -d "$path"; then
48942       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48943     fi
48944 
48945     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48946   fi
48947 
48948       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48949 $as_echo_n "checking for $DLL_NAME... " >&6; }
48950       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48951 $as_echo "$MSVC_DLL" >&6; }
48952     else
48953       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48954 $as_echo "incorrect, ignoring" >&6; }
48955       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48956 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48957     fi
48958   fi
48959 
48960       done
48961     fi
48962   fi
48963 
48964   if test "x$MSVC_DLL" = x; then
48965     # Probe: Check in the Boot JDK directory.
48966     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
48967 
48968   DLL_NAME="$DLL_NAME"
48969   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48970   METHOD="well-known location in Boot JDK"
48971   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48972     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48973 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48974 
48975     # Need to check if the found msvcr is correct architecture
48976     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48977 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48978     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48979     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48980       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48981       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48982       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48983         CORRECT_MSVCR_ARCH="PE32 executable"
48984       else
48985         CORRECT_MSVCR_ARCH="PE32+ executable"
48986       fi
48987     else
48988       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48989         CORRECT_MSVCR_ARCH=386
48990       else
48991         CORRECT_MSVCR_ARCH=x86-64
48992       fi
48993     fi
48994     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48995       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48996 $as_echo "ok" >&6; }
48997       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48998 
48999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49000 
49001   # Input might be given as Windows format, start by converting to
49002   # unix format.
49003   path="$MSVC_DLL"
49004   new_path=`$CYGPATH -u "$path"`
49005 
49006   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49007   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49008   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49009   # "foo.exe" is OK but "foo" is an error.
49010   #
49011   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49012   # It is also a way to make sure we got the proper file name for the real test later on.
49013   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49014   if test "x$test_shortpath" = x; then
49015     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49016 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49017     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49018   fi
49019 
49020   # Call helper function which possibly converts this using DOS-style short mode.
49021   # If so, the updated path is stored in $new_path.
49022 
49023   input_path="$new_path"
49024   # Check if we need to convert this using DOS-style short mode. If the path
49025   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49026   # take no chances and rewrite it.
49027   # Note: m4 eats our [], so we need to use [ and ] instead.
49028   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49029   if test "x$has_forbidden_chars" != x; then
49030     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49031     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49032     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49033     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49034       # Going to short mode and back again did indeed matter. Since short mode is
49035       # case insensitive, let's make it lowercase to improve readability.
49036       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49037       # Now convert it back to Unix-style (cygpath)
49038       input_path=`$CYGPATH -u "$shortmode_path"`
49039       new_path="$input_path"
49040     fi
49041   fi
49042 
49043   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49044   if test "x$test_cygdrive_prefix" = x; then
49045     # As a simple fix, exclude /usr/bin since it's not a real path.
49046     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49047       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49048       # a path prefixed by /cygdrive for fixpath to work.
49049       new_path="$CYGWIN_ROOT_PATH$input_path"
49050     fi
49051   fi
49052 
49053 
49054   if test "x$path" != "x$new_path"; then
49055     MSVC_DLL="$new_path"
49056     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49057 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49058   fi
49059 
49060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49061 
49062   path="$MSVC_DLL"
49063   has_colon=`$ECHO $path | $GREP ^.:`
49064   new_path="$path"
49065   if test "x$has_colon" = x; then
49066     # Not in mixed or Windows style, start by that.
49067     new_path=`cmd //c echo $path`
49068   fi
49069 
49070 
49071   input_path="$new_path"
49072   # Check if we need to convert this using DOS-style short mode. If the path
49073   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49074   # take no chances and rewrite it.
49075   # Note: m4 eats our [], so we need to use [ and ] instead.
49076   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49077   if test "x$has_forbidden_chars" != x; then
49078     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49079     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49080   fi
49081 
49082 
49083   windows_path="$new_path"
49084   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49085     unix_path=`$CYGPATH -u "$windows_path"`
49086     new_path="$unix_path"
49087   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49088     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49089     new_path="$unix_path"
49090   fi
49091 
49092   if test "x$path" != "x$new_path"; then
49093     MSVC_DLL="$new_path"
49094     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49095 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49096   fi
49097 
49098   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49099   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49100 
49101   else
49102     # We're on a posix platform. Hooray! :)
49103     path="$MSVC_DLL"
49104     has_space=`$ECHO "$path" | $GREP " "`
49105     if test "x$has_space" != x; then
49106       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49107 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49108       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49109     fi
49110 
49111     # Use eval to expand a potential ~
49112     eval path="$path"
49113     if test ! -f "$path" && test ! -d "$path"; then
49114       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49115     fi
49116 
49117     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49118   fi
49119 
49120       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49121 $as_echo_n "checking for $DLL_NAME... " >&6; }
49122       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49123 $as_echo "$MSVC_DLL" >&6; }
49124     else
49125       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49126 $as_echo "incorrect, ignoring" >&6; }
49127       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49128 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49129     fi
49130   fi
49131 
49132   fi
49133 
49134   if test "x$MSVC_DLL" = x; then
49135     # Probe: Look in the Windows system32 directory
49136     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49137 
49138   windows_path="$CYGWIN_SYSTEMROOT"
49139   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49140     unix_path=`$CYGPATH -u "$windows_path"`
49141     CYGWIN_SYSTEMROOT="$unix_path"
49142   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49143     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49144     CYGWIN_SYSTEMROOT="$unix_path"
49145   fi
49146 
49147     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49148 
49149   DLL_NAME="$DLL_NAME"
49150   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49151   METHOD="well-known location in SYSTEMROOT"
49152   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49153     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49154 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49155 
49156     # Need to check if the found msvcr is correct architecture
49157     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49158 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49159     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49160     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49161       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49162       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49163       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49164         CORRECT_MSVCR_ARCH="PE32 executable"
49165       else
49166         CORRECT_MSVCR_ARCH="PE32+ executable"
49167       fi
49168     else
49169       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49170         CORRECT_MSVCR_ARCH=386
49171       else
49172         CORRECT_MSVCR_ARCH=x86-64
49173       fi
49174     fi
49175     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49176       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49177 $as_echo "ok" >&6; }
49178       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49179 
49180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49181 
49182   # Input might be given as Windows format, start by converting to
49183   # unix format.
49184   path="$MSVC_DLL"
49185   new_path=`$CYGPATH -u "$path"`
49186 
49187   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49188   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49189   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49190   # "foo.exe" is OK but "foo" is an error.
49191   #
49192   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49193   # It is also a way to make sure we got the proper file name for the real test later on.
49194   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49195   if test "x$test_shortpath" = x; then
49196     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49197 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49198     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49199   fi
49200 
49201   # Call helper function which possibly converts this using DOS-style short mode.
49202   # If so, the updated path is stored in $new_path.
49203 
49204   input_path="$new_path"
49205   # Check if we need to convert this using DOS-style short mode. If the path
49206   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49207   # take no chances and rewrite it.
49208   # Note: m4 eats our [], so we need to use [ and ] instead.
49209   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49210   if test "x$has_forbidden_chars" != x; then
49211     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49212     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49213     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49214     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49215       # Going to short mode and back again did indeed matter. Since short mode is
49216       # case insensitive, let's make it lowercase to improve readability.
49217       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49218       # Now convert it back to Unix-style (cygpath)
49219       input_path=`$CYGPATH -u "$shortmode_path"`
49220       new_path="$input_path"
49221     fi
49222   fi
49223 
49224   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49225   if test "x$test_cygdrive_prefix" = x; then
49226     # As a simple fix, exclude /usr/bin since it's not a real path.
49227     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49228       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49229       # a path prefixed by /cygdrive for fixpath to work.
49230       new_path="$CYGWIN_ROOT_PATH$input_path"
49231     fi
49232   fi
49233 
49234 
49235   if test "x$path" != "x$new_path"; then
49236     MSVC_DLL="$new_path"
49237     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49238 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49239   fi
49240 
49241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49242 
49243   path="$MSVC_DLL"
49244   has_colon=`$ECHO $path | $GREP ^.:`
49245   new_path="$path"
49246   if test "x$has_colon" = x; then
49247     # Not in mixed or Windows style, start by that.
49248     new_path=`cmd //c echo $path`
49249   fi
49250 
49251 
49252   input_path="$new_path"
49253   # Check if we need to convert this using DOS-style short mode. If the path
49254   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49255   # take no chances and rewrite it.
49256   # Note: m4 eats our [], so we need to use [ and ] instead.
49257   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49258   if test "x$has_forbidden_chars" != x; then
49259     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49260     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49261   fi
49262 
49263 
49264   windows_path="$new_path"
49265   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49266     unix_path=`$CYGPATH -u "$windows_path"`
49267     new_path="$unix_path"
49268   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49269     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49270     new_path="$unix_path"
49271   fi
49272 
49273   if test "x$path" != "x$new_path"; then
49274     MSVC_DLL="$new_path"
49275     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49276 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49277   fi
49278 
49279   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49280   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49281 
49282   else
49283     # We're on a posix platform. Hooray! :)
49284     path="$MSVC_DLL"
49285     has_space=`$ECHO "$path" | $GREP " "`
49286     if test "x$has_space" != x; then
49287       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49288 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49289       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49290     fi
49291 
49292     # Use eval to expand a potential ~
49293     eval path="$path"
49294     if test ! -f "$path" && test ! -d "$path"; then
49295       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49296     fi
49297 
49298     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49299   fi
49300 
49301       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49302 $as_echo_n "checking for $DLL_NAME... " >&6; }
49303       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49304 $as_echo "$MSVC_DLL" >&6; }
49305     else
49306       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49307 $as_echo "incorrect, ignoring" >&6; }
49308       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49309 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49310     fi
49311   fi
49312 
49313   fi
49314 
49315   if test "x$MSVC_DLL" = x; then
49316     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49317     if test "x$VS100COMNTOOLS" != x; then
49318       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49319 
49320   windows_path="$CYGWIN_VS_TOOLS_DIR"
49321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49322     unix_path=`$CYGPATH -u "$windows_path"`
49323     CYGWIN_VS_TOOLS_DIR="$unix_path"
49324   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49325     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49326     CYGWIN_VS_TOOLS_DIR="$unix_path"
49327   fi
49328 
49329       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49330         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49331             | $GREP -i /x64/ | $HEAD --lines 1`
49332       else
49333         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49334             | $GREP -i /x86/ | $HEAD --lines 1`
49335       fi
49336 
49337   DLL_NAME="$DLL_NAME"
49338   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49339   METHOD="search of VS100COMNTOOLS"
49340   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49341     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49342 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49343 
49344     # Need to check if the found msvcr is correct architecture
49345     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49346 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49347     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49348     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49349       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49350       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49351       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49352         CORRECT_MSVCR_ARCH="PE32 executable"
49353       else
49354         CORRECT_MSVCR_ARCH="PE32+ executable"
49355       fi
49356     else
49357       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49358         CORRECT_MSVCR_ARCH=386
49359       else
49360         CORRECT_MSVCR_ARCH=x86-64
49361       fi
49362     fi
49363     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49364       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49365 $as_echo "ok" >&6; }
49366       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49367 
49368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49369 
49370   # Input might be given as Windows format, start by converting to
49371   # unix format.
49372   path="$MSVC_DLL"
49373   new_path=`$CYGPATH -u "$path"`
49374 
49375   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49376   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49377   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49378   # "foo.exe" is OK but "foo" is an error.
49379   #
49380   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49381   # It is also a way to make sure we got the proper file name for the real test later on.
49382   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49383   if test "x$test_shortpath" = x; then
49384     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49385 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49386     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49387   fi
49388 
49389   # Call helper function which possibly converts this using DOS-style short mode.
49390   # If so, the updated path is stored in $new_path.
49391 
49392   input_path="$new_path"
49393   # Check if we need to convert this using DOS-style short mode. If the path
49394   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49395   # take no chances and rewrite it.
49396   # Note: m4 eats our [], so we need to use [ and ] instead.
49397   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49398   if test "x$has_forbidden_chars" != x; then
49399     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49400     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49401     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49402     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49403       # Going to short mode and back again did indeed matter. Since short mode is
49404       # case insensitive, let's make it lowercase to improve readability.
49405       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49406       # Now convert it back to Unix-style (cygpath)
49407       input_path=`$CYGPATH -u "$shortmode_path"`
49408       new_path="$input_path"
49409     fi
49410   fi
49411 
49412   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49413   if test "x$test_cygdrive_prefix" = x; then
49414     # As a simple fix, exclude /usr/bin since it's not a real path.
49415     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49416       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49417       # a path prefixed by /cygdrive for fixpath to work.
49418       new_path="$CYGWIN_ROOT_PATH$input_path"
49419     fi
49420   fi
49421 
49422 
49423   if test "x$path" != "x$new_path"; then
49424     MSVC_DLL="$new_path"
49425     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49426 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49427   fi
49428 
49429   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49430 
49431   path="$MSVC_DLL"
49432   has_colon=`$ECHO $path | $GREP ^.:`
49433   new_path="$path"
49434   if test "x$has_colon" = x; then
49435     # Not in mixed or Windows style, start by that.
49436     new_path=`cmd //c echo $path`
49437   fi
49438 
49439 
49440   input_path="$new_path"
49441   # Check if we need to convert this using DOS-style short mode. If the path
49442   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49443   # take no chances and rewrite it.
49444   # Note: m4 eats our [], so we need to use [ and ] instead.
49445   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49446   if test "x$has_forbidden_chars" != x; then
49447     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49448     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49449   fi
49450 
49451 
49452   windows_path="$new_path"
49453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49454     unix_path=`$CYGPATH -u "$windows_path"`
49455     new_path="$unix_path"
49456   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49457     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49458     new_path="$unix_path"
49459   fi
49460 
49461   if test "x$path" != "x$new_path"; then
49462     MSVC_DLL="$new_path"
49463     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49464 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49465   fi
49466 
49467   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49468   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49469 
49470   else
49471     # We're on a posix platform. Hooray! :)
49472     path="$MSVC_DLL"
49473     has_space=`$ECHO "$path" | $GREP " "`
49474     if test "x$has_space" != x; then
49475       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49476 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49477       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49478     fi
49479 
49480     # Use eval to expand a potential ~
49481     eval path="$path"
49482     if test ! -f "$path" && test ! -d "$path"; then
49483       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49484     fi
49485 
49486     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49487   fi
49488 
49489       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49490 $as_echo_n "checking for $DLL_NAME... " >&6; }
49491       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49492 $as_echo "$MSVC_DLL" >&6; }
49493     else
49494       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49495 $as_echo "incorrect, ignoring" >&6; }
49496       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49497 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49498     fi
49499   fi
49500 
49501     fi
49502   fi
49503 
49504   if test "x$MSVC_DLL" = x; then
49505     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49506     # (This was the original behaviour; kept since it might turn something up)
49507     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49508       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49509         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49510           | $GREP x64 | $HEAD --lines 1`
49511       else
49512         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49513           | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49514         if test "x$POSSIBLE_MSVC_DLL" = x; then
49515           # We're grasping at straws now...
49516           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49517               | $HEAD --lines 1`
49518         fi
49519       fi
49520 
49521 
49522   DLL_NAME="$DLL_NAME"
49523   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49524   METHOD="search of VCINSTALLDIR"
49525   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49526     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49527 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49528 
49529     # Need to check if the found msvcr is correct architecture
49530     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49531 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49532     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49533     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49534       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49535       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49536       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49537         CORRECT_MSVCR_ARCH="PE32 executable"
49538       else
49539         CORRECT_MSVCR_ARCH="PE32+ executable"
49540       fi
49541     else
49542       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49543         CORRECT_MSVCR_ARCH=386
49544       else
49545         CORRECT_MSVCR_ARCH=x86-64
49546       fi
49547     fi
49548     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49549       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49550 $as_echo "ok" >&6; }
49551       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49552 
49553   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49554 
49555   # Input might be given as Windows format, start by converting to
49556   # unix format.
49557   path="$MSVC_DLL"
49558   new_path=`$CYGPATH -u "$path"`
49559 
49560   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49561   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49562   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49563   # "foo.exe" is OK but "foo" is an error.
49564   #
49565   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49566   # It is also a way to make sure we got the proper file name for the real test later on.
49567   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49568   if test "x$test_shortpath" = x; then
49569     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49570 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49571     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49572   fi
49573 
49574   # Call helper function which possibly converts this using DOS-style short mode.
49575   # If so, the updated path is stored in $new_path.
49576 
49577   input_path="$new_path"
49578   # Check if we need to convert this using DOS-style short mode. If the path
49579   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49580   # take no chances and rewrite it.
49581   # Note: m4 eats our [], so we need to use [ and ] instead.
49582   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49583   if test "x$has_forbidden_chars" != x; then
49584     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49585     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49586     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49587     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49588       # Going to short mode and back again did indeed matter. Since short mode is
49589       # case insensitive, let's make it lowercase to improve readability.
49590       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49591       # Now convert it back to Unix-style (cygpath)
49592       input_path=`$CYGPATH -u "$shortmode_path"`
49593       new_path="$input_path"
49594     fi
49595   fi
49596 
49597   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49598   if test "x$test_cygdrive_prefix" = x; then
49599     # As a simple fix, exclude /usr/bin since it's not a real path.
49600     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49601       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49602       # a path prefixed by /cygdrive for fixpath to work.
49603       new_path="$CYGWIN_ROOT_PATH$input_path"
49604     fi
49605   fi
49606 
49607 
49608   if test "x$path" != "x$new_path"; then
49609     MSVC_DLL="$new_path"
49610     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49611 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49612   fi
49613 
49614   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49615 
49616   path="$MSVC_DLL"
49617   has_colon=`$ECHO $path | $GREP ^.:`
49618   new_path="$path"
49619   if test "x$has_colon" = x; then
49620     # Not in mixed or Windows style, start by that.
49621     new_path=`cmd //c echo $path`
49622   fi
49623 
49624 
49625   input_path="$new_path"
49626   # Check if we need to convert this using DOS-style short mode. If the path
49627   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49628   # take no chances and rewrite it.
49629   # Note: m4 eats our [], so we need to use [ and ] instead.
49630   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49631   if test "x$has_forbidden_chars" != x; then
49632     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49633     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49634   fi
49635 
49636 
49637   windows_path="$new_path"
49638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49639     unix_path=`$CYGPATH -u "$windows_path"`
49640     new_path="$unix_path"
49641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49642     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49643     new_path="$unix_path"
49644   fi
49645 
49646   if test "x$path" != "x$new_path"; then
49647     MSVC_DLL="$new_path"
49648     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49649 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49650   fi
49651 
49652   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49653   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49654 
49655   else
49656     # We're on a posix platform. Hooray! :)
49657     path="$MSVC_DLL"
49658     has_space=`$ECHO "$path" | $GREP " "`
49659     if test "x$has_space" != x; then
49660       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49661 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49662       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49663     fi
49664 
49665     # Use eval to expand a potential ~
49666     eval path="$path"
49667     if test ! -f "$path" && test ! -d "$path"; then
49668       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49669     fi
49670 
49671     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49672   fi
49673 
49674       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49675 $as_echo_n "checking for $DLL_NAME... " >&6; }
49676       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49677 $as_echo "$MSVC_DLL" >&6; }
49678     else
49679       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49680 $as_echo "incorrect, ignoring" >&6; }
49681       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49682 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49683     fi
49684   fi
49685 
49686     fi
49687   fi
49688 
49689   if test "x$MSVC_DLL" = x; then
49690     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49691 $as_echo_n "checking for $DLL_NAME... " >&6; }
49692     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49693 $as_echo "no" >&6; }
49694     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49695   fi
49696 
49697     MSVCR_DLL="$MSVC_DLL"
49698   fi
49699 
49700 
49701 
49702 # Check whether --with-msvcp-dll was given.
49703 if test "${with_msvcp_dll+set}" = set; then :
49704   withval=$with_msvcp_dll;
49705 fi
49706 
49707 
49708   if test "x$MSVCP_NAME" != "x"; then
49709     if test "x$with_msvcp_dll" != x; then
49710       # If given explicitely by user, do not probe. If not present, fail directly.
49711 
49712   DLL_NAME="$MSVCP_NAME"
49713   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
49714   METHOD="--with-msvcp-dll"
49715   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49716     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49717 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49718 
49719     # Need to check if the found msvcr is correct architecture
49720     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49721 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49722     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49723     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49724       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49725       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49726       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49727         CORRECT_MSVCR_ARCH="PE32 executable"
49728       else
49729         CORRECT_MSVCR_ARCH="PE32+ executable"
49730       fi
49731     else
49732       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49733         CORRECT_MSVCR_ARCH=386
49734       else
49735         CORRECT_MSVCR_ARCH=x86-64
49736       fi
49737     fi
49738     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49739       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49740 $as_echo "ok" >&6; }
49741       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49742 
49743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49744 
49745   # Input might be given as Windows format, start by converting to
49746   # unix format.
49747   path="$MSVC_DLL"
49748   new_path=`$CYGPATH -u "$path"`
49749 
49750   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49751   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49752   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49753   # "foo.exe" is OK but "foo" is an error.
49754   #
49755   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49756   # It is also a way to make sure we got the proper file name for the real test later on.
49757   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49758   if test "x$test_shortpath" = x; then
49759     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49760 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49761     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49762   fi
49763 
49764   # Call helper function which possibly converts this using DOS-style short mode.
49765   # If so, the updated path is stored in $new_path.
49766 
49767   input_path="$new_path"
49768   # Check if we need to convert this using DOS-style short mode. If the path
49769   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49770   # take no chances and rewrite it.
49771   # Note: m4 eats our [], so we need to use [ and ] instead.
49772   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49773   if test "x$has_forbidden_chars" != x; then
49774     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49775     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49776     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49777     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49778       # Going to short mode and back again did indeed matter. Since short mode is
49779       # case insensitive, let's make it lowercase to improve readability.
49780       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49781       # Now convert it back to Unix-style (cygpath)
49782       input_path=`$CYGPATH -u "$shortmode_path"`
49783       new_path="$input_path"
49784     fi
49785   fi
49786 
49787   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49788   if test "x$test_cygdrive_prefix" = x; then
49789     # As a simple fix, exclude /usr/bin since it's not a real path.
49790     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49791       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49792       # a path prefixed by /cygdrive for fixpath to work.
49793       new_path="$CYGWIN_ROOT_PATH$input_path"
49794     fi
49795   fi
49796 
49797 
49798   if test "x$path" != "x$new_path"; then
49799     MSVC_DLL="$new_path"
49800     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49801 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49802   fi
49803 
49804   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49805 
49806   path="$MSVC_DLL"
49807   has_colon=`$ECHO $path | $GREP ^.:`
49808   new_path="$path"
49809   if test "x$has_colon" = x; then
49810     # Not in mixed or Windows style, start by that.
49811     new_path=`cmd //c echo $path`
49812   fi
49813 
49814 
49815   input_path="$new_path"
49816   # Check if we need to convert this using DOS-style short mode. If the path
49817   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49818   # take no chances and rewrite it.
49819   # Note: m4 eats our [], so we need to use [ and ] instead.
49820   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49821   if test "x$has_forbidden_chars" != x; then
49822     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49823     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49824   fi
49825 
49826 
49827   windows_path="$new_path"
49828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49829     unix_path=`$CYGPATH -u "$windows_path"`
49830     new_path="$unix_path"
49831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49833     new_path="$unix_path"
49834   fi
49835 
49836   if test "x$path" != "x$new_path"; then
49837     MSVC_DLL="$new_path"
49838     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49839 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49840   fi
49841 
49842   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49843   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49844 
49845   else
49846     # We're on a posix platform. Hooray! :)
49847     path="$MSVC_DLL"
49848     has_space=`$ECHO "$path" | $GREP " "`
49849     if test "x$has_space" != x; then
49850       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49851 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49852       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49853     fi
49854 
49855     # Use eval to expand a potential ~
49856     eval path="$path"
49857     if test ! -f "$path" && test ! -d "$path"; then
49858       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49859     fi
49860 
49861     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49862   fi
49863 
49864       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49865 $as_echo_n "checking for $DLL_NAME... " >&6; }
49866       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49867 $as_echo "$MSVC_DLL" >&6; }
49868     else
49869       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49870 $as_echo "incorrect, ignoring" >&6; }
49871       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49872 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49873     fi
49874   fi
49875 
49876       if test "x$MSVC_DLL" = x; then
49877         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
49878       fi
49879       MSVCP_DLL="$MSVC_DLL"
49880     elif test "x$DEVKIT_MSVCP_DLL" != x; then
49881 
49882   DLL_NAME="$MSVCP_NAME"
49883   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
49884   METHOD="devkit"
49885   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49886     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49887 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49888 
49889     # Need to check if the found msvcr is correct architecture
49890     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49891 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49892     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49893     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49894       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49895       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49896       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49897         CORRECT_MSVCR_ARCH="PE32 executable"
49898       else
49899         CORRECT_MSVCR_ARCH="PE32+ executable"
49900       fi
49901     else
49902       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49903         CORRECT_MSVCR_ARCH=386
49904       else
49905         CORRECT_MSVCR_ARCH=x86-64
49906       fi
49907     fi
49908     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49909       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49910 $as_echo "ok" >&6; }
49911       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49912 
49913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49914 
49915   # Input might be given as Windows format, start by converting to
49916   # unix format.
49917   path="$MSVC_DLL"
49918   new_path=`$CYGPATH -u "$path"`
49919 
49920   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49921   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49922   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49923   # "foo.exe" is OK but "foo" is an error.
49924   #
49925   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49926   # It is also a way to make sure we got the proper file name for the real test later on.
49927   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49928   if test "x$test_shortpath" = x; then
49929     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49930 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49931     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49932   fi
49933 
49934   # Call helper function which possibly converts this using DOS-style short mode.
49935   # If so, the updated path is stored in $new_path.
49936 
49937   input_path="$new_path"
49938   # Check if we need to convert this using DOS-style short mode. If the path
49939   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49940   # take no chances and rewrite it.
49941   # Note: m4 eats our [], so we need to use [ and ] instead.
49942   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49943   if test "x$has_forbidden_chars" != x; then
49944     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49945     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49946     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49947     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49948       # Going to short mode and back again did indeed matter. Since short mode is
49949       # case insensitive, let's make it lowercase to improve readability.
49950       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49951       # Now convert it back to Unix-style (cygpath)
49952       input_path=`$CYGPATH -u "$shortmode_path"`
49953       new_path="$input_path"
49954     fi
49955   fi
49956 
49957   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49958   if test "x$test_cygdrive_prefix" = x; then
49959     # As a simple fix, exclude /usr/bin since it's not a real path.
49960     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49961       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49962       # a path prefixed by /cygdrive for fixpath to work.
49963       new_path="$CYGWIN_ROOT_PATH$input_path"
49964     fi
49965   fi
49966 
49967 
49968   if test "x$path" != "x$new_path"; then
49969     MSVC_DLL="$new_path"
49970     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49971 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49972   fi
49973 
49974   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49975 
49976   path="$MSVC_DLL"
49977   has_colon=`$ECHO $path | $GREP ^.:`
49978   new_path="$path"
49979   if test "x$has_colon" = x; then
49980     # Not in mixed or Windows style, start by that.
49981     new_path=`cmd //c echo $path`
49982   fi
49983 
49984 
49985   input_path="$new_path"
49986   # Check if we need to convert this using DOS-style short mode. If the path
49987   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49988   # take no chances and rewrite it.
49989   # Note: m4 eats our [], so we need to use [ and ] instead.
49990   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49991   if test "x$has_forbidden_chars" != x; then
49992     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49993     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49994   fi
49995 
49996 
49997   windows_path="$new_path"
49998   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49999     unix_path=`$CYGPATH -u "$windows_path"`
50000     new_path="$unix_path"
50001   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50002     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50003     new_path="$unix_path"
50004   fi
50005 
50006   if test "x$path" != "x$new_path"; then
50007     MSVC_DLL="$new_path"
50008     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50009 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50010   fi
50011 
50012   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50013   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50014 
50015   else
50016     # We're on a posix platform. Hooray! :)
50017     path="$MSVC_DLL"
50018     has_space=`$ECHO "$path" | $GREP " "`
50019     if test "x$has_space" != x; then
50020       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50021 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50022       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50023     fi
50024 
50025     # Use eval to expand a potential ~
50026     eval path="$path"
50027     if test ! -f "$path" && test ! -d "$path"; then
50028       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50029     fi
50030 
50031     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50032   fi
50033 
50034       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50035 $as_echo_n "checking for $DLL_NAME... " >&6; }
50036       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50037 $as_echo "$MSVC_DLL" >&6; }
50038     else
50039       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50040 $as_echo "incorrect, ignoring" >&6; }
50041       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50042 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50043     fi
50044   fi
50045 
50046       if test "x$MSVC_DLL" = x; then
50047         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
50048       fi
50049       MSVCP_DLL="$MSVC_DLL"
50050     else
50051 
50052   DLL_NAME="${MSVCP_NAME}"
50053   MSVC_DLL=
50054 
50055   if test "x$MSVC_DLL" = x; then
50056     if test "x$VCINSTALLDIR" != x; then
50057       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50058 
50059   windows_path="$CYGWIN_VC_INSTALL_DIR"
50060   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50061     unix_path=`$CYGPATH -u "$windows_path"`
50062     CYGWIN_VC_INSTALL_DIR="$unix_path"
50063   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50064     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50065     CYGWIN_VC_INSTALL_DIR="$unix_path"
50066   fi
50067 
50068       if test "$VS_VERSION" -lt 2017; then
50069         # Probe: Using well-known location from Visual Studio 12.0 and older
50070         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50071           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50072         else
50073           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50074         fi
50075       else
50076         # Probe: Using well-known location from VS 2017
50077         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50078           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
50079         else
50080           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
50081         fi
50082       fi
50083       # In case any of the above finds more than one file, loop over them.
50084       for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
50085         $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
50086 
50087   DLL_NAME="$DLL_NAME"
50088   POSSIBLE_MSVC_DLL="$possible_msvc_dll"
50089   METHOD="well-known location in VCINSTALLDIR"
50090   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50091     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50092 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50093 
50094     # Need to check if the found msvcr is correct architecture
50095     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50096 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50097     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50098     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50099       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50100       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50101       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50102         CORRECT_MSVCR_ARCH="PE32 executable"
50103       else
50104         CORRECT_MSVCR_ARCH="PE32+ executable"
50105       fi
50106     else
50107       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50108         CORRECT_MSVCR_ARCH=386
50109       else
50110         CORRECT_MSVCR_ARCH=x86-64
50111       fi
50112     fi
50113     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50114       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50115 $as_echo "ok" >&6; }
50116       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50117 
50118   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50119 
50120   # Input might be given as Windows format, start by converting to
50121   # unix format.
50122   path="$MSVC_DLL"
50123   new_path=`$CYGPATH -u "$path"`
50124 
50125   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50126   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50127   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50128   # "foo.exe" is OK but "foo" is an error.
50129   #
50130   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50131   # It is also a way to make sure we got the proper file name for the real test later on.
50132   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50133   if test "x$test_shortpath" = x; then
50134     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50135 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50136     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50137   fi
50138 
50139   # Call helper function which possibly converts this using DOS-style short mode.
50140   # If so, the updated path is stored in $new_path.
50141 
50142   input_path="$new_path"
50143   # Check if we need to convert this using DOS-style short mode. If the path
50144   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50145   # take no chances and rewrite it.
50146   # Note: m4 eats our [], so we need to use [ and ] instead.
50147   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50148   if test "x$has_forbidden_chars" != x; then
50149     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50150     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50151     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50152     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50153       # Going to short mode and back again did indeed matter. Since short mode is
50154       # case insensitive, let's make it lowercase to improve readability.
50155       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50156       # Now convert it back to Unix-style (cygpath)
50157       input_path=`$CYGPATH -u "$shortmode_path"`
50158       new_path="$input_path"
50159     fi
50160   fi
50161 
50162   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50163   if test "x$test_cygdrive_prefix" = x; then
50164     # As a simple fix, exclude /usr/bin since it's not a real path.
50165     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50166       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50167       # a path prefixed by /cygdrive for fixpath to work.
50168       new_path="$CYGWIN_ROOT_PATH$input_path"
50169     fi
50170   fi
50171 
50172 
50173   if test "x$path" != "x$new_path"; then
50174     MSVC_DLL="$new_path"
50175     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50176 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50177   fi
50178 
50179   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50180 
50181   path="$MSVC_DLL"
50182   has_colon=`$ECHO $path | $GREP ^.:`
50183   new_path="$path"
50184   if test "x$has_colon" = x; then
50185     # Not in mixed or Windows style, start by that.
50186     new_path=`cmd //c echo $path`
50187   fi
50188 
50189 
50190   input_path="$new_path"
50191   # Check if we need to convert this using DOS-style short mode. If the path
50192   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50193   # take no chances and rewrite it.
50194   # Note: m4 eats our [], so we need to use [ and ] instead.
50195   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50196   if test "x$has_forbidden_chars" != x; then
50197     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50198     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50199   fi
50200 
50201 
50202   windows_path="$new_path"
50203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50204     unix_path=`$CYGPATH -u "$windows_path"`
50205     new_path="$unix_path"
50206   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50207     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50208     new_path="$unix_path"
50209   fi
50210 
50211   if test "x$path" != "x$new_path"; then
50212     MSVC_DLL="$new_path"
50213     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50214 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50215   fi
50216 
50217   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50218   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50219 
50220   else
50221     # We're on a posix platform. Hooray! :)
50222     path="$MSVC_DLL"
50223     has_space=`$ECHO "$path" | $GREP " "`
50224     if test "x$has_space" != x; then
50225       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50226 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50227       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50228     fi
50229 
50230     # Use eval to expand a potential ~
50231     eval path="$path"
50232     if test ! -f "$path" && test ! -d "$path"; then
50233       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50234     fi
50235 
50236     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50237   fi
50238 
50239       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50240 $as_echo_n "checking for $DLL_NAME... " >&6; }
50241       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50242 $as_echo "$MSVC_DLL" >&6; }
50243     else
50244       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50245 $as_echo "incorrect, ignoring" >&6; }
50246       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50247 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50248     fi
50249   fi
50250 
50251       done
50252     fi
50253   fi
50254 
50255   if test "x$MSVC_DLL" = x; then
50256     # Probe: Check in the Boot JDK directory.
50257     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50258 
50259   DLL_NAME="$DLL_NAME"
50260   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50261   METHOD="well-known location in Boot JDK"
50262   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50263     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50264 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50265 
50266     # Need to check if the found msvcr is correct architecture
50267     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50268 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50269     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50270     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50271       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50272       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50273       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50274         CORRECT_MSVCR_ARCH="PE32 executable"
50275       else
50276         CORRECT_MSVCR_ARCH="PE32+ executable"
50277       fi
50278     else
50279       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50280         CORRECT_MSVCR_ARCH=386
50281       else
50282         CORRECT_MSVCR_ARCH=x86-64
50283       fi
50284     fi
50285     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50286       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50287 $as_echo "ok" >&6; }
50288       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50289 
50290   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50291 
50292   # Input might be given as Windows format, start by converting to
50293   # unix format.
50294   path="$MSVC_DLL"
50295   new_path=`$CYGPATH -u "$path"`
50296 
50297   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50298   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50299   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50300   # "foo.exe" is OK but "foo" is an error.
50301   #
50302   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50303   # It is also a way to make sure we got the proper file name for the real test later on.
50304   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50305   if test "x$test_shortpath" = x; then
50306     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50307 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50308     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50309   fi
50310 
50311   # Call helper function which possibly converts this using DOS-style short mode.
50312   # If so, the updated path is stored in $new_path.
50313 
50314   input_path="$new_path"
50315   # Check if we need to convert this using DOS-style short mode. If the path
50316   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50317   # take no chances and rewrite it.
50318   # Note: m4 eats our [], so we need to use [ and ] instead.
50319   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50320   if test "x$has_forbidden_chars" != x; then
50321     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50322     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50323     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50324     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50325       # Going to short mode and back again did indeed matter. Since short mode is
50326       # case insensitive, let's make it lowercase to improve readability.
50327       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50328       # Now convert it back to Unix-style (cygpath)
50329       input_path=`$CYGPATH -u "$shortmode_path"`
50330       new_path="$input_path"
50331     fi
50332   fi
50333 
50334   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50335   if test "x$test_cygdrive_prefix" = x; then
50336     # As a simple fix, exclude /usr/bin since it's not a real path.
50337     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50338       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50339       # a path prefixed by /cygdrive for fixpath to work.
50340       new_path="$CYGWIN_ROOT_PATH$input_path"
50341     fi
50342   fi
50343 
50344 
50345   if test "x$path" != "x$new_path"; then
50346     MSVC_DLL="$new_path"
50347     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50348 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50349   fi
50350 
50351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50352 
50353   path="$MSVC_DLL"
50354   has_colon=`$ECHO $path | $GREP ^.:`
50355   new_path="$path"
50356   if test "x$has_colon" = x; then
50357     # Not in mixed or Windows style, start by that.
50358     new_path=`cmd //c echo $path`
50359   fi
50360 
50361 
50362   input_path="$new_path"
50363   # Check if we need to convert this using DOS-style short mode. If the path
50364   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50365   # take no chances and rewrite it.
50366   # Note: m4 eats our [], so we need to use [ and ] instead.
50367   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50368   if test "x$has_forbidden_chars" != x; then
50369     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50370     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50371   fi
50372 
50373 
50374   windows_path="$new_path"
50375   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50376     unix_path=`$CYGPATH -u "$windows_path"`
50377     new_path="$unix_path"
50378   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50379     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50380     new_path="$unix_path"
50381   fi
50382 
50383   if test "x$path" != "x$new_path"; then
50384     MSVC_DLL="$new_path"
50385     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50386 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50387   fi
50388 
50389   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50390   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50391 
50392   else
50393     # We're on a posix platform. Hooray! :)
50394     path="$MSVC_DLL"
50395     has_space=`$ECHO "$path" | $GREP " "`
50396     if test "x$has_space" != x; then
50397       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50398 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50399       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50400     fi
50401 
50402     # Use eval to expand a potential ~
50403     eval path="$path"
50404     if test ! -f "$path" && test ! -d "$path"; then
50405       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50406     fi
50407 
50408     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50409   fi
50410 
50411       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50412 $as_echo_n "checking for $DLL_NAME... " >&6; }
50413       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50414 $as_echo "$MSVC_DLL" >&6; }
50415     else
50416       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50417 $as_echo "incorrect, ignoring" >&6; }
50418       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50419 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50420     fi
50421   fi
50422 
50423   fi
50424 
50425   if test "x$MSVC_DLL" = x; then
50426     # Probe: Look in the Windows system32 directory
50427     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50428 
50429   windows_path="$CYGWIN_SYSTEMROOT"
50430   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50431     unix_path=`$CYGPATH -u "$windows_path"`
50432     CYGWIN_SYSTEMROOT="$unix_path"
50433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50434     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50435     CYGWIN_SYSTEMROOT="$unix_path"
50436   fi
50437 
50438     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50439 
50440   DLL_NAME="$DLL_NAME"
50441   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50442   METHOD="well-known location in SYSTEMROOT"
50443   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50444     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50445 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50446 
50447     # Need to check if the found msvcr is correct architecture
50448     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50449 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50450     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50451     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50452       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50453       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50454       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50455         CORRECT_MSVCR_ARCH="PE32 executable"
50456       else
50457         CORRECT_MSVCR_ARCH="PE32+ executable"
50458       fi
50459     else
50460       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50461         CORRECT_MSVCR_ARCH=386
50462       else
50463         CORRECT_MSVCR_ARCH=x86-64
50464       fi
50465     fi
50466     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50467       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50468 $as_echo "ok" >&6; }
50469       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50470 
50471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50472 
50473   # Input might be given as Windows format, start by converting to
50474   # unix format.
50475   path="$MSVC_DLL"
50476   new_path=`$CYGPATH -u "$path"`
50477 
50478   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50479   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50480   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50481   # "foo.exe" is OK but "foo" is an error.
50482   #
50483   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50484   # It is also a way to make sure we got the proper file name for the real test later on.
50485   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50486   if test "x$test_shortpath" = x; then
50487     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50488 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50489     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50490   fi
50491 
50492   # Call helper function which possibly converts this using DOS-style short mode.
50493   # If so, the updated path is stored in $new_path.
50494 
50495   input_path="$new_path"
50496   # Check if we need to convert this using DOS-style short mode. If the path
50497   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50498   # take no chances and rewrite it.
50499   # Note: m4 eats our [], so we need to use [ and ] instead.
50500   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50501   if test "x$has_forbidden_chars" != x; then
50502     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50503     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50504     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50505     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50506       # Going to short mode and back again did indeed matter. Since short mode is
50507       # case insensitive, let's make it lowercase to improve readability.
50508       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50509       # Now convert it back to Unix-style (cygpath)
50510       input_path=`$CYGPATH -u "$shortmode_path"`
50511       new_path="$input_path"
50512     fi
50513   fi
50514 
50515   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50516   if test "x$test_cygdrive_prefix" = x; then
50517     # As a simple fix, exclude /usr/bin since it's not a real path.
50518     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50519       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50520       # a path prefixed by /cygdrive for fixpath to work.
50521       new_path="$CYGWIN_ROOT_PATH$input_path"
50522     fi
50523   fi
50524 
50525 
50526   if test "x$path" != "x$new_path"; then
50527     MSVC_DLL="$new_path"
50528     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50529 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50530   fi
50531 
50532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50533 
50534   path="$MSVC_DLL"
50535   has_colon=`$ECHO $path | $GREP ^.:`
50536   new_path="$path"
50537   if test "x$has_colon" = x; then
50538     # Not in mixed or Windows style, start by that.
50539     new_path=`cmd //c echo $path`
50540   fi
50541 
50542 
50543   input_path="$new_path"
50544   # Check if we need to convert this using DOS-style short mode. If the path
50545   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50546   # take no chances and rewrite it.
50547   # Note: m4 eats our [], so we need to use [ and ] instead.
50548   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50549   if test "x$has_forbidden_chars" != x; then
50550     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50551     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50552   fi
50553 
50554 
50555   windows_path="$new_path"
50556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50557     unix_path=`$CYGPATH -u "$windows_path"`
50558     new_path="$unix_path"
50559   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50560     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50561     new_path="$unix_path"
50562   fi
50563 
50564   if test "x$path" != "x$new_path"; then
50565     MSVC_DLL="$new_path"
50566     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50567 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50568   fi
50569 
50570   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50571   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50572 
50573   else
50574     # We're on a posix platform. Hooray! :)
50575     path="$MSVC_DLL"
50576     has_space=`$ECHO "$path" | $GREP " "`
50577     if test "x$has_space" != x; then
50578       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50579 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50580       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50581     fi
50582 
50583     # Use eval to expand a potential ~
50584     eval path="$path"
50585     if test ! -f "$path" && test ! -d "$path"; then
50586       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50587     fi
50588 
50589     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50590   fi
50591 
50592       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50593 $as_echo_n "checking for $DLL_NAME... " >&6; }
50594       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50595 $as_echo "$MSVC_DLL" >&6; }
50596     else
50597       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50598 $as_echo "incorrect, ignoring" >&6; }
50599       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50600 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50601     fi
50602   fi
50603 
50604   fi
50605 
50606   if test "x$MSVC_DLL" = x; then
50607     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50608     if test "x$VS100COMNTOOLS" != x; then
50609       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50610 
50611   windows_path="$CYGWIN_VS_TOOLS_DIR"
50612   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50613     unix_path=`$CYGPATH -u "$windows_path"`
50614     CYGWIN_VS_TOOLS_DIR="$unix_path"
50615   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50616     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50617     CYGWIN_VS_TOOLS_DIR="$unix_path"
50618   fi
50619 
50620       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50621         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50622             | $GREP -i /x64/ | $HEAD --lines 1`
50623       else
50624         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50625             | $GREP -i /x86/ | $HEAD --lines 1`
50626       fi
50627 
50628   DLL_NAME="$DLL_NAME"
50629   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50630   METHOD="search of VS100COMNTOOLS"
50631   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50632     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50633 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50634 
50635     # Need to check if the found msvcr is correct architecture
50636     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50637 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50638     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50639     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50640       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50641       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50642       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50643         CORRECT_MSVCR_ARCH="PE32 executable"
50644       else
50645         CORRECT_MSVCR_ARCH="PE32+ executable"
50646       fi
50647     else
50648       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50649         CORRECT_MSVCR_ARCH=386
50650       else
50651         CORRECT_MSVCR_ARCH=x86-64
50652       fi
50653     fi
50654     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50655       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50656 $as_echo "ok" >&6; }
50657       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50658 
50659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50660 
50661   # Input might be given as Windows format, start by converting to
50662   # unix format.
50663   path="$MSVC_DLL"
50664   new_path=`$CYGPATH -u "$path"`
50665 
50666   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50667   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50668   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50669   # "foo.exe" is OK but "foo" is an error.
50670   #
50671   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50672   # It is also a way to make sure we got the proper file name for the real test later on.
50673   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50674   if test "x$test_shortpath" = x; then
50675     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50676 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50677     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50678   fi
50679 
50680   # Call helper function which possibly converts this using DOS-style short mode.
50681   # If so, the updated path is stored in $new_path.
50682 
50683   input_path="$new_path"
50684   # Check if we need to convert this using DOS-style short mode. If the path
50685   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50686   # take no chances and rewrite it.
50687   # Note: m4 eats our [], so we need to use [ and ] instead.
50688   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50689   if test "x$has_forbidden_chars" != x; then
50690     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50691     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50692     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50693     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50694       # Going to short mode and back again did indeed matter. Since short mode is
50695       # case insensitive, let's make it lowercase to improve readability.
50696       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50697       # Now convert it back to Unix-style (cygpath)
50698       input_path=`$CYGPATH -u "$shortmode_path"`
50699       new_path="$input_path"
50700     fi
50701   fi
50702 
50703   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50704   if test "x$test_cygdrive_prefix" = x; then
50705     # As a simple fix, exclude /usr/bin since it's not a real path.
50706     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50707       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50708       # a path prefixed by /cygdrive for fixpath to work.
50709       new_path="$CYGWIN_ROOT_PATH$input_path"
50710     fi
50711   fi
50712 
50713 
50714   if test "x$path" != "x$new_path"; then
50715     MSVC_DLL="$new_path"
50716     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50717 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50718   fi
50719 
50720   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50721 
50722   path="$MSVC_DLL"
50723   has_colon=`$ECHO $path | $GREP ^.:`
50724   new_path="$path"
50725   if test "x$has_colon" = x; then
50726     # Not in mixed or Windows style, start by that.
50727     new_path=`cmd //c echo $path`
50728   fi
50729 
50730 
50731   input_path="$new_path"
50732   # Check if we need to convert this using DOS-style short mode. If the path
50733   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50734   # take no chances and rewrite it.
50735   # Note: m4 eats our [], so we need to use [ and ] instead.
50736   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50737   if test "x$has_forbidden_chars" != x; then
50738     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50739     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50740   fi
50741 
50742 
50743   windows_path="$new_path"
50744   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50745     unix_path=`$CYGPATH -u "$windows_path"`
50746     new_path="$unix_path"
50747   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50748     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50749     new_path="$unix_path"
50750   fi
50751 
50752   if test "x$path" != "x$new_path"; then
50753     MSVC_DLL="$new_path"
50754     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50755 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50756   fi
50757 
50758   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50759   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50760 
50761   else
50762     # We're on a posix platform. Hooray! :)
50763     path="$MSVC_DLL"
50764     has_space=`$ECHO "$path" | $GREP " "`
50765     if test "x$has_space" != x; then
50766       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50767 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50768       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50769     fi
50770 
50771     # Use eval to expand a potential ~
50772     eval path="$path"
50773     if test ! -f "$path" && test ! -d "$path"; then
50774       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50775     fi
50776 
50777     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50778   fi
50779 
50780       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50781 $as_echo_n "checking for $DLL_NAME... " >&6; }
50782       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50783 $as_echo "$MSVC_DLL" >&6; }
50784     else
50785       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50786 $as_echo "incorrect, ignoring" >&6; }
50787       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50788 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50789     fi
50790   fi
50791 
50792     fi
50793   fi
50794 
50795   if test "x$MSVC_DLL" = x; then
50796     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50797     # (This was the original behaviour; kept since it might turn something up)
50798     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50799       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50800         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50801           | $GREP x64 | $HEAD --lines 1`
50802       else
50803         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50804           | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50805         if test "x$POSSIBLE_MSVC_DLL" = x; then
50806           # We're grasping at straws now...
50807           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50808               | $HEAD --lines 1`
50809         fi
50810       fi
50811 
50812 
50813   DLL_NAME="$DLL_NAME"
50814   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50815   METHOD="search of VCINSTALLDIR"
50816   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50817     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50818 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50819 
50820     # Need to check if the found msvcr is correct architecture
50821     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50822 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50823     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50824     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50825       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50826       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50827       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50828         CORRECT_MSVCR_ARCH="PE32 executable"
50829       else
50830         CORRECT_MSVCR_ARCH="PE32+ executable"
50831       fi
50832     else
50833       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50834         CORRECT_MSVCR_ARCH=386
50835       else
50836         CORRECT_MSVCR_ARCH=x86-64
50837       fi
50838     fi
50839     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50840       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50841 $as_echo "ok" >&6; }
50842       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50843 
50844   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50845 
50846   # Input might be given as Windows format, start by converting to
50847   # unix format.
50848   path="$MSVC_DLL"
50849   new_path=`$CYGPATH -u "$path"`
50850 
50851   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50852   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50853   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50854   # "foo.exe" is OK but "foo" is an error.
50855   #
50856   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50857   # It is also a way to make sure we got the proper file name for the real test later on.
50858   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50859   if test "x$test_shortpath" = x; then
50860     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50861 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50862     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50863   fi
50864 
50865   # Call helper function which possibly converts this using DOS-style short mode.
50866   # If so, the updated path is stored in $new_path.
50867 
50868   input_path="$new_path"
50869   # Check if we need to convert this using DOS-style short mode. If the path
50870   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50871   # take no chances and rewrite it.
50872   # Note: m4 eats our [], so we need to use [ and ] instead.
50873   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50874   if test "x$has_forbidden_chars" != x; then
50875     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50876     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50877     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50878     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50879       # Going to short mode and back again did indeed matter. Since short mode is
50880       # case insensitive, let's make it lowercase to improve readability.
50881       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50882       # Now convert it back to Unix-style (cygpath)
50883       input_path=`$CYGPATH -u "$shortmode_path"`
50884       new_path="$input_path"
50885     fi
50886   fi
50887 
50888   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50889   if test "x$test_cygdrive_prefix" = x; then
50890     # As a simple fix, exclude /usr/bin since it's not a real path.
50891     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50892       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50893       # a path prefixed by /cygdrive for fixpath to work.
50894       new_path="$CYGWIN_ROOT_PATH$input_path"
50895     fi
50896   fi
50897 
50898 
50899   if test "x$path" != "x$new_path"; then
50900     MSVC_DLL="$new_path"
50901     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50902 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50903   fi
50904 
50905   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50906 
50907   path="$MSVC_DLL"
50908   has_colon=`$ECHO $path | $GREP ^.:`
50909   new_path="$path"
50910   if test "x$has_colon" = x; then
50911     # Not in mixed or Windows style, start by that.
50912     new_path=`cmd //c echo $path`
50913   fi
50914 
50915 
50916   input_path="$new_path"
50917   # Check if we need to convert this using DOS-style short mode. If the path
50918   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50919   # take no chances and rewrite it.
50920   # Note: m4 eats our [], so we need to use [ and ] instead.
50921   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50922   if test "x$has_forbidden_chars" != x; then
50923     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50924     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50925   fi
50926 
50927 
50928   windows_path="$new_path"
50929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50930     unix_path=`$CYGPATH -u "$windows_path"`
50931     new_path="$unix_path"
50932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50934     new_path="$unix_path"
50935   fi
50936 
50937   if test "x$path" != "x$new_path"; then
50938     MSVC_DLL="$new_path"
50939     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50940 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50941   fi
50942 
50943   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50944   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50945 
50946   else
50947     # We're on a posix platform. Hooray! :)
50948     path="$MSVC_DLL"
50949     has_space=`$ECHO "$path" | $GREP " "`
50950     if test "x$has_space" != x; then
50951       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50952 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50953       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50954     fi
50955 
50956     # Use eval to expand a potential ~
50957     eval path="$path"
50958     if test ! -f "$path" && test ! -d "$path"; then
50959       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50960     fi
50961 
50962     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50963   fi
50964 
50965       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50966 $as_echo_n "checking for $DLL_NAME... " >&6; }
50967       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50968 $as_echo "$MSVC_DLL" >&6; }
50969     else
50970       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50971 $as_echo "incorrect, ignoring" >&6; }
50972       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50973 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50974     fi
50975   fi
50976 
50977     fi
50978   fi
50979 
50980   if test "x$MSVC_DLL" = x; then
50981     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50982 $as_echo_n "checking for $DLL_NAME... " >&6; }
50983     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50984 $as_echo "no" >&6; }
50985     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50986   fi
50987 
50988       MSVCP_DLL="$MSVC_DLL"
50989     fi
50990 
50991   fi
50992 
50993 
50994 
50995 # Check whether --with-dxsdk was given.
50996 if test "${with_dxsdk+set}" = set; then :
50997   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50998 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50999 fi
51000 
51001 
51002 
51003 
51004 # Check whether --with-dxsdk-lib was given.
51005 if test "${with_dxsdk_lib+set}" = set; then :
51006   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
51007 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
51008 fi
51009 
51010 
51011 
51012 
51013 # Check whether --with-dxsdk-include was given.
51014 if test "${with_dxsdk_include+set}" = set; then :
51015   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
51016 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
51017 fi
51018 
51019 
51020   fi
51021 
51022 
51023 ###############################################################################
51024 #
51025 # We need to do some final tweaking, when everything else is done.
51026 #
51027 ###############################################################################
51028 
51029 
51030   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
51031 
51032 
51033   # The name of the Service Agent jar.
51034   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
51035   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
51036     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
51037   fi
51038 
51039 
51040 
51041     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
51042 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
51043 
51044     if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
51045       ENABLE_INTREE_EC=yes
51046       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51047 $as_echo "yes" >&6; }
51048     else
51049       ENABLE_INTREE_EC=no
51050       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51051 $as_echo "no" >&6; }
51052     fi
51053 
51054 
51055 
51056 
51057 ###############################################################################
51058 #
51059 # Configure parts of the build that only affect the build performance,
51060 # not the result.
51061 #
51062 ###############################################################################
51063 
51064 
51065   # How many cores do we have on this build system?
51066 
51067 # Check whether --with-num-cores was given.
51068 if test "${with_num_cores+set}" = set; then :
51069   withval=$with_num_cores;
51070 fi
51071 
51072   if test "x$with_num_cores" = x; then
51073     # The number of cores were not specified, try to probe them.
51074 
51075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
51076 $as_echo_n "checking for number of cores... " >&6; }
51077   NUM_CORES=1
51078   FOUND_CORES=no
51079 
51080   if test -f /proc/cpuinfo; then
51081     # Looks like a Linux (or cygwin) system
51082     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
51083     FOUND_CORES=yes
51084   elif test -x /usr/sbin/psrinfo; then
51085     # Looks like a Solaris system
51086     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
51087     FOUND_CORES=yes
51088   elif test -x /usr/sbin/system_profiler; then
51089     # Looks like a MacOSX system
51090     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
51091     FOUND_CORES=yes
51092   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
51093     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
51094     FOUND_CORES=yes
51095   elif test -n "$NUMBER_OF_PROCESSORS"; then
51096     # On windows, look in the env
51097     NUM_CORES=$NUMBER_OF_PROCESSORS
51098     FOUND_CORES=yes
51099   fi
51100 
51101   if test "x$FOUND_CORES" = xyes; then
51102     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
51103 $as_echo "$NUM_CORES" >&6; }
51104   else
51105     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
51106 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
51107     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
51108 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
51109   fi
51110 
51111   else
51112     NUM_CORES=$with_num_cores
51113   fi
51114 
51115 
51116 
51117   # How much memory do we have on this build system?
51118 
51119 # Check whether --with-memory-size was given.
51120 if test "${with_memory_size+set}" = set; then :
51121   withval=$with_memory_size;
51122 fi
51123 
51124   if test "x$with_memory_size" = x; then
51125     # The memory size was not specified, try to probe it.
51126 
51127   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
51128 $as_echo_n "checking for memory size... " >&6; }
51129   # Default to 1024 MB
51130   MEMORY_SIZE=1024
51131   FOUND_MEM=no
51132 
51133   if test -f /proc/meminfo; then
51134     # Looks like a Linux (or cygwin) system
51135     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
51136     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
51137     FOUND_MEM=yes
51138   elif test -x /usr/sbin/prtconf; then
51139     # Looks like a Solaris or AIX system
51140     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
51141     FOUND_MEM=yes
51142   elif test -x /usr/sbin/system_profiler; then
51143     # Looks like a MacOSX system
51144     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
51145     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
51146     FOUND_MEM=yes
51147   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51148     # Windows, but without cygwin
51149     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
51150     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
51151     FOUND_MEM=yes
51152   fi
51153 
51154   if test "x$FOUND_MEM" = xyes; then
51155     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
51156 $as_echo "$MEMORY_SIZE MB" >&6; }
51157   else
51158     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
51159 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
51160     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
51161 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
51162   fi
51163 
51164   else
51165     MEMORY_SIZE=$with_memory_size
51166   fi
51167 
51168 
51169 
51170   # Provide a decent default number of parallel jobs for make depending on
51171   # number of cores, amount of memory and machine architecture.
51172 
51173 # Check whether --with-jobs was given.
51174 if test "${with_jobs+set}" = set; then :
51175   withval=$with_jobs;
51176 fi
51177 
51178   if test "x$with_jobs" = x; then
51179     # Number of jobs was not specified, calculate.
51180     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
51181 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
51182     # Approximate memory in GB, rounding up a bit.
51183     memory_gb=`expr $MEMORY_SIZE / 1100`
51184     # Pick the lowest of memory in gb and number of cores.
51185     if test "$memory_gb" -lt "$NUM_CORES"; then
51186       JOBS="$memory_gb"
51187     else
51188       JOBS="$NUM_CORES"
51189       # On bigger machines, leave some room for other processes to run
51190       if test "$JOBS" -gt "4"; then
51191         JOBS=`expr $JOBS '*' 90 / 100`
51192       fi
51193     fi
51194     # Cap number of jobs to 16
51195     if test "$JOBS" -gt "16"; then
51196       JOBS=16
51197     fi
51198     if test "$JOBS" -eq "0"; then
51199       JOBS=1
51200     fi
51201     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
51202 $as_echo "$JOBS" >&6; }
51203   else
51204     JOBS=$with_jobs
51205   fi
51206 
51207 
51208 
51209 # Setup smart javac (after cores and memory have been setup)
51210 
51211 
51212 # Check whether --with-sjavac-server-java was given.
51213 if test "${with_sjavac_server_java+set}" = set; then :
51214   withval=$with_sjavac_server_java;
51215 fi
51216 
51217 
51218   if test "x$with_sjavac_server_java" != x; then
51219     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
51220     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
51221     if test "x$FOUND_VERSION" = x; then
51222       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
51223     fi
51224   else
51225     SJAVAC_SERVER_JAVA=""
51226     # Hotspot specific options.
51227 
51228   $ECHO "Check if jvm arg is ok: -verbosegc" >&5
51229   $ECHO "Command: $JAVA -verbosegc -version" >&5
51230   OUTPUT=`$JAVA -verbosegc -version 2>&1`
51231   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51232   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51233   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51234     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
51235     JVM_ARG_OK=true
51236   else
51237     $ECHO "Arg failed:" >&5
51238     $ECHO "$OUTPUT" >&5
51239     JVM_ARG_OK=false
51240   fi
51241 
51242     # JRockit specific options.
51243 
51244   $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
51245   $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
51246   OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
51247   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51248   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51249   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51250     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
51251     JVM_ARG_OK=true
51252   else
51253     $ECHO "Arg failed:" >&5
51254     $ECHO "$OUTPUT" >&5
51255     JVM_ARG_OK=false
51256   fi
51257 
51258     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
51259   fi
51260 
51261 
51262   if test "$MEMORY_SIZE" -gt "2500"; then
51263 
51264   $ECHO "Check if jvm arg is ok: -d64" >&5
51265   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
51266   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
51267   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51268   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51269   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51270     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
51271     JVM_ARG_OK=true
51272   else
51273     $ECHO "Arg failed:" >&5
51274     $ECHO "$OUTPUT" >&5
51275     JVM_ARG_OK=false
51276   fi
51277 
51278     if test "$JVM_ARG_OK" = true; then
51279       JVM_64BIT=true
51280       JVM_ARG_OK=false
51281     fi
51282   fi
51283 
51284   if test "$JVM_64BIT" = true; then
51285     if test "$MEMORY_SIZE" -gt "17000"; then
51286 
51287   $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
51288   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
51289   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
51290   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51291   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51292   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51293     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
51294     JVM_ARG_OK=true
51295   else
51296     $ECHO "Arg failed:" >&5
51297     $ECHO "$OUTPUT" >&5
51298     JVM_ARG_OK=false
51299   fi
51300 
51301     fi
51302     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
51303 
51304   $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
51305   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
51306   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
51307   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51308   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51309   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51310     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
51311     JVM_ARG_OK=true
51312   else
51313     $ECHO "Arg failed:" >&5
51314     $ECHO "$OUTPUT" >&5
51315     JVM_ARG_OK=false
51316   fi
51317 
51318     fi
51319     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
51320 
51321   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
51322   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
51323   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
51324   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51325   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51326   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51327     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
51328     JVM_ARG_OK=true
51329   else
51330     $ECHO "Arg failed:" >&5
51331     $ECHO "$OUTPUT" >&5
51332     JVM_ARG_OK=false
51333   fi
51334 
51335     fi
51336     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
51337 
51338   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
51339   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
51340   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
51341   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51342   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51343   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51344     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
51345     JVM_ARG_OK=true
51346   else
51347     $ECHO "Arg failed:" >&5
51348     $ECHO "$OUTPUT" >&5
51349     JVM_ARG_OK=false
51350   fi
51351 
51352     fi
51353   fi
51354   if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
51355 
51356   $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
51357   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
51358   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
51359   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51360   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51361   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51362     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
51363     JVM_ARG_OK=true
51364   else
51365     $ECHO "Arg failed:" >&5
51366     $ECHO "$OUTPUT" >&5
51367     JVM_ARG_OK=false
51368   fi
51369 
51370   fi
51371   if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
51372 
51373   $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
51374   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
51375   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
51376   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51377   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51378   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51379     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
51380     JVM_ARG_OK=true
51381   else
51382     $ECHO "Arg failed:" >&5
51383     $ECHO "$OUTPUT" >&5
51384     JVM_ARG_OK=false
51385   fi
51386 
51387   fi
51388   if test "$JVM_ARG_OK" = false; then
51389 
51390   $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
51391   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
51392   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
51393   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51394   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51395   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51396     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
51397     JVM_ARG_OK=true
51398   else
51399     $ECHO "Arg failed:" >&5
51400     $ECHO "$OUTPUT" >&5
51401     JVM_ARG_OK=false
51402   fi
51403 
51404   fi
51405 
51406   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
51407 $as_echo_n "checking whether to use sjavac... " >&6; }
51408   # Check whether --enable-sjavac was given.
51409 if test "${enable_sjavac+set}" = set; then :
51410   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
51411 else
51412   ENABLE_SJAVAC='no'
51413 fi
51414 
51415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
51416 $as_echo "$ENABLE_SJAVAC" >&6; }
51417 
51418 
51419   if test "x$ENABLE_SJAVAC" = xyes; then
51420     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
51421   else
51422     SJAVAC_SERVER_DIR=
51423   fi
51424 
51425 
51426 
51427 # Can the C/C++ compiler use precompiled headers?
51428 
51429 
51430   ###############################################################################
51431   #
51432   # Can the C/C++ compiler use precompiled headers?
51433   #
51434   # Check whether --enable-precompiled-headers was given.
51435 if test "${enable_precompiled_headers+set}" = set; then :
51436   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
51437 else
51438   ENABLE_PRECOMPH=yes
51439 fi
51440 
51441 
51442   USE_PRECOMPILED_HEADER=1
51443   if test "x$ENABLE_PRECOMPH" = xno; then
51444     USE_PRECOMPILED_HEADER=0
51445   fi
51446 
51447   if test "x$ENABLE_PRECOMPH" = xyes; then
51448     # Check that the compiler actually supports precomp headers.
51449     if test "x$TOOLCHAIN_TYPE" = xgcc; then
51450       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
51451 $as_echo_n "checking that precompiled headers work... " >&6; }
51452       echo "int alfa();" > conftest.h
51453       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
51454       if test ! -f conftest.hpp.gch; then
51455         USE_PRECOMPILED_HEADER=0
51456         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51457 $as_echo "no" >&6; }
51458       else
51459         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51460 $as_echo "yes" >&6; }
51461       fi
51462       rm -f conftest.h conftest.hpp.gch
51463     fi
51464   fi
51465 
51466 
51467 
51468 
51469 # Setup use of ccache, if available
51470 
51471   # Check whether --enable-ccache was given.
51472 if test "${enable_ccache+set}" = set; then :
51473   enableval=$enable_ccache;
51474 fi
51475 
51476 
51477   CCACHE=
51478   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
51479 $as_echo_n "checking is ccache enabled... " >&6; }
51480   ENABLE_CCACHE=$enable_ccache
51481   if test "x$enable_ccache" = xyes; then
51482     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51483 $as_echo "yes" >&6; }
51484     OLD_PATH="$PATH"
51485     if test "x$TOOLCHAIN_PATH" != x; then
51486       PATH=$TOOLCHAIN_PATH:$PATH
51487     fi
51488 
51489 
51490 
51491   # Publish this variable in the help.
51492 
51493 
51494   if test "x$CCACHE" = x; then
51495     # The variable is not set by user, try to locate tool using the code snippet
51496     for ac_prog in ccache
51497 do
51498   # Extract the first word of "$ac_prog", so it can be a program name with args.
51499 set dummy $ac_prog; ac_word=$2
51500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51501 $as_echo_n "checking for $ac_word... " >&6; }
51502 if ${ac_cv_path_CCACHE+:} false; then :
51503   $as_echo_n "(cached) " >&6
51504 else
51505   case $CCACHE in
51506   [\\/]* | ?:[\\/]*)
51507   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51508   ;;
51509   *)
51510   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51511 for as_dir in $PATH
51512 do
51513   IFS=$as_save_IFS
51514   test -z "$as_dir" && as_dir=.
51515     for ac_exec_ext in '' $ac_executable_extensions; do
51516   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51517     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51519     break 2
51520   fi
51521 done
51522   done
51523 IFS=$as_save_IFS
51524 
51525   ;;
51526 esac
51527 fi
51528 CCACHE=$ac_cv_path_CCACHE
51529 if test -n "$CCACHE"; then
51530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51531 $as_echo "$CCACHE" >&6; }
51532 else
51533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51534 $as_echo "no" >&6; }
51535 fi
51536 
51537 
51538   test -n "$CCACHE" && break
51539 done
51540 
51541   else
51542     # The variable is set, but is it from the command line or the environment?
51543 
51544     # Try to remove the string !CCACHE! from our list.
51545     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
51546     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
51547       # If it failed, the variable was not from the command line. Ignore it,
51548       # but warn the user (except for BASH, which is always set by the calling BASH).
51549       if test "xCCACHE" != xBASH; then
51550         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
51551 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
51552       fi
51553       # Try to locate tool using the code snippet
51554       for ac_prog in ccache
51555 do
51556   # Extract the first word of "$ac_prog", so it can be a program name with args.
51557 set dummy $ac_prog; ac_word=$2
51558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51559 $as_echo_n "checking for $ac_word... " >&6; }
51560 if ${ac_cv_path_CCACHE+:} false; then :
51561   $as_echo_n "(cached) " >&6
51562 else
51563   case $CCACHE in
51564   [\\/]* | ?:[\\/]*)
51565   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51566   ;;
51567   *)
51568   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51569 for as_dir in $PATH
51570 do
51571   IFS=$as_save_IFS
51572   test -z "$as_dir" && as_dir=.
51573     for ac_exec_ext in '' $ac_executable_extensions; do
51574   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51575     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51576     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51577     break 2
51578   fi
51579 done
51580   done
51581 IFS=$as_save_IFS
51582 
51583   ;;
51584 esac
51585 fi
51586 CCACHE=$ac_cv_path_CCACHE
51587 if test -n "$CCACHE"; then
51588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51589 $as_echo "$CCACHE" >&6; }
51590 else
51591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51592 $as_echo "no" >&6; }
51593 fi
51594 
51595 
51596   test -n "$CCACHE" && break
51597 done
51598 
51599     else
51600       # If it succeeded, then it was overridden by the user. We will use it
51601       # for the tool.
51602 
51603       # First remove it from the list of overridden variables, so we can test
51604       # for unknown variables in the end.
51605       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
51606 
51607       # Check if the provided tool contains a complete path.
51608       tool_specified="$CCACHE"
51609       tool_basename="${tool_specified##*/}"
51610       if test "x$tool_basename" = "x$tool_specified"; then
51611         # A command without a complete path is provided, search $PATH.
51612         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
51613 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
51614         # Extract the first word of "$tool_basename", so it can be a program name with args.
51615 set dummy $tool_basename; ac_word=$2
51616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51617 $as_echo_n "checking for $ac_word... " >&6; }
51618 if ${ac_cv_path_CCACHE+:} false; then :
51619   $as_echo_n "(cached) " >&6
51620 else
51621   case $CCACHE in
51622   [\\/]* | ?:[\\/]*)
51623   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51624   ;;
51625   *)
51626   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51627 for as_dir in $PATH
51628 do
51629   IFS=$as_save_IFS
51630   test -z "$as_dir" && as_dir=.
51631     for ac_exec_ext in '' $ac_executable_extensions; do
51632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51633     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51635     break 2
51636   fi
51637 done
51638   done
51639 IFS=$as_save_IFS
51640 
51641   ;;
51642 esac
51643 fi
51644 CCACHE=$ac_cv_path_CCACHE
51645 if test -n "$CCACHE"; then
51646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51647 $as_echo "$CCACHE" >&6; }
51648 else
51649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51650 $as_echo "no" >&6; }
51651 fi
51652 
51653 
51654         if test "x$CCACHE" = x; then
51655           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
51656         fi
51657       else
51658         # Otherwise we believe it is a complete path. Use it as it is.
51659         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
51660 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
51661         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
51662 $as_echo_n "checking for CCACHE... " >&6; }
51663         if test ! -x "$tool_specified"; then
51664           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
51665 $as_echo "not found" >&6; }
51666           as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
51667         fi
51668         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
51669 $as_echo "$tool_specified" >&6; }
51670       fi
51671     fi
51672   fi
51673 
51674 
51675 
51676   if test "x$CCACHE" = x; then
51677     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
51678   fi
51679 
51680 
51681     CCACHE_STATUS="enabled"
51682     PATH="$OLD_PATH"
51683   elif test "x$enable_ccache" = xno; then
51684     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
51685 $as_echo "no, explicitly disabled" >&6; }
51686   elif test "x$enable_ccache" = x; then
51687     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51688 $as_echo "no" >&6; }
51689   else
51690     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
51691 $as_echo "unknown" >&6; }
51692     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
51693   fi
51694 
51695 
51696 
51697 # Check whether --with-ccache-dir was given.
51698 if test "${with_ccache_dir+set}" = set; then :
51699   withval=$with_ccache_dir;
51700 fi
51701 
51702 
51703   if test "x$with_ccache_dir" != x; then
51704     # When using a non home ccache directory, assume the use is to share ccache files
51705     # with other users. Thus change the umask.
51706     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
51707     if test "x$CCACHE" = x; then
51708       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
51709 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
51710     fi
51711   fi
51712 
51713   if test "x$CCACHE" != x; then
51714 
51715   if test "x$CCACHE" != x; then
51716     # Only use ccache if it is 3.1.4 or later, which supports
51717     # precompiled headers.
51718     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
51719 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
51720     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
51721     if test "x$HAS_GOOD_CCACHE" = x; then
51722       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
51723 $as_echo "no, disabling ccache" >&6; }
51724       CCACHE=
51725       CCACHE_STATUS="disabled"
51726     else
51727       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51728 $as_echo "yes" >&6; }
51729       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
51730 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
51731       PUSHED_FLAGS="$CXXFLAGS"
51732       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
51733       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51734 /* end confdefs.h.  */
51735 
51736 int
51737 main ()
51738 {
51739 
51740   ;
51741   return 0;
51742 }
51743 _ACEOF
51744 if ac_fn_cxx_try_compile "$LINENO"; then :
51745   CC_KNOWS_CCACHE_TRICK=yes
51746 else
51747   CC_KNOWS_CCACHE_TRICK=no
51748 fi
51749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51750       CXXFLAGS="$PUSHED_FLAGS"
51751       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
51752         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51753 $as_echo "yes" >&6; }
51754       else
51755         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
51756 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
51757         CCACHE=
51758         CCACHE_STATUS="disabled"
51759       fi
51760     fi
51761   fi
51762 
51763   if test "x$CCACHE" != x; then
51764     CCACHE_SLOPPINESS=time_macros
51765     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
51766     CCACHE_FLAGS=-fpch-preprocess
51767 
51768     if test "x$SET_CCACHE_DIR" != x; then
51769       mkdir -p $CCACHE_DIR > /dev/null 2>&1
51770       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
51771     fi
51772   fi
51773 
51774   fi
51775 
51776 
51777 ###############################################################################
51778 #
51779 # And now the finish...
51780 #
51781 ###############################################################################
51782 
51783 # Check for some common pitfalls
51784 
51785   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51786     file_to_test="$SRC_ROOT/LICENSE"
51787     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
51788       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
51789     fi
51790   fi
51791 
51792 
51793   # Did user specify any unknown variables?
51794 
51795   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
51796     # Replace the separating ! with spaces before presenting for end user.
51797     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
51798     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
51799 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
51800   fi
51801 
51802 
51803   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
51804 $as_echo_n "checking if build directory is on local disk... " >&6; }
51805 
51806   # df -l lists only local disks; if the given directory is not found then
51807   # a non-zero exit code is given
51808   if test "x$DF" = x; then
51809     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51810       # msys does not have df; use Windows "net use" instead.
51811       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
51812       if test "x$IS_NETWORK_DISK" = x; then
51813         OUTPUT_DIR_IS_LOCAL="yes"
51814       else
51815         OUTPUT_DIR_IS_LOCAL="no"
51816       fi
51817     else
51818       # No df here, say it's local
51819       OUTPUT_DIR_IS_LOCAL="yes"
51820     fi
51821   else
51822     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
51823       OUTPUT_DIR_IS_LOCAL="yes"
51824     else
51825       OUTPUT_DIR_IS_LOCAL="no"
51826     fi
51827   fi
51828 
51829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
51830 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
51831 
51832 
51833 
51834   # Check if the user has any old-style ALT_ variables set.
51835   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
51836 
51837   # Before generating output files, test if they exist. If they do, this is a reconfigure.
51838   # Since we can't properly handle the dependencies for this, warn the user about the situation
51839   if test -e $OUTPUT_ROOT/spec.gmk; then
51840     IS_RECONFIGURE=yes
51841   else
51842     IS_RECONFIGURE=no
51843   fi
51844 
51845 
51846 # At the end, call the custom hook. (Dummy macro if no custom sources available)
51847 
51848 
51849 # We're messing a bit with internal autoconf variables to put the config.status
51850 # in the output directory instead of the current directory.
51851 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
51852 
51853 # Create the actual output files. Now the main work of configure is done.
51854 cat >confcache <<\_ACEOF
51855 # This file is a shell script that caches the results of configure
51856 # tests run on this system so they can be shared between configure
51857 # scripts and configure runs, see configure's option --config-cache.
51858 # It is not useful on other systems.  If it contains results you don't
51859 # want to keep, you may remove or edit it.
51860 #
51861 # config.status only pays attention to the cache file if you give it
51862 # the --recheck option to rerun configure.
51863 #
51864 # `ac_cv_env_foo' variables (set or unset) will be overridden when
51865 # loading this file, other *unset* `ac_cv_foo' will be assigned the
51866 # following values.
51867 
51868 _ACEOF
51869 
51870 # The following way of writing the cache mishandles newlines in values,
51871 # but we know of no workaround that is simple, portable, and efficient.
51872 # So, we kill variables containing newlines.
51873 # Ultrix sh set writes to stderr and can't be redirected directly,
51874 # and sets the high bit in the cache file unless we assign to the vars.
51875 (
51876   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51877     eval ac_val=\$$ac_var
51878     case $ac_val in #(
51879     *${as_nl}*)
51880       case $ac_var in #(
51881       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51882 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51883       esac
51884       case $ac_var in #(
51885       _ | IFS | as_nl) ;; #(
51886       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51887       *) { eval $ac_var=; unset $ac_var;} ;;
51888       esac ;;
51889     esac
51890   done
51891 
51892   (set) 2>&1 |
51893     case $as_nl`(ac_space=' '; set) 2>&1` in #(
51894     *${as_nl}ac_space=\ *)
51895       # `set' does not quote correctly, so add quotes: double-quote
51896       # substitution turns \\\\ into \\, and sed turns \\ into \.
51897       sed -n \
51898         "s/'/'\\\\''/g;
51899           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51900       ;; #(
51901     *)
51902       # `set' quotes correctly as required by POSIX, so do not add quotes.
51903       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51904       ;;
51905     esac |
51906     sort
51907 ) |
51908   sed '
51909      /^ac_cv_env_/b end
51910      t clear
51911      :clear
51912      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51913      t end
51914      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51915      :end' >>confcache
51916 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51917   if test -w "$cache_file"; then
51918     if test "x$cache_file" != "x/dev/null"; then
51919       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51920 $as_echo "$as_me: updating cache $cache_file" >&6;}
51921       if test ! -f "$cache_file" || test -h "$cache_file"; then
51922         cat confcache >"$cache_file"
51923       else
51924         case $cache_file in #(
51925         */* | ?:*)
51926           mv -f confcache "$cache_file"$$ &&
51927           mv -f "$cache_file"$$ "$cache_file" ;; #(
51928         *)
51929           mv -f confcache "$cache_file" ;;
51930         esac
51931       fi
51932     fi
51933   else
51934     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51935 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51936   fi
51937 fi
51938 rm -f confcache
51939 
51940 test "x$prefix" = xNONE && prefix=$ac_default_prefix
51941 # Let make expand exec_prefix.
51942 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51943 
51944 DEFS=-DHAVE_CONFIG_H
51945 
51946 ac_libobjs=
51947 ac_ltlibobjs=
51948 U=
51949 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51950   # 1. Remove the extension, and $U if already installed.
51951   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51952   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51953   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51954   #    will be set to the directory where LIBOBJS objects are built.
51955   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51956   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51957 done
51958 LIBOBJS=$ac_libobjs
51959 
51960 LTLIBOBJS=$ac_ltlibobjs
51961 
51962 
51963 
51964 : "${CONFIG_STATUS=./config.status}"
51965 ac_write_fail=0
51966 ac_clean_files_save=$ac_clean_files
51967 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51968 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51969 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51970 as_write_fail=0
51971 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51972 #! $SHELL
51973 # Generated by $as_me.
51974 # Run this file to recreate the current configuration.
51975 # Compiler output produced by configure, useful for debugging
51976 # configure, is in config.log if it exists.
51977 
51978 debug=false
51979 ac_cs_recheck=false
51980 ac_cs_silent=false
51981 
51982 SHELL=\${CONFIG_SHELL-$SHELL}
51983 export SHELL
51984 _ASEOF
51985 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51986 ## -------------------- ##
51987 ## M4sh Initialization. ##
51988 ## -------------------- ##
51989 
51990 # Be more Bourne compatible
51991 DUALCASE=1; export DUALCASE # for MKS sh
51992 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51993   emulate sh
51994   NULLCMD=:
51995   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51996   # is contrary to our usage.  Disable this feature.
51997   alias -g '${1+"$@"}'='"$@"'
51998   setopt NO_GLOB_SUBST
51999 else
52000   case `(set -o) 2>/dev/null` in #(
52001   *posix*) :
52002     set -o posix ;; #(
52003   *) :
52004      ;;
52005 esac
52006 fi
52007 
52008 
52009 as_nl='
52010 '
52011 export as_nl
52012 # Printing a long string crashes Solaris 7 /usr/bin/printf.
52013 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
52014 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
52015 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
52016 # Prefer a ksh shell builtin over an external printf program on Solaris,
52017 # but without wasting forks for bash or zsh.
52018 if test -z "$BASH_VERSION$ZSH_VERSION" \
52019     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
52020   as_echo='print -r --'
52021   as_echo_n='print -rn --'
52022 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52023   as_echo='printf %s\n'
52024   as_echo_n='printf %s'
52025 else
52026   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52027     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52028     as_echo_n='/usr/ucb/echo -n'
52029   else
52030     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
52031     as_echo_n_body='eval
52032       arg=$1;
52033       case $arg in #(
52034       *"$as_nl"*)
52035         expr "X$arg" : "X\\(.*\\)$as_nl";
52036         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
52037       esac;
52038       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
52039     '
52040     export as_echo_n_body
52041     as_echo_n='sh -c $as_echo_n_body as_echo'
52042   fi
52043   export as_echo_body
52044   as_echo='sh -c $as_echo_body as_echo'
52045 fi
52046 
52047 # The user is always right.
52048 if test "${PATH_SEPARATOR+set}" != set; then
52049   PATH_SEPARATOR=:
52050   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
52051     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
52052       PATH_SEPARATOR=';'
52053   }
52054 fi
52055 
52056 
52057 # IFS
52058 # We need space, tab and new line, in precisely that order.  Quoting is
52059 # there to prevent editors from complaining about space-tab.
52060 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
52061 # splitting by setting IFS to empty value.)
52062 IFS=" ""        $as_nl"
52063 
52064 # Find who we are.  Look in the path if we contain no directory separator.
52065 as_myself=
52066 case $0 in #((
52067   *[\\/]* ) as_myself=$0 ;;
52068   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52069 for as_dir in $PATH
52070 do
52071   IFS=$as_save_IFS
52072   test -z "$as_dir" && as_dir=.
52073     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
52074   done
52075 IFS=$as_save_IFS
52076 
52077      ;;
52078 esac
52079 # We did not find ourselves, most probably we were run as `sh COMMAND'
52080 # in which case we are not to be found in the path.
52081 if test "x$as_myself" = x; then
52082   as_myself=$0
52083 fi
52084 if test ! -f "$as_myself"; then
52085   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
52086   exit 1
52087 fi
52088 
52089 # Unset variables that we do not need and which cause bugs (e.g. in
52090 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
52091 # suppresses any "Segmentation fault" message there.  '((' could
52092 # trigger a bug in pdksh 5.2.14.
52093 for as_var in BASH_ENV ENV MAIL MAILPATH
52094 do eval test x\${$as_var+set} = xset \
52095   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
52096 done
52097 PS1='$ '
52098 PS2='> '
52099 PS4='+ '
52100 
52101 # NLS nuisances.
52102 LC_ALL=C
52103 export LC_ALL
52104 LANGUAGE=C
52105 export LANGUAGE
52106 
52107 # CDPATH.
52108 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
52109 
52110 
52111 # as_fn_error STATUS ERROR [LINENO LOG_FD]
52112 # ----------------------------------------
52113 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
52114 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
52115 # script with STATUS, using 1 if that was 0.
52116 as_fn_error ()
52117 {
52118   as_status=$1; test $as_status -eq 0 && as_status=1
52119   if test "$4"; then
52120     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
52121     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
52122   fi
52123   $as_echo "$as_me: error: $2" >&2
52124   as_fn_exit $as_status
52125 } # as_fn_error
52126 
52127 
52128 # as_fn_set_status STATUS
52129 # -----------------------
52130 # Set $? to STATUS, without forking.
52131 as_fn_set_status ()
52132 {
52133   return $1
52134 } # as_fn_set_status
52135 
52136 # as_fn_exit STATUS
52137 # -----------------
52138 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
52139 as_fn_exit ()
52140 {
52141   set +e
52142   as_fn_set_status $1
52143   exit $1
52144 } # as_fn_exit
52145 
52146 # as_fn_unset VAR
52147 # ---------------
52148 # Portably unset VAR.
52149 as_fn_unset ()
52150 {
52151   { eval $1=; unset $1;}
52152 }
52153 as_unset=as_fn_unset
52154 # as_fn_append VAR VALUE
52155 # ----------------------
52156 # Append the text in VALUE to the end of the definition contained in VAR. Take
52157 # advantage of any shell optimizations that allow amortized linear growth over
52158 # repeated appends, instead of the typical quadratic growth present in naive
52159 # implementations.
52160 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
52161   eval 'as_fn_append ()
52162   {
52163     eval $1+=\$2
52164   }'
52165 else
52166   as_fn_append ()
52167   {
52168     eval $1=\$$1\$2
52169   }
52170 fi # as_fn_append
52171 
52172 # as_fn_arith ARG...
52173 # ------------------
52174 # Perform arithmetic evaluation on the ARGs, and store the result in the
52175 # global $as_val. Take advantage of shells that can avoid forks. The arguments
52176 # must be portable across $(()) and expr.
52177 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
52178   eval 'as_fn_arith ()
52179   {
52180     as_val=$(( $* ))
52181   }'
52182 else
52183   as_fn_arith ()
52184   {
52185     as_val=`expr "$@" || test $? -eq 1`
52186   }
52187 fi # as_fn_arith
52188 
52189 
52190 if expr a : '\(a\)' >/dev/null 2>&1 &&
52191    test "X`expr 00001 : '.*\(...\)'`" = X001; then
52192   as_expr=expr
52193 else
52194   as_expr=false
52195 fi
52196 
52197 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
52198   as_basename=basename
52199 else
52200   as_basename=false
52201 fi
52202 
52203 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
52204   as_dirname=dirname
52205 else
52206   as_dirname=false
52207 fi
52208 
52209 as_me=`$as_basename -- "$0" ||
52210 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
52211          X"$0" : 'X\(//\)$' \| \
52212          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
52213 $as_echo X/"$0" |
52214     sed '/^.*\/\([^/][^/]*\)\/*$/{
52215             s//\1/
52216             q
52217           }
52218           /^X\/\(\/\/\)$/{
52219             s//\1/
52220             q
52221           }
52222           /^X\/\(\/\).*/{
52223             s//\1/
52224             q
52225           }
52226           s/.*/./; q'`
52227 
52228 # Avoid depending upon Character Ranges.
52229 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
52230 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
52231 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
52232 as_cr_digits='0123456789'
52233 as_cr_alnum=$as_cr_Letters$as_cr_digits
52234 
52235 ECHO_C= ECHO_N= ECHO_T=
52236 case `echo -n x` in #(((((
52237 -n*)
52238   case `echo 'xy\c'` in
52239   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
52240   xy)  ECHO_C='\c';;
52241   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
52242        ECHO_T=' ';;
52243   esac;;
52244 *)
52245   ECHO_N='-n';;
52246 esac
52247 
52248 rm -f conf$$ conf$$.exe conf$$.file
52249 if test -d conf$$.dir; then
52250   rm -f conf$$.dir/conf$$.file
52251 else
52252   rm -f conf$$.dir
52253   mkdir conf$$.dir 2>/dev/null
52254 fi
52255 if (echo >conf$$.file) 2>/dev/null; then
52256   if ln -s conf$$.file conf$$ 2>/dev/null; then
52257     as_ln_s='ln -s'
52258     # ... but there are two gotchas:
52259     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
52260     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
52261     # In both cases, we have to default to `cp -pR'.
52262     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
52263       as_ln_s='cp -pR'
52264   elif ln conf$$.file conf$$ 2>/dev/null; then
52265     as_ln_s=ln
52266   else
52267     as_ln_s='cp -pR'
52268   fi
52269 else
52270   as_ln_s='cp -pR'
52271 fi
52272 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
52273 rmdir conf$$.dir 2>/dev/null
52274 
52275 
52276 # as_fn_mkdir_p
52277 # -------------
52278 # Create "$as_dir" as a directory, including parents if necessary.
52279 as_fn_mkdir_p ()
52280 {
52281 
52282   case $as_dir in #(
52283   -*) as_dir=./$as_dir;;
52284   esac
52285   test -d "$as_dir" || eval $as_mkdir_p || {
52286     as_dirs=
52287     while :; do
52288       case $as_dir in #(
52289       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
52290       *) as_qdir=$as_dir;;
52291       esac
52292       as_dirs="'$as_qdir' $as_dirs"
52293       as_dir=`$as_dirname -- "$as_dir" ||
52294 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52295          X"$as_dir" : 'X\(//\)[^/]' \| \
52296          X"$as_dir" : 'X\(//\)$' \| \
52297          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
52298 $as_echo X"$as_dir" |
52299     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52300             s//\1/
52301             q
52302           }
52303           /^X\(\/\/\)[^/].*/{
52304             s//\1/
52305             q
52306           }
52307           /^X\(\/\/\)$/{
52308             s//\1/
52309             q
52310           }
52311           /^X\(\/\).*/{
52312             s//\1/
52313             q
52314           }
52315           s/.*/./; q'`
52316       test -d "$as_dir" && break
52317     done
52318     test -z "$as_dirs" || eval "mkdir $as_dirs"
52319   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
52320 
52321 
52322 } # as_fn_mkdir_p
52323 if mkdir -p . 2>/dev/null; then
52324   as_mkdir_p='mkdir -p "$as_dir"'
52325 else
52326   test -d ./-p && rmdir ./-p
52327   as_mkdir_p=false
52328 fi
52329 
52330 
52331 # as_fn_executable_p FILE
52332 # -----------------------
52333 # Test if FILE is an executable regular file.
52334 as_fn_executable_p ()
52335 {
52336   test -f "$1" && test -x "$1"
52337 } # as_fn_executable_p
52338 as_test_x='test -x'
52339 as_executable_p=as_fn_executable_p
52340 
52341 # Sed expression to map a string onto a valid CPP name.
52342 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
52343 
52344 # Sed expression to map a string onto a valid variable name.
52345 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
52346 
52347 
52348 exec 6>&1
52349 ## ----------------------------------- ##
52350 ## Main body of $CONFIG_STATUS script. ##
52351 ## ----------------------------------- ##
52352 _ASEOF
52353 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
52354 
52355 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52356 # Save the log message, to keep $0 and so on meaningful, and to
52357 # report actual input values of CONFIG_FILES etc. instead of their
52358 # values after options handling.
52359 ac_log="
52360 This file was extended by OpenJDK $as_me jdk8, which was
52361 generated by GNU Autoconf 2.69.  Invocation command line was
52362 
52363   CONFIG_FILES    = $CONFIG_FILES
52364   CONFIG_HEADERS  = $CONFIG_HEADERS
52365   CONFIG_LINKS    = $CONFIG_LINKS
52366   CONFIG_COMMANDS = $CONFIG_COMMANDS
52367   $ $0 $@
52368 
52369 on `(hostname || uname -n) 2>/dev/null | sed 1q`
52370 "
52371 
52372 _ACEOF
52373 
52374 case $ac_config_files in *"
52375 "*) set x $ac_config_files; shift; ac_config_files=$*;;
52376 esac
52377 
52378 case $ac_config_headers in *"
52379 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
52380 esac
52381 
52382 
52383 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52384 # Files that config.status was made for.
52385 config_files="$ac_config_files"
52386 config_headers="$ac_config_headers"
52387 
52388 _ACEOF
52389 
52390 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52391 ac_cs_usage="\
52392 \`$as_me' instantiates files and other configuration actions
52393 from templates according to the current configuration.  Unless the files
52394 and actions are specified as TAGs, all are instantiated by default.
52395 
52396 Usage: $0 [OPTION]... [TAG]...
52397 
52398   -h, --help       print this help, then exit
52399   -V, --version    print version number and configuration settings, then exit
52400       --config     print configuration, then exit
52401   -q, --quiet, --silent
52402                    do not print progress messages
52403   -d, --debug      don't remove temporary files
52404       --recheck    update $as_me by reconfiguring in the same conditions
52405       --file=FILE[:TEMPLATE]
52406                    instantiate the configuration file FILE
52407       --header=FILE[:TEMPLATE]
52408                    instantiate the configuration header FILE
52409 
52410 Configuration files:
52411 $config_files
52412 
52413 Configuration headers:
52414 $config_headers
52415 
52416 Report bugs to <build-dev@openjdk.java.net>.
52417 OpenJDK home page: <http://openjdk.java.net>."
52418 
52419 _ACEOF
52420 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52421 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
52422 ac_cs_version="\\
52423 OpenJDK config.status jdk8
52424 configured by $0, generated by GNU Autoconf 2.69,
52425   with options \\"\$ac_cs_config\\"
52426 
52427 Copyright (C) 2012 Free Software Foundation, Inc.
52428 This config.status script is free software; the Free Software Foundation
52429 gives unlimited permission to copy, distribute and modify it."
52430 
52431 ac_pwd='$ac_pwd'
52432 srcdir='$srcdir'
52433 AWK='$AWK'
52434 test -n "\$AWK" || AWK=awk
52435 _ACEOF
52436 
52437 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52438 # The default lists apply if the user does not specify any file.
52439 ac_need_defaults=:
52440 while test $# != 0
52441 do
52442   case $1 in
52443   --*=?*)
52444     ac_option=`expr "X$1" : 'X\([^=]*\)='`
52445     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
52446     ac_shift=:
52447     ;;
52448   --*=)
52449     ac_option=`expr "X$1" : 'X\([^=]*\)='`
52450     ac_optarg=
52451     ac_shift=:
52452     ;;
52453   *)
52454     ac_option=$1
52455     ac_optarg=$2
52456     ac_shift=shift
52457     ;;
52458   esac
52459 
52460   case $ac_option in
52461   # Handling of the options.
52462   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
52463     ac_cs_recheck=: ;;
52464   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
52465     $as_echo "$ac_cs_version"; exit ;;
52466   --config | --confi | --conf | --con | --co | --c )
52467     $as_echo "$ac_cs_config"; exit ;;
52468   --debug | --debu | --deb | --de | --d | -d )
52469     debug=: ;;
52470   --file | --fil | --fi | --f )
52471     $ac_shift
52472     case $ac_optarg in
52473     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52474     '') as_fn_error $? "missing file argument" ;;
52475     esac
52476     as_fn_append CONFIG_FILES " '$ac_optarg'"
52477     ac_need_defaults=false;;
52478   --header | --heade | --head | --hea )
52479     $ac_shift
52480     case $ac_optarg in
52481     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52482     esac
52483     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
52484     ac_need_defaults=false;;
52485   --he | --h)
52486     # Conflict between --help and --header
52487     as_fn_error $? "ambiguous option: \`$1'
52488 Try \`$0 --help' for more information.";;
52489   --help | --hel | -h )
52490     $as_echo "$ac_cs_usage"; exit ;;
52491   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
52492   | -silent | --silent | --silen | --sile | --sil | --si | --s)
52493     ac_cs_silent=: ;;
52494 
52495   # This is an error.
52496   -*) as_fn_error $? "unrecognized option: \`$1'
52497 Try \`$0 --help' for more information." ;;
52498 
52499   *) as_fn_append ac_config_targets " $1"
52500      ac_need_defaults=false ;;
52501 
52502   esac
52503   shift
52504 done
52505 
52506 ac_configure_extra_args=
52507 
52508 if $ac_cs_silent; then
52509   exec 6>/dev/null
52510   ac_configure_extra_args="$ac_configure_extra_args --silent"
52511 fi
52512 
52513 _ACEOF
52514 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52515 if \$ac_cs_recheck; then
52516   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
52517   shift
52518   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
52519   CONFIG_SHELL='$SHELL'
52520   export CONFIG_SHELL
52521   exec "\$@"
52522 fi
52523 
52524 _ACEOF
52525 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52526 exec 5>>config.log
52527 {
52528   echo
52529   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
52530 ## Running $as_me. ##
52531 _ASBOX
52532   $as_echo "$ac_log"
52533 } >&5
52534 
52535 _ACEOF
52536 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52537 _ACEOF
52538 
52539 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52540 
52541 # Handling of arguments.
52542 for ac_config_target in $ac_config_targets
52543 do
52544   case $ac_config_target in
52545     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
52546     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
52547     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
52548     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
52549     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
52550     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
52551     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
52552 
52553   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
52554   esac
52555 done
52556 
52557 
52558 # If the user did not use the arguments to specify the items to instantiate,
52559 # then the envvar interface is used.  Set only those that are not.
52560 # We use the long form for the default assignment because of an extremely
52561 # bizarre bug on SunOS 4.1.3.
52562 if $ac_need_defaults; then
52563   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52564   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
52565 fi
52566 
52567 # Have a temporary directory for convenience.  Make it in the build tree
52568 # simply because there is no reason against having it here, and in addition,
52569 # creating and moving files from /tmp can sometimes cause problems.
52570 # Hook for its removal unless debugging.
52571 # Note that there is a small window in which the directory will not be cleaned:
52572 # after its creation but before its name has been assigned to `$tmp'.
52573 $debug ||
52574 {
52575   tmp= ac_tmp=
52576   trap 'exit_status=$?
52577   : "${ac_tmp:=$tmp}"
52578   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
52579 ' 0
52580   trap 'as_fn_exit 1' 1 2 13 15
52581 }
52582 # Create a (secure) tmp directory for tmp files.
52583 
52584 {
52585   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52586   test -d "$tmp"
52587 }  ||
52588 {
52589   tmp=./conf$$-$RANDOM
52590   (umask 077 && mkdir "$tmp")
52591 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52592 ac_tmp=$tmp
52593 
52594 # Set up the scripts for CONFIG_FILES section.
52595 # No need to generate them if there are no CONFIG_FILES.
52596 # This happens for instance with `./config.status config.h'.
52597 if test -n "$CONFIG_FILES"; then
52598 
52599 
52600 ac_cr=`echo X | tr X '\015'`
52601 # On cygwin, bash can eat \r inside `` if the user requested igncr.
52602 # But we know of no other shell where ac_cr would be empty at this
52603 # point, so we can use a bashism as a fallback.
52604 if test "x$ac_cr" = x; then
52605   eval ac_cr=\$\'\\r\'
52606 fi
52607 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52608 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52609   ac_cs_awk_cr='\\r'
52610 else
52611   ac_cs_awk_cr=$ac_cr
52612 fi
52613 
52614 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52615 _ACEOF
52616 
52617 
52618 {
52619   echo "cat >conf$$subs.awk <<_ACEOF" &&
52620   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52621   echo "_ACEOF"
52622 } >conf$$subs.sh ||
52623   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52624 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52625 ac_delim='%!_!# '
52626 for ac_last_try in false false false false false :; do
52627   . ./conf$$subs.sh ||
52628     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52629 
52630   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52631   if test $ac_delim_n = $ac_delim_num; then
52632     break
52633   elif $ac_last_try; then
52634     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52635   else
52636     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52637   fi
52638 done
52639 rm -f conf$$subs.sh
52640 
52641 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52642 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52643 _ACEOF
52644 sed -n '
52645 h
52646 s/^/S["/; s/!.*/"]=/
52647 p
52648 g
52649 s/^[^!]*!//
52650 :repl
52651 t repl
52652 s/'"$ac_delim"'$//
52653 t delim
52654 :nl
52655 h
52656 s/\(.\{148\}\)..*/\1/
52657 t more1
52658 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52659 p
52660 n
52661 b repl
52662 :more1
52663 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52664 p
52665 g
52666 s/.\{148\}//
52667 t nl
52668 :delim
52669 h
52670 s/\(.\{148\}\)..*/\1/
52671 t more2
52672 s/["\\]/\\&/g; s/^/"/; s/$/"/
52673 p
52674 b
52675 :more2
52676 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52677 p
52678 g
52679 s/.\{148\}//
52680 t delim
52681 ' <conf$$subs.awk | sed '
52682 /^[^""]/{
52683   N
52684   s/\n//
52685 }
52686 ' >>$CONFIG_STATUS || ac_write_fail=1
52687 rm -f conf$$subs.awk
52688 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52689 _ACAWK
52690 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
52691   for (key in S) S_is_set[key] = 1
52692   FS = ""
52693 
52694 }
52695 {
52696   line = $ 0
52697   nfields = split(line, field, "@")
52698   substed = 0
52699   len = length(field[1])
52700   for (i = 2; i < nfields; i++) {
52701     key = field[i]
52702     keylen = length(key)
52703     if (S_is_set[key]) {
52704       value = S[key]
52705       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52706       len += length(value) + length(field[++i])
52707       substed = 1
52708     } else
52709       len += 1 + keylen
52710   }
52711 
52712   print line
52713 }
52714 
52715 _ACAWK
52716 _ACEOF
52717 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52718 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52719   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52720 else
52721   cat
52722 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52723   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52724 _ACEOF
52725 
52726 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52727 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52728 # trailing colons and then remove the whole line if VPATH becomes empty
52729 # (actually we leave an empty line to preserve line numbers).
52730 if test "x$srcdir" = x.; then
52731   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
52732 h
52733 s///
52734 s/^/:/
52735 s/[      ]*$/:/
52736 s/:\$(srcdir):/:/g
52737 s/:\${srcdir}:/:/g
52738 s/:@srcdir@:/:/g
52739 s/^:*//
52740 s/:*$//
52741 x
52742 s/\(=[   ]*\).*/\1/
52743 G
52744 s/\n//
52745 s/^[^=]*=[       ]*$//
52746 }'
52747 fi
52748 
52749 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52750 fi # test -n "$CONFIG_FILES"
52751 
52752 # Set up the scripts for CONFIG_HEADERS section.
52753 # No need to generate them if there are no CONFIG_HEADERS.
52754 # This happens for instance with `./config.status Makefile'.
52755 if test -n "$CONFIG_HEADERS"; then
52756 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
52757 BEGIN {
52758 _ACEOF
52759 
52760 # Transform confdefs.h into an awk script `defines.awk', embedded as
52761 # here-document in config.status, that substitutes the proper values into
52762 # config.h.in to produce config.h.
52763 
52764 # Create a delimiter string that does not exist in confdefs.h, to ease
52765 # handling of long lines.
52766 ac_delim='%!_!# '
52767 for ac_last_try in false false :; do
52768   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
52769   if test -z "$ac_tt"; then
52770     break
52771   elif $ac_last_try; then
52772     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
52773   else
52774     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52775   fi
52776 done
52777 
52778 # For the awk script, D is an array of macro values keyed by name,
52779 # likewise P contains macro parameters if any.  Preserve backslash
52780 # newline sequences.
52781 
52782 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
52783 sed -n '
52784 s/.\{148\}/&'"$ac_delim"'/g
52785 t rset
52786 :rset
52787 s/^[     ]*#[    ]*define[       ][      ]*/ /
52788 t def
52789 d
52790 :def
52791 s/\\$//
52792 t bsnl
52793 s/["\\]/\\&/g
52794 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
52795 D["\1"]=" \3"/p
52796 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
52797 d
52798 :bsnl
52799 s/["\\]/\\&/g
52800 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
52801 D["\1"]=" \3\\\\\\n"\\/p
52802 t cont
52803 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
52804 t cont
52805 d
52806 :cont
52807 n
52808 s/.\{148\}/&'"$ac_delim"'/g
52809 t clear
52810 :clear
52811 s/\\$//
52812 t bsnlc
52813 s/["\\]/\\&/g; s/^/"/; s/$/"/p
52814 d
52815 :bsnlc
52816 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
52817 b cont
52818 ' <confdefs.h | sed '
52819 s/'"$ac_delim"'/"\\\
52820 "/g' >>$CONFIG_STATUS || ac_write_fail=1
52821 
52822 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52823   for (key in D) D_is_set[key] = 1
52824   FS = ""
52825 }
52826 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
52827   line = \$ 0
52828   split(line, arg, " ")
52829   if (arg[1] == "#") {
52830     defundef = arg[2]
52831     mac1 = arg[3]
52832   } else {
52833     defundef = substr(arg[1], 2)
52834     mac1 = arg[2]
52835   }
52836   split(mac1, mac2, "(") #)
52837   macro = mac2[1]
52838   prefix = substr(line, 1, index(line, defundef) - 1)
52839   if (D_is_set[macro]) {
52840     # Preserve the white space surrounding the "#".
52841     print prefix "define", macro P[macro] D[macro]
52842     next
52843   } else {
52844     # Replace #undef with comments.  This is necessary, for example,
52845     # in the case of _POSIX_SOURCE, which is predefined and required
52846     # on some systems where configure will not decide to define it.
52847     if (defundef == "undef") {
52848       print "/*", prefix defundef, macro, "*/"
52849       next
52850     }
52851   }
52852 }
52853 { print }
52854 _ACAWK
52855 _ACEOF
52856 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52857   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
52858 fi # test -n "$CONFIG_HEADERS"
52859 
52860 
52861 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
52862 shift
52863 for ac_tag
52864 do
52865   case $ac_tag in
52866   :[FHLC]) ac_mode=$ac_tag; continue;;
52867   esac
52868   case $ac_mode$ac_tag in
52869   :[FHL]*:*);;
52870   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52871   :[FH]-) ac_tag=-:-;;
52872   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52873   esac
52874   ac_save_IFS=$IFS
52875   IFS=:
52876   set x $ac_tag
52877   IFS=$ac_save_IFS
52878   shift
52879   ac_file=$1
52880   shift
52881 
52882   case $ac_mode in
52883   :L) ac_source=$1;;
52884   :[FH])
52885     ac_file_inputs=
52886     for ac_f
52887     do
52888       case $ac_f in
52889       -) ac_f="$ac_tmp/stdin";;
52890       *) # Look for the file first in the build tree, then in the source tree
52891          # (if the path is not absolute).  The absolute path cannot be DOS-style,
52892          # because $ac_f cannot contain `:'.
52893          test -f "$ac_f" ||
52894            case $ac_f in
52895            [\\/$]*) false;;
52896            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52897            esac ||
52898            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52899       esac
52900       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52901       as_fn_append ac_file_inputs " '$ac_f'"
52902     done
52903 
52904     # Let's still pretend it is `configure' which instantiates (i.e., don't
52905     # use $as_me), people would be surprised to read:
52906     #    /* config.h.  Generated by config.status.  */
52907     configure_input='Generated from '`
52908           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52909         `' by configure.'
52910     if test x"$ac_file" != x-; then
52911       configure_input="$ac_file.  $configure_input"
52912       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52913 $as_echo "$as_me: creating $ac_file" >&6;}
52914     fi
52915     # Neutralize special characters interpreted by sed in replacement strings.
52916     case $configure_input in #(
52917     *\&* | *\|* | *\\* )
52918        ac_sed_conf_input=`$as_echo "$configure_input" |
52919        sed 's/[\\\\&|]/\\\\&/g'`;; #(
52920     *) ac_sed_conf_input=$configure_input;;
52921     esac
52922 
52923     case $ac_tag in
52924     *:-:* | *:-) cat >"$ac_tmp/stdin" \
52925       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52926     esac
52927     ;;
52928   esac
52929 
52930   ac_dir=`$as_dirname -- "$ac_file" ||
52931 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52932          X"$ac_file" : 'X\(//\)[^/]' \| \
52933          X"$ac_file" : 'X\(//\)$' \| \
52934          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52935 $as_echo X"$ac_file" |
52936     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52937             s//\1/
52938             q
52939           }
52940           /^X\(\/\/\)[^/].*/{
52941             s//\1/
52942             q
52943           }
52944           /^X\(\/\/\)$/{
52945             s//\1/
52946             q
52947           }
52948           /^X\(\/\).*/{
52949             s//\1/
52950             q
52951           }
52952           s/.*/./; q'`
52953   as_dir="$ac_dir"; as_fn_mkdir_p
52954   ac_builddir=.
52955 
52956 case "$ac_dir" in
52957 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52958 *)
52959   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52960   # A ".." for each directory in $ac_dir_suffix.
52961   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52962   case $ac_top_builddir_sub in
52963   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52964   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52965   esac ;;
52966 esac
52967 ac_abs_top_builddir=$ac_pwd
52968 ac_abs_builddir=$ac_pwd$ac_dir_suffix
52969 # for backward compatibility:
52970 ac_top_builddir=$ac_top_build_prefix
52971 
52972 case $srcdir in
52973   .)  # We are building in place.
52974     ac_srcdir=.
52975     ac_top_srcdir=$ac_top_builddir_sub
52976     ac_abs_top_srcdir=$ac_pwd ;;
52977   [\\/]* | ?:[\\/]* )  # Absolute name.
52978     ac_srcdir=$srcdir$ac_dir_suffix;
52979     ac_top_srcdir=$srcdir
52980     ac_abs_top_srcdir=$srcdir ;;
52981   *) # Relative name.
52982     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52983     ac_top_srcdir=$ac_top_build_prefix$srcdir
52984     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52985 esac
52986 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52987 
52988 
52989   case $ac_mode in
52990   :F)
52991   #
52992   # CONFIG_FILE
52993   #
52994 
52995 _ACEOF
52996 
52997 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52998 # If the template does not know about datarootdir, expand it.
52999 # FIXME: This hack should be removed a few years after 2.60.
53000 ac_datarootdir_hack=; ac_datarootdir_seen=
53001 ac_sed_dataroot='
53002 /datarootdir/ {
53003   p
53004   q
53005 }
53006 /@datadir@/p
53007 /@docdir@/p
53008 /@infodir@/p
53009 /@localedir@/p
53010 /@mandir@/p'
53011 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
53012 *datarootdir*) ac_datarootdir_seen=yes;;
53013 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
53014   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
53015 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
53016 _ACEOF
53017 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53018   ac_datarootdir_hack='
53019   s&@datadir@&$datadir&g
53020   s&@docdir@&$docdir&g
53021   s&@infodir@&$infodir&g
53022   s&@localedir@&$localedir&g
53023   s&@mandir@&$mandir&g
53024   s&\\\${datarootdir}&$datarootdir&g' ;;
53025 esac
53026 _ACEOF
53027 
53028 # Neutralize VPATH when `$srcdir' = `.'.
53029 # Shell code in configure.ac might set extrasub.
53030 # FIXME: do we really want to maintain this feature?
53031 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53032 ac_sed_extra="$ac_vpsub
53033 $extrasub
53034 _ACEOF
53035 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53036 :t
53037 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
53038 s|@configure_input@|$ac_sed_conf_input|;t t
53039 s&@top_builddir@&$ac_top_builddir_sub&;t t
53040 s&@top_build_prefix@&$ac_top_build_prefix&;t t
53041 s&@srcdir@&$ac_srcdir&;t t
53042 s&@abs_srcdir@&$ac_abs_srcdir&;t t
53043 s&@top_srcdir@&$ac_top_srcdir&;t t
53044 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
53045 s&@builddir@&$ac_builddir&;t t
53046 s&@abs_builddir@&$ac_abs_builddir&;t t
53047 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
53048 $ac_datarootdir_hack
53049 "
53050 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
53051   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53052 
53053 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
53054   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
53055   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
53056       "$ac_tmp/out"`; test -z "$ac_out"; } &&
53057   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
53058 which seems to be undefined.  Please make sure it is defined" >&5
53059 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
53060 which seems to be undefined.  Please make sure it is defined" >&2;}
53061 
53062   rm -f "$ac_tmp/stdin"
53063   case $ac_file in
53064   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
53065   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
53066   esac \
53067   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53068  ;;
53069   :H)
53070   #
53071   # CONFIG_HEADER
53072   #
53073   if test x"$ac_file" != x-; then
53074     {
53075       $as_echo "/* $configure_input  */" \
53076       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
53077     } >"$ac_tmp/config.h" \
53078       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53079     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
53080       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
53081 $as_echo "$as_me: $ac_file is unchanged" >&6;}
53082     else
53083       rm -f "$ac_file"
53084       mv "$ac_tmp/config.h" "$ac_file" \
53085         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53086     fi
53087   else
53088     $as_echo "/* $configure_input  */" \
53089       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
53090       || as_fn_error $? "could not create -" "$LINENO" 5
53091   fi
53092  ;;
53093 
53094 
53095   esac
53096 
53097 done # for ac_tag
53098 
53099 
53100 as_fn_exit 0
53101 _ACEOF
53102 ac_clean_files=$ac_clean_files_save
53103 
53104 test $ac_write_fail = 0 ||
53105   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
53106 
53107 
53108 # configure is writing to config.log, and then calls config.status.
53109 # config.status does its own redirection, appending to config.log.
53110 # Unfortunately, on DOS this fails, as config.log is still kept open
53111 # by configure, so config.status won't be able to write to it; its
53112 # output is simply discarded.  So we exec the FD to /dev/null,
53113 # effectively closing config.log, so it can be properly (re)opened and
53114 # appended to by config.status.  When coming back to configure, we
53115 # need to make the FD available again.
53116 if test "$no_create" != yes; then
53117   ac_cs_success=:
53118   ac_config_status_args=
53119   test "$silent" = yes &&
53120     ac_config_status_args="$ac_config_status_args --quiet"
53121   exec 5>/dev/null
53122   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
53123   exec 5>>config.log
53124   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
53125   # would make configure fail if this is the last instruction.
53126   $ac_cs_success || as_fn_exit 1
53127 fi
53128 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
53129   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
53130 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
53131 fi
53132 
53133 
53134 
53135 # Try to move the config.log file to the output directory.
53136 if test -e ./config.log; then
53137   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
53138 fi
53139 
53140 # Make the compare script executable
53141 $CHMOD +x $OUTPUT_ROOT/compare.sh
53142 
53143 # Finally output some useful information to the user
53144 
53145   # Finally output some useful information to the user
53146 
53147   printf "\n"
53148   printf "====================================================\n"
53149   printf "A new configuration has been successfully created in\n"
53150   printf "$OUTPUT_ROOT\n"
53151   if test "x$CONFIGURE_COMMAND_LINE" != x; then
53152     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
53153   else
53154     printf "using default settings.\n"
53155   fi
53156 
53157   printf "\n"
53158   printf "Configuration summary:\n"
53159   printf "* Debug level:    $DEBUG_LEVEL\n"
53160   printf "* JDK variant:    $JDK_VARIANT\n"
53161   printf "* JVM variants:   $with_jvm_variants\n"
53162   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
53163 
53164   printf "\n"
53165   printf "Tools summary:\n"
53166   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
53167     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
53168   fi
53169   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
53170   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
53171   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
53172   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
53173 
53174   printf "\n"
53175   printf "Build performance summary:\n"
53176   printf "* Cores to use:   $JOBS\n"
53177   printf "* Memory limit:   $MEMORY_SIZE MB\n"
53178   if test "x$CCACHE_STATUS" != "x"; then
53179     printf "* ccache status:  $CCACHE_STATUS\n"
53180   fi
53181   printf "\n"
53182 
53183   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
53184     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
53185     printf "will result in longer build times.\n"
53186     printf "\n"
53187   fi
53188 
53189   if test "x$FOUND_ALT_VARIABLES" != "x"; then
53190     printf "WARNING: You have old-style ALT_ environment variables set.\n"
53191     printf "These are not respected, and will be ignored. It is recommended\n"
53192     printf "that you clean your environment. The following variables are set:\n"
53193     printf "$FOUND_ALT_VARIABLES\n"
53194     printf "\n"
53195   fi
53196 
53197   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
53198     printf "WARNING: Your build output directory is not on a local disk.\n"
53199     printf "This will severely degrade build performance!\n"
53200     printf "It is recommended that you create an output directory on a local disk,\n"
53201     printf "and run the configure script again from that directory.\n"
53202     printf "\n"
53203   fi
53204 
53205   if test "x$IS_RECONFIGURE" = "xyes"; then
53206     printf "WARNING: The result of this configuration has overridden an older\n"
53207     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
53208     printf "proper build. Failure to do so might result in strange build problems.\n"
53209     printf "\n"
53210   fi
53211 
53212   if test "x$UNSUPPORTED_TOOLCHAIN_VERSION" = "xyes"; then
53213     printf "WARNING: The toolchain version used is known to have issues. Please\n"
53214     printf "consider using a supported version unless you know what you are doing.\n"
53215     printf "\n"
53216   fi
53217