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 UCRT_DLL_DIR
 644 MSVCP_DLL
 645 MSVCR_DLL
 646 LIBCXX
 647 LLVM_LIBS
 648 LLVM_LDFLAGS
 649 LLVM_CFLAGS
 650 LLVM_CONFIG
 651 LIBFFI_LIBS
 652 LIBFFI_CFLAGS
 653 STATIC_CXX_SETTING
 654 LIBDL
 655 LIBM
 656 LIBZIP_CAN_USE_MMAP
 657 USE_EXTERNAL_LIBZ
 658 USE_EXTERNAL_LIBGIF
 659 USE_EXTERNAL_LIBJPEG
 660 FONTCONFIG_CFLAGS
 661 ALSA_LIBS
 662 ALSA_CFLAGS
 663 FREETYPE_BUNDLE_LIB_PATH
 664 FREETYPE_LIBS
 665 FREETYPE_CFLAGS
 666 CUPS_CFLAGS
 667 X_EXTRA_LIBS
 668 X_LIBS
 669 X_PRE_LIBS
 670 X_CFLAGS
 671 XMKMF
 672 FIXPATH
 673 ZIP_DEBUGINFO_FILES
 674 DEBUG_BINARIES
 675 STRIP_POLICY
 676 ENABLE_DEBUG_SYMBOLS
 677 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 678 ZERO_ARCHFLAG
 679 LDFLAGS_CXX_JDK
 680 LDFLAGS_JDKEXE_SUFFIX
 681 LDFLAGS_JDKLIB_SUFFIX
 682 LDFLAGS_JDKEXE
 683 LDFLAGS_JDKLIB
 684 CXXFLAGS_JDKEXE
 685 CXXFLAGS_JDKLIB
 686 CFLAGS_JDKEXE
 687 CFLAGS_JDKLIB
 688 MACOSX_VERSION_MIN
 689 NO_LIFETIME_DSE_CFLAG
 690 NO_DELETE_NULL_POINTER_CHECKS_CFLAG
 691 LEGACY_EXTRA_LDFLAGS
 692 LEGACY_EXTRA_CXXFLAGS
 693 LEGACY_EXTRA_CFLAGS
 694 CXXSTD_CXXFLAG
 695 CXX_O_FLAG_NONE
 696 CXX_O_FLAG_NORM
 697 CXX_O_FLAG_HI
 698 CXX_O_FLAG_HIGHEST
 699 C_O_FLAG_NONE
 700 C_O_FLAG_NORM
 701 C_O_FLAG_HI
 702 C_O_FLAG_HIGHEST
 703 CXXFLAGS_DEBUG_SYMBOLS
 704 CFLAGS_DEBUG_SYMBOLS
 705 ASFLAGS_DEBUG_SYMBOLS
 706 CXX_FLAG_DEPS
 707 C_FLAG_DEPS
 708 SET_SHARED_LIBRARY_MAPFILE
 709 SET_SHARED_LIBRARY_NAME
 710 SET_SHARED_LIBRARY_ORIGIN
 711 SET_EXECUTABLE_ORIGIN
 712 SHARED_LIBRARY_FLAGS
 713 CXX_FLAG_REORDER
 714 C_FLAG_REORDER
 715 SYSROOT_LDFLAGS
 716 SYSROOT_CFLAGS
 717 RC_FLAGS
 718 AR_OUT_OPTION
 719 LD_OUT_OPTION
 720 EXE_OUT_OPTION
 721 CC_OUT_OPTION
 722 POST_MCS_CMD
 723 POST_STRIP_CMD
 724 ARFLAGS
 725 COMPILER_TARGET_BITS_FLAG
 726 JT_HOME
 727 JTREGEXE
 728 USING_BROKEN_SUSE_LD
 729 PACKAGE_PATH
 730 LDEXECXX
 731 LDEXE
 732 USE_CLANG
 733 HOTSPOT_LD
 734 HOTSPOT_CXX
 735 HOTSPOT_RC
 736 HOTSPOT_MT
 737 BUILD_LD
 738 BUILD_CXX
 739 BUILD_CC
 740 ac_ct_OBJDUMP
 741 OBJDUMP
 742 ac_ct_OBJCOPY
 743 OBJCOPY
 744 ac_ct_NM
 745 OTOOL
 746 ac_ct_STRIP
 747 MCS
 748 GNM
 749 NM
 750 STRIP
 751 MSBUILD
 752 DUMPBIN
 753 RC
 754 MT
 755 LIPO
 756 ac_ct_OBJC
 757 OBJCFLAGS
 758 OBJC
 759 ac_ct_AR
 760 AR
 761 AS
 762 LDCXX
 763 LD
 764 CXXCPP
 765 CPP
 766 CXX_VERSION_NUMBER
 767 CC_VERSION_NUMBER
 768 ac_ct_CXX
 769 CXXFLAGS
 770 CXX
 771 ac_ct_PROPER_COMPILER_CXX
 772 PROPER_COMPILER_CXX
 773 TOOLCHAIN_PATH_CXX
 774 POTENTIAL_CXX
 775 OBJEXT
 776 EXEEXT
 777 ac_ct_CC
 778 CPPFLAGS
 779 LDFLAGS
 780 CFLAGS
 781 CC
 782 ac_ct_PROPER_COMPILER_CC
 783 PROPER_COMPILER_CC
 784 TOOLCHAIN_PATH_CC
 785 POTENTIAL_CC
 786 SDKPATH
 787 XCODEBUILD
 788 SET_DEVELOPER_DIR
 789 VS_LIB
 790 VS_INCLUDE
 791 VS_PATH
 792 CYGWIN_LINK
 793 EXE_SUFFIX
 794 OBJ_SUFFIX
 795 STATIC_LIBRARY
 796 SHARED_LIBRARY
 797 STATIC_LIBRARY_SUFFIX
 798 SHARED_LIBRARY_SUFFIX
 799 LIBRARY_PREFIX
 800 TOOLCHAIN_TYPE
 801 BUILD_HOTSPOT
 802 HOTSPOT_DIST
 803 BUILD_OUTPUT
 804 OVERRIDE_SRC_ROOT
 805 ADD_SRC_ROOT
 806 JDK_TOPDIR
 807 NASHORN_TOPDIR
 808 HOTSPOT_TOPDIR
 809 JAXWS_TOPDIR
 810 JAXP_TOPDIR
 811 CORBA_TOPDIR
 812 LANGTOOLS_TOPDIR
 813 JAVA_FLAGS_SMALL
 814 JAVA_FLAGS_BIG
 815 JAVA_FLAGS
 816 BOOT_JDK_BITS
 817 JAVAC_FLAGS
 818 BOOT_JDK_SOURCETARGET
 819 BOOT_JDK
 820 BOOT_TOOLSJAR
 821 BOOT_RTJAR
 822 JAVA_CHECK
 823 JAVAC_CHECK
 824 COOKED_BUILD_NUMBER
 825 COOKED_JDK_UPDATE_VERSION
 826 JDK_VERSION
 827 COPYRIGHT_YEAR
 828 COMPANY_NAME
 829 MACOSX_BUNDLE_ID_BASE
 830 MACOSX_BUNDLE_NAME_BASE
 831 JDK_RC_PLATFORM_NAME
 832 PRODUCT_SUFFIX
 833 PRODUCT_NAME
 834 LAUNCHER_NAME
 835 MILESTONE
 836 JDK_BUILD_NUMBER
 837 JDK_UPDATE_VERSION
 838 JDK_MICRO_VERSION
 839 JDK_MINOR_VERSION
 840 JDK_MAJOR_VERSION
 841 USER_RELEASE_SUFFIX
 842 COMPRESS_JARS
 843 UNLIMITED_CRYPTO
 844 CACERTS_FILE
 845 TEST_IN_BUILD
 846 BUILD_HEADLESS
 847 SUPPORT_HEADFUL
 848 SUPPORT_HEADLESS
 849 BDEPS_FTP
 850 BDEPS_UNZIP
 851 OS_VERSION_MICRO
 852 OS_VERSION_MINOR
 853 OS_VERSION_MAJOR
 854 PKG_CONFIG
 855 CODESIGN
 856 XATTR
 857 DSYMUTIL
 858 IS_GNU_TIME
 859 TIME
 860 STAT
 861 HG
 862 READELF
 863 LDD
 864 ZIP
 865 UNZIP
 866 FIND_DELETE
 867 MAKE
 868 CHECK_TOOLSDIR_MAKE
 869 CHECK_TOOLSDIR_GMAKE
 870 CHECK_MAKE
 871 CHECK_GMAKE
 872 PKGHANDLER
 873 OUTPUT_ROOT
 874 CONF_NAME
 875 SPEC
 876 DEVKIT_LIB_DIR
 877 BUILD_VARIANT_RELEASE
 878 DEBUG_CLASSFILES
 879 FASTDEBUG
 880 VARIANT
 881 DEBUG_LEVEL
 882 MACOSX_UNIVERSAL
 883 INCLUDE_SA
 884 JVM_VARIANT_CORE
 885 JVM_VARIANT_ZEROSHARK
 886 JVM_VARIANT_ZERO
 887 JVM_VARIANT_KERNEL
 888 JVM_VARIANT_MINIMAL1
 889 JVM_VARIANT_CLIENT
 890 JVM_VARIANT_SERVER
 891 JVM_VARIANTS
 892 JVM_INTERPRETER
 893 JDK_VARIANT
 894 SET_OPENJDK
 895 BUILD_LOG_WRAPPER
 896 BUILD_LOG_PREVIOUS
 897 BUILD_LOG
 898 TOPDIR
 899 PATH_SEP
 900 ZERO_ARCHDEF
 901 DEFINE_CROSS_COMPILE_ARCH
 902 LP64
 903 OPENJDK_TARGET_OS_EXPORT_DIR
 904 OPENJDK_TARGET_OS_API_DIR
 905 OPENJDK_TARGET_CPU_JLI_CFLAGS
 906 OPENJDK_TARGET_CPU_OSARCH
 907 OPENJDK_TARGET_CPU_ISADIR
 908 OPENJDK_TARGET_CPU_LIBDIR
 909 OPENJDK_TARGET_CPU_LEGACY_LIB
 910 OPENJDK_TARGET_CPU_LEGACY
 911 REQUIRED_OS_VERSION
 912 REQUIRED_OS_NAME
 913 COMPILE_TYPE
 914 OPENJDK_TARGET_CPU_ENDIAN
 915 OPENJDK_TARGET_CPU_BITS
 916 OPENJDK_TARGET_CPU_ARCH
 917 OPENJDK_TARGET_CPU
 918 OPENJDK_TARGET_OS_ENV
 919 OPENJDK_TARGET_OS_API
 920 OPENJDK_TARGET_OS
 921 OPENJDK_BUILD_CPU_ENDIAN
 922 OPENJDK_BUILD_CPU_BITS
 923 OPENJDK_BUILD_CPU_ARCH
 924 OPENJDK_BUILD_CPU
 925 OPENJDK_BUILD_OS_ENV
 926 OPENJDK_BUILD_OS_API
 927 OPENJDK_BUILD_OS
 928 OPENJDK_BUILD_AUTOCONF_NAME
 929 OPENJDK_TARGET_AUTOCONF_NAME
 930 target_os
 931 target_vendor
 932 target_cpu
 933 target
 934 host_os
 935 host_vendor
 936 host_cpu
 937 host
 938 build_os
 939 build_vendor
 940 build_cpu
 941 build
 942 CPIO
 943 SETFILE
 944 DF
 945 READLINK
 946 CYGPATH
 947 SED
 948 FGREP
 949 EGREP
 950 GREP
 951 AWK
 952 XARGS
 953 WHICH
 954 WC
 955 UNIQ
 956 UNAME
 957 TR
 958 TOUCH
 959 TEE
 960 TAR
 961 TAIL
 962 SORT
 963 SH
 964 RM
 965 PRINTF
 966 NAWK
 967 MV
 968 MKTEMP
 969 MKDIR
 970 LS
 971 LN
 972 HEAD
 973 FIND
 974 FILE
 975 EXPR
 976 ECHO
 977 DIRNAME
 978 DIFF
 979 DATE
 980 CUT
 981 CP
 982 COMM
 983 CMP
 984 CHMOD
 985 CAT
 986 BASH
 987 BASENAME
 988 DATE_WHEN_CONFIGURED
 989 CONFIGURE_COMMAND_LINE
 990 CUSTOM_MAKE_DIR
 991 target_alias
 992 host_alias
 993 build_alias
 994 LIBS
 995 ECHO_T
 996 ECHO_N
 997 ECHO_C
 998 DEFS
 999 mandir
1000 localedir
1001 libdir
1002 psdir
1003 pdfdir
1004 dvidir
1005 htmldir
1006 infodir
1007 docdir
1008 oldincludedir
1009 includedir
1010 localstatedir
1011 sharedstatedir
1012 sysconfdir
1013 datadir
1014 datarootdir
1015 libexecdir
1016 sbindir
1017 bindir
1018 program_transform_name
1019 prefix
1020 exec_prefix
1021 PACKAGE_URL
1022 PACKAGE_BUGREPORT
1023 PACKAGE_STRING
1024 PACKAGE_VERSION
1025 PACKAGE_TARNAME
1026 PACKAGE_NAME
1027 PATH_SEPARATOR
1028 SHELL'
1029 ac_subst_files=''
1030 ac_user_opts='
1031 enable_option_checking
1032 with_custom_make_dir
1033 with_target_bits
1034 enable_openjdk_only
1035 with_jdk_variant
1036 with_jvm_interpreter
1037 with_jvm_variants
1038 enable_debug
1039 with_debug_level
1040 with_devkit
1041 with_sys_root
1042 with_sysroot
1043 with_tools_dir
1044 with_toolchain_path
1045 with_extra_path
1046 with_xcode_path
1047 with_conf_name
1048 with_builddeps_conf
1049 with_builddeps_server
1050 with_builddeps_dir
1051 with_builddeps_group
1052 enable_headful
1053 enable_hotspot_test_in_build
1054 with_cacerts_file
1055 enable_unlimited_crypto
1056 with_milestone
1057 with_update_version
1058 with_user_release_suffix
1059 with_build_number
1060 with_vendor_name
1061 with_copyright_year
1062 with_boot_jdk
1063 with_boot_jdk_jvmargs
1064 with_add_source_root
1065 with_override_source_root
1066 with_adds_and_overrides
1067 with_override_langtools
1068 with_override_corba
1069 with_override_jaxp
1070 with_override_jaxws
1071 with_override_hotspot
1072 with_override_nashorn
1073 with_override_jdk
1074 with_import_hotspot
1075 with_toolchain_type
1076 with_toolchain_version
1077 with_jtreg
1078 with_extra_cflags
1079 with_extra_cxxflags
1080 with_extra_ldflags
1081 enable_debug_symbols
1082 enable_zip_debug_info
1083 with_native_debug_symbols
1084 enable_macosx_runtime_support
1085 with_x
1086 with_cups
1087 with_cups_include
1088 with_freetype
1089 with_freetype_include
1090 with_freetype_lib
1091 with_freetype_src
1092 enable_freetype_bundling
1093 with_alsa
1094 with_alsa_include
1095 with_alsa_lib
1096 with_fontconfig
1097 with_fontconfig_include
1098 with_giflib
1099 with_zlib
1100 with_stdc__lib
1101 with_msvcr_dll
1102 with_msvcp_dll
1103 with_ucrt_dll_dir
1104 with_dxsdk
1105 with_dxsdk_lib
1106 with_dxsdk_include
1107 with_num_cores
1108 with_memory_size
1109 with_jobs
1110 with_sjavac_server_java
1111 enable_sjavac
1112 enable_precompiled_headers
1113 enable_ccache
1114 with_ccache_dir
1115 '
1116       ac_precious_vars='build_alias
1117 host_alias
1118 target_alias
1119 BASENAME
1120 BASH
1121 CAT
1122 CHMOD
1123 CMP
1124 COMM
1125 CP
1126 CUT
1127 DATE
1128 DIFF
1129 DIRNAME
1130 ECHO
1131 EXPR
1132 FILE
1133 FIND
1134 HEAD
1135 LN
1136 LS
1137 MKDIR
1138 MKTEMP
1139 MV
1140 NAWK
1141 PRINTF
1142 RM
1143 SH
1144 SORT
1145 TAIL
1146 TAR
1147 TEE
1148 TOUCH
1149 TR
1150 UNAME
1151 UNIQ
1152 WC
1153 WHICH
1154 XARGS
1155 AWK
1156 GREP
1157 EGREP
1158 FGREP
1159 SED
1160 CYGPATH
1161 READLINK
1162 DF
1163 SETFILE
1164 CPIO
1165 UNZIP
1166 ZIP
1167 LDD
1168 READELF
1169 HG
1170 STAT
1171 TIME
1172 DSYMUTIL
1173 XATTR
1174 CODESIGN
1175 PKG_CONFIG
1176 CC
1177 CFLAGS
1178 LDFLAGS
1179 LIBS
1180 CPPFLAGS
1181 CXX
1182 CXXFLAGS
1183 CCC
1184 CPP
1185 CXXCPP
1186 AS
1187 AR
1188 OBJC
1189 OBJCFLAGS
1190 LIPO
1191 STRIP
1192 NM
1193 GNM
1194 MCS
1195 OBJCOPY
1196 OBJDUMP
1197 BUILD_CC
1198 BUILD_CXX
1199 BUILD_LD
1200 JTREGEXE
1201 XMKMF
1202 FREETYPE_CFLAGS
1203 FREETYPE_LIBS
1204 ALSA_CFLAGS
1205 ALSA_LIBS
1206 LIBFFI_CFLAGS
1207 LIBFFI_LIBS
1208 CCACHE'
1209 
1210 
1211 # Initialize some variables set by options.
1212 ac_init_help=
1213 ac_init_version=false
1214 ac_unrecognized_opts=
1215 ac_unrecognized_sep=
1216 # The variables have the same names as the options, with
1217 # dashes changed to underlines.
1218 cache_file=/dev/null
1219 exec_prefix=NONE
1220 no_create=
1221 no_recursion=
1222 prefix=NONE
1223 program_prefix=NONE
1224 program_suffix=NONE
1225 program_transform_name=s,x,x,
1226 silent=
1227 site=
1228 srcdir=
1229 verbose=
1230 x_includes=NONE
1231 x_libraries=NONE
1232 
1233 # Installation directory options.
1234 # These are left unexpanded so users can "make install exec_prefix=/foo"
1235 # and all the variables that are supposed to be based on exec_prefix
1236 # by default will actually change.
1237 # Use braces instead of parens because sh, perl, etc. also accept them.
1238 # (The list follows the same order as the GNU Coding Standards.)
1239 bindir='${exec_prefix}/bin'
1240 sbindir='${exec_prefix}/sbin'
1241 libexecdir='${exec_prefix}/libexec'
1242 datarootdir='${prefix}/share'
1243 datadir='${datarootdir}'
1244 sysconfdir='${prefix}/etc'
1245 sharedstatedir='${prefix}/com'
1246 localstatedir='${prefix}/var'
1247 includedir='${prefix}/include'
1248 oldincludedir='/usr/include'
1249 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1250 infodir='${datarootdir}/info'
1251 htmldir='${docdir}'
1252 dvidir='${docdir}'
1253 pdfdir='${docdir}'
1254 psdir='${docdir}'
1255 libdir='${exec_prefix}/lib'
1256 localedir='${datarootdir}/locale'
1257 mandir='${datarootdir}/man'
1258 
1259 ac_prev=
1260 ac_dashdash=
1261 for ac_option
1262 do
1263   # If the previous option needs an argument, assign it.
1264   if test -n "$ac_prev"; then
1265     eval $ac_prev=\$ac_option
1266     ac_prev=
1267     continue
1268   fi
1269 
1270   case $ac_option in
1271   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1272   *=)   ac_optarg= ;;
1273   *)    ac_optarg=yes ;;
1274   esac
1275 
1276   # Accept the important Cygnus configure options, so we can diagnose typos.
1277 
1278   case $ac_dashdash$ac_option in
1279   --)
1280     ac_dashdash=yes ;;
1281 
1282   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1283     ac_prev=bindir ;;
1284   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1285     bindir=$ac_optarg ;;
1286 
1287   -build | --build | --buil | --bui | --bu)
1288     ac_prev=build_alias ;;
1289   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1290     build_alias=$ac_optarg ;;
1291 
1292   -cache-file | --cache-file | --cache-fil | --cache-fi \
1293   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1294     ac_prev=cache_file ;;
1295   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1296   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1297     cache_file=$ac_optarg ;;
1298 
1299   --config-cache | -C)
1300     cache_file=config.cache ;;
1301 
1302   -datadir | --datadir | --datadi | --datad)
1303     ac_prev=datadir ;;
1304   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1305     datadir=$ac_optarg ;;
1306 
1307   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1308   | --dataroo | --dataro | --datar)
1309     ac_prev=datarootdir ;;
1310   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1311   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1312     datarootdir=$ac_optarg ;;
1313 
1314   -disable-* | --disable-*)
1315     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1316     # Reject names that are not valid shell variable names.
1317     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1318       as_fn_error $? "invalid feature name: $ac_useropt"
1319     ac_useropt_orig=$ac_useropt
1320     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1321     case $ac_user_opts in
1322       *"
1323 "enable_$ac_useropt"
1324 "*) ;;
1325       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1326          ac_unrecognized_sep=', ';;
1327     esac
1328     eval enable_$ac_useropt=no ;;
1329 
1330   -docdir | --docdir | --docdi | --doc | --do)
1331     ac_prev=docdir ;;
1332   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1333     docdir=$ac_optarg ;;
1334 
1335   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1336     ac_prev=dvidir ;;
1337   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1338     dvidir=$ac_optarg ;;
1339 
1340   -enable-* | --enable-*)
1341     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1342     # Reject names that are not valid shell variable names.
1343     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1344       as_fn_error $? "invalid feature name: $ac_useropt"
1345     ac_useropt_orig=$ac_useropt
1346     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1347     case $ac_user_opts in
1348       *"
1349 "enable_$ac_useropt"
1350 "*) ;;
1351       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1352          ac_unrecognized_sep=', ';;
1353     esac
1354     eval enable_$ac_useropt=\$ac_optarg ;;
1355 
1356   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1357   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1358   | --exec | --exe | --ex)
1359     ac_prev=exec_prefix ;;
1360   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1361   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1362   | --exec=* | --exe=* | --ex=*)
1363     exec_prefix=$ac_optarg ;;
1364 
1365   -gas | --gas | --ga | --g)
1366     # Obsolete; use --with-gas.
1367     with_gas=yes ;;
1368 
1369   -help | --help | --hel | --he | -h)
1370     ac_init_help=long ;;
1371   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1372     ac_init_help=recursive ;;
1373   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1374     ac_init_help=short ;;
1375 
1376   -host | --host | --hos | --ho)
1377     ac_prev=host_alias ;;
1378   -host=* | --host=* | --hos=* | --ho=*)
1379     host_alias=$ac_optarg ;;
1380 
1381   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1382     ac_prev=htmldir ;;
1383   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1384   | --ht=*)
1385     htmldir=$ac_optarg ;;
1386 
1387   -includedir | --includedir | --includedi | --included | --include \
1388   | --includ | --inclu | --incl | --inc)
1389     ac_prev=includedir ;;
1390   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1391   | --includ=* | --inclu=* | --incl=* | --inc=*)
1392     includedir=$ac_optarg ;;
1393 
1394   -infodir | --infodir | --infodi | --infod | --info | --inf)
1395     ac_prev=infodir ;;
1396   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1397     infodir=$ac_optarg ;;
1398 
1399   -libdir | --libdir | --libdi | --libd)
1400     ac_prev=libdir ;;
1401   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1402     libdir=$ac_optarg ;;
1403 
1404   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1405   | --libexe | --libex | --libe)
1406     ac_prev=libexecdir ;;
1407   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1408   | --libexe=* | --libex=* | --libe=*)
1409     libexecdir=$ac_optarg ;;
1410 
1411   -localedir | --localedir | --localedi | --localed | --locale)
1412     ac_prev=localedir ;;
1413   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1414     localedir=$ac_optarg ;;
1415 
1416   -localstatedir | --localstatedir | --localstatedi | --localstated \
1417   | --localstate | --localstat | --localsta | --localst | --locals)
1418     ac_prev=localstatedir ;;
1419   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1420   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1421     localstatedir=$ac_optarg ;;
1422 
1423   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1424     ac_prev=mandir ;;
1425   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1426     mandir=$ac_optarg ;;
1427 
1428   -nfp | --nfp | --nf)
1429     # Obsolete; use --without-fp.
1430     with_fp=no ;;
1431 
1432   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1433   | --no-cr | --no-c | -n)
1434     no_create=yes ;;
1435 
1436   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1437   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1438     no_recursion=yes ;;
1439 
1440   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1441   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1442   | --oldin | --oldi | --old | --ol | --o)
1443     ac_prev=oldincludedir ;;
1444   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1445   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1446   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1447     oldincludedir=$ac_optarg ;;
1448 
1449   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1450     ac_prev=prefix ;;
1451   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1452     prefix=$ac_optarg ;;
1453 
1454   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1455   | --program-pre | --program-pr | --program-p)
1456     ac_prev=program_prefix ;;
1457   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1458   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1459     program_prefix=$ac_optarg ;;
1460 
1461   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1462   | --program-suf | --program-su | --program-s)
1463     ac_prev=program_suffix ;;
1464   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1465   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1466     program_suffix=$ac_optarg ;;
1467 
1468   -program-transform-name | --program-transform-name \
1469   | --program-transform-nam | --program-transform-na \
1470   | --program-transform-n | --program-transform- \
1471   | --program-transform | --program-transfor \
1472   | --program-transfo | --program-transf \
1473   | --program-trans | --program-tran \
1474   | --progr-tra | --program-tr | --program-t)
1475     ac_prev=program_transform_name ;;
1476   -program-transform-name=* | --program-transform-name=* \
1477   | --program-transform-nam=* | --program-transform-na=* \
1478   | --program-transform-n=* | --program-transform-=* \
1479   | --program-transform=* | --program-transfor=* \
1480   | --program-transfo=* | --program-transf=* \
1481   | --program-trans=* | --program-tran=* \
1482   | --progr-tra=* | --program-tr=* | --program-t=*)
1483     program_transform_name=$ac_optarg ;;
1484 
1485   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1486     ac_prev=pdfdir ;;
1487   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1488     pdfdir=$ac_optarg ;;
1489 
1490   -psdir | --psdir | --psdi | --psd | --ps)
1491     ac_prev=psdir ;;
1492   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1493     psdir=$ac_optarg ;;
1494 
1495   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1496   | -silent | --silent | --silen | --sile | --sil)
1497     silent=yes ;;
1498 
1499   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1500     ac_prev=sbindir ;;
1501   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1502   | --sbi=* | --sb=*)
1503     sbindir=$ac_optarg ;;
1504 
1505   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1506   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1507   | --sharedst | --shareds | --shared | --share | --shar \
1508   | --sha | --sh)
1509     ac_prev=sharedstatedir ;;
1510   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1511   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1512   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1513   | --sha=* | --sh=*)
1514     sharedstatedir=$ac_optarg ;;
1515 
1516   -site | --site | --sit)
1517     ac_prev=site ;;
1518   -site=* | --site=* | --sit=*)
1519     site=$ac_optarg ;;
1520 
1521   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1522     ac_prev=srcdir ;;
1523   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1524     srcdir=$ac_optarg ;;
1525 
1526   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1527   | --syscon | --sysco | --sysc | --sys | --sy)
1528     ac_prev=sysconfdir ;;
1529   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1530   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1531     sysconfdir=$ac_optarg ;;
1532 
1533   -target | --target | --targe | --targ | --tar | --ta | --t)
1534     ac_prev=target_alias ;;
1535   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1536     target_alias=$ac_optarg ;;
1537 
1538   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1539     verbose=yes ;;
1540 
1541   -version | --version | --versio | --versi | --vers | -V)
1542     ac_init_version=: ;;
1543 
1544   -with-* | --with-*)
1545     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1546     # Reject names that are not valid shell variable names.
1547     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1548       as_fn_error $? "invalid package name: $ac_useropt"
1549     ac_useropt_orig=$ac_useropt
1550     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1551     case $ac_user_opts in
1552       *"
1553 "with_$ac_useropt"
1554 "*) ;;
1555       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1556          ac_unrecognized_sep=', ';;
1557     esac
1558     eval with_$ac_useropt=\$ac_optarg ;;
1559 
1560   -without-* | --without-*)
1561     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1562     # Reject names that are not valid shell variable names.
1563     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1564       as_fn_error $? "invalid package name: $ac_useropt"
1565     ac_useropt_orig=$ac_useropt
1566     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1567     case $ac_user_opts in
1568       *"
1569 "with_$ac_useropt"
1570 "*) ;;
1571       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1572          ac_unrecognized_sep=', ';;
1573     esac
1574     eval with_$ac_useropt=no ;;
1575 
1576   --x)
1577     # Obsolete; use --with-x.
1578     with_x=yes ;;
1579 
1580   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1581   | --x-incl | --x-inc | --x-in | --x-i)
1582     ac_prev=x_includes ;;
1583   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1584   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1585     x_includes=$ac_optarg ;;
1586 
1587   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1588   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1589     ac_prev=x_libraries ;;
1590   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1591   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1592     x_libraries=$ac_optarg ;;
1593 
1594   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1595 Try \`$0 --help' for more information"
1596     ;;
1597 
1598   *=*)
1599     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1600     # Reject names that are not valid shell variable names.
1601     case $ac_envvar in #(
1602       '' | [0-9]* | *[!_$as_cr_alnum]* )
1603       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1604     esac
1605     eval $ac_envvar=\$ac_optarg
1606     export $ac_envvar ;;
1607 
1608   *)
1609     # FIXME: should be removed in autoconf 3.0.
1610     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1611     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1612       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1613     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1614     ;;
1615 
1616   esac
1617 done
1618 
1619 if test -n "$ac_prev"; then
1620   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1621   as_fn_error $? "missing argument to $ac_option"
1622 fi
1623 
1624 if test -n "$ac_unrecognized_opts"; then
1625   case $enable_option_checking in
1626     no) ;;
1627     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1628     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1629   esac
1630 fi
1631 
1632 # Check all directory arguments for consistency.
1633 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1634                 datadir sysconfdir sharedstatedir localstatedir includedir \
1635                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1636                 libdir localedir mandir
1637 do
1638   eval ac_val=\$$ac_var
1639   # Remove trailing slashes.
1640   case $ac_val in
1641     */ )
1642       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1643       eval $ac_var=\$ac_val;;
1644   esac
1645   # Be sure to have absolute directory names.
1646   case $ac_val in
1647     [\\/$]* | ?:[\\/]* )  continue;;
1648     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1649   esac
1650   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1651 done
1652 
1653 # There might be people who depend on the old broken behavior: `$host'
1654 # used to hold the argument of --host etc.
1655 # FIXME: To remove some day.
1656 build=$build_alias
1657 host=$host_alias
1658 target=$target_alias
1659 
1660 # FIXME: To remove some day.
1661 if test "x$host_alias" != x; then
1662   if test "x$build_alias" = x; then
1663     cross_compiling=maybe
1664   elif test "x$build_alias" != "x$host_alias"; then
1665     cross_compiling=yes
1666   fi
1667 fi
1668 
1669 ac_tool_prefix=
1670 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1671 
1672 test "$silent" = yes && exec 6>/dev/null
1673 
1674 
1675 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1676 ac_ls_di=`ls -di .` &&
1677 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1678   as_fn_error $? "working directory cannot be determined"
1679 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1680   as_fn_error $? "pwd does not report name of working directory"
1681 
1682 
1683 # Find the source files, if location was not specified.
1684 if test -z "$srcdir"; then
1685   ac_srcdir_defaulted=yes
1686   # Try the directory containing this script, then the parent directory.
1687   ac_confdir=`$as_dirname -- "$as_myself" ||
1688 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1689          X"$as_myself" : 'X\(//\)[^/]' \| \
1690          X"$as_myself" : 'X\(//\)$' \| \
1691          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1692 $as_echo X"$as_myself" |
1693     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1694             s//\1/
1695             q
1696           }
1697           /^X\(\/\/\)[^/].*/{
1698             s//\1/
1699             q
1700           }
1701           /^X\(\/\/\)$/{
1702             s//\1/
1703             q
1704           }
1705           /^X\(\/\).*/{
1706             s//\1/
1707             q
1708           }
1709           s/.*/./; q'`
1710   srcdir=$ac_confdir
1711   if test ! -r "$srcdir/$ac_unique_file"; then
1712     srcdir=..
1713   fi
1714 else
1715   ac_srcdir_defaulted=no
1716 fi
1717 if test ! -r "$srcdir/$ac_unique_file"; then
1718   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1719   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1720 fi
1721 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1722 ac_abs_confdir=`(
1723         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1724         pwd)`
1725 # When building in place, set srcdir=.
1726 if test "$ac_abs_confdir" = "$ac_pwd"; then
1727   srcdir=.
1728 fi
1729 # Remove unnecessary trailing slashes from srcdir.
1730 # Double slashes in file names in object file debugging info
1731 # mess up M-x gdb in Emacs.
1732 case $srcdir in
1733 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1734 esac
1735 for ac_var in $ac_precious_vars; do
1736   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1737   eval ac_env_${ac_var}_value=\$${ac_var}
1738   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1739   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1740 done
1741 
1742 #
1743 # Report the --help message.
1744 #
1745 if test "$ac_init_help" = "long"; then
1746   # Omit some internal or obsolete options to make the list less imposing.
1747   # This message is too long to be a string in the A/UX 3.1 sh.
1748   cat <<_ACEOF
1749 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1750 
1751 Usage: $0 [OPTION]... [VAR=VALUE]...
1752 
1753 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1754 VAR=VALUE.  See below for descriptions of some of the useful variables.
1755 
1756 Defaults for the options are specified in brackets.
1757 
1758 Configuration:
1759   -h, --help              display this help and exit
1760       --help=short        display options specific to this package
1761       --help=recursive    display the short help of all the included packages
1762   -V, --version           display version information and exit
1763   -q, --quiet, --silent   do not print \`checking ...' messages
1764       --cache-file=FILE   cache test results in FILE [disabled]
1765   -C, --config-cache      alias for \`--cache-file=config.cache'
1766   -n, --no-create         do not create output files
1767       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1768 
1769 Installation directories:
1770   --prefix=PREFIX         install architecture-independent files in PREFIX
1771                           [$ac_default_prefix]
1772   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1773                           [PREFIX]
1774 
1775 By default, \`make install' will install all the files in
1776 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1777 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1778 for instance \`--prefix=\$HOME'.
1779 
1780 For better control, use the options below.
1781 
1782 Fine tuning of the installation directories:
1783   --bindir=DIR            user executables [EPREFIX/bin]
1784   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1785   --libexecdir=DIR        program executables [EPREFIX/libexec]
1786   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1787   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1788   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1789   --libdir=DIR            object code libraries [EPREFIX/lib]
1790   --includedir=DIR        C header files [PREFIX/include]
1791   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1792   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1793   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1794   --infodir=DIR           info documentation [DATAROOTDIR/info]
1795   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1796   --mandir=DIR            man documentation [DATAROOTDIR/man]
1797   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1798   --htmldir=DIR           html documentation [DOCDIR]
1799   --dvidir=DIR            dvi documentation [DOCDIR]
1800   --pdfdir=DIR            pdf documentation [DOCDIR]
1801   --psdir=DIR             ps documentation [DOCDIR]
1802 _ACEOF
1803 
1804   cat <<\_ACEOF
1805 
1806 X features:
1807   --x-includes=DIR    X include files are in DIR
1808   --x-libraries=DIR   X library files are in DIR
1809 
1810 System types:
1811   --build=BUILD     configure for building on BUILD [guessed]
1812   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1813   --target=TARGET   configure for building compilers for TARGET [HOST]
1814 _ACEOF
1815 fi
1816 
1817 if test -n "$ac_init_help"; then
1818   case $ac_init_help in
1819      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1820    esac
1821   cat <<\_ACEOF
1822 
1823 Optional Features:
1824   --disable-option-checking  ignore unrecognized --enable/--with options
1825   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1826   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1827   --enable-openjdk-only   suppress building custom source even if present
1828                           [disabled]
1829   --enable-debug          set the debug level to fastdebug (shorthand for
1830                           --with-debug-level=fastdebug) [disabled]
1831   --disable-headful       disable building headful support (graphical UI
1832                           support) [enabled]
1833   --enable-hotspot-test-in-build
1834                           run the Queens test after Hotspot build [disabled]
1835   --enable-unlimited-crypto
1836                           Enable unlimited crypto policy [disabled]
1837   --disable-debug-symbols disable generation of debug symbols [enabled]
1838   --disable-zip-debug-info
1839                           disable zipping of debug-info files [enabled]
1840   --enable-macosx-runtime-support
1841                           Deprecated. Option is kept for backwards
1842                           compatibility and is ignored
1843   --disable-freetype-bundling
1844                           disable bundling of the freetype library with the
1845                           build result [enabled on Windows or when using
1846                           --with-freetype, disabled otherwise]
1847   --enable-sjavac         use sjavac to do fast incremental compiles
1848                           [disabled]
1849   --disable-precompiled-headers
1850                           disable using precompiled headers when compiling C++
1851                           [enabled]
1852   --enable-ccache         enable using ccache to speed up recompilations
1853                           [disabled]
1854 
1855 Optional Packages:
1856   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1857   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1858   --with-custom-make-dir  use this directory for custom build/make files
1859   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1860                           support it), e.g. --with-target-bits=32 [guessed]
1861   --with-jdk-variant      JDK variant to build (normal) [normal]
1862   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1863   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1864                           client, minimal1, kernel, zero, zeroshark, core)
1865                           [server]
1866   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1867                           [release]
1868   --with-devkit           use this devkit for compilers, tools and resources
1869   --with-sys-root         alias for --with-sysroot for backwards compatability
1870   --with-sysroot          use this directory as sysroot)
1871   --with-tools-dir        alias for --with-toolchain-path for backwards
1872                           compatibility
1873   --with-toolchain-path   prepend these directories when searching for
1874                           toolchain binaries (compilers etc)
1875   --with-extra-path       prepend these directories to the default path
1876   --with-xcode-path       explicit path to Xcode 4 (generally for building on
1877                           10.9 and later)
1878   --with-conf-name        use this as the name of the configuration [generated
1879                           from important configuration options]
1880   --with-builddeps-conf   use this configuration file for the builddeps
1881   --with-builddeps-server download and use build dependencies from this server
1882                           url
1883   --with-builddeps-dir    store downloaded build dependencies here
1884                           [/localhome/builddeps]
1885   --with-builddeps-group  chgrp the downloaded build dependencies to this
1886                           group
1887   --with-cacerts-file     specify alternative cacerts file
1888   --with-milestone        Set milestone value for build [internal]
1889   --with-update-version   Set update version value for build [b00]
1890   --with-user-release-suffix
1891                           Add a custom string to the version string if build
1892                           number isn't set.[username_builddateb00]
1893   --with-build-number     Set build number value for build [b00]
1894   --with-vendor-name      Set vendor name [not specified]
1895   --with-copyright-year   Set copyright year value for build [current year]
1896   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1897   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1898                           invocations of the Boot JDK, overriding the default
1899                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1900                           -enableassertions"
1901   --with-add-source-root  for each and every source directory, look in this
1902                           additional source root for the same directory; if it
1903                           exists and have files in it, include it in the build
1904   --with-override-source-root
1905                           for each and every source directory, look in this
1906                           override source root for the same directory; if it
1907                           exists, use that directory instead and ignore the
1908                           directory in the original source root
1909   --with-adds-and-overrides
1910                           use the subdirs 'adds' and 'overrides' in the
1911                           specified directory as add-source-root and
1912                           override-source-root
1913   --with-override-langtools
1914                           use this langtools dir for the build
1915   --with-override-corba   use this corba dir for the build
1916   --with-override-jaxp    use this jaxp dir for the build
1917   --with-override-jaxws   use this jaxws dir for the build
1918   --with-override-hotspot use this hotspot dir for the build
1919   --with-override-nashorn use this nashorn dir for the build
1920   --with-override-jdk     use this jdk dir for the build
1921   --with-import-hotspot   import hotspot binaries from this jdk image or
1922                           hotspot build dist dir instead of building from
1923                           source
1924   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1925                           to show possible values [platform dependent]
1926   --with-toolchain-version
1927                           the version of the toolchain to look for, use
1928                           '--help' to show possible values [platform
1929                           dependent]
1930   --with-jtreg            Regression Test Harness [probed]
1931   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1932   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1933   --with-extra-ldflags    extra flags to be used when linking jdk
1934   --with-native-debug-symbols
1935                           set the native debug symbol configuration (none,
1936                           internal, external, zipped) [varying]
1937   --with-x                use the X Window System
1938   --with-cups             specify prefix directory for the cups package
1939                           (expecting the headers under PATH/include)
1940   --with-cups-include     specify directory for the cups include files
1941   --with-freetype         specify prefix directory for the freetype package
1942                           (expecting the libraries under PATH/lib and the
1943                           headers under PATH/include)
1944   --with-freetype-include specify directory for the freetype include files
1945   --with-freetype-lib     specify directory for the freetype library
1946   --with-freetype-src     specify directory with freetype sources to
1947                           automatically build the library (experimental,
1948                           Windows-only)
1949   --with-alsa             specify prefix directory for the alsa package
1950                           (expecting the libraries under PATH/lib and the
1951                           headers under PATH/include)
1952   --with-alsa-include     specify directory for the alsa include files
1953   --with-alsa-lib         specify directory for the alsa library
1954   --with-fontconfig       specify prefix directory for the fontconfig package
1955                           (expecting the headers under PATH/include)
1956   --with-fontconfig-include
1957                           specify directory for the fontconfig include files
1958   --with-giflib           use giflib from build system or OpenJDK source
1959                           (system, bundled) [bundled]
1960   --with-zlib             use zlib from build system or OpenJDK source
1961                           (system, bundled) [bundled]
1962   --with-stdc++lib=<static>,<dynamic>,<default>
1963                           force linking of the C++ runtime on Linux to either
1964                           static or dynamic, default is static with dynamic as
1965                           fallback
1966   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1967                           (Windows only) [probed]
1968   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1969                           (Windows only) [probed]
1970   --with-ucrt-dll-dir     path to Microsoft Windows Kit UCRT DLL dir (Windows
1971                           only) [probed]
1972   --with-dxsdk            Deprecated. Option is kept for backwards
1973                           compatibility and is ignored
1974   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1975                           compatibility and is ignored
1976   --with-dxsdk-include    Deprecated. Option is kept for backwards
1977                           compatibility and is ignored
1978   --with-num-cores        number of cores in the build system, e.g.
1979                           --with-num-cores=8 [probed]
1980   --with-memory-size      memory (in MB) available in the build system, e.g.
1981                           --with-memory-size=1024 [probed]
1982   --with-jobs             number of parallel jobs to let make run [calculated
1983                           based on cores and memory]
1984   --with-sjavac-server-java
1985                           use this java binary for running the sjavac
1986                           background server [Boot JDK java]
1987   --with-ccache-dir       where to store ccache files [~/.ccache]
1988 
1989 Some influential environment variables:
1990   BASENAME    Override default value for BASENAME
1991   BASH        Override default value for BASH
1992   CAT         Override default value for CAT
1993   CHMOD       Override default value for CHMOD
1994   CMP         Override default value for CMP
1995   COMM        Override default value for COMM
1996   CP          Override default value for CP
1997   CUT         Override default value for CUT
1998   DATE        Override default value for DATE
1999   DIFF        Override default value for DIFF
2000   DIRNAME     Override default value for DIRNAME
2001   ECHO        Override default value for ECHO
2002   EXPR        Override default value for EXPR
2003   FILE        Override default value for FILE
2004   FIND        Override default value for FIND
2005   HEAD        Override default value for HEAD
2006   LN          Override default value for LN
2007   LS          Override default value for LS
2008   MKDIR       Override default value for MKDIR
2009   MKTEMP      Override default value for MKTEMP
2010   MV          Override default value for MV
2011   NAWK        Override default value for NAWK
2012   PRINTF      Override default value for PRINTF
2013   RM          Override default value for RM
2014   SH          Override default value for SH
2015   SORT        Override default value for SORT
2016   TAIL        Override default value for TAIL
2017   TAR         Override default value for TAR
2018   TEE         Override default value for TEE
2019   TOUCH       Override default value for TOUCH
2020   TR          Override default value for TR
2021   UNAME       Override default value for UNAME
2022   UNIQ        Override default value for UNIQ
2023   WC          Override default value for WC
2024   WHICH       Override default value for WHICH
2025   XARGS       Override default value for XARGS
2026   AWK         Override default value for AWK
2027   GREP        Override default value for GREP
2028   EGREP       Override default value for EGREP
2029   FGREP       Override default value for FGREP
2030   SED         Override default value for SED
2031   CYGPATH     Override default value for CYGPATH
2032   READLINK    Override default value for READLINK
2033   DF          Override default value for DF
2034   SETFILE     Override default value for SETFILE
2035   CPIO        Override default value for CPIO
2036   UNZIP       Override default value for UNZIP
2037   ZIP         Override default value for ZIP
2038   LDD         Override default value for LDD
2039   READELF     Override default value for READELF
2040   HG          Override default value for HG
2041   STAT        Override default value for STAT
2042   TIME        Override default value for TIME
2043   DSYMUTIL    Override default value for DSYMUTIL
2044   XATTR       Override default value for XATTR
2045   CODESIGN    Override default value for CODESIGN
2046   PKG_CONFIG  path to pkg-config utility
2047   CC          C compiler command
2048   CFLAGS      C compiler flags
2049   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2050               nonstandard directory <lib dir>
2051   LIBS        libraries to pass to the linker, e.g. -l<library>
2052   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2053               you have headers in a nonstandard directory <include dir>
2054   CXX         C++ compiler command
2055   CXXFLAGS    C++ compiler flags
2056   CPP         C preprocessor
2057   CXXCPP      C++ preprocessor
2058   AS          Override default value for AS
2059   AR          Override default value for AR
2060   OBJC        Objective C compiler command
2061   OBJCFLAGS   Objective C compiler flags
2062   LIPO        Override default value for LIPO
2063   STRIP       Override default value for STRIP
2064   NM          Override default value for NM
2065   GNM         Override default value for GNM
2066   MCS         Override default value for MCS
2067   OBJCOPY     Override default value for OBJCOPY
2068   OBJDUMP     Override default value for OBJDUMP
2069   BUILD_CC    Override default value for BUILD_CC
2070   BUILD_CXX   Override default value for BUILD_CXX
2071   BUILD_LD    Override default value for BUILD_LD
2072   JTREGEXE    Override default value for JTREGEXE
2073   XMKMF       Path to xmkmf, Makefile generator for X Window System
2074   FREETYPE_CFLAGS
2075               C compiler flags for FREETYPE, overriding pkg-config
2076   FREETYPE_LIBS
2077               linker flags for FREETYPE, overriding pkg-config
2078   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2079   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2080   LIBFFI_CFLAGS
2081               C compiler flags for LIBFFI, overriding pkg-config
2082   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2083   CCACHE      Override default value for CCACHE
2084 
2085 Use these variables to override the choices made by `configure' or to help
2086 it to find libraries and programs with nonstandard names/locations.
2087 
2088 Report bugs to <build-dev@openjdk.java.net>.
2089 OpenJDK home page: <http://openjdk.java.net>.
2090 _ACEOF
2091 ac_status=$?
2092 fi
2093 
2094 if test "$ac_init_help" = "recursive"; then
2095   # If there are subdirs, report their specific --help.
2096   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2097     test -d "$ac_dir" ||
2098       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2099       continue
2100     ac_builddir=.
2101 
2102 case "$ac_dir" in
2103 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2104 *)
2105   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2106   # A ".." for each directory in $ac_dir_suffix.
2107   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2108   case $ac_top_builddir_sub in
2109   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2110   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2111   esac ;;
2112 esac
2113 ac_abs_top_builddir=$ac_pwd
2114 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2115 # for backward compatibility:
2116 ac_top_builddir=$ac_top_build_prefix
2117 
2118 case $srcdir in
2119   .)  # We are building in place.
2120     ac_srcdir=.
2121     ac_top_srcdir=$ac_top_builddir_sub
2122     ac_abs_top_srcdir=$ac_pwd ;;
2123   [\\/]* | ?:[\\/]* )  # Absolute name.
2124     ac_srcdir=$srcdir$ac_dir_suffix;
2125     ac_top_srcdir=$srcdir
2126     ac_abs_top_srcdir=$srcdir ;;
2127   *) # Relative name.
2128     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2129     ac_top_srcdir=$ac_top_build_prefix$srcdir
2130     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2131 esac
2132 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2133 
2134     cd "$ac_dir" || { ac_status=$?; continue; }
2135     # Check for guested configure.
2136     if test -f "$ac_srcdir/configure.gnu"; then
2137       echo &&
2138       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2139     elif test -f "$ac_srcdir/configure"; then
2140       echo &&
2141       $SHELL "$ac_srcdir/configure" --help=recursive
2142     else
2143       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2144     fi || ac_status=$?
2145     cd "$ac_pwd" || { ac_status=$?; break; }
2146   done
2147 fi
2148 
2149 test -n "$ac_init_help" && exit $ac_status
2150 if $ac_init_version; then
2151   cat <<\_ACEOF
2152 OpenJDK configure jdk8
2153 generated by GNU Autoconf 2.69
2154 
2155 Copyright (C) 2012 Free Software Foundation, Inc.
2156 This configure script is free software; the Free Software Foundation
2157 gives unlimited permission to copy, distribute and modify it.
2158 _ACEOF
2159   exit
2160 fi
2161 
2162 ## ------------------------ ##
2163 ## Autoconf initialization. ##
2164 ## ------------------------ ##
2165 
2166 # ac_fn_c_try_compile LINENO
2167 # --------------------------
2168 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2169 ac_fn_c_try_compile ()
2170 {
2171   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2172   rm -f conftest.$ac_objext
2173   if { { ac_try="$ac_compile"
2174 case "(($ac_try" in
2175   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2176   *) ac_try_echo=$ac_try;;
2177 esac
2178 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2179 $as_echo "$ac_try_echo"; } >&5
2180   (eval "$ac_compile") 2>conftest.err
2181   ac_status=$?
2182   if test -s conftest.err; then
2183     grep -v '^ *+' conftest.err >conftest.er1
2184     cat conftest.er1 >&5
2185     mv -f conftest.er1 conftest.err
2186   fi
2187   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2188   test $ac_status = 0; } && {
2189          test -z "$ac_c_werror_flag" ||
2190          test ! -s conftest.err
2191        } && test -s conftest.$ac_objext; then :
2192   ac_retval=0
2193 else
2194   $as_echo "$as_me: failed program was:" >&5
2195 sed 's/^/| /' conftest.$ac_ext >&5
2196 
2197         ac_retval=1
2198 fi
2199   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2200   as_fn_set_status $ac_retval
2201 
2202 } # ac_fn_c_try_compile
2203 
2204 # ac_fn_cxx_try_compile LINENO
2205 # ----------------------------
2206 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2207 ac_fn_cxx_try_compile ()
2208 {
2209   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2210   rm -f conftest.$ac_objext
2211   if { { ac_try="$ac_compile"
2212 case "(($ac_try" in
2213   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2214   *) ac_try_echo=$ac_try;;
2215 esac
2216 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2217 $as_echo "$ac_try_echo"; } >&5
2218   (eval "$ac_compile") 2>conftest.err
2219   ac_status=$?
2220   if test -s conftest.err; then
2221     grep -v '^ *+' conftest.err >conftest.er1
2222     cat conftest.er1 >&5
2223     mv -f conftest.er1 conftest.err
2224   fi
2225   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2226   test $ac_status = 0; } && {
2227          test -z "$ac_cxx_werror_flag" ||
2228          test ! -s conftest.err
2229        } && test -s conftest.$ac_objext; then :
2230   ac_retval=0
2231 else
2232   $as_echo "$as_me: failed program was:" >&5
2233 sed 's/^/| /' conftest.$ac_ext >&5
2234 
2235         ac_retval=1
2236 fi
2237   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2238   as_fn_set_status $ac_retval
2239 
2240 } # ac_fn_cxx_try_compile
2241 
2242 # ac_fn_c_try_cpp LINENO
2243 # ----------------------
2244 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2245 ac_fn_c_try_cpp ()
2246 {
2247   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2248   if { { ac_try="$ac_cpp conftest.$ac_ext"
2249 case "(($ac_try" in
2250   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2251   *) ac_try_echo=$ac_try;;
2252 esac
2253 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2254 $as_echo "$ac_try_echo"; } >&5
2255   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2256   ac_status=$?
2257   if test -s conftest.err; then
2258     grep -v '^ *+' conftest.err >conftest.er1
2259     cat conftest.er1 >&5
2260     mv -f conftest.er1 conftest.err
2261   fi
2262   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2263   test $ac_status = 0; } > conftest.i && {
2264          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2265          test ! -s conftest.err
2266        }; then :
2267   ac_retval=0
2268 else
2269   $as_echo "$as_me: failed program was:" >&5
2270 sed 's/^/| /' conftest.$ac_ext >&5
2271 
2272     ac_retval=1
2273 fi
2274   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2275   as_fn_set_status $ac_retval
2276 
2277 } # ac_fn_c_try_cpp
2278 
2279 # ac_fn_cxx_try_cpp LINENO
2280 # ------------------------
2281 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2282 ac_fn_cxx_try_cpp ()
2283 {
2284   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285   if { { ac_try="$ac_cpp conftest.$ac_ext"
2286 case "(($ac_try" in
2287   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2288   *) ac_try_echo=$ac_try;;
2289 esac
2290 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2291 $as_echo "$ac_try_echo"; } >&5
2292   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2293   ac_status=$?
2294   if test -s conftest.err; then
2295     grep -v '^ *+' conftest.err >conftest.er1
2296     cat conftest.er1 >&5
2297     mv -f conftest.er1 conftest.err
2298   fi
2299   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2300   test $ac_status = 0; } > conftest.i && {
2301          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2302          test ! -s conftest.err
2303        }; then :
2304   ac_retval=0
2305 else
2306   $as_echo "$as_me: failed program was:" >&5
2307 sed 's/^/| /' conftest.$ac_ext >&5
2308 
2309     ac_retval=1
2310 fi
2311   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2312   as_fn_set_status $ac_retval
2313 
2314 } # ac_fn_cxx_try_cpp
2315 
2316 # ac_fn_objc_try_compile LINENO
2317 # -----------------------------
2318 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2319 ac_fn_objc_try_compile ()
2320 {
2321   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2322   rm -f conftest.$ac_objext
2323   if { { ac_try="$ac_compile"
2324 case "(($ac_try" in
2325   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2326   *) ac_try_echo=$ac_try;;
2327 esac
2328 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2329 $as_echo "$ac_try_echo"; } >&5
2330   (eval "$ac_compile") 2>conftest.err
2331   ac_status=$?
2332   if test -s conftest.err; then
2333     grep -v '^ *+' conftest.err >conftest.er1
2334     cat conftest.er1 >&5
2335     mv -f conftest.er1 conftest.err
2336   fi
2337   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2338   test $ac_status = 0; } && {
2339          test -z "$ac_objc_werror_flag" ||
2340          test ! -s conftest.err
2341        } && test -s conftest.$ac_objext; then :
2342   ac_retval=0
2343 else
2344   $as_echo "$as_me: failed program was:" >&5
2345 sed 's/^/| /' conftest.$ac_ext >&5
2346 
2347         ac_retval=1
2348 fi
2349   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2350   as_fn_set_status $ac_retval
2351 
2352 } # ac_fn_objc_try_compile
2353 
2354 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2355 # ---------------------------------------------------------
2356 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2357 # the include files in INCLUDES and setting the cache variable VAR
2358 # accordingly.
2359 ac_fn_cxx_check_header_mongrel ()
2360 {
2361   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2362   if eval \${$3+:} false; then :
2363   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2364 $as_echo_n "checking for $2... " >&6; }
2365 if eval \${$3+:} false; then :
2366   $as_echo_n "(cached) " >&6
2367 fi
2368 eval ac_res=\$$3
2369                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2370 $as_echo "$ac_res" >&6; }
2371 else
2372   # Is the header compilable?
2373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2374 $as_echo_n "checking $2 usability... " >&6; }
2375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376 /* end confdefs.h.  */
2377 $4
2378 #include <$2>
2379 _ACEOF
2380 if ac_fn_cxx_try_compile "$LINENO"; then :
2381   ac_header_compiler=yes
2382 else
2383   ac_header_compiler=no
2384 fi
2385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2387 $as_echo "$ac_header_compiler" >&6; }
2388 
2389 # Is the header present?
2390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2391 $as_echo_n "checking $2 presence... " >&6; }
2392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2393 /* end confdefs.h.  */
2394 #include <$2>
2395 _ACEOF
2396 if ac_fn_cxx_try_cpp "$LINENO"; then :
2397   ac_header_preproc=yes
2398 else
2399   ac_header_preproc=no
2400 fi
2401 rm -f conftest.err conftest.i conftest.$ac_ext
2402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2403 $as_echo "$ac_header_preproc" >&6; }
2404 
2405 # So?  What about this header?
2406 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2407   yes:no: )
2408     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2409 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2410     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2411 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2412     ;;
2413   no:yes:* )
2414     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2415 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2416     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2417 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2418     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2419 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2420     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2421 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2422     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2423 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2424 ( $as_echo "## ----------------------------------------- ##
2425 ## Report this to build-dev@openjdk.java.net ##
2426 ## ----------------------------------------- ##"
2427      ) | sed "s/^/$as_me: WARNING:     /" >&2
2428     ;;
2429 esac
2430   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2431 $as_echo_n "checking for $2... " >&6; }
2432 if eval \${$3+:} false; then :
2433   $as_echo_n "(cached) " >&6
2434 else
2435   eval "$3=\$ac_header_compiler"
2436 fi
2437 eval ac_res=\$$3
2438                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2439 $as_echo "$ac_res" >&6; }
2440 fi
2441   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2442 
2443 } # ac_fn_cxx_check_header_mongrel
2444 
2445 # ac_fn_cxx_try_run LINENO
2446 # ------------------------
2447 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2448 # that executables *can* be run.
2449 ac_fn_cxx_try_run ()
2450 {
2451   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2452   if { { ac_try="$ac_link"
2453 case "(($ac_try" in
2454   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2455   *) ac_try_echo=$ac_try;;
2456 esac
2457 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2458 $as_echo "$ac_try_echo"; } >&5
2459   (eval "$ac_link") 2>&5
2460   ac_status=$?
2461   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2462   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2463   { { case "(($ac_try" in
2464   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2465   *) ac_try_echo=$ac_try;;
2466 esac
2467 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2468 $as_echo "$ac_try_echo"; } >&5
2469   (eval "$ac_try") 2>&5
2470   ac_status=$?
2471   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2472   test $ac_status = 0; }; }; then :
2473   ac_retval=0
2474 else
2475   $as_echo "$as_me: program exited with status $ac_status" >&5
2476        $as_echo "$as_me: failed program was:" >&5
2477 sed 's/^/| /' conftest.$ac_ext >&5
2478 
2479        ac_retval=$ac_status
2480 fi
2481   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2482   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2483   as_fn_set_status $ac_retval
2484 
2485 } # ac_fn_cxx_try_run
2486 
2487 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2488 # ---------------------------------------------------------
2489 # Tests whether HEADER exists and can be compiled using the include files in
2490 # INCLUDES, setting the cache variable VAR accordingly.
2491 ac_fn_cxx_check_header_compile ()
2492 {
2493   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2495 $as_echo_n "checking for $2... " >&6; }
2496 if eval \${$3+:} false; then :
2497   $as_echo_n "(cached) " >&6
2498 else
2499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2500 /* end confdefs.h.  */
2501 $4
2502 #include <$2>
2503 _ACEOF
2504 if ac_fn_cxx_try_compile "$LINENO"; then :
2505   eval "$3=yes"
2506 else
2507   eval "$3=no"
2508 fi
2509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2510 fi
2511 eval ac_res=\$$3
2512                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2513 $as_echo "$ac_res" >&6; }
2514   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2515 
2516 } # ac_fn_cxx_check_header_compile
2517 
2518 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2519 # ----------------------------------------------
2520 # Tries to find the compile-time value of EXPR in a program that includes
2521 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2522 # computed
2523 ac_fn_cxx_compute_int ()
2524 {
2525   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2526   if test "$cross_compiling" = yes; then
2527     # Depending upon the size, compute the lo and hi bounds.
2528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2529 /* end confdefs.h.  */
2530 $4
2531 int
2532 main ()
2533 {
2534 static int test_array [1 - 2 * !(($2) >= 0)];
2535 test_array [0] = 0;
2536 return test_array [0];
2537 
2538   ;
2539   return 0;
2540 }
2541 _ACEOF
2542 if ac_fn_cxx_try_compile "$LINENO"; then :
2543   ac_lo=0 ac_mid=0
2544   while :; do
2545     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2546 /* end confdefs.h.  */
2547 $4
2548 int
2549 main ()
2550 {
2551 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2552 test_array [0] = 0;
2553 return test_array [0];
2554 
2555   ;
2556   return 0;
2557 }
2558 _ACEOF
2559 if ac_fn_cxx_try_compile "$LINENO"; then :
2560   ac_hi=$ac_mid; break
2561 else
2562   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2563                         if test $ac_lo -le $ac_mid; then
2564                           ac_lo= ac_hi=
2565                           break
2566                         fi
2567                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2568 fi
2569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2570   done
2571 else
2572   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2573 /* end confdefs.h.  */
2574 $4
2575 int
2576 main ()
2577 {
2578 static int test_array [1 - 2 * !(($2) < 0)];
2579 test_array [0] = 0;
2580 return test_array [0];
2581 
2582   ;
2583   return 0;
2584 }
2585 _ACEOF
2586 if ac_fn_cxx_try_compile "$LINENO"; then :
2587   ac_hi=-1 ac_mid=-1
2588   while :; do
2589     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2590 /* end confdefs.h.  */
2591 $4
2592 int
2593 main ()
2594 {
2595 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2596 test_array [0] = 0;
2597 return test_array [0];
2598 
2599   ;
2600   return 0;
2601 }
2602 _ACEOF
2603 if ac_fn_cxx_try_compile "$LINENO"; then :
2604   ac_lo=$ac_mid; break
2605 else
2606   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2607                         if test $ac_mid -le $ac_hi; then
2608                           ac_lo= ac_hi=
2609                           break
2610                         fi
2611                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2612 fi
2613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2614   done
2615 else
2616   ac_lo= ac_hi=
2617 fi
2618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2619 fi
2620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2621 # Binary search between lo and hi bounds.
2622 while test "x$ac_lo" != "x$ac_hi"; do
2623   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2624   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2625 /* end confdefs.h.  */
2626 $4
2627 int
2628 main ()
2629 {
2630 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2631 test_array [0] = 0;
2632 return test_array [0];
2633 
2634   ;
2635   return 0;
2636 }
2637 _ACEOF
2638 if ac_fn_cxx_try_compile "$LINENO"; then :
2639   ac_hi=$ac_mid
2640 else
2641   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2642 fi
2643 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2644 done
2645 case $ac_lo in #((
2646 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2647 '') ac_retval=1 ;;
2648 esac
2649   else
2650     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2651 /* end confdefs.h.  */
2652 $4
2653 static long int longval () { return $2; }
2654 static unsigned long int ulongval () { return $2; }
2655 #include <stdio.h>
2656 #include <stdlib.h>
2657 int
2658 main ()
2659 {
2660 
2661   FILE *f = fopen ("conftest.val", "w");
2662   if (! f)
2663     return 1;
2664   if (($2) < 0)
2665     {
2666       long int i = longval ();
2667       if (i != ($2))
2668         return 1;
2669       fprintf (f, "%ld", i);
2670     }
2671   else
2672     {
2673       unsigned long int i = ulongval ();
2674       if (i != ($2))
2675         return 1;
2676       fprintf (f, "%lu", i);
2677     }
2678   /* Do not output a trailing newline, as this causes \r\n confusion
2679      on some platforms.  */
2680   return ferror (f) || fclose (f) != 0;
2681 
2682   ;
2683   return 0;
2684 }
2685 _ACEOF
2686 if ac_fn_cxx_try_run "$LINENO"; then :
2687   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2688 else
2689   ac_retval=1
2690 fi
2691 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2692   conftest.$ac_objext conftest.beam conftest.$ac_ext
2693 rm -f conftest.val
2694 
2695   fi
2696   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2697   as_fn_set_status $ac_retval
2698 
2699 } # ac_fn_cxx_compute_int
2700 
2701 # ac_fn_cxx_try_link LINENO
2702 # -------------------------
2703 # Try to link conftest.$ac_ext, and return whether this succeeded.
2704 ac_fn_cxx_try_link ()
2705 {
2706   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2707   rm -f conftest.$ac_objext conftest$ac_exeext
2708   if { { ac_try="$ac_link"
2709 case "(($ac_try" in
2710   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2711   *) ac_try_echo=$ac_try;;
2712 esac
2713 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2714 $as_echo "$ac_try_echo"; } >&5
2715   (eval "$ac_link") 2>conftest.err
2716   ac_status=$?
2717   if test -s conftest.err; then
2718     grep -v '^ *+' conftest.err >conftest.er1
2719     cat conftest.er1 >&5
2720     mv -f conftest.er1 conftest.err
2721   fi
2722   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2723   test $ac_status = 0; } && {
2724          test -z "$ac_cxx_werror_flag" ||
2725          test ! -s conftest.err
2726        } && test -s conftest$ac_exeext && {
2727          test "$cross_compiling" = yes ||
2728          test -x conftest$ac_exeext
2729        }; then :
2730   ac_retval=0
2731 else
2732   $as_echo "$as_me: failed program was:" >&5
2733 sed 's/^/| /' conftest.$ac_ext >&5
2734 
2735         ac_retval=1
2736 fi
2737   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2738   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2739   # interfere with the next link command; also delete a directory that is
2740   # left behind by Apple's compiler.  We do this before executing the actions.
2741   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2742   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2743   as_fn_set_status $ac_retval
2744 
2745 } # ac_fn_cxx_try_link
2746 
2747 # ac_fn_cxx_check_func LINENO FUNC VAR
2748 # ------------------------------------
2749 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2750 ac_fn_cxx_check_func ()
2751 {
2752   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2753   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2754 $as_echo_n "checking for $2... " >&6; }
2755 if eval \${$3+:} false; then :
2756   $as_echo_n "(cached) " >&6
2757 else
2758   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2759 /* end confdefs.h.  */
2760 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2761    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2762 #define $2 innocuous_$2
2763 
2764 /* System header to define __stub macros and hopefully few prototypes,
2765     which can conflict with char $2 (); below.
2766     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2767     <limits.h> exists even on freestanding compilers.  */
2768 
2769 #ifdef __STDC__
2770 # include <limits.h>
2771 #else
2772 # include <assert.h>
2773 #endif
2774 
2775 #undef $2
2776 
2777 /* Override any GCC internal prototype to avoid an error.
2778    Use char because int might match the return type of a GCC
2779    builtin and then its argument prototype would still apply.  */
2780 #ifdef __cplusplus
2781 extern "C"
2782 #endif
2783 char $2 ();
2784 /* The GNU C library defines this for functions which it implements
2785     to always fail with ENOSYS.  Some functions are actually named
2786     something starting with __ and the normal name is an alias.  */
2787 #if defined __stub_$2 || defined __stub___$2
2788 choke me
2789 #endif
2790 
2791 int
2792 main ()
2793 {
2794 return $2 ();
2795   ;
2796   return 0;
2797 }
2798 _ACEOF
2799 if ac_fn_cxx_try_link "$LINENO"; then :
2800   eval "$3=yes"
2801 else
2802   eval "$3=no"
2803 fi
2804 rm -f core conftest.err conftest.$ac_objext \
2805     conftest$ac_exeext conftest.$ac_ext
2806 fi
2807 eval ac_res=\$$3
2808                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2809 $as_echo "$ac_res" >&6; }
2810   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2811 
2812 } # ac_fn_cxx_check_func
2813 
2814 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2815 # -------------------------------------------------------
2816 # Tests whether HEADER exists and can be compiled using the include files in
2817 # INCLUDES, setting the cache variable VAR accordingly.
2818 ac_fn_c_check_header_compile ()
2819 {
2820   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2821   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2822 $as_echo_n "checking for $2... " >&6; }
2823 if eval \${$3+:} false; then :
2824   $as_echo_n "(cached) " >&6
2825 else
2826   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2827 /* end confdefs.h.  */
2828 $4
2829 #include <$2>
2830 _ACEOF
2831 if ac_fn_c_try_compile "$LINENO"; then :
2832   eval "$3=yes"
2833 else
2834   eval "$3=no"
2835 fi
2836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2837 fi
2838 eval ac_res=\$$3
2839                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2840 $as_echo "$ac_res" >&6; }
2841   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2842 
2843 } # ac_fn_c_check_header_compile
2844 cat >config.log <<_ACEOF
2845 This file contains any messages produced by compilers while
2846 running configure, to aid debugging if configure makes a mistake.
2847 
2848 It was created by OpenJDK $as_me jdk8, which was
2849 generated by GNU Autoconf 2.69.  Invocation command line was
2850 
2851   $ $0 $@
2852 
2853 _ACEOF
2854 exec 5>>config.log
2855 {
2856 cat <<_ASUNAME
2857 ## --------- ##
2858 ## Platform. ##
2859 ## --------- ##
2860 
2861 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2862 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2863 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2864 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2865 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2866 
2867 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2868 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2869 
2870 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2871 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2872 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2873 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2874 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2875 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2876 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2877 
2878 _ASUNAME
2879 
2880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2881 for as_dir in $PATH
2882 do
2883   IFS=$as_save_IFS
2884   test -z "$as_dir" && as_dir=.
2885     $as_echo "PATH: $as_dir"
2886   done
2887 IFS=$as_save_IFS
2888 
2889 } >&5
2890 
2891 cat >&5 <<_ACEOF
2892 
2893 
2894 ## ----------- ##
2895 ## Core tests. ##
2896 ## ----------- ##
2897 
2898 _ACEOF
2899 
2900 
2901 # Keep a trace of the command line.
2902 # Strip out --no-create and --no-recursion so they do not pile up.
2903 # Strip out --silent because we don't want to record it for future runs.
2904 # Also quote any args containing shell meta-characters.
2905 # Make two passes to allow for proper duplicate-argument suppression.
2906 ac_configure_args=
2907 ac_configure_args0=
2908 ac_configure_args1=
2909 ac_must_keep_next=false
2910 for ac_pass in 1 2
2911 do
2912   for ac_arg
2913   do
2914     case $ac_arg in
2915     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2916     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2917     | -silent | --silent | --silen | --sile | --sil)
2918       continue ;;
2919     *\'*)
2920       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2921     esac
2922     case $ac_pass in
2923     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2924     2)
2925       as_fn_append ac_configure_args1 " '$ac_arg'"
2926       if test $ac_must_keep_next = true; then
2927         ac_must_keep_next=false # Got value, back to normal.
2928       else
2929         case $ac_arg in
2930           *=* | --config-cache | -C | -disable-* | --disable-* \
2931           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2932           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2933           | -with-* | --with-* | -without-* | --without-* | --x)
2934             case "$ac_configure_args0 " in
2935               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2936             esac
2937             ;;
2938           -* ) ac_must_keep_next=true ;;
2939         esac
2940       fi
2941       as_fn_append ac_configure_args " '$ac_arg'"
2942       ;;
2943     esac
2944   done
2945 done
2946 { ac_configure_args0=; unset ac_configure_args0;}
2947 { ac_configure_args1=; unset ac_configure_args1;}
2948 
2949 # When interrupted or exit'd, cleanup temporary files, and complete
2950 # config.log.  We remove comments because anyway the quotes in there
2951 # would cause problems or look ugly.
2952 # WARNING: Use '\'' to represent an apostrophe within the trap.
2953 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2954 trap 'exit_status=$?
2955   # Save into config.log some information that might help in debugging.
2956   {
2957     echo
2958 
2959     $as_echo "## ---------------- ##
2960 ## Cache variables. ##
2961 ## ---------------- ##"
2962     echo
2963     # The following way of writing the cache mishandles newlines in values,
2964 (
2965   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2966     eval ac_val=\$$ac_var
2967     case $ac_val in #(
2968     *${as_nl}*)
2969       case $ac_var in #(
2970       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2971 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2972       esac
2973       case $ac_var in #(
2974       _ | IFS | as_nl) ;; #(
2975       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2976       *) { eval $ac_var=; unset $ac_var;} ;;
2977       esac ;;
2978     esac
2979   done
2980   (set) 2>&1 |
2981     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2982     *${as_nl}ac_space=\ *)
2983       sed -n \
2984         "s/'\''/'\''\\\\'\'''\''/g;
2985           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2986       ;; #(
2987     *)
2988       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2989       ;;
2990     esac |
2991     sort
2992 )
2993     echo
2994 
2995     $as_echo "## ----------------- ##
2996 ## Output variables. ##
2997 ## ----------------- ##"
2998     echo
2999     for ac_var in $ac_subst_vars
3000     do
3001       eval ac_val=\$$ac_var
3002       case $ac_val in
3003       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3004       esac
3005       $as_echo "$ac_var='\''$ac_val'\''"
3006     done | sort
3007     echo
3008 
3009     if test -n "$ac_subst_files"; then
3010       $as_echo "## ------------------- ##
3011 ## File substitutions. ##
3012 ## ------------------- ##"
3013       echo
3014       for ac_var in $ac_subst_files
3015       do
3016         eval ac_val=\$$ac_var
3017         case $ac_val in
3018         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3019         esac
3020         $as_echo "$ac_var='\''$ac_val'\''"
3021       done | sort
3022       echo
3023     fi
3024 
3025     if test -s confdefs.h; then
3026       $as_echo "## ----------- ##
3027 ## confdefs.h. ##
3028 ## ----------- ##"
3029       echo
3030       cat confdefs.h
3031       echo
3032     fi
3033     test "$ac_signal" != 0 &&
3034       $as_echo "$as_me: caught signal $ac_signal"
3035     $as_echo "$as_me: exit $exit_status"
3036   } >&5
3037   rm -f core *.core core.conftest.* &&
3038     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3039     exit $exit_status
3040 ' 0
3041 for ac_signal in 1 2 13 15; do
3042   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3043 done
3044 ac_signal=0
3045 
3046 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3047 rm -f -r conftest* confdefs.h
3048 
3049 $as_echo "/* confdefs.h */" > confdefs.h
3050 
3051 # Predefined preprocessor variables.
3052 
3053 cat >>confdefs.h <<_ACEOF
3054 #define PACKAGE_NAME "$PACKAGE_NAME"
3055 _ACEOF
3056 
3057 cat >>confdefs.h <<_ACEOF
3058 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3059 _ACEOF
3060 
3061 cat >>confdefs.h <<_ACEOF
3062 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3063 _ACEOF
3064 
3065 cat >>confdefs.h <<_ACEOF
3066 #define PACKAGE_STRING "$PACKAGE_STRING"
3067 _ACEOF
3068 
3069 cat >>confdefs.h <<_ACEOF
3070 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3071 _ACEOF
3072 
3073 cat >>confdefs.h <<_ACEOF
3074 #define PACKAGE_URL "$PACKAGE_URL"
3075 _ACEOF
3076 
3077 
3078 # Let the site file select an alternate cache file if it wants to.
3079 # Prefer an explicitly selected file to automatically selected ones.
3080 ac_site_file1=NONE
3081 ac_site_file2=NONE
3082 if test -n "$CONFIG_SITE"; then
3083   # We do not want a PATH search for config.site.
3084   case $CONFIG_SITE in #((
3085     -*)  ac_site_file1=./$CONFIG_SITE;;
3086     */*) ac_site_file1=$CONFIG_SITE;;
3087     *)   ac_site_file1=./$CONFIG_SITE;;
3088   esac
3089 elif test "x$prefix" != xNONE; then
3090   ac_site_file1=$prefix/share/config.site
3091   ac_site_file2=$prefix/etc/config.site
3092 else
3093   ac_site_file1=$ac_default_prefix/share/config.site
3094   ac_site_file2=$ac_default_prefix/etc/config.site
3095 fi
3096 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3097 do
3098   test "x$ac_site_file" = xNONE && continue
3099   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3100     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3101 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3102     sed 's/^/| /' "$ac_site_file" >&5
3103     . "$ac_site_file" \
3104       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3105 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3106 as_fn_error $? "failed to load site script $ac_site_file
3107 See \`config.log' for more details" "$LINENO" 5; }
3108   fi
3109 done
3110 
3111 if test -r "$cache_file"; then
3112   # Some versions of bash will fail to source /dev/null (special files
3113   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3114   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3115     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3116 $as_echo "$as_me: loading cache $cache_file" >&6;}
3117     case $cache_file in
3118       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3119       *)                      . "./$cache_file";;
3120     esac
3121   fi
3122 else
3123   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3124 $as_echo "$as_me: creating cache $cache_file" >&6;}
3125   >$cache_file
3126 fi
3127 
3128 # Check that the precious variables saved in the cache have kept the same
3129 # value.
3130 ac_cache_corrupted=false
3131 for ac_var in $ac_precious_vars; do
3132   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3133   eval ac_new_set=\$ac_env_${ac_var}_set
3134   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3135   eval ac_new_val=\$ac_env_${ac_var}_value
3136   case $ac_old_set,$ac_new_set in
3137     set,)
3138       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3139 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3140       ac_cache_corrupted=: ;;
3141     ,set)
3142       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3143 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3144       ac_cache_corrupted=: ;;
3145     ,);;
3146     *)
3147       if test "x$ac_old_val" != "x$ac_new_val"; then
3148         # differences in whitespace do not lead to failure.
3149         ac_old_val_w=`echo x $ac_old_val`
3150         ac_new_val_w=`echo x $ac_new_val`
3151         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3152           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3153 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3154           ac_cache_corrupted=:
3155         else
3156           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3157 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3158           eval $ac_var=\$ac_old_val
3159         fi
3160         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3161 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3162         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3163 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3164       fi;;
3165   esac
3166   # Pass precious variables to config.status.
3167   if test "$ac_new_set" = set; then
3168     case $ac_new_val in
3169     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3170     *) ac_arg=$ac_var=$ac_new_val ;;
3171     esac
3172     case " $ac_configure_args " in
3173       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3174       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3175     esac
3176   fi
3177 done
3178 if $ac_cache_corrupted; then
3179   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3180 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3181   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3182 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3183   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3184 fi
3185 ## -------------------- ##
3186 ## Main body of script. ##
3187 ## -------------------- ##
3188 
3189 ac_ext=c
3190 ac_cpp='$CPP $CPPFLAGS'
3191 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3192 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3193 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3194 
3195 
3196 
3197 ac_aux_dir=
3198 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3199   if test -f "$ac_dir/install-sh"; then
3200     ac_aux_dir=$ac_dir
3201     ac_install_sh="$ac_aux_dir/install-sh -c"
3202     break
3203   elif test -f "$ac_dir/install.sh"; then
3204     ac_aux_dir=$ac_dir
3205     ac_install_sh="$ac_aux_dir/install.sh -c"
3206     break
3207   elif test -f "$ac_dir/shtool"; then
3208     ac_aux_dir=$ac_dir
3209     ac_install_sh="$ac_aux_dir/shtool install -c"
3210     break
3211   fi
3212 done
3213 if test -z "$ac_aux_dir"; then
3214   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
3215 fi
3216 
3217 # These three variables are undocumented and unsupported,
3218 # and are intended to be withdrawn in a future Autoconf release.
3219 # They can cause serious problems if a builder's source tree is in a directory
3220 # whose full name contains unusual characters.
3221 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3222 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3223 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3224 
3225 
3226 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3227 
3228 #
3229 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3230 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3231 #
3232 # This code is free software; you can redistribute it and/or modify it
3233 # under the terms of the GNU General Public License version 2 only, as
3234 # published by the Free Software Foundation.  Oracle designates this
3235 # particular file as subject to the "Classpath" exception as provided
3236 # by Oracle in the LICENSE file that accompanied this code.
3237 #
3238 # This code is distributed in the hope that it will be useful, but WITHOUT
3239 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3240 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3241 # version 2 for more details (a copy is included in the LICENSE file that
3242 # accompanied this code).
3243 #
3244 # You should have received a copy of the GNU General Public License version
3245 # 2 along with this work; if not, write to the Free Software Foundation,
3246 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3247 #
3248 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3249 # or visit www.oracle.com if you need additional information or have any
3250 # questions.
3251 #
3252 
3253 #
3254 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3255 #
3256 # This program is free software; you can redistribute it and/or modify
3257 # it under the terms of the GNU General Public License as published by
3258 # the Free Software Foundation; either version 2 of the License, or
3259 # (at your option) any later version.
3260 #
3261 # This program is distributed in the hope that it will be useful, but
3262 # WITHOUT ANY WARRANTY; without even the implied warranty of
3263 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3264 # General Public License for more details.
3265 #
3266 # You should have received a copy of the GNU General Public License
3267 # along with this program; if not, write to the Free Software
3268 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3269 #
3270 # As a special exception to the GNU General Public License, if you
3271 # distribute this file as part of a program that contains a
3272 # configuration script generated by Autoconf, you may include it under
3273 # the same distribution terms that you use for the rest of that program.
3274 
3275 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3276 # ----------------------------------
3277 # PKG_PROG_PKG_CONFIG
3278 
3279 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3280 #
3281 # Check to see whether a particular set of modules exists.  Similar
3282 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3283 #
3284 #
3285 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3286 # this or PKG_CHECK_MODULES is called, or make sure to call
3287 # PKG_CHECK_EXISTS manually
3288 # --------------------------------------------------------------
3289 
3290 
3291 
3292 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3293 # ---------------------------------------------
3294 # _PKG_CONFIG
3295 
3296 # _PKG_SHORT_ERRORS_SUPPORTED
3297 # -----------------------------
3298 # _PKG_SHORT_ERRORS_SUPPORTED
3299 
3300 
3301 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3302 # [ACTION-IF-NOT-FOUND])
3303 #
3304 #
3305 # Note that if there is a possibility the first call to
3306 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3307 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3308 #
3309 #
3310 # --------------------------------------------------------------
3311 # PKG_CHECK_MODULES
3312 
3313 
3314 # Include these first...
3315 #
3316 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3317 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3318 #
3319 # This code is free software; you can redistribute it and/or modify it
3320 # under the terms of the GNU General Public License version 2 only, as
3321 # published by the Free Software Foundation.  Oracle designates this
3322 # particular file as subject to the "Classpath" exception as provided
3323 # by Oracle in the LICENSE file that accompanied this code.
3324 #
3325 # This code is distributed in the hope that it will be useful, but WITHOUT
3326 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3327 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3328 # version 2 for more details (a copy is included in the LICENSE file that
3329 # accompanied this code).
3330 #
3331 # You should have received a copy of the GNU General Public License version
3332 # 2 along with this work; if not, write to the Free Software Foundation,
3333 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3334 #
3335 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3336 # or visit www.oracle.com if you need additional information or have any
3337 # questions.
3338 #
3339 
3340 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3341 # If so, then append $1 to $2 \
3342 # Also set JVM_ARG_OK to true/false depending on outcome.
3343 
3344 
3345 # Appends a string to a path variable, only adding the : when needed.
3346 
3347 
3348 # Prepends a string to a path variable, only adding the : when needed.
3349 
3350 
3351 # This will make sure the given variable points to a full and proper
3352 # path. This means:
3353 # 1) There will be no spaces in the path. On posix platforms,
3354 #    spaces in the path will result in an error. On Windows,
3355 #    the path will be rewritten using short-style to be space-free.
3356 # 2) The path will be absolute, and it will be in unix-style (on
3357 #     cygwin).
3358 # $1: The name of the variable to fix
3359 
3360 
3361 # This will make sure the given variable points to a executable
3362 # with a full and proper path. This means:
3363 # 1) There will be no spaces in the path. On posix platforms,
3364 #    spaces in the path will result in an error. On Windows,
3365 #    the path will be rewritten using short-style to be space-free.
3366 # 2) The path will be absolute, and it will be in unix-style (on
3367 #     cygwin).
3368 # Any arguments given to the executable is preserved.
3369 # If the input variable does not have a directory specification, then
3370 # it need to be in the PATH.
3371 # $1: The name of the variable to fix
3372 
3373 
3374 
3375 
3376 # Register a --with argument but mark it as deprecated
3377 # $1: The name of the with argument to deprecate, not including --with-
3378 
3379 
3380 # Register a --enable argument but mark it as deprecated
3381 # $1: The name of the with argument to deprecate, not including --enable-
3382 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3383 
3384 
3385 
3386 
3387 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3388 # $1: variable to check
3389 
3390 
3391 # Check that there are no unprocessed overridden variables left.
3392 # If so, they are an incorrect argument and we will exit with an error.
3393 
3394 
3395 # Setup a tool for the given variable. If correctly specified by the user,
3396 # use that value, otherwise search for the tool using the supplied code snippet.
3397 # $1: variable to set
3398 # $2: code snippet to call to look for the tool
3399 
3400 
3401 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3402 # $1: variable to set
3403 # $2: executable name (or list of names) to look for
3404 
3405 
3406 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3407 # $1: variable to set
3408 # $2: executable name (or list of names) to look for
3409 
3410 
3411 # Like BASIC_PATH_PROGS but fails if no tool was found.
3412 # $1: variable to set
3413 # $2: executable name (or list of names) to look for
3414 
3415 
3416 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3417 # $1: variable to set
3418 # $2: autoconf macro to call to look for the special tool
3419 
3420 
3421 # Setup the most fundamental tools that relies on not much else to set up,
3422 # but is used by much of the early bootstrap code.
3423 
3424 
3425 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3426 
3427 
3428 # Evaluates platform specific overrides for devkit variables.
3429 # $1: Name of variable
3430 
3431 
3432 
3433 
3434 
3435 
3436 
3437 
3438 
3439 #%%% Simple tools %%%
3440 
3441 # Check if we have found a usable version of make
3442 # $1: the path to a potential make binary (or empty)
3443 # $2: the description on how we found this
3444 
3445 
3446 # Goes looking for a usable version of GNU make.
3447 
3448 
3449 
3450 
3451 
3452 
3453 # Check if build directory is on local disk. If not possible to determine,
3454 # we prefer to claim it's local.
3455 # Argument 1: directory to test
3456 # Argument 2: what to do if it is on local disk
3457 # Argument 3: what to do otherwise (remote disk or failure)
3458 
3459 
3460 # Check that source files have basic read permissions set. This might
3461 # not be the case in cygwin in certain conditions.
3462 
3463 
3464 
3465 
3466 #
3467 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3468 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3469 #
3470 # This code is free software; you can redistribute it and/or modify it
3471 # under the terms of the GNU General Public License version 2 only, as
3472 # published by the Free Software Foundation.  Oracle designates this
3473 # particular file as subject to the "Classpath" exception as provided
3474 # by Oracle in the LICENSE file that accompanied this code.
3475 #
3476 # This code is distributed in the hope that it will be useful, but WITHOUT
3477 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3478 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3479 # version 2 for more details (a copy is included in the LICENSE file that
3480 # accompanied this code).
3481 #
3482 # You should have received a copy of the GNU General Public License version
3483 # 2 along with this work; if not, write to the Free Software Foundation,
3484 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3485 #
3486 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3487 # or visit www.oracle.com if you need additional information or have any
3488 # questions.
3489 #
3490 
3491 
3492 
3493 
3494 
3495 # Helper function which possibly converts a path using DOS-style short mode.
3496 # If so, the updated path is stored in $new_path.
3497 # $1: The path to check
3498 
3499 
3500 # Helper function which possibly converts a path using DOS-style short mode.
3501 # If so, the updated path is stored in $new_path.
3502 # $1: The path to check
3503 
3504 
3505 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3506 # and could probably be heavily simplified. However, all changes in this
3507 # area tend to need lot of testing in different scenarios, and in lack of
3508 # proper unit testing, cleaning this up has not been deemed worth the effort
3509 # at the moment.
3510 
3511 
3512 
3513 
3514 
3515 
3516 
3517 
3518 
3519 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3520 
3521 
3522 
3523 
3524 #
3525 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3526 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3527 #
3528 # This code is free software; you can redistribute it and/or modify it
3529 # under the terms of the GNU General Public License version 2 only, as
3530 # published by the Free Software Foundation.  Oracle designates this
3531 # particular file as subject to the "Classpath" exception as provided
3532 # by Oracle in the LICENSE file that accompanied this code.
3533 #
3534 # This code is distributed in the hope that it will be useful, but WITHOUT
3535 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3536 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3537 # version 2 for more details (a copy is included in the LICENSE file that
3538 # accompanied this code).
3539 #
3540 # You should have received a copy of the GNU General Public License version
3541 # 2 along with this work; if not, write to the Free Software Foundation,
3542 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3543 #
3544 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3545 # or visit www.oracle.com if you need additional information or have any
3546 # questions.
3547 #
3548 
3549 
3550 
3551 
3552 
3553 
3554 
3555 
3556 
3557 
3558 
3559 # ... then the rest
3560 #
3561 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3562 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3563 #
3564 # This code is free software; you can redistribute it and/or modify it
3565 # under the terms of the GNU General Public License version 2 only, as
3566 # published by the Free Software Foundation.  Oracle designates this
3567 # particular file as subject to the "Classpath" exception as provided
3568 # by Oracle in the LICENSE file that accompanied this code.
3569 #
3570 # This code is distributed in the hope that it will be useful, but WITHOUT
3571 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3572 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3573 # version 2 for more details (a copy is included in the LICENSE file that
3574 # accompanied this code).
3575 #
3576 # You should have received a copy of the GNU General Public License version
3577 # 2 along with this work; if not, write to the Free Software Foundation,
3578 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3579 #
3580 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3581 # or visit www.oracle.com if you need additional information or have any
3582 # questions.
3583 #
3584 
3585 # Execute the check given as argument, and verify the result
3586 # If the Boot JDK was previously found, do nothing
3587 # $1 A command line (typically autoconf macro) to execute
3588 
3589 
3590 # Test: Is bootjdk explicitely set by command line arguments?
3591 
3592 
3593 # Test: Is bootjdk available from builddeps?
3594 
3595 
3596 # Test: Is $JAVA_HOME set?
3597 
3598 
3599 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3600 
3601 
3602 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3603 
3604 
3605 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3606 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3607 # $1 = Path to directory containing jdk installations.
3608 # $2 = String to append to the found JDK directory to get the proper JDK home
3609 
3610 
3611 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3612 # environmental variable as base for where to look.
3613 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3614 
3615 
3616 # Test: Is there a JDK installed in default, well-known locations?
3617 
3618 
3619 # Check that a command-line tool in the Boot JDK is correct
3620 # $1 = name of variable to assign
3621 # $2 = name of binary
3622 
3623 
3624 ###############################################################################
3625 #
3626 # We need a Boot JDK to bootstrap the build.
3627 #
3628 
3629 
3630 
3631 
3632 
3633 #
3634 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3635 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3636 #
3637 # This code is free software; you can redistribute it and/or modify it
3638 # under the terms of the GNU General Public License version 2 only, as
3639 # published by the Free Software Foundation.  Oracle designates this
3640 # particular file as subject to the "Classpath" exception as provided
3641 # by Oracle in the LICENSE file that accompanied this code.
3642 #
3643 # This code is distributed in the hope that it will be useful, but WITHOUT
3644 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3645 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3646 # version 2 for more details (a copy is included in the LICENSE file that
3647 # accompanied this code).
3648 #
3649 # You should have received a copy of the GNU General Public License version
3650 # 2 along with this work; if not, write to the Free Software Foundation,
3651 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3652 #
3653 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3654 # or visit www.oracle.com if you need additional information or have any
3655 # questions.
3656 #
3657 
3658 
3659 
3660 
3661 
3662 
3663 
3664 
3665 
3666 
3667 
3668 
3669 
3670 
3671 
3672 
3673 
3674 
3675 
3676 
3677 #
3678 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3679 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3680 #
3681 # This code is free software; you can redistribute it and/or modify it
3682 # under the terms of the GNU General Public License version 2 only, as
3683 # published by the Free Software Foundation.  Oracle designates this
3684 # particular file as subject to the "Classpath" exception as provided
3685 # by Oracle in the LICENSE file that accompanied this code.
3686 #
3687 # This code is distributed in the hope that it will be useful, but WITHOUT
3688 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3689 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3690 # version 2 for more details (a copy is included in the LICENSE file that
3691 # accompanied this code).
3692 #
3693 # You should have received a copy of the GNU General Public License version
3694 # 2 along with this work; if not, write to the Free Software Foundation,
3695 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3696 #
3697 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3698 # or visit www.oracle.com if you need additional information or have any
3699 # questions.
3700 #
3701 
3702 
3703 
3704 
3705 
3706 # Documentation on common flags used for solstudio in HIGHEST.
3707 #
3708 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3709 #          done with care, there are some assumptions below that need to
3710 #          be understood about the use of pointers, and IEEE behavior.
3711 #
3712 # -fns: Use non-standard floating point mode (not IEEE 754)
3713 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3714 # -fsingle: Use single precision floating point with 'float'
3715 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3716 #   (Source with excessing pointer casting and data access with mixed
3717 #    pointer types are not recommended)
3718 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3719 #   (If you expect perfect errno behavior, do not use this)
3720 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3721 # -xrestrict: Pointer parameters to functions do not overlap
3722 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3723 #    If you pass in multiple pointers to the same data, do not use this)
3724 # -xlibmil: Inline some library routines
3725 #   (If you expect perfect errno behavior, do not use this)
3726 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3727 #   (If you expect perfect errno behavior, do not use this)
3728 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3729 
3730     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3731     # Bug?
3732     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3733     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3734     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3735     #fi
3736 
3737 
3738 
3739 
3740 
3741 
3742 # FLAGS_C_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3743 #                                  [RUN-IF-FALSE])
3744 # ------------------------------------------------------------
3745 # Check that the C compiler supports an argument
3746 
3747 
3748 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3749 #                                    [RUN-IF-FALSE])
3750 # ------------------------------------------------------------
3751 # Check that the C++ compiler supports an argument
3752 
3753 
3754 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3755 #                                [RUN-IF-FALSE])
3756 # ------------------------------------------------------------
3757 # Check that the C and C++ compilers support an argument
3758 
3759 
3760 
3761 
3762 
3763 
3764 
3765 #
3766 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3767 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3768 #
3769 # This code is free software; you can redistribute it and/or modify it
3770 # under the terms of the GNU General Public License version 2 only, as
3771 # published by the Free Software Foundation.  Oracle designates this
3772 # particular file as subject to the "Classpath" exception as provided
3773 # by Oracle in the LICENSE file that accompanied this code.
3774 #
3775 # This code is distributed in the hope that it will be useful, but WITHOUT
3776 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3777 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3778 # version 2 for more details (a copy is included in the LICENSE file that
3779 # accompanied this code).
3780 #
3781 # You should have received a copy of the GNU General Public License version
3782 # 2 along with this work; if not, write to the Free Software Foundation,
3783 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3784 #
3785 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3786 # or visit www.oracle.com if you need additional information or have any
3787 # questions.
3788 #
3789 
3790 
3791 
3792 
3793 
3794 cygwin_help() {
3795   case $1 in
3796     unzip)
3797       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3798       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3799       ;;
3800     zip)
3801       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3802       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3803       ;;
3804     make)
3805       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3806       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3807       ;;
3808     freetype)
3809       HELP_MSG="
3810 The freetype library can now be build during the configure process.
3811 Download the freetype sources and unpack them into an arbitrary directory:
3812 
3813 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3814 tar -xzf freetype-2.5.3.tar.gz
3815 
3816 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3817 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3818 builds or into '<freetype_src>/lib32' for 32-bit builds.
3819 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3820 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3821       ;;
3822   esac
3823 }
3824 
3825 msys_help() {
3826   PKGHANDLER_COMMAND=""
3827 }
3828 
3829 apt_help() {
3830   case $1 in
3831     devkit)
3832       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3833     openjdk)
3834       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3835     alsa)
3836       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3837     cups)
3838       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3839     fontconfig)
3840       PKGHANDLER_COMMAND="sudo apt-get install libfontconfig1-dev" ;;
3841     freetype)
3842       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3843     pulse)
3844       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3845     x11)
3846       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3847     ccache)
3848       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3849   esac
3850 }
3851 
3852 yum_help() {
3853   case $1 in
3854     devkit)
3855       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3856     openjdk)
3857       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3858     alsa)
3859       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3860     cups)
3861       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3862     fontconfig)
3863       PKGHANDLER_COMMAND="sudo yum install fontconfig-devel" ;;
3864     freetype)
3865       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3866     pulse)
3867       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3868     x11)
3869       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3870     ccache)
3871       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3872   esac
3873 }
3874 
3875 port_help() {
3876   PKGHANDLER_COMMAND=""
3877 }
3878 
3879 pkgutil_help() {
3880   PKGHANDLER_COMMAND=""
3881 }
3882 
3883 pkgadd_help() {
3884   PKGHANDLER_COMMAND=""
3885 }
3886 
3887 # This function will check if we're called from the "configure" wrapper while
3888 # printing --help. If so, we will print out additional information that can
3889 # only be extracted within the autoconf script, and then exit. This must be
3890 # called at the very beginning in configure.ac.
3891 
3892 
3893 
3894 
3895 #
3896 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3897 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3898 #
3899 # This code is free software; you can redistribute it and/or modify it
3900 # under the terms of the GNU General Public License version 2 only, as
3901 # published by the Free Software Foundation.  Oracle designates this
3902 # particular file as subject to the "Classpath" exception as provided
3903 # by Oracle in the LICENSE file that accompanied this code.
3904 #
3905 # This code is distributed in the hope that it will be useful, but WITHOUT
3906 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3907 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3908 # version 2 for more details (a copy is included in the LICENSE file that
3909 # accompanied this code).
3910 #
3911 # You should have received a copy of the GNU General Public License version
3912 # 2 along with this work; if not, write to the Free Software Foundation,
3913 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3914 #
3915 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3916 # or visit www.oracle.com if you need additional information or have any
3917 # questions.
3918 #
3919 
3920 
3921 
3922 
3923 
3924 
3925 
3926 
3927 
3928 
3929 ###############################################################################
3930 #
3931 # Should we build only OpenJDK even if closed sources are present?
3932 #
3933 
3934 
3935 
3936 
3937 ###############################################################################
3938 #
3939 # Setup version numbers
3940 #
3941 
3942 
3943 
3944 
3945 
3946 
3947 # Support for customization of the build process. Some build files
3948 # will include counterparts from this location, if they exist. This allows
3949 # for a degree of customization of the build targets and the rules/recipes
3950 # to create them
3951 
3952 # Check whether --with-custom-make-dir was given.
3953 if test "${with_custom_make_dir+set}" = set; then :
3954   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3955 fi
3956 
3957 
3958 
3959 #
3960 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3961 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3962 #
3963 # This code is free software; you can redistribute it and/or modify it
3964 # under the terms of the GNU General Public License version 2 only, as
3965 # published by the Free Software Foundation.  Oracle designates this
3966 # particular file as subject to the "Classpath" exception as provided
3967 # by Oracle in the LICENSE file that accompanied this code.
3968 #
3969 # This code is distributed in the hope that it will be useful, but WITHOUT
3970 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3971 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3972 # version 2 for more details (a copy is included in the LICENSE file that
3973 # accompanied this code).
3974 #
3975 # You should have received a copy of the GNU General Public License version
3976 # 2 along with this work; if not, write to the Free Software Foundation,
3977 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3978 #
3979 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3980 # or visit www.oracle.com if you need additional information or have any
3981 # questions.
3982 #
3983 
3984 
3985 
3986 
3987 
3988 
3989 
3990 
3991 
3992 
3993 
3994 
3995 
3996 
3997 
3998 ################################################################################
3999 # Setup fontconfig
4000 ################################################################################
4001 
4002 
4003 
4004 
4005 
4006 
4007 
4008 
4009 #
4010 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4011 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4012 #
4013 # This code is free software; you can redistribute it and/or modify it
4014 # under the terms of the GNU General Public License version 2 only, as
4015 # published by the Free Software Foundation.  Oracle designates this
4016 # particular file as subject to the "Classpath" exception as provided
4017 # by Oracle in the LICENSE file that accompanied this code.
4018 #
4019 # This code is distributed in the hope that it will be useful, but WITHOUT
4020 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4021 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4022 # version 2 for more details (a copy is included in the LICENSE file that
4023 # accompanied this code).
4024 #
4025 # You should have received a copy of the GNU General Public License version
4026 # 2 along with this work; if not, write to the Free Software Foundation,
4027 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4028 #
4029 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4030 # or visit www.oracle.com if you need additional information or have any
4031 # questions.
4032 #
4033 
4034 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4035 # Converts autoconf style CPU name to OpenJDK style, into
4036 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4037 
4038 
4039 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4040 # Converts autoconf style OS name to OpenJDK style, into
4041 # VAR_OS and VAR_OS_API.
4042 
4043 
4044 # Expects $host_os $host_cpu $build_os and $build_cpu
4045 # and $with_target_bits to have been setup!
4046 #
4047 # Translate the standard triplet(quadruplet) definition
4048 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4049 # OPENJDK_BUILD_OS, etc.
4050 
4051 
4052 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4053 # accordingly. Must be done after setting up build and target system, but before
4054 # doing anything else with these values.
4055 
4056 
4057 # Setup the legacy variables, for controlling the old makefiles.
4058 #
4059 
4060 
4061 
4062 
4063 #%%% Build and target systems %%%
4064 
4065 
4066 
4067 
4068 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4069 # Add -mX to various FLAGS variables.
4070 
4071 
4072 
4073 
4074 
4075 
4076 #
4077 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4078 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4079 #
4080 # This code is free software; you can redistribute it and/or modify it
4081 # under the terms of the GNU General Public License version 2 only, as
4082 # published by the Free Software Foundation.  Oracle designates this
4083 # particular file as subject to the "Classpath" exception as provided
4084 # by Oracle in the LICENSE file that accompanied this code.
4085 #
4086 # This code is distributed in the hope that it will be useful, but WITHOUT
4087 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4088 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4089 # version 2 for more details (a copy is included in the LICENSE file that
4090 # accompanied this code).
4091 #
4092 # You should have received a copy of the GNU General Public License version
4093 # 2 along with this work; if not, write to the Free Software Foundation,
4094 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4095 #
4096 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4097 # or visit www.oracle.com if you need additional information or have any
4098 # questions.
4099 #
4100 
4101 
4102 
4103 
4104 
4105 
4106 
4107 
4108 #
4109 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
4110 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4111 #
4112 # This code is free software; you can redistribute it and/or modify it
4113 # under the terms of the GNU General Public License version 2 only, as
4114 # published by the Free Software Foundation.  Oracle designates this
4115 # particular file as subject to the "Classpath" exception as provided
4116 # by Oracle in the LICENSE file that accompanied this code.
4117 #
4118 # This code is distributed in the hope that it will be useful, but WITHOUT
4119 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4120 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4121 # version 2 for more details (a copy is included in the LICENSE file that
4122 # accompanied this code).
4123 #
4124 # You should have received a copy of the GNU General Public License version
4125 # 2 along with this work; if not, write to the Free Software Foundation,
4126 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4127 #
4128 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4129 # or visit www.oracle.com if you need additional information or have any
4130 # questions.
4131 #
4132 
4133 ########################################################################
4134 # This file is responsible for detecting, verifying and setting up the
4135 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4136 # proper paths to the binaries, but it will not setup any flags.
4137 #
4138 # The binaries used is determined by the toolchain type, which is the family of
4139 # compilers and related tools that are used.
4140 ########################################################################
4141 
4142 
4143 # All valid toolchains, regardless of platform (used by help.m4)
4144 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4145 
4146 # These toolchains are valid on different platforms
4147 VALID_TOOLCHAINS_linux="gcc clang"
4148 VALID_TOOLCHAINS_solaris="solstudio"
4149 VALID_TOOLCHAINS_macosx="gcc clang"
4150 VALID_TOOLCHAINS_aix="xlc"
4151 VALID_TOOLCHAINS_windows="microsoft"
4152 
4153 # Toolchain descriptions
4154 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4155 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4156 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4157 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4158 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4159 
4160 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4161 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4162 # $1 - optional variable prefix for compiler and version variables (BUILD_)
4163 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4164 
4165 
4166 # Check if the configured compiler (C and C++) is of a specific version or
4167 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4168 #
4169 # Arguments:
4170 #   $1:   The version string to check against the found version
4171 #   $2:   block to run if the compiler is at least this version (>=)
4172 #   $3:   block to run if the compiler is older than this version (<)
4173 
4174 
4175 
4176 # Setup a number of variables describing how native output files are
4177 # named on this platform/toolchain.
4178 
4179 
4180 # Determine which toolchain type to use, and make sure it is valid for this
4181 # platform. Setup various information about the selected toolchain.
4182 
4183 
4184 # Before we start detecting the toolchain executables, we might need some
4185 # special setup, e.g. additional paths etc.
4186 
4187 
4188 # Restore path, etc
4189 
4190 
4191 # Check if a compiler is of the toolchain type we expect, and save the version
4192 # information from it. If the compiler does not match the expected type,
4193 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4194 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4195 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4196 #
4197 # $1 = compiler to test (CC or CXX)
4198 # $2 = human readable name of compiler (C or C++)
4199 
4200 
4201 
4202 # Try to locate the given C or C++ compiler in the path, or otherwise.
4203 #
4204 # $1 = compiler to test (CC or CXX)
4205 # $2 = human readable name of compiler (C or C++)
4206 # $3 = list of compiler names to search for
4207 
4208 
4209 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4210 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4211 # archiver (AR). Verify that the compilers are correct according to the
4212 # toolchain type.
4213 
4214 
4215 # Setup additional tools that is considered a part of the toolchain, but not the
4216 # core part. Many of these are highly platform-specific and do not exist,
4217 # and/or are not needed on all platforms.
4218 
4219 
4220 # Setup the build tools (i.e, the compiler and linker used to build programs
4221 # that should be run on the build platform, not the target platform, as a build
4222 # helper). Since the non-cross-compile case uses the normal, target compilers
4223 # for this, we can only do this after these have been setup.
4224 
4225 
4226 # Setup legacy variables that are still needed as alternative ways to refer to
4227 # parts of the toolchain.
4228 
4229 
4230 # Do some additional checks on the detected tools.
4231 
4232 
4233 # Setup the JTReg Regression Test Harness.
4234 
4235 
4236 
4237 #
4238 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
4239 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4240 #
4241 # This code is free software; you can redistribute it and/or modify it
4242 # under the terms of the GNU General Public License version 2 only, as
4243 # published by the Free Software Foundation.  Oracle designates this
4244 # particular file as subject to the "Classpath" exception as provided
4245 # by Oracle in the LICENSE file that accompanied this code.
4246 #
4247 # This code is distributed in the hope that it will be useful, but WITHOUT
4248 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4249 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4250 # version 2 for more details (a copy is included in the LICENSE file that
4251 # accompanied this code).
4252 #
4253 # You should have received a copy of the GNU General Public License version
4254 # 2 along with this work; if not, write to the Free Software Foundation,
4255 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4256 #
4257 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4258 # or visit www.oracle.com if you need additional information or have any
4259 # questions.
4260 #
4261 
4262 ################################################################################
4263 # The order of these defines the priority by which we try to find them.
4264 VALID_VS_VERSIONS="2010 2012 2013 2015 2017"
4265 
4266 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4267 VS_VERSION_INTERNAL_2010=100
4268 VS_MSVCR_2010=msvcr100.dll
4269 # We don't use msvcp on Visual Studio 2010
4270 #VS_MSVCP_2010=msvcp100.dll
4271 VS_ENVVAR_2010="VS100COMNTOOLS"
4272 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4273 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4274 VS_VS_PLATFORM_NAME_2010="v100"
4275 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4276 
4277 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4278 VS_VERSION_INTERNAL_2012=110
4279 VS_MSVCR_2012=msvcr110.dll
4280 VS_MSVCP_2012=msvcp110.dll
4281 VS_ENVVAR_2012="VS110COMNTOOLS"
4282 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4283 VS_SDK_INSTALLDIR_2012=
4284 VS_VS_PLATFORM_NAME_2012="v110"
4285 VS_SDK_PLATFORM_NAME_2012=
4286 
4287 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4288 VS_VERSION_INTERNAL_2013=120
4289 VS_MSVCR_2013=msvcr120.dll
4290 VS_MSVCP_2013=msvcp120.dll
4291 VS_ENVVAR_2013="VS120COMNTOOLS"
4292 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4293 VS_SDK_INSTALLDIR_2013=
4294 VS_VS_PLATFORM_NAME_2013="v120"
4295 VS_SDK_PLATFORM_NAME_2013=
4296 
4297 VS_DESCRIPTION_2015="Microsoft Visual Studio 2015 - CURRENTLY NOT WORKING"
4298 VS_VERSION_INTERNAL_2015=140
4299 VS_MSVCR_2015=vcruntime140.dll
4300 VS_MSVCP_2015=msvcp140.dll
4301 VS_ENVVAR_2015="VS140COMNTOOLS"
4302 VS_VS_INSTALLDIR_2015="Microsoft Visual Studio 14.0"
4303 VS_SDK_INSTALLDIR_2015=
4304 VS_VS_PLATFORM_NAME_2015="v140"
4305 VS_SDK_PLATFORM_NAME_2015=
4306 # The vcvars of 2015 breaks if 2017 is also installed. Work around this by
4307 # explicitly specifying Windows Kit 8.1 to be used.
4308 VS_ENV_ARGS_2015="8.1"
4309 
4310 VS_DESCRIPTION_2017="Microsoft Visual Studio 2017 - CURRENTLY NOT WORKING"
4311 VS_VERSION_INTERNAL_2017=141
4312 VS_MSVCR_2017=vcruntime140.dll
4313 VS_MSVCP_2017=msvcp140.dll
4314 VS_ENVVAR_2017="VS150COMNTOOLS"
4315 VS_USE_UCRT_2017="true"
4316 VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017"
4317 VS_EDITIONS_2017="Community Professional Enterprise"
4318 VS_SDK_INSTALLDIR_2017=
4319 VS_VS_PLATFORM_NAME_2017="v141"
4320 VS_SDK_PLATFORM_NAME_2017=
4321 
4322 ################################################################################
4323 
4324 
4325 
4326 ################################################################################
4327 
4328 
4329 
4330 ################################################################################
4331 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4332 # build environment and assigns it to VS_ENV_CMD
4333 
4334 
4335 ################################################################################
4336 
4337 
4338 
4339 ################################################################################
4340 # Check if the VS env variables were setup prior to running configure.
4341 # If not, then find vcvarsall.bat and run it automatically, and integrate
4342 # the set env variables into the spec file.
4343 
4344 
4345 
4346 
4347 
4348 
4349 
4350 
4351 
4352 
4353 
4354 
4355 
4356 
4357 # This line needs to be here, verbatim, after all includes and the dummy hook
4358 # definitions. It is replaced with custom functionality when building
4359 # custom sources.
4360 #CUSTOM_AUTOCONF_INCLUDE
4361 
4362 # Do not change or remove the following line, it is needed for consistency checks:
4363 DATE_WHEN_GENERATED=1552671404
4364 
4365 ###############################################################################
4366 #
4367 # Initialization / Boot-strapping
4368 #
4369 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4370 # thus it jumps back and forth, each time gaining something needed later on.
4371 #
4372 ###############################################################################
4373 
4374 # If we are requested to print additional help, do that and then exit.
4375 # This must be the very first call.
4376 
4377   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4378     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4379     $PRINTF "Which are valid to use depends on the build platform.\n"
4380     for toolchain in $VALID_TOOLCHAINS_all; do
4381       # Use indirect variable referencing
4382       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4383       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4384       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4385     done
4386 
4387     # And now exit directly
4388     exit 0
4389   fi
4390 
4391 
4392 # Basic initialization that must happen first of all in the normal process.
4393 
4394   # Save the original command line. This is passed to us by the wrapper configure script.
4395 
4396   DATE_WHEN_CONFIGURED=`LANG=C date`
4397 
4398   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4399 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4400   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4401 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4402 
4403 
4404   # Start with tools that do not need have cross compilation support
4405   # and can be expected to be found in the default PATH. These tools are
4406   # used by configure. Nor are these tools expected to be found in the
4407   # devkit from the builddeps server either, since they are
4408   # needed to download the devkit.
4409 
4410   # First are all the simple required tools.
4411 
4412 
4413 
4414   # Publish this variable in the help.
4415 
4416 
4417   if test "x$BASENAME" = x; then
4418     # The variable is not set by user, try to locate tool using the code snippet
4419     for ac_prog in basename
4420 do
4421   # Extract the first word of "$ac_prog", so it can be a program name with args.
4422 set dummy $ac_prog; ac_word=$2
4423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4424 $as_echo_n "checking for $ac_word... " >&6; }
4425 if ${ac_cv_path_BASENAME+:} false; then :
4426   $as_echo_n "(cached) " >&6
4427 else
4428   case $BASENAME in
4429   [\\/]* | ?:[\\/]*)
4430   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4431   ;;
4432   *)
4433   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4434 for as_dir in $PATH
4435 do
4436   IFS=$as_save_IFS
4437   test -z "$as_dir" && as_dir=.
4438     for ac_exec_ext in '' $ac_executable_extensions; do
4439   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4440     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4441     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4442     break 2
4443   fi
4444 done
4445   done
4446 IFS=$as_save_IFS
4447 
4448   ;;
4449 esac
4450 fi
4451 BASENAME=$ac_cv_path_BASENAME
4452 if test -n "$BASENAME"; then
4453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4454 $as_echo "$BASENAME" >&6; }
4455 else
4456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4457 $as_echo "no" >&6; }
4458 fi
4459 
4460 
4461   test -n "$BASENAME" && break
4462 done
4463 
4464   else
4465     # The variable is set, but is it from the command line or the environment?
4466 
4467     # Try to remove the string !BASENAME! from our list.
4468     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4469     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4470       # If it failed, the variable was not from the command line. Ignore it,
4471       # but warn the user (except for BASH, which is always set by the calling BASH).
4472       if test "xBASENAME" != xBASH; then
4473         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4474 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4475       fi
4476       # Try to locate tool using the code snippet
4477       for ac_prog in basename
4478 do
4479   # Extract the first word of "$ac_prog", so it can be a program name with args.
4480 set dummy $ac_prog; ac_word=$2
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4482 $as_echo_n "checking for $ac_word... " >&6; }
4483 if ${ac_cv_path_BASENAME+:} false; then :
4484   $as_echo_n "(cached) " >&6
4485 else
4486   case $BASENAME in
4487   [\\/]* | ?:[\\/]*)
4488   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4489   ;;
4490   *)
4491   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4492 for as_dir in $PATH
4493 do
4494   IFS=$as_save_IFS
4495   test -z "$as_dir" && as_dir=.
4496     for ac_exec_ext in '' $ac_executable_extensions; do
4497   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4498     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4499     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4500     break 2
4501   fi
4502 done
4503   done
4504 IFS=$as_save_IFS
4505 
4506   ;;
4507 esac
4508 fi
4509 BASENAME=$ac_cv_path_BASENAME
4510 if test -n "$BASENAME"; then
4511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4512 $as_echo "$BASENAME" >&6; }
4513 else
4514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4515 $as_echo "no" >&6; }
4516 fi
4517 
4518 
4519   test -n "$BASENAME" && break
4520 done
4521 
4522     else
4523       # If it succeeded, then it was overridden by the user. We will use it
4524       # for the tool.
4525 
4526       # First remove it from the list of overridden variables, so we can test
4527       # for unknown variables in the end.
4528       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4529 
4530       # Check if the provided tool contains a complete path.
4531       tool_specified="$BASENAME"
4532       tool_basename="${tool_specified##*/}"
4533       if test "x$tool_basename" = "x$tool_specified"; then
4534         # A command without a complete path is provided, search $PATH.
4535         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4536 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4537         # Extract the first word of "$tool_basename", so it can be a program name with args.
4538 set dummy $tool_basename; ac_word=$2
4539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4540 $as_echo_n "checking for $ac_word... " >&6; }
4541 if ${ac_cv_path_BASENAME+:} false; then :
4542   $as_echo_n "(cached) " >&6
4543 else
4544   case $BASENAME in
4545   [\\/]* | ?:[\\/]*)
4546   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4547   ;;
4548   *)
4549   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4550 for as_dir in $PATH
4551 do
4552   IFS=$as_save_IFS
4553   test -z "$as_dir" && as_dir=.
4554     for ac_exec_ext in '' $ac_executable_extensions; do
4555   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4556     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4557     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4558     break 2
4559   fi
4560 done
4561   done
4562 IFS=$as_save_IFS
4563 
4564   ;;
4565 esac
4566 fi
4567 BASENAME=$ac_cv_path_BASENAME
4568 if test -n "$BASENAME"; then
4569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4570 $as_echo "$BASENAME" >&6; }
4571 else
4572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4573 $as_echo "no" >&6; }
4574 fi
4575 
4576 
4577         if test "x$BASENAME" = x; then
4578           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4579         fi
4580       else
4581         # Otherwise we believe it is a complete path. Use it as it is.
4582         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4583 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4584         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4585 $as_echo_n "checking for BASENAME... " >&6; }
4586         if test ! -x "$tool_specified"; then
4587           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4588 $as_echo "not found" >&6; }
4589           as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4590         fi
4591         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4592 $as_echo "$tool_specified" >&6; }
4593       fi
4594     fi
4595   fi
4596 
4597 
4598 
4599   if test "x$BASENAME" = x; then
4600     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4601   fi
4602 
4603 
4604 
4605 
4606 
4607   # Publish this variable in the help.
4608 
4609 
4610   if test "x$BASH" = x; then
4611     # The variable is not set by user, try to locate tool using the code snippet
4612     for ac_prog in bash
4613 do
4614   # Extract the first word of "$ac_prog", so it can be a program name with args.
4615 set dummy $ac_prog; ac_word=$2
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4617 $as_echo_n "checking for $ac_word... " >&6; }
4618 if ${ac_cv_path_BASH+:} false; then :
4619   $as_echo_n "(cached) " >&6
4620 else
4621   case $BASH in
4622   [\\/]* | ?:[\\/]*)
4623   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4624   ;;
4625   *)
4626   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4627 for as_dir in $PATH
4628 do
4629   IFS=$as_save_IFS
4630   test -z "$as_dir" && as_dir=.
4631     for ac_exec_ext in '' $ac_executable_extensions; do
4632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4633     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4635     break 2
4636   fi
4637 done
4638   done
4639 IFS=$as_save_IFS
4640 
4641   ;;
4642 esac
4643 fi
4644 BASH=$ac_cv_path_BASH
4645 if test -n "$BASH"; then
4646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4647 $as_echo "$BASH" >&6; }
4648 else
4649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4650 $as_echo "no" >&6; }
4651 fi
4652 
4653 
4654   test -n "$BASH" && break
4655 done
4656 
4657   else
4658     # The variable is set, but is it from the command line or the environment?
4659 
4660     # Try to remove the string !BASH! from our list.
4661     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4662     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4663       # If it failed, the variable was not from the command line. Ignore it,
4664       # but warn the user (except for BASH, which is always set by the calling BASH).
4665       if test "xBASH" != xBASH; then
4666         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4667 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4668       fi
4669       # Try to locate tool using the code snippet
4670       for ac_prog in bash
4671 do
4672   # Extract the first word of "$ac_prog", so it can be a program name with args.
4673 set dummy $ac_prog; ac_word=$2
4674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4675 $as_echo_n "checking for $ac_word... " >&6; }
4676 if ${ac_cv_path_BASH+:} false; then :
4677   $as_echo_n "(cached) " >&6
4678 else
4679   case $BASH in
4680   [\\/]* | ?:[\\/]*)
4681   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4682   ;;
4683   *)
4684   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4685 for as_dir in $PATH
4686 do
4687   IFS=$as_save_IFS
4688   test -z "$as_dir" && as_dir=.
4689     for ac_exec_ext in '' $ac_executable_extensions; do
4690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4691     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4693     break 2
4694   fi
4695 done
4696   done
4697 IFS=$as_save_IFS
4698 
4699   ;;
4700 esac
4701 fi
4702 BASH=$ac_cv_path_BASH
4703 if test -n "$BASH"; then
4704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4705 $as_echo "$BASH" >&6; }
4706 else
4707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708 $as_echo "no" >&6; }
4709 fi
4710 
4711 
4712   test -n "$BASH" && break
4713 done
4714 
4715     else
4716       # If it succeeded, then it was overridden by the user. We will use it
4717       # for the tool.
4718 
4719       # First remove it from the list of overridden variables, so we can test
4720       # for unknown variables in the end.
4721       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4722 
4723       # Check if the provided tool contains a complete path.
4724       tool_specified="$BASH"
4725       tool_basename="${tool_specified##*/}"
4726       if test "x$tool_basename" = "x$tool_specified"; then
4727         # A command without a complete path is provided, search $PATH.
4728         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4729 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4730         # Extract the first word of "$tool_basename", so it can be a program name with args.
4731 set dummy $tool_basename; ac_word=$2
4732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4733 $as_echo_n "checking for $ac_word... " >&6; }
4734 if ${ac_cv_path_BASH+:} false; then :
4735   $as_echo_n "(cached) " >&6
4736 else
4737   case $BASH in
4738   [\\/]* | ?:[\\/]*)
4739   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4740   ;;
4741   *)
4742   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4743 for as_dir in $PATH
4744 do
4745   IFS=$as_save_IFS
4746   test -z "$as_dir" && as_dir=.
4747     for ac_exec_ext in '' $ac_executable_extensions; do
4748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4749     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4751     break 2
4752   fi
4753 done
4754   done
4755 IFS=$as_save_IFS
4756 
4757   ;;
4758 esac
4759 fi
4760 BASH=$ac_cv_path_BASH
4761 if test -n "$BASH"; then
4762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4763 $as_echo "$BASH" >&6; }
4764 else
4765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4766 $as_echo "no" >&6; }
4767 fi
4768 
4769 
4770         if test "x$BASH" = x; then
4771           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4772         fi
4773       else
4774         # Otherwise we believe it is a complete path. Use it as it is.
4775         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4776 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4777         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4778 $as_echo_n "checking for BASH... " >&6; }
4779         if test ! -x "$tool_specified"; then
4780           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4781 $as_echo "not found" >&6; }
4782           as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4783         fi
4784         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4785 $as_echo "$tool_specified" >&6; }
4786       fi
4787     fi
4788   fi
4789 
4790 
4791 
4792   if test "x$BASH" = x; then
4793     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4794   fi
4795 
4796 
4797 
4798 
4799 
4800   # Publish this variable in the help.
4801 
4802 
4803   if test "x$CAT" = x; then
4804     # The variable is not set by user, try to locate tool using the code snippet
4805     for ac_prog in cat
4806 do
4807   # Extract the first word of "$ac_prog", so it can be a program name with args.
4808 set dummy $ac_prog; ac_word=$2
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4810 $as_echo_n "checking for $ac_word... " >&6; }
4811 if ${ac_cv_path_CAT+:} false; then :
4812   $as_echo_n "(cached) " >&6
4813 else
4814   case $CAT in
4815   [\\/]* | ?:[\\/]*)
4816   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4817   ;;
4818   *)
4819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4820 for as_dir in $PATH
4821 do
4822   IFS=$as_save_IFS
4823   test -z "$as_dir" && as_dir=.
4824     for ac_exec_ext in '' $ac_executable_extensions; do
4825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4826     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4828     break 2
4829   fi
4830 done
4831   done
4832 IFS=$as_save_IFS
4833 
4834   ;;
4835 esac
4836 fi
4837 CAT=$ac_cv_path_CAT
4838 if test -n "$CAT"; then
4839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4840 $as_echo "$CAT" >&6; }
4841 else
4842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4843 $as_echo "no" >&6; }
4844 fi
4845 
4846 
4847   test -n "$CAT" && break
4848 done
4849 
4850   else
4851     # The variable is set, but is it from the command line or the environment?
4852 
4853     # Try to remove the string !CAT! from our list.
4854     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4855     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4856       # If it failed, the variable was not from the command line. Ignore it,
4857       # but warn the user (except for BASH, which is always set by the calling BASH).
4858       if test "xCAT" != xBASH; then
4859         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4860 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4861       fi
4862       # Try to locate tool using the code snippet
4863       for ac_prog in cat
4864 do
4865   # Extract the first word of "$ac_prog", so it can be a program name with args.
4866 set dummy $ac_prog; ac_word=$2
4867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4868 $as_echo_n "checking for $ac_word... " >&6; }
4869 if ${ac_cv_path_CAT+:} false; then :
4870   $as_echo_n "(cached) " >&6
4871 else
4872   case $CAT in
4873   [\\/]* | ?:[\\/]*)
4874   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4875   ;;
4876   *)
4877   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4878 for as_dir in $PATH
4879 do
4880   IFS=$as_save_IFS
4881   test -z "$as_dir" && as_dir=.
4882     for ac_exec_ext in '' $ac_executable_extensions; do
4883   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4884     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4885     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4886     break 2
4887   fi
4888 done
4889   done
4890 IFS=$as_save_IFS
4891 
4892   ;;
4893 esac
4894 fi
4895 CAT=$ac_cv_path_CAT
4896 if test -n "$CAT"; then
4897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4898 $as_echo "$CAT" >&6; }
4899 else
4900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4901 $as_echo "no" >&6; }
4902 fi
4903 
4904 
4905   test -n "$CAT" && break
4906 done
4907 
4908     else
4909       # If it succeeded, then it was overridden by the user. We will use it
4910       # for the tool.
4911 
4912       # First remove it from the list of overridden variables, so we can test
4913       # for unknown variables in the end.
4914       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4915 
4916       # Check if the provided tool contains a complete path.
4917       tool_specified="$CAT"
4918       tool_basename="${tool_specified##*/}"
4919       if test "x$tool_basename" = "x$tool_specified"; then
4920         # A command without a complete path is provided, search $PATH.
4921         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4922 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4923         # Extract the first word of "$tool_basename", so it can be a program name with args.
4924 set dummy $tool_basename; ac_word=$2
4925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4926 $as_echo_n "checking for $ac_word... " >&6; }
4927 if ${ac_cv_path_CAT+:} false; then :
4928   $as_echo_n "(cached) " >&6
4929 else
4930   case $CAT in
4931   [\\/]* | ?:[\\/]*)
4932   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4933   ;;
4934   *)
4935   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4936 for as_dir in $PATH
4937 do
4938   IFS=$as_save_IFS
4939   test -z "$as_dir" && as_dir=.
4940     for ac_exec_ext in '' $ac_executable_extensions; do
4941   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4942     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4944     break 2
4945   fi
4946 done
4947   done
4948 IFS=$as_save_IFS
4949 
4950   ;;
4951 esac
4952 fi
4953 CAT=$ac_cv_path_CAT
4954 if test -n "$CAT"; then
4955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4956 $as_echo "$CAT" >&6; }
4957 else
4958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4959 $as_echo "no" >&6; }
4960 fi
4961 
4962 
4963         if test "x$CAT" = x; then
4964           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4965         fi
4966       else
4967         # Otherwise we believe it is a complete path. Use it as it is.
4968         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4969 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4970         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4971 $as_echo_n "checking for CAT... " >&6; }
4972         if test ! -x "$tool_specified"; then
4973           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4974 $as_echo "not found" >&6; }
4975           as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4976         fi
4977         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4978 $as_echo "$tool_specified" >&6; }
4979       fi
4980     fi
4981   fi
4982 
4983 
4984 
4985   if test "x$CAT" = x; then
4986     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4987   fi
4988 
4989 
4990 
4991 
4992 
4993   # Publish this variable in the help.
4994 
4995 
4996   if test "x$CHMOD" = x; then
4997     # The variable is not set by user, try to locate tool using the code snippet
4998     for ac_prog in chmod
4999 do
5000   # Extract the first word of "$ac_prog", so it can be a program name with args.
5001 set dummy $ac_prog; ac_word=$2
5002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5003 $as_echo_n "checking for $ac_word... " >&6; }
5004 if ${ac_cv_path_CHMOD+:} false; then :
5005   $as_echo_n "(cached) " >&6
5006 else
5007   case $CHMOD in
5008   [\\/]* | ?:[\\/]*)
5009   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5010   ;;
5011   *)
5012   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013 for as_dir in $PATH
5014 do
5015   IFS=$as_save_IFS
5016   test -z "$as_dir" && as_dir=.
5017     for ac_exec_ext in '' $ac_executable_extensions; do
5018   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5019     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5020     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021     break 2
5022   fi
5023 done
5024   done
5025 IFS=$as_save_IFS
5026 
5027   ;;
5028 esac
5029 fi
5030 CHMOD=$ac_cv_path_CHMOD
5031 if test -n "$CHMOD"; then
5032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5033 $as_echo "$CHMOD" >&6; }
5034 else
5035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5036 $as_echo "no" >&6; }
5037 fi
5038 
5039 
5040   test -n "$CHMOD" && break
5041 done
5042 
5043   else
5044     # The variable is set, but is it from the command line or the environment?
5045 
5046     # Try to remove the string !CHMOD! from our list.
5047     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5048     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5049       # If it failed, the variable was not from the command line. Ignore it,
5050       # but warn the user (except for BASH, which is always set by the calling BASH).
5051       if test "xCHMOD" != xBASH; then
5052         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5053 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5054       fi
5055       # Try to locate tool using the code snippet
5056       for ac_prog in chmod
5057 do
5058   # Extract the first word of "$ac_prog", so it can be a program name with args.
5059 set dummy $ac_prog; ac_word=$2
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061 $as_echo_n "checking for $ac_word... " >&6; }
5062 if ${ac_cv_path_CHMOD+:} false; then :
5063   $as_echo_n "(cached) " >&6
5064 else
5065   case $CHMOD in
5066   [\\/]* | ?:[\\/]*)
5067   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5068   ;;
5069   *)
5070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071 for as_dir in $PATH
5072 do
5073   IFS=$as_save_IFS
5074   test -z "$as_dir" && as_dir=.
5075     for ac_exec_ext in '' $ac_executable_extensions; do
5076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5077     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5079     break 2
5080   fi
5081 done
5082   done
5083 IFS=$as_save_IFS
5084 
5085   ;;
5086 esac
5087 fi
5088 CHMOD=$ac_cv_path_CHMOD
5089 if test -n "$CHMOD"; then
5090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5091 $as_echo "$CHMOD" >&6; }
5092 else
5093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094 $as_echo "no" >&6; }
5095 fi
5096 
5097 
5098   test -n "$CHMOD" && break
5099 done
5100 
5101     else
5102       # If it succeeded, then it was overridden by the user. We will use it
5103       # for the tool.
5104 
5105       # First remove it from the list of overridden variables, so we can test
5106       # for unknown variables in the end.
5107       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5108 
5109       # Check if the provided tool contains a complete path.
5110       tool_specified="$CHMOD"
5111       tool_basename="${tool_specified##*/}"
5112       if test "x$tool_basename" = "x$tool_specified"; then
5113         # A command without a complete path is provided, search $PATH.
5114         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5115 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5116         # Extract the first word of "$tool_basename", so it can be a program name with args.
5117 set dummy $tool_basename; ac_word=$2
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5119 $as_echo_n "checking for $ac_word... " >&6; }
5120 if ${ac_cv_path_CHMOD+:} false; then :
5121   $as_echo_n "(cached) " >&6
5122 else
5123   case $CHMOD in
5124   [\\/]* | ?:[\\/]*)
5125   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5126   ;;
5127   *)
5128   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5129 for as_dir in $PATH
5130 do
5131   IFS=$as_save_IFS
5132   test -z "$as_dir" && as_dir=.
5133     for ac_exec_ext in '' $ac_executable_extensions; do
5134   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5135     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5137     break 2
5138   fi
5139 done
5140   done
5141 IFS=$as_save_IFS
5142 
5143   ;;
5144 esac
5145 fi
5146 CHMOD=$ac_cv_path_CHMOD
5147 if test -n "$CHMOD"; then
5148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5149 $as_echo "$CHMOD" >&6; }
5150 else
5151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5152 $as_echo "no" >&6; }
5153 fi
5154 
5155 
5156         if test "x$CHMOD" = x; then
5157           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5158         fi
5159       else
5160         # Otherwise we believe it is a complete path. Use it as it is.
5161         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5162 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5163         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5164 $as_echo_n "checking for CHMOD... " >&6; }
5165         if test ! -x "$tool_specified"; then
5166           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5167 $as_echo "not found" >&6; }
5168           as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5169         fi
5170         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5171 $as_echo "$tool_specified" >&6; }
5172       fi
5173     fi
5174   fi
5175 
5176 
5177 
5178   if test "x$CHMOD" = x; then
5179     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5180   fi
5181 
5182 
5183 
5184 
5185 
5186   # Publish this variable in the help.
5187 
5188 
5189   if test "x$CMP" = x; then
5190     # The variable is not set by user, try to locate tool using the code snippet
5191     for ac_prog in cmp
5192 do
5193   # Extract the first word of "$ac_prog", so it can be a program name with args.
5194 set dummy $ac_prog; ac_word=$2
5195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5196 $as_echo_n "checking for $ac_word... " >&6; }
5197 if ${ac_cv_path_CMP+:} false; then :
5198   $as_echo_n "(cached) " >&6
5199 else
5200   case $CMP in
5201   [\\/]* | ?:[\\/]*)
5202   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5203   ;;
5204   *)
5205   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5206 for as_dir in $PATH
5207 do
5208   IFS=$as_save_IFS
5209   test -z "$as_dir" && as_dir=.
5210     for ac_exec_ext in '' $ac_executable_extensions; do
5211   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5212     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5213     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5214     break 2
5215   fi
5216 done
5217   done
5218 IFS=$as_save_IFS
5219 
5220   ;;
5221 esac
5222 fi
5223 CMP=$ac_cv_path_CMP
5224 if test -n "$CMP"; then
5225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5226 $as_echo "$CMP" >&6; }
5227 else
5228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5229 $as_echo "no" >&6; }
5230 fi
5231 
5232 
5233   test -n "$CMP" && break
5234 done
5235 
5236   else
5237     # The variable is set, but is it from the command line or the environment?
5238 
5239     # Try to remove the string !CMP! from our list.
5240     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5241     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5242       # If it failed, the variable was not from the command line. Ignore it,
5243       # but warn the user (except for BASH, which is always set by the calling BASH).
5244       if test "xCMP" != xBASH; then
5245         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5246 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5247       fi
5248       # Try to locate tool using the code snippet
5249       for ac_prog in cmp
5250 do
5251   # Extract the first word of "$ac_prog", so it can be a program name with args.
5252 set dummy $ac_prog; ac_word=$2
5253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5254 $as_echo_n "checking for $ac_word... " >&6; }
5255 if ${ac_cv_path_CMP+:} false; then :
5256   $as_echo_n "(cached) " >&6
5257 else
5258   case $CMP in
5259   [\\/]* | ?:[\\/]*)
5260   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5261   ;;
5262   *)
5263   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5264 for as_dir in $PATH
5265 do
5266   IFS=$as_save_IFS
5267   test -z "$as_dir" && as_dir=.
5268     for ac_exec_ext in '' $ac_executable_extensions; do
5269   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5270     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5271     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5272     break 2
5273   fi
5274 done
5275   done
5276 IFS=$as_save_IFS
5277 
5278   ;;
5279 esac
5280 fi
5281 CMP=$ac_cv_path_CMP
5282 if test -n "$CMP"; then
5283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5284 $as_echo "$CMP" >&6; }
5285 else
5286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5287 $as_echo "no" >&6; }
5288 fi
5289 
5290 
5291   test -n "$CMP" && break
5292 done
5293 
5294     else
5295       # If it succeeded, then it was overridden by the user. We will use it
5296       # for the tool.
5297 
5298       # First remove it from the list of overridden variables, so we can test
5299       # for unknown variables in the end.
5300       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5301 
5302       # Check if the provided tool contains a complete path.
5303       tool_specified="$CMP"
5304       tool_basename="${tool_specified##*/}"
5305       if test "x$tool_basename" = "x$tool_specified"; then
5306         # A command without a complete path is provided, search $PATH.
5307         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5308 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5309         # Extract the first word of "$tool_basename", so it can be a program name with args.
5310 set dummy $tool_basename; ac_word=$2
5311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5312 $as_echo_n "checking for $ac_word... " >&6; }
5313 if ${ac_cv_path_CMP+:} false; then :
5314   $as_echo_n "(cached) " >&6
5315 else
5316   case $CMP in
5317   [\\/]* | ?:[\\/]*)
5318   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5319   ;;
5320   *)
5321   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5322 for as_dir in $PATH
5323 do
5324   IFS=$as_save_IFS
5325   test -z "$as_dir" && as_dir=.
5326     for ac_exec_ext in '' $ac_executable_extensions; do
5327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5328     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5330     break 2
5331   fi
5332 done
5333   done
5334 IFS=$as_save_IFS
5335 
5336   ;;
5337 esac
5338 fi
5339 CMP=$ac_cv_path_CMP
5340 if test -n "$CMP"; then
5341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5342 $as_echo "$CMP" >&6; }
5343 else
5344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5345 $as_echo "no" >&6; }
5346 fi
5347 
5348 
5349         if test "x$CMP" = x; then
5350           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5351         fi
5352       else
5353         # Otherwise we believe it is a complete path. Use it as it is.
5354         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5355 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5356         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5357 $as_echo_n "checking for CMP... " >&6; }
5358         if test ! -x "$tool_specified"; then
5359           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5360 $as_echo "not found" >&6; }
5361           as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5362         fi
5363         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5364 $as_echo "$tool_specified" >&6; }
5365       fi
5366     fi
5367   fi
5368 
5369 
5370 
5371   if test "x$CMP" = x; then
5372     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5373   fi
5374 
5375 
5376 
5377 
5378 
5379   # Publish this variable in the help.
5380 
5381 
5382   if test "x$COMM" = x; then
5383     # The variable is not set by user, try to locate tool using the code snippet
5384     for ac_prog in comm
5385 do
5386   # Extract the first word of "$ac_prog", so it can be a program name with args.
5387 set dummy $ac_prog; ac_word=$2
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5389 $as_echo_n "checking for $ac_word... " >&6; }
5390 if ${ac_cv_path_COMM+:} false; then :
5391   $as_echo_n "(cached) " >&6
5392 else
5393   case $COMM in
5394   [\\/]* | ?:[\\/]*)
5395   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5396   ;;
5397   *)
5398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5399 for as_dir in $PATH
5400 do
5401   IFS=$as_save_IFS
5402   test -z "$as_dir" && as_dir=.
5403     for ac_exec_ext in '' $ac_executable_extensions; do
5404   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5405     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5407     break 2
5408   fi
5409 done
5410   done
5411 IFS=$as_save_IFS
5412 
5413   ;;
5414 esac
5415 fi
5416 COMM=$ac_cv_path_COMM
5417 if test -n "$COMM"; then
5418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5419 $as_echo "$COMM" >&6; }
5420 else
5421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5422 $as_echo "no" >&6; }
5423 fi
5424 
5425 
5426   test -n "$COMM" && break
5427 done
5428 
5429   else
5430     # The variable is set, but is it from the command line or the environment?
5431 
5432     # Try to remove the string !COMM! from our list.
5433     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5434     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5435       # If it failed, the variable was not from the command line. Ignore it,
5436       # but warn the user (except for BASH, which is always set by the calling BASH).
5437       if test "xCOMM" != xBASH; then
5438         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5439 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5440       fi
5441       # Try to locate tool using the code snippet
5442       for ac_prog in comm
5443 do
5444   # Extract the first word of "$ac_prog", so it can be a program name with args.
5445 set dummy $ac_prog; ac_word=$2
5446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5447 $as_echo_n "checking for $ac_word... " >&6; }
5448 if ${ac_cv_path_COMM+:} false; then :
5449   $as_echo_n "(cached) " >&6
5450 else
5451   case $COMM in
5452   [\\/]* | ?:[\\/]*)
5453   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5454   ;;
5455   *)
5456   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5457 for as_dir in $PATH
5458 do
5459   IFS=$as_save_IFS
5460   test -z "$as_dir" && as_dir=.
5461     for ac_exec_ext in '' $ac_executable_extensions; do
5462   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5463     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5464     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5465     break 2
5466   fi
5467 done
5468   done
5469 IFS=$as_save_IFS
5470 
5471   ;;
5472 esac
5473 fi
5474 COMM=$ac_cv_path_COMM
5475 if test -n "$COMM"; then
5476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5477 $as_echo "$COMM" >&6; }
5478 else
5479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5480 $as_echo "no" >&6; }
5481 fi
5482 
5483 
5484   test -n "$COMM" && break
5485 done
5486 
5487     else
5488       # If it succeeded, then it was overridden by the user. We will use it
5489       # for the tool.
5490 
5491       # First remove it from the list of overridden variables, so we can test
5492       # for unknown variables in the end.
5493       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5494 
5495       # Check if the provided tool contains a complete path.
5496       tool_specified="$COMM"
5497       tool_basename="${tool_specified##*/}"
5498       if test "x$tool_basename" = "x$tool_specified"; then
5499         # A command without a complete path is provided, search $PATH.
5500         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5501 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5502         # Extract the first word of "$tool_basename", so it can be a program name with args.
5503 set dummy $tool_basename; ac_word=$2
5504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5505 $as_echo_n "checking for $ac_word... " >&6; }
5506 if ${ac_cv_path_COMM+:} false; then :
5507   $as_echo_n "(cached) " >&6
5508 else
5509   case $COMM in
5510   [\\/]* | ?:[\\/]*)
5511   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5512   ;;
5513   *)
5514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5515 for as_dir in $PATH
5516 do
5517   IFS=$as_save_IFS
5518   test -z "$as_dir" && as_dir=.
5519     for ac_exec_ext in '' $ac_executable_extensions; do
5520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5521     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5523     break 2
5524   fi
5525 done
5526   done
5527 IFS=$as_save_IFS
5528 
5529   ;;
5530 esac
5531 fi
5532 COMM=$ac_cv_path_COMM
5533 if test -n "$COMM"; then
5534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5535 $as_echo "$COMM" >&6; }
5536 else
5537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5538 $as_echo "no" >&6; }
5539 fi
5540 
5541 
5542         if test "x$COMM" = x; then
5543           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5544         fi
5545       else
5546         # Otherwise we believe it is a complete path. Use it as it is.
5547         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5548 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5549         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5550 $as_echo_n "checking for COMM... " >&6; }
5551         if test ! -x "$tool_specified"; then
5552           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5553 $as_echo "not found" >&6; }
5554           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5555         fi
5556         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5557 $as_echo "$tool_specified" >&6; }
5558       fi
5559     fi
5560   fi
5561 
5562 
5563 
5564   if test "x$COMM" = x; then
5565     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5566   fi
5567 
5568 
5569 
5570 
5571 
5572   # Publish this variable in the help.
5573 
5574 
5575   if test "x$CP" = x; then
5576     # The variable is not set by user, try to locate tool using the code snippet
5577     for ac_prog in cp
5578 do
5579   # Extract the first word of "$ac_prog", so it can be a program name with args.
5580 set dummy $ac_prog; ac_word=$2
5581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5582 $as_echo_n "checking for $ac_word... " >&6; }
5583 if ${ac_cv_path_CP+:} false; then :
5584   $as_echo_n "(cached) " >&6
5585 else
5586   case $CP in
5587   [\\/]* | ?:[\\/]*)
5588   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5589   ;;
5590   *)
5591   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5592 for as_dir in $PATH
5593 do
5594   IFS=$as_save_IFS
5595   test -z "$as_dir" && as_dir=.
5596     for ac_exec_ext in '' $ac_executable_extensions; do
5597   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5598     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5599     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5600     break 2
5601   fi
5602 done
5603   done
5604 IFS=$as_save_IFS
5605 
5606   ;;
5607 esac
5608 fi
5609 CP=$ac_cv_path_CP
5610 if test -n "$CP"; then
5611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5612 $as_echo "$CP" >&6; }
5613 else
5614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5615 $as_echo "no" >&6; }
5616 fi
5617 
5618 
5619   test -n "$CP" && break
5620 done
5621 
5622   else
5623     # The variable is set, but is it from the command line or the environment?
5624 
5625     # Try to remove the string !CP! from our list.
5626     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5627     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5628       # If it failed, the variable was not from the command line. Ignore it,
5629       # but warn the user (except for BASH, which is always set by the calling BASH).
5630       if test "xCP" != xBASH; then
5631         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5632 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5633       fi
5634       # Try to locate tool using the code snippet
5635       for ac_prog in cp
5636 do
5637   # Extract the first word of "$ac_prog", so it can be a program name with args.
5638 set dummy $ac_prog; ac_word=$2
5639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5640 $as_echo_n "checking for $ac_word... " >&6; }
5641 if ${ac_cv_path_CP+:} false; then :
5642   $as_echo_n "(cached) " >&6
5643 else
5644   case $CP in
5645   [\\/]* | ?:[\\/]*)
5646   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5647   ;;
5648   *)
5649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5650 for as_dir in $PATH
5651 do
5652   IFS=$as_save_IFS
5653   test -z "$as_dir" && as_dir=.
5654     for ac_exec_ext in '' $ac_executable_extensions; do
5655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5656     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5658     break 2
5659   fi
5660 done
5661   done
5662 IFS=$as_save_IFS
5663 
5664   ;;
5665 esac
5666 fi
5667 CP=$ac_cv_path_CP
5668 if test -n "$CP"; then
5669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5670 $as_echo "$CP" >&6; }
5671 else
5672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5673 $as_echo "no" >&6; }
5674 fi
5675 
5676 
5677   test -n "$CP" && break
5678 done
5679 
5680     else
5681       # If it succeeded, then it was overridden by the user. We will use it
5682       # for the tool.
5683 
5684       # First remove it from the list of overridden variables, so we can test
5685       # for unknown variables in the end.
5686       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5687 
5688       # Check if the provided tool contains a complete path.
5689       tool_specified="$CP"
5690       tool_basename="${tool_specified##*/}"
5691       if test "x$tool_basename" = "x$tool_specified"; then
5692         # A command without a complete path is provided, search $PATH.
5693         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5694 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5695         # Extract the first word of "$tool_basename", so it can be a program name with args.
5696 set dummy $tool_basename; ac_word=$2
5697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5698 $as_echo_n "checking for $ac_word... " >&6; }
5699 if ${ac_cv_path_CP+:} false; then :
5700   $as_echo_n "(cached) " >&6
5701 else
5702   case $CP in
5703   [\\/]* | ?:[\\/]*)
5704   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5705   ;;
5706   *)
5707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5708 for as_dir in $PATH
5709 do
5710   IFS=$as_save_IFS
5711   test -z "$as_dir" && as_dir=.
5712     for ac_exec_ext in '' $ac_executable_extensions; do
5713   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5714     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5716     break 2
5717   fi
5718 done
5719   done
5720 IFS=$as_save_IFS
5721 
5722   ;;
5723 esac
5724 fi
5725 CP=$ac_cv_path_CP
5726 if test -n "$CP"; then
5727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5728 $as_echo "$CP" >&6; }
5729 else
5730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5731 $as_echo "no" >&6; }
5732 fi
5733 
5734 
5735         if test "x$CP" = x; then
5736           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5737         fi
5738       else
5739         # Otherwise we believe it is a complete path. Use it as it is.
5740         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5741 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5742         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5743 $as_echo_n "checking for CP... " >&6; }
5744         if test ! -x "$tool_specified"; then
5745           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5746 $as_echo "not found" >&6; }
5747           as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5748         fi
5749         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5750 $as_echo "$tool_specified" >&6; }
5751       fi
5752     fi
5753   fi
5754 
5755 
5756 
5757   if test "x$CP" = x; then
5758     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5759   fi
5760 
5761 
5762 
5763 
5764 
5765   # Publish this variable in the help.
5766 
5767 
5768   if test "x$CUT" = x; then
5769     # The variable is not set by user, try to locate tool using the code snippet
5770     for ac_prog in cut
5771 do
5772   # Extract the first word of "$ac_prog", so it can be a program name with args.
5773 set dummy $ac_prog; ac_word=$2
5774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5775 $as_echo_n "checking for $ac_word... " >&6; }
5776 if ${ac_cv_path_CUT+:} false; then :
5777   $as_echo_n "(cached) " >&6
5778 else
5779   case $CUT in
5780   [\\/]* | ?:[\\/]*)
5781   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5782   ;;
5783   *)
5784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5785 for as_dir in $PATH
5786 do
5787   IFS=$as_save_IFS
5788   test -z "$as_dir" && as_dir=.
5789     for ac_exec_ext in '' $ac_executable_extensions; do
5790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5791     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5793     break 2
5794   fi
5795 done
5796   done
5797 IFS=$as_save_IFS
5798 
5799   ;;
5800 esac
5801 fi
5802 CUT=$ac_cv_path_CUT
5803 if test -n "$CUT"; then
5804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5805 $as_echo "$CUT" >&6; }
5806 else
5807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5808 $as_echo "no" >&6; }
5809 fi
5810 
5811 
5812   test -n "$CUT" && break
5813 done
5814 
5815   else
5816     # The variable is set, but is it from the command line or the environment?
5817 
5818     # Try to remove the string !CUT! from our list.
5819     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5820     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5821       # If it failed, the variable was not from the command line. Ignore it,
5822       # but warn the user (except for BASH, which is always set by the calling BASH).
5823       if test "xCUT" != xBASH; then
5824         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5825 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5826       fi
5827       # Try to locate tool using the code snippet
5828       for ac_prog in cut
5829 do
5830   # Extract the first word of "$ac_prog", so it can be a program name with args.
5831 set dummy $ac_prog; ac_word=$2
5832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5833 $as_echo_n "checking for $ac_word... " >&6; }
5834 if ${ac_cv_path_CUT+:} false; then :
5835   $as_echo_n "(cached) " >&6
5836 else
5837   case $CUT in
5838   [\\/]* | ?:[\\/]*)
5839   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5840   ;;
5841   *)
5842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5843 for as_dir in $PATH
5844 do
5845   IFS=$as_save_IFS
5846   test -z "$as_dir" && as_dir=.
5847     for ac_exec_ext in '' $ac_executable_extensions; do
5848   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5849     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5850     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5851     break 2
5852   fi
5853 done
5854   done
5855 IFS=$as_save_IFS
5856 
5857   ;;
5858 esac
5859 fi
5860 CUT=$ac_cv_path_CUT
5861 if test -n "$CUT"; then
5862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5863 $as_echo "$CUT" >&6; }
5864 else
5865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5866 $as_echo "no" >&6; }
5867 fi
5868 
5869 
5870   test -n "$CUT" && break
5871 done
5872 
5873     else
5874       # If it succeeded, then it was overridden by the user. We will use it
5875       # for the tool.
5876 
5877       # First remove it from the list of overridden variables, so we can test
5878       # for unknown variables in the end.
5879       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5880 
5881       # Check if the provided tool contains a complete path.
5882       tool_specified="$CUT"
5883       tool_basename="${tool_specified##*/}"
5884       if test "x$tool_basename" = "x$tool_specified"; then
5885         # A command without a complete path is provided, search $PATH.
5886         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5887 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5888         # Extract the first word of "$tool_basename", so it can be a program name with args.
5889 set dummy $tool_basename; ac_word=$2
5890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5891 $as_echo_n "checking for $ac_word... " >&6; }
5892 if ${ac_cv_path_CUT+:} false; then :
5893   $as_echo_n "(cached) " >&6
5894 else
5895   case $CUT in
5896   [\\/]* | ?:[\\/]*)
5897   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5898   ;;
5899   *)
5900   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5901 for as_dir in $PATH
5902 do
5903   IFS=$as_save_IFS
5904   test -z "$as_dir" && as_dir=.
5905     for ac_exec_ext in '' $ac_executable_extensions; do
5906   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5907     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5908     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5909     break 2
5910   fi
5911 done
5912   done
5913 IFS=$as_save_IFS
5914 
5915   ;;
5916 esac
5917 fi
5918 CUT=$ac_cv_path_CUT
5919 if test -n "$CUT"; then
5920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5921 $as_echo "$CUT" >&6; }
5922 else
5923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5924 $as_echo "no" >&6; }
5925 fi
5926 
5927 
5928         if test "x$CUT" = x; then
5929           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5930         fi
5931       else
5932         # Otherwise we believe it is a complete path. Use it as it is.
5933         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5934 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5935         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5936 $as_echo_n "checking for CUT... " >&6; }
5937         if test ! -x "$tool_specified"; then
5938           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5939 $as_echo "not found" >&6; }
5940           as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5941         fi
5942         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5943 $as_echo "$tool_specified" >&6; }
5944       fi
5945     fi
5946   fi
5947 
5948 
5949 
5950   if test "x$CUT" = x; then
5951     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5952   fi
5953 
5954 
5955 
5956 
5957 
5958   # Publish this variable in the help.
5959 
5960 
5961   if test "x$DATE" = x; then
5962     # The variable is not set by user, try to locate tool using the code snippet
5963     for ac_prog in date
5964 do
5965   # Extract the first word of "$ac_prog", so it can be a program name with args.
5966 set dummy $ac_prog; ac_word=$2
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5968 $as_echo_n "checking for $ac_word... " >&6; }
5969 if ${ac_cv_path_DATE+:} false; then :
5970   $as_echo_n "(cached) " >&6
5971 else
5972   case $DATE in
5973   [\\/]* | ?:[\\/]*)
5974   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5975   ;;
5976   *)
5977   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5978 for as_dir in $PATH
5979 do
5980   IFS=$as_save_IFS
5981   test -z "$as_dir" && as_dir=.
5982     for ac_exec_ext in '' $ac_executable_extensions; do
5983   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5984     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5986     break 2
5987   fi
5988 done
5989   done
5990 IFS=$as_save_IFS
5991 
5992   ;;
5993 esac
5994 fi
5995 DATE=$ac_cv_path_DATE
5996 if test -n "$DATE"; then
5997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5998 $as_echo "$DATE" >&6; }
5999 else
6000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6001 $as_echo "no" >&6; }
6002 fi
6003 
6004 
6005   test -n "$DATE" && break
6006 done
6007 
6008   else
6009     # The variable is set, but is it from the command line or the environment?
6010 
6011     # Try to remove the string !DATE! from our list.
6012     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6013     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6014       # If it failed, the variable was not from the command line. Ignore it,
6015       # but warn the user (except for BASH, which is always set by the calling BASH).
6016       if test "xDATE" != xBASH; then
6017         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6018 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6019       fi
6020       # Try to locate tool using the code snippet
6021       for ac_prog in date
6022 do
6023   # Extract the first word of "$ac_prog", so it can be a program name with args.
6024 set dummy $ac_prog; ac_word=$2
6025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6026 $as_echo_n "checking for $ac_word... " >&6; }
6027 if ${ac_cv_path_DATE+:} false; then :
6028   $as_echo_n "(cached) " >&6
6029 else
6030   case $DATE in
6031   [\\/]* | ?:[\\/]*)
6032   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6033   ;;
6034   *)
6035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6036 for as_dir in $PATH
6037 do
6038   IFS=$as_save_IFS
6039   test -z "$as_dir" && as_dir=.
6040     for ac_exec_ext in '' $ac_executable_extensions; do
6041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6042     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6044     break 2
6045   fi
6046 done
6047   done
6048 IFS=$as_save_IFS
6049 
6050   ;;
6051 esac
6052 fi
6053 DATE=$ac_cv_path_DATE
6054 if test -n "$DATE"; then
6055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6056 $as_echo "$DATE" >&6; }
6057 else
6058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6059 $as_echo "no" >&6; }
6060 fi
6061 
6062 
6063   test -n "$DATE" && break
6064 done
6065 
6066     else
6067       # If it succeeded, then it was overridden by the user. We will use it
6068       # for the tool.
6069 
6070       # First remove it from the list of overridden variables, so we can test
6071       # for unknown variables in the end.
6072       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6073 
6074       # Check if the provided tool contains a complete path.
6075       tool_specified="$DATE"
6076       tool_basename="${tool_specified##*/}"
6077       if test "x$tool_basename" = "x$tool_specified"; then
6078         # A command without a complete path is provided, search $PATH.
6079         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6080 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6081         # Extract the first word of "$tool_basename", so it can be a program name with args.
6082 set dummy $tool_basename; ac_word=$2
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6084 $as_echo_n "checking for $ac_word... " >&6; }
6085 if ${ac_cv_path_DATE+:} false; then :
6086   $as_echo_n "(cached) " >&6
6087 else
6088   case $DATE in
6089   [\\/]* | ?:[\\/]*)
6090   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6091   ;;
6092   *)
6093   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6094 for as_dir in $PATH
6095 do
6096   IFS=$as_save_IFS
6097   test -z "$as_dir" && as_dir=.
6098     for ac_exec_ext in '' $ac_executable_extensions; do
6099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6100     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6102     break 2
6103   fi
6104 done
6105   done
6106 IFS=$as_save_IFS
6107 
6108   ;;
6109 esac
6110 fi
6111 DATE=$ac_cv_path_DATE
6112 if test -n "$DATE"; then
6113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6114 $as_echo "$DATE" >&6; }
6115 else
6116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6117 $as_echo "no" >&6; }
6118 fi
6119 
6120 
6121         if test "x$DATE" = x; then
6122           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6123         fi
6124       else
6125         # Otherwise we believe it is a complete path. Use it as it is.
6126         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6127 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6128         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6129 $as_echo_n "checking for DATE... " >&6; }
6130         if test ! -x "$tool_specified"; then
6131           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6132 $as_echo "not found" >&6; }
6133           as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6134         fi
6135         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6136 $as_echo "$tool_specified" >&6; }
6137       fi
6138     fi
6139   fi
6140 
6141 
6142 
6143   if test "x$DATE" = x; then
6144     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6145   fi
6146 
6147 
6148 
6149 
6150 
6151   # Publish this variable in the help.
6152 
6153 
6154   if test "x$DIFF" = x; then
6155     # The variable is not set by user, try to locate tool using the code snippet
6156     for ac_prog in gdiff diff
6157 do
6158   # Extract the first word of "$ac_prog", so it can be a program name with args.
6159 set dummy $ac_prog; ac_word=$2
6160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6161 $as_echo_n "checking for $ac_word... " >&6; }
6162 if ${ac_cv_path_DIFF+:} false; then :
6163   $as_echo_n "(cached) " >&6
6164 else
6165   case $DIFF in
6166   [\\/]* | ?:[\\/]*)
6167   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6168   ;;
6169   *)
6170   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6171 for as_dir in $PATH
6172 do
6173   IFS=$as_save_IFS
6174   test -z "$as_dir" && as_dir=.
6175     for ac_exec_ext in '' $ac_executable_extensions; do
6176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6177     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6179     break 2
6180   fi
6181 done
6182   done
6183 IFS=$as_save_IFS
6184 
6185   ;;
6186 esac
6187 fi
6188 DIFF=$ac_cv_path_DIFF
6189 if test -n "$DIFF"; then
6190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6191 $as_echo "$DIFF" >&6; }
6192 else
6193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6194 $as_echo "no" >&6; }
6195 fi
6196 
6197 
6198   test -n "$DIFF" && break
6199 done
6200 
6201   else
6202     # The variable is set, but is it from the command line or the environment?
6203 
6204     # Try to remove the string !DIFF! from our list.
6205     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6206     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6207       # If it failed, the variable was not from the command line. Ignore it,
6208       # but warn the user (except for BASH, which is always set by the calling BASH).
6209       if test "xDIFF" != xBASH; then
6210         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6211 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6212       fi
6213       # Try to locate tool using the code snippet
6214       for ac_prog in gdiff diff
6215 do
6216   # Extract the first word of "$ac_prog", so it can be a program name with args.
6217 set dummy $ac_prog; ac_word=$2
6218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6219 $as_echo_n "checking for $ac_word... " >&6; }
6220 if ${ac_cv_path_DIFF+:} false; then :
6221   $as_echo_n "(cached) " >&6
6222 else
6223   case $DIFF in
6224   [\\/]* | ?:[\\/]*)
6225   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6226   ;;
6227   *)
6228   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6229 for as_dir in $PATH
6230 do
6231   IFS=$as_save_IFS
6232   test -z "$as_dir" && as_dir=.
6233     for ac_exec_ext in '' $ac_executable_extensions; do
6234   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6235     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6236     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6237     break 2
6238   fi
6239 done
6240   done
6241 IFS=$as_save_IFS
6242 
6243   ;;
6244 esac
6245 fi
6246 DIFF=$ac_cv_path_DIFF
6247 if test -n "$DIFF"; then
6248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6249 $as_echo "$DIFF" >&6; }
6250 else
6251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6252 $as_echo "no" >&6; }
6253 fi
6254 
6255 
6256   test -n "$DIFF" && break
6257 done
6258 
6259     else
6260       # If it succeeded, then it was overridden by the user. We will use it
6261       # for the tool.
6262 
6263       # First remove it from the list of overridden variables, so we can test
6264       # for unknown variables in the end.
6265       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6266 
6267       # Check if the provided tool contains a complete path.
6268       tool_specified="$DIFF"
6269       tool_basename="${tool_specified##*/}"
6270       if test "x$tool_basename" = "x$tool_specified"; then
6271         # A command without a complete path is provided, search $PATH.
6272         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6273 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6274         # Extract the first word of "$tool_basename", so it can be a program name with args.
6275 set dummy $tool_basename; ac_word=$2
6276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6277 $as_echo_n "checking for $ac_word... " >&6; }
6278 if ${ac_cv_path_DIFF+:} false; then :
6279   $as_echo_n "(cached) " >&6
6280 else
6281   case $DIFF in
6282   [\\/]* | ?:[\\/]*)
6283   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6284   ;;
6285   *)
6286   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6287 for as_dir in $PATH
6288 do
6289   IFS=$as_save_IFS
6290   test -z "$as_dir" && as_dir=.
6291     for ac_exec_ext in '' $ac_executable_extensions; do
6292   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6293     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6294     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6295     break 2
6296   fi
6297 done
6298   done
6299 IFS=$as_save_IFS
6300 
6301   ;;
6302 esac
6303 fi
6304 DIFF=$ac_cv_path_DIFF
6305 if test -n "$DIFF"; then
6306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6307 $as_echo "$DIFF" >&6; }
6308 else
6309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6310 $as_echo "no" >&6; }
6311 fi
6312 
6313 
6314         if test "x$DIFF" = x; then
6315           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6316         fi
6317       else
6318         # Otherwise we believe it is a complete path. Use it as it is.
6319         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6320 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6321         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6322 $as_echo_n "checking for DIFF... " >&6; }
6323         if test ! -x "$tool_specified"; then
6324           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6325 $as_echo "not found" >&6; }
6326           as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6327         fi
6328         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6329 $as_echo "$tool_specified" >&6; }
6330       fi
6331     fi
6332   fi
6333 
6334 
6335 
6336   if test "x$DIFF" = x; then
6337     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6338   fi
6339 
6340 
6341 
6342 
6343 
6344   # Publish this variable in the help.
6345 
6346 
6347   if test "x$DIRNAME" = x; then
6348     # The variable is not set by user, try to locate tool using the code snippet
6349     for ac_prog in dirname
6350 do
6351   # Extract the first word of "$ac_prog", so it can be a program name with args.
6352 set dummy $ac_prog; ac_word=$2
6353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6354 $as_echo_n "checking for $ac_word... " >&6; }
6355 if ${ac_cv_path_DIRNAME+:} false; then :
6356   $as_echo_n "(cached) " >&6
6357 else
6358   case $DIRNAME in
6359   [\\/]* | ?:[\\/]*)
6360   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6361   ;;
6362   *)
6363   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6364 for as_dir in $PATH
6365 do
6366   IFS=$as_save_IFS
6367   test -z "$as_dir" && as_dir=.
6368     for ac_exec_ext in '' $ac_executable_extensions; do
6369   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6370     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6371     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6372     break 2
6373   fi
6374 done
6375   done
6376 IFS=$as_save_IFS
6377 
6378   ;;
6379 esac
6380 fi
6381 DIRNAME=$ac_cv_path_DIRNAME
6382 if test -n "$DIRNAME"; then
6383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6384 $as_echo "$DIRNAME" >&6; }
6385 else
6386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6387 $as_echo "no" >&6; }
6388 fi
6389 
6390 
6391   test -n "$DIRNAME" && break
6392 done
6393 
6394   else
6395     # The variable is set, but is it from the command line or the environment?
6396 
6397     # Try to remove the string !DIRNAME! from our list.
6398     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6399     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6400       # If it failed, the variable was not from the command line. Ignore it,
6401       # but warn the user (except for BASH, which is always set by the calling BASH).
6402       if test "xDIRNAME" != xBASH; then
6403         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6404 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6405       fi
6406       # Try to locate tool using the code snippet
6407       for ac_prog in dirname
6408 do
6409   # Extract the first word of "$ac_prog", so it can be a program name with args.
6410 set dummy $ac_prog; ac_word=$2
6411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6412 $as_echo_n "checking for $ac_word... " >&6; }
6413 if ${ac_cv_path_DIRNAME+:} false; then :
6414   $as_echo_n "(cached) " >&6
6415 else
6416   case $DIRNAME in
6417   [\\/]* | ?:[\\/]*)
6418   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6419   ;;
6420   *)
6421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6422 for as_dir in $PATH
6423 do
6424   IFS=$as_save_IFS
6425   test -z "$as_dir" && as_dir=.
6426     for ac_exec_ext in '' $ac_executable_extensions; do
6427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6428     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6430     break 2
6431   fi
6432 done
6433   done
6434 IFS=$as_save_IFS
6435 
6436   ;;
6437 esac
6438 fi
6439 DIRNAME=$ac_cv_path_DIRNAME
6440 if test -n "$DIRNAME"; then
6441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6442 $as_echo "$DIRNAME" >&6; }
6443 else
6444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6445 $as_echo "no" >&6; }
6446 fi
6447 
6448 
6449   test -n "$DIRNAME" && break
6450 done
6451 
6452     else
6453       # If it succeeded, then it was overridden by the user. We will use it
6454       # for the tool.
6455 
6456       # First remove it from the list of overridden variables, so we can test
6457       # for unknown variables in the end.
6458       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6459 
6460       # Check if the provided tool contains a complete path.
6461       tool_specified="$DIRNAME"
6462       tool_basename="${tool_specified##*/}"
6463       if test "x$tool_basename" = "x$tool_specified"; then
6464         # A command without a complete path is provided, search $PATH.
6465         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6466 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6467         # Extract the first word of "$tool_basename", so it can be a program name with args.
6468 set dummy $tool_basename; ac_word=$2
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6470 $as_echo_n "checking for $ac_word... " >&6; }
6471 if ${ac_cv_path_DIRNAME+:} false; then :
6472   $as_echo_n "(cached) " >&6
6473 else
6474   case $DIRNAME in
6475   [\\/]* | ?:[\\/]*)
6476   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6477   ;;
6478   *)
6479   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6480 for as_dir in $PATH
6481 do
6482   IFS=$as_save_IFS
6483   test -z "$as_dir" && as_dir=.
6484     for ac_exec_ext in '' $ac_executable_extensions; do
6485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6486     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6488     break 2
6489   fi
6490 done
6491   done
6492 IFS=$as_save_IFS
6493 
6494   ;;
6495 esac
6496 fi
6497 DIRNAME=$ac_cv_path_DIRNAME
6498 if test -n "$DIRNAME"; then
6499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6500 $as_echo "$DIRNAME" >&6; }
6501 else
6502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6503 $as_echo "no" >&6; }
6504 fi
6505 
6506 
6507         if test "x$DIRNAME" = x; then
6508           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6509         fi
6510       else
6511         # Otherwise we believe it is a complete path. Use it as it is.
6512         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6513 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6514         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6515 $as_echo_n "checking for DIRNAME... " >&6; }
6516         if test ! -x "$tool_specified"; then
6517           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6518 $as_echo "not found" >&6; }
6519           as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6520         fi
6521         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6522 $as_echo "$tool_specified" >&6; }
6523       fi
6524     fi
6525   fi
6526 
6527 
6528 
6529   if test "x$DIRNAME" = x; then
6530     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6531   fi
6532 
6533 
6534 
6535 
6536 
6537   # Publish this variable in the help.
6538 
6539 
6540   if test "x$ECHO" = x; then
6541     # The variable is not set by user, try to locate tool using the code snippet
6542     for ac_prog in echo
6543 do
6544   # Extract the first word of "$ac_prog", so it can be a program name with args.
6545 set dummy $ac_prog; ac_word=$2
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6547 $as_echo_n "checking for $ac_word... " >&6; }
6548 if ${ac_cv_path_ECHO+:} false; then :
6549   $as_echo_n "(cached) " >&6
6550 else
6551   case $ECHO in
6552   [\\/]* | ?:[\\/]*)
6553   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6554   ;;
6555   *)
6556   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6557 for as_dir in $PATH
6558 do
6559   IFS=$as_save_IFS
6560   test -z "$as_dir" && as_dir=.
6561     for ac_exec_ext in '' $ac_executable_extensions; do
6562   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6563     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6564     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6565     break 2
6566   fi
6567 done
6568   done
6569 IFS=$as_save_IFS
6570 
6571   ;;
6572 esac
6573 fi
6574 ECHO=$ac_cv_path_ECHO
6575 if test -n "$ECHO"; then
6576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6577 $as_echo "$ECHO" >&6; }
6578 else
6579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6580 $as_echo "no" >&6; }
6581 fi
6582 
6583 
6584   test -n "$ECHO" && break
6585 done
6586 
6587   else
6588     # The variable is set, but is it from the command line or the environment?
6589 
6590     # Try to remove the string !ECHO! from our list.
6591     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6592     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6593       # If it failed, the variable was not from the command line. Ignore it,
6594       # but warn the user (except for BASH, which is always set by the calling BASH).
6595       if test "xECHO" != xBASH; then
6596         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6597 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6598       fi
6599       # Try to locate tool using the code snippet
6600       for ac_prog in echo
6601 do
6602   # Extract the first word of "$ac_prog", so it can be a program name with args.
6603 set dummy $ac_prog; ac_word=$2
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6605 $as_echo_n "checking for $ac_word... " >&6; }
6606 if ${ac_cv_path_ECHO+:} false; then :
6607   $as_echo_n "(cached) " >&6
6608 else
6609   case $ECHO in
6610   [\\/]* | ?:[\\/]*)
6611   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6612   ;;
6613   *)
6614   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6615 for as_dir in $PATH
6616 do
6617   IFS=$as_save_IFS
6618   test -z "$as_dir" && as_dir=.
6619     for ac_exec_ext in '' $ac_executable_extensions; do
6620   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6621     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6622     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6623     break 2
6624   fi
6625 done
6626   done
6627 IFS=$as_save_IFS
6628 
6629   ;;
6630 esac
6631 fi
6632 ECHO=$ac_cv_path_ECHO
6633 if test -n "$ECHO"; then
6634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6635 $as_echo "$ECHO" >&6; }
6636 else
6637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6638 $as_echo "no" >&6; }
6639 fi
6640 
6641 
6642   test -n "$ECHO" && break
6643 done
6644 
6645     else
6646       # If it succeeded, then it was overridden by the user. We will use it
6647       # for the tool.
6648 
6649       # First remove it from the list of overridden variables, so we can test
6650       # for unknown variables in the end.
6651       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6652 
6653       # Check if the provided tool contains a complete path.
6654       tool_specified="$ECHO"
6655       tool_basename="${tool_specified##*/}"
6656       if test "x$tool_basename" = "x$tool_specified"; then
6657         # A command without a complete path is provided, search $PATH.
6658         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6659 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6660         # Extract the first word of "$tool_basename", so it can be a program name with args.
6661 set dummy $tool_basename; ac_word=$2
6662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6663 $as_echo_n "checking for $ac_word... " >&6; }
6664 if ${ac_cv_path_ECHO+:} false; then :
6665   $as_echo_n "(cached) " >&6
6666 else
6667   case $ECHO in
6668   [\\/]* | ?:[\\/]*)
6669   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6670   ;;
6671   *)
6672   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6673 for as_dir in $PATH
6674 do
6675   IFS=$as_save_IFS
6676   test -z "$as_dir" && as_dir=.
6677     for ac_exec_ext in '' $ac_executable_extensions; do
6678   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6679     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6680     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6681     break 2
6682   fi
6683 done
6684   done
6685 IFS=$as_save_IFS
6686 
6687   ;;
6688 esac
6689 fi
6690 ECHO=$ac_cv_path_ECHO
6691 if test -n "$ECHO"; then
6692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6693 $as_echo "$ECHO" >&6; }
6694 else
6695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6696 $as_echo "no" >&6; }
6697 fi
6698 
6699 
6700         if test "x$ECHO" = x; then
6701           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6702         fi
6703       else
6704         # Otherwise we believe it is a complete path. Use it as it is.
6705         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6706 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6707         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6708 $as_echo_n "checking for ECHO... " >&6; }
6709         if test ! -x "$tool_specified"; then
6710           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6711 $as_echo "not found" >&6; }
6712           as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6713         fi
6714         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6715 $as_echo "$tool_specified" >&6; }
6716       fi
6717     fi
6718   fi
6719 
6720 
6721 
6722   if test "x$ECHO" = x; then
6723     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6724   fi
6725 
6726 
6727 
6728 
6729 
6730   # Publish this variable in the help.
6731 
6732 
6733   if test "x$EXPR" = x; then
6734     # The variable is not set by user, try to locate tool using the code snippet
6735     for ac_prog in expr
6736 do
6737   # Extract the first word of "$ac_prog", so it can be a program name with args.
6738 set dummy $ac_prog; ac_word=$2
6739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6740 $as_echo_n "checking for $ac_word... " >&6; }
6741 if ${ac_cv_path_EXPR+:} false; then :
6742   $as_echo_n "(cached) " >&6
6743 else
6744   case $EXPR in
6745   [\\/]* | ?:[\\/]*)
6746   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6747   ;;
6748   *)
6749   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6750 for as_dir in $PATH
6751 do
6752   IFS=$as_save_IFS
6753   test -z "$as_dir" && as_dir=.
6754     for ac_exec_ext in '' $ac_executable_extensions; do
6755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6756     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6758     break 2
6759   fi
6760 done
6761   done
6762 IFS=$as_save_IFS
6763 
6764   ;;
6765 esac
6766 fi
6767 EXPR=$ac_cv_path_EXPR
6768 if test -n "$EXPR"; then
6769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6770 $as_echo "$EXPR" >&6; }
6771 else
6772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6773 $as_echo "no" >&6; }
6774 fi
6775 
6776 
6777   test -n "$EXPR" && break
6778 done
6779 
6780   else
6781     # The variable is set, but is it from the command line or the environment?
6782 
6783     # Try to remove the string !EXPR! from our list.
6784     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6785     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6786       # If it failed, the variable was not from the command line. Ignore it,
6787       # but warn the user (except for BASH, which is always set by the calling BASH).
6788       if test "xEXPR" != xBASH; then
6789         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6790 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6791       fi
6792       # Try to locate tool using the code snippet
6793       for ac_prog in expr
6794 do
6795   # Extract the first word of "$ac_prog", so it can be a program name with args.
6796 set dummy $ac_prog; ac_word=$2
6797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6798 $as_echo_n "checking for $ac_word... " >&6; }
6799 if ${ac_cv_path_EXPR+:} false; then :
6800   $as_echo_n "(cached) " >&6
6801 else
6802   case $EXPR in
6803   [\\/]* | ?:[\\/]*)
6804   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6805   ;;
6806   *)
6807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6808 for as_dir in $PATH
6809 do
6810   IFS=$as_save_IFS
6811   test -z "$as_dir" && as_dir=.
6812     for ac_exec_ext in '' $ac_executable_extensions; do
6813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6814     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6816     break 2
6817   fi
6818 done
6819   done
6820 IFS=$as_save_IFS
6821 
6822   ;;
6823 esac
6824 fi
6825 EXPR=$ac_cv_path_EXPR
6826 if test -n "$EXPR"; then
6827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6828 $as_echo "$EXPR" >&6; }
6829 else
6830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6831 $as_echo "no" >&6; }
6832 fi
6833 
6834 
6835   test -n "$EXPR" && break
6836 done
6837 
6838     else
6839       # If it succeeded, then it was overridden by the user. We will use it
6840       # for the tool.
6841 
6842       # First remove it from the list of overridden variables, so we can test
6843       # for unknown variables in the end.
6844       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6845 
6846       # Check if the provided tool contains a complete path.
6847       tool_specified="$EXPR"
6848       tool_basename="${tool_specified##*/}"
6849       if test "x$tool_basename" = "x$tool_specified"; then
6850         # A command without a complete path is provided, search $PATH.
6851         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6852 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6853         # Extract the first word of "$tool_basename", so it can be a program name with args.
6854 set dummy $tool_basename; ac_word=$2
6855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6856 $as_echo_n "checking for $ac_word... " >&6; }
6857 if ${ac_cv_path_EXPR+:} false; then :
6858   $as_echo_n "(cached) " >&6
6859 else
6860   case $EXPR in
6861   [\\/]* | ?:[\\/]*)
6862   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6863   ;;
6864   *)
6865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6866 for as_dir in $PATH
6867 do
6868   IFS=$as_save_IFS
6869   test -z "$as_dir" && as_dir=.
6870     for ac_exec_ext in '' $ac_executable_extensions; do
6871   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6872     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6873     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6874     break 2
6875   fi
6876 done
6877   done
6878 IFS=$as_save_IFS
6879 
6880   ;;
6881 esac
6882 fi
6883 EXPR=$ac_cv_path_EXPR
6884 if test -n "$EXPR"; then
6885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6886 $as_echo "$EXPR" >&6; }
6887 else
6888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6889 $as_echo "no" >&6; }
6890 fi
6891 
6892 
6893         if test "x$EXPR" = x; then
6894           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6895         fi
6896       else
6897         # Otherwise we believe it is a complete path. Use it as it is.
6898         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6899 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6900         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6901 $as_echo_n "checking for EXPR... " >&6; }
6902         if test ! -x "$tool_specified"; then
6903           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6904 $as_echo "not found" >&6; }
6905           as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6906         fi
6907         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6908 $as_echo "$tool_specified" >&6; }
6909       fi
6910     fi
6911   fi
6912 
6913 
6914 
6915   if test "x$EXPR" = x; then
6916     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6917   fi
6918 
6919 
6920 
6921 
6922 
6923   # Publish this variable in the help.
6924 
6925 
6926   if test "x$FILE" = x; then
6927     # The variable is not set by user, try to locate tool using the code snippet
6928     for ac_prog in file
6929 do
6930   # Extract the first word of "$ac_prog", so it can be a program name with args.
6931 set dummy $ac_prog; ac_word=$2
6932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6933 $as_echo_n "checking for $ac_word... " >&6; }
6934 if ${ac_cv_path_FILE+:} false; then :
6935   $as_echo_n "(cached) " >&6
6936 else
6937   case $FILE in
6938   [\\/]* | ?:[\\/]*)
6939   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6940   ;;
6941   *)
6942   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6943 for as_dir in $PATH
6944 do
6945   IFS=$as_save_IFS
6946   test -z "$as_dir" && as_dir=.
6947     for ac_exec_ext in '' $ac_executable_extensions; do
6948   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6949     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6950     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6951     break 2
6952   fi
6953 done
6954   done
6955 IFS=$as_save_IFS
6956 
6957   ;;
6958 esac
6959 fi
6960 FILE=$ac_cv_path_FILE
6961 if test -n "$FILE"; then
6962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6963 $as_echo "$FILE" >&6; }
6964 else
6965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6966 $as_echo "no" >&6; }
6967 fi
6968 
6969 
6970   test -n "$FILE" && break
6971 done
6972 
6973   else
6974     # The variable is set, but is it from the command line or the environment?
6975 
6976     # Try to remove the string !FILE! from our list.
6977     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6978     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6979       # If it failed, the variable was not from the command line. Ignore it,
6980       # but warn the user (except for BASH, which is always set by the calling BASH).
6981       if test "xFILE" != xBASH; then
6982         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6983 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6984       fi
6985       # Try to locate tool using the code snippet
6986       for ac_prog in file
6987 do
6988   # Extract the first word of "$ac_prog", so it can be a program name with args.
6989 set dummy $ac_prog; ac_word=$2
6990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6991 $as_echo_n "checking for $ac_word... " >&6; }
6992 if ${ac_cv_path_FILE+:} false; then :
6993   $as_echo_n "(cached) " >&6
6994 else
6995   case $FILE in
6996   [\\/]* | ?:[\\/]*)
6997   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6998   ;;
6999   *)
7000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7001 for as_dir in $PATH
7002 do
7003   IFS=$as_save_IFS
7004   test -z "$as_dir" && as_dir=.
7005     for ac_exec_ext in '' $ac_executable_extensions; do
7006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7007     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7009     break 2
7010   fi
7011 done
7012   done
7013 IFS=$as_save_IFS
7014 
7015   ;;
7016 esac
7017 fi
7018 FILE=$ac_cv_path_FILE
7019 if test -n "$FILE"; then
7020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7021 $as_echo "$FILE" >&6; }
7022 else
7023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7024 $as_echo "no" >&6; }
7025 fi
7026 
7027 
7028   test -n "$FILE" && break
7029 done
7030 
7031     else
7032       # If it succeeded, then it was overridden by the user. We will use it
7033       # for the tool.
7034 
7035       # First remove it from the list of overridden variables, so we can test
7036       # for unknown variables in the end.
7037       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7038 
7039       # Check if the provided tool contains a complete path.
7040       tool_specified="$FILE"
7041       tool_basename="${tool_specified##*/}"
7042       if test "x$tool_basename" = "x$tool_specified"; then
7043         # A command without a complete path is provided, search $PATH.
7044         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7045 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7046         # Extract the first word of "$tool_basename", so it can be a program name with args.
7047 set dummy $tool_basename; ac_word=$2
7048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7049 $as_echo_n "checking for $ac_word... " >&6; }
7050 if ${ac_cv_path_FILE+:} false; then :
7051   $as_echo_n "(cached) " >&6
7052 else
7053   case $FILE in
7054   [\\/]* | ?:[\\/]*)
7055   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7056   ;;
7057   *)
7058   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7059 for as_dir in $PATH
7060 do
7061   IFS=$as_save_IFS
7062   test -z "$as_dir" && as_dir=.
7063     for ac_exec_ext in '' $ac_executable_extensions; do
7064   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7065     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7067     break 2
7068   fi
7069 done
7070   done
7071 IFS=$as_save_IFS
7072 
7073   ;;
7074 esac
7075 fi
7076 FILE=$ac_cv_path_FILE
7077 if test -n "$FILE"; then
7078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7079 $as_echo "$FILE" >&6; }
7080 else
7081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7082 $as_echo "no" >&6; }
7083 fi
7084 
7085 
7086         if test "x$FILE" = x; then
7087           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7088         fi
7089       else
7090         # Otherwise we believe it is a complete path. Use it as it is.
7091         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7092 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7093         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7094 $as_echo_n "checking for FILE... " >&6; }
7095         if test ! -x "$tool_specified"; then
7096           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7097 $as_echo "not found" >&6; }
7098           as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7099         fi
7100         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7101 $as_echo "$tool_specified" >&6; }
7102       fi
7103     fi
7104   fi
7105 
7106 
7107 
7108   if test "x$FILE" = x; then
7109     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7110   fi
7111 
7112 
7113 
7114 
7115 
7116   # Publish this variable in the help.
7117 
7118 
7119   if test "x$FIND" = x; then
7120     # The variable is not set by user, try to locate tool using the code snippet
7121     for ac_prog in find
7122 do
7123   # Extract the first word of "$ac_prog", so it can be a program name with args.
7124 set dummy $ac_prog; ac_word=$2
7125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7126 $as_echo_n "checking for $ac_word... " >&6; }
7127 if ${ac_cv_path_FIND+:} false; then :
7128   $as_echo_n "(cached) " >&6
7129 else
7130   case $FIND in
7131   [\\/]* | ?:[\\/]*)
7132   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7133   ;;
7134   *)
7135   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7136 for as_dir in $PATH
7137 do
7138   IFS=$as_save_IFS
7139   test -z "$as_dir" && as_dir=.
7140     for ac_exec_ext in '' $ac_executable_extensions; do
7141   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7142     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7143     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7144     break 2
7145   fi
7146 done
7147   done
7148 IFS=$as_save_IFS
7149 
7150   ;;
7151 esac
7152 fi
7153 FIND=$ac_cv_path_FIND
7154 if test -n "$FIND"; then
7155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7156 $as_echo "$FIND" >&6; }
7157 else
7158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7159 $as_echo "no" >&6; }
7160 fi
7161 
7162 
7163   test -n "$FIND" && break
7164 done
7165 
7166   else
7167     # The variable is set, but is it from the command line or the environment?
7168 
7169     # Try to remove the string !FIND! from our list.
7170     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7171     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7172       # If it failed, the variable was not from the command line. Ignore it,
7173       # but warn the user (except for BASH, which is always set by the calling BASH).
7174       if test "xFIND" != xBASH; then
7175         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7176 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7177       fi
7178       # Try to locate tool using the code snippet
7179       for ac_prog in find
7180 do
7181   # Extract the first word of "$ac_prog", so it can be a program name with args.
7182 set dummy $ac_prog; ac_word=$2
7183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7184 $as_echo_n "checking for $ac_word... " >&6; }
7185 if ${ac_cv_path_FIND+:} false; then :
7186   $as_echo_n "(cached) " >&6
7187 else
7188   case $FIND in
7189   [\\/]* | ?:[\\/]*)
7190   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7191   ;;
7192   *)
7193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7194 for as_dir in $PATH
7195 do
7196   IFS=$as_save_IFS
7197   test -z "$as_dir" && as_dir=.
7198     for ac_exec_ext in '' $ac_executable_extensions; do
7199   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7200     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7202     break 2
7203   fi
7204 done
7205   done
7206 IFS=$as_save_IFS
7207 
7208   ;;
7209 esac
7210 fi
7211 FIND=$ac_cv_path_FIND
7212 if test -n "$FIND"; then
7213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7214 $as_echo "$FIND" >&6; }
7215 else
7216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7217 $as_echo "no" >&6; }
7218 fi
7219 
7220 
7221   test -n "$FIND" && break
7222 done
7223 
7224     else
7225       # If it succeeded, then it was overridden by the user. We will use it
7226       # for the tool.
7227 
7228       # First remove it from the list of overridden variables, so we can test
7229       # for unknown variables in the end.
7230       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7231 
7232       # Check if the provided tool contains a complete path.
7233       tool_specified="$FIND"
7234       tool_basename="${tool_specified##*/}"
7235       if test "x$tool_basename" = "x$tool_specified"; then
7236         # A command without a complete path is provided, search $PATH.
7237         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7238 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7239         # Extract the first word of "$tool_basename", so it can be a program name with args.
7240 set dummy $tool_basename; ac_word=$2
7241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7242 $as_echo_n "checking for $ac_word... " >&6; }
7243 if ${ac_cv_path_FIND+:} false; then :
7244   $as_echo_n "(cached) " >&6
7245 else
7246   case $FIND in
7247   [\\/]* | ?:[\\/]*)
7248   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7249   ;;
7250   *)
7251   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7252 for as_dir in $PATH
7253 do
7254   IFS=$as_save_IFS
7255   test -z "$as_dir" && as_dir=.
7256     for ac_exec_ext in '' $ac_executable_extensions; do
7257   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7258     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7259     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7260     break 2
7261   fi
7262 done
7263   done
7264 IFS=$as_save_IFS
7265 
7266   ;;
7267 esac
7268 fi
7269 FIND=$ac_cv_path_FIND
7270 if test -n "$FIND"; then
7271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7272 $as_echo "$FIND" >&6; }
7273 else
7274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7275 $as_echo "no" >&6; }
7276 fi
7277 
7278 
7279         if test "x$FIND" = x; then
7280           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7281         fi
7282       else
7283         # Otherwise we believe it is a complete path. Use it as it is.
7284         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7285 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7286         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7287 $as_echo_n "checking for FIND... " >&6; }
7288         if test ! -x "$tool_specified"; then
7289           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7290 $as_echo "not found" >&6; }
7291           as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7292         fi
7293         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7294 $as_echo "$tool_specified" >&6; }
7295       fi
7296     fi
7297   fi
7298 
7299 
7300 
7301   if test "x$FIND" = x; then
7302     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7303   fi
7304 
7305 
7306 
7307 
7308 
7309   # Publish this variable in the help.
7310 
7311 
7312   if test "x$HEAD" = x; then
7313     # The variable is not set by user, try to locate tool using the code snippet
7314     for ac_prog in head
7315 do
7316   # Extract the first word of "$ac_prog", so it can be a program name with args.
7317 set dummy $ac_prog; ac_word=$2
7318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7319 $as_echo_n "checking for $ac_word... " >&6; }
7320 if ${ac_cv_path_HEAD+:} false; then :
7321   $as_echo_n "(cached) " >&6
7322 else
7323   case $HEAD in
7324   [\\/]* | ?:[\\/]*)
7325   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7326   ;;
7327   *)
7328   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7329 for as_dir in $PATH
7330 do
7331   IFS=$as_save_IFS
7332   test -z "$as_dir" && as_dir=.
7333     for ac_exec_ext in '' $ac_executable_extensions; do
7334   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7335     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7336     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7337     break 2
7338   fi
7339 done
7340   done
7341 IFS=$as_save_IFS
7342 
7343   ;;
7344 esac
7345 fi
7346 HEAD=$ac_cv_path_HEAD
7347 if test -n "$HEAD"; then
7348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7349 $as_echo "$HEAD" >&6; }
7350 else
7351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7352 $as_echo "no" >&6; }
7353 fi
7354 
7355 
7356   test -n "$HEAD" && break
7357 done
7358 
7359   else
7360     # The variable is set, but is it from the command line or the environment?
7361 
7362     # Try to remove the string !HEAD! from our list.
7363     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7364     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7365       # If it failed, the variable was not from the command line. Ignore it,
7366       # but warn the user (except for BASH, which is always set by the calling BASH).
7367       if test "xHEAD" != xBASH; then
7368         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7369 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7370       fi
7371       # Try to locate tool using the code snippet
7372       for ac_prog in head
7373 do
7374   # Extract the first word of "$ac_prog", so it can be a program name with args.
7375 set dummy $ac_prog; ac_word=$2
7376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7377 $as_echo_n "checking for $ac_word... " >&6; }
7378 if ${ac_cv_path_HEAD+:} false; then :
7379   $as_echo_n "(cached) " >&6
7380 else
7381   case $HEAD in
7382   [\\/]* | ?:[\\/]*)
7383   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7384   ;;
7385   *)
7386   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7387 for as_dir in $PATH
7388 do
7389   IFS=$as_save_IFS
7390   test -z "$as_dir" && as_dir=.
7391     for ac_exec_ext in '' $ac_executable_extensions; do
7392   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7393     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7394     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7395     break 2
7396   fi
7397 done
7398   done
7399 IFS=$as_save_IFS
7400 
7401   ;;
7402 esac
7403 fi
7404 HEAD=$ac_cv_path_HEAD
7405 if test -n "$HEAD"; then
7406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7407 $as_echo "$HEAD" >&6; }
7408 else
7409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7410 $as_echo "no" >&6; }
7411 fi
7412 
7413 
7414   test -n "$HEAD" && break
7415 done
7416 
7417     else
7418       # If it succeeded, then it was overridden by the user. We will use it
7419       # for the tool.
7420 
7421       # First remove it from the list of overridden variables, so we can test
7422       # for unknown variables in the end.
7423       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7424 
7425       # Check if the provided tool contains a complete path.
7426       tool_specified="$HEAD"
7427       tool_basename="${tool_specified##*/}"
7428       if test "x$tool_basename" = "x$tool_specified"; then
7429         # A command without a complete path is provided, search $PATH.
7430         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7431 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7432         # Extract the first word of "$tool_basename", so it can be a program name with args.
7433 set dummy $tool_basename; ac_word=$2
7434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7435 $as_echo_n "checking for $ac_word... " >&6; }
7436 if ${ac_cv_path_HEAD+:} false; then :
7437   $as_echo_n "(cached) " >&6
7438 else
7439   case $HEAD in
7440   [\\/]* | ?:[\\/]*)
7441   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7442   ;;
7443   *)
7444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7445 for as_dir in $PATH
7446 do
7447   IFS=$as_save_IFS
7448   test -z "$as_dir" && as_dir=.
7449     for ac_exec_ext in '' $ac_executable_extensions; do
7450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7451     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7453     break 2
7454   fi
7455 done
7456   done
7457 IFS=$as_save_IFS
7458 
7459   ;;
7460 esac
7461 fi
7462 HEAD=$ac_cv_path_HEAD
7463 if test -n "$HEAD"; then
7464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7465 $as_echo "$HEAD" >&6; }
7466 else
7467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7468 $as_echo "no" >&6; }
7469 fi
7470 
7471 
7472         if test "x$HEAD" = x; then
7473           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7474         fi
7475       else
7476         # Otherwise we believe it is a complete path. Use it as it is.
7477         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7478 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7479         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7480 $as_echo_n "checking for HEAD... " >&6; }
7481         if test ! -x "$tool_specified"; then
7482           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7483 $as_echo "not found" >&6; }
7484           as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7485         fi
7486         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7487 $as_echo "$tool_specified" >&6; }
7488       fi
7489     fi
7490   fi
7491 
7492 
7493 
7494   if test "x$HEAD" = x; then
7495     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7496   fi
7497 
7498 
7499 
7500 
7501 
7502   # Publish this variable in the help.
7503 
7504 
7505   if test "x$LN" = x; then
7506     # The variable is not set by user, try to locate tool using the code snippet
7507     for ac_prog in ln
7508 do
7509   # Extract the first word of "$ac_prog", so it can be a program name with args.
7510 set dummy $ac_prog; ac_word=$2
7511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7512 $as_echo_n "checking for $ac_word... " >&6; }
7513 if ${ac_cv_path_LN+:} false; then :
7514   $as_echo_n "(cached) " >&6
7515 else
7516   case $LN in
7517   [\\/]* | ?:[\\/]*)
7518   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7519   ;;
7520   *)
7521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7522 for as_dir in $PATH
7523 do
7524   IFS=$as_save_IFS
7525   test -z "$as_dir" && as_dir=.
7526     for ac_exec_ext in '' $ac_executable_extensions; do
7527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7528     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7530     break 2
7531   fi
7532 done
7533   done
7534 IFS=$as_save_IFS
7535 
7536   ;;
7537 esac
7538 fi
7539 LN=$ac_cv_path_LN
7540 if test -n "$LN"; then
7541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7542 $as_echo "$LN" >&6; }
7543 else
7544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7545 $as_echo "no" >&6; }
7546 fi
7547 
7548 
7549   test -n "$LN" && break
7550 done
7551 
7552   else
7553     # The variable is set, but is it from the command line or the environment?
7554 
7555     # Try to remove the string !LN! from our list.
7556     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7557     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7558       # If it failed, the variable was not from the command line. Ignore it,
7559       # but warn the user (except for BASH, which is always set by the calling BASH).
7560       if test "xLN" != xBASH; then
7561         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7562 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7563       fi
7564       # Try to locate tool using the code snippet
7565       for ac_prog in ln
7566 do
7567   # Extract the first word of "$ac_prog", so it can be a program name with args.
7568 set dummy $ac_prog; ac_word=$2
7569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7570 $as_echo_n "checking for $ac_word... " >&6; }
7571 if ${ac_cv_path_LN+:} false; then :
7572   $as_echo_n "(cached) " >&6
7573 else
7574   case $LN in
7575   [\\/]* | ?:[\\/]*)
7576   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7577   ;;
7578   *)
7579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7580 for as_dir in $PATH
7581 do
7582   IFS=$as_save_IFS
7583   test -z "$as_dir" && as_dir=.
7584     for ac_exec_ext in '' $ac_executable_extensions; do
7585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7586     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7588     break 2
7589   fi
7590 done
7591   done
7592 IFS=$as_save_IFS
7593 
7594   ;;
7595 esac
7596 fi
7597 LN=$ac_cv_path_LN
7598 if test -n "$LN"; then
7599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7600 $as_echo "$LN" >&6; }
7601 else
7602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7603 $as_echo "no" >&6; }
7604 fi
7605 
7606 
7607   test -n "$LN" && break
7608 done
7609 
7610     else
7611       # If it succeeded, then it was overridden by the user. We will use it
7612       # for the tool.
7613 
7614       # First remove it from the list of overridden variables, so we can test
7615       # for unknown variables in the end.
7616       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7617 
7618       # Check if the provided tool contains a complete path.
7619       tool_specified="$LN"
7620       tool_basename="${tool_specified##*/}"
7621       if test "x$tool_basename" = "x$tool_specified"; then
7622         # A command without a complete path is provided, search $PATH.
7623         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7624 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7625         # Extract the first word of "$tool_basename", so it can be a program name with args.
7626 set dummy $tool_basename; ac_word=$2
7627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7628 $as_echo_n "checking for $ac_word... " >&6; }
7629 if ${ac_cv_path_LN+:} false; then :
7630   $as_echo_n "(cached) " >&6
7631 else
7632   case $LN in
7633   [\\/]* | ?:[\\/]*)
7634   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7635   ;;
7636   *)
7637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7638 for as_dir in $PATH
7639 do
7640   IFS=$as_save_IFS
7641   test -z "$as_dir" && as_dir=.
7642     for ac_exec_ext in '' $ac_executable_extensions; do
7643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7644     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7646     break 2
7647   fi
7648 done
7649   done
7650 IFS=$as_save_IFS
7651 
7652   ;;
7653 esac
7654 fi
7655 LN=$ac_cv_path_LN
7656 if test -n "$LN"; then
7657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7658 $as_echo "$LN" >&6; }
7659 else
7660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7661 $as_echo "no" >&6; }
7662 fi
7663 
7664 
7665         if test "x$LN" = x; then
7666           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7667         fi
7668       else
7669         # Otherwise we believe it is a complete path. Use it as it is.
7670         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7671 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7672         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7673 $as_echo_n "checking for LN... " >&6; }
7674         if test ! -x "$tool_specified"; then
7675           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7676 $as_echo "not found" >&6; }
7677           as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7678         fi
7679         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7680 $as_echo "$tool_specified" >&6; }
7681       fi
7682     fi
7683   fi
7684 
7685 
7686 
7687   if test "x$LN" = x; then
7688     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7689   fi
7690 
7691 
7692 
7693 
7694 
7695   # Publish this variable in the help.
7696 
7697 
7698   if test "x$LS" = x; then
7699     # The variable is not set by user, try to locate tool using the code snippet
7700     for ac_prog in ls
7701 do
7702   # Extract the first word of "$ac_prog", so it can be a program name with args.
7703 set dummy $ac_prog; ac_word=$2
7704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7705 $as_echo_n "checking for $ac_word... " >&6; }
7706 if ${ac_cv_path_LS+:} false; then :
7707   $as_echo_n "(cached) " >&6
7708 else
7709   case $LS in
7710   [\\/]* | ?:[\\/]*)
7711   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7712   ;;
7713   *)
7714   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7715 for as_dir in $PATH
7716 do
7717   IFS=$as_save_IFS
7718   test -z "$as_dir" && as_dir=.
7719     for ac_exec_ext in '' $ac_executable_extensions; do
7720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7721     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7723     break 2
7724   fi
7725 done
7726   done
7727 IFS=$as_save_IFS
7728 
7729   ;;
7730 esac
7731 fi
7732 LS=$ac_cv_path_LS
7733 if test -n "$LS"; then
7734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7735 $as_echo "$LS" >&6; }
7736 else
7737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7738 $as_echo "no" >&6; }
7739 fi
7740 
7741 
7742   test -n "$LS" && break
7743 done
7744 
7745   else
7746     # The variable is set, but is it from the command line or the environment?
7747 
7748     # Try to remove the string !LS! from our list.
7749     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7750     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7751       # If it failed, the variable was not from the command line. Ignore it,
7752       # but warn the user (except for BASH, which is always set by the calling BASH).
7753       if test "xLS" != xBASH; then
7754         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7755 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7756       fi
7757       # Try to locate tool using the code snippet
7758       for ac_prog in ls
7759 do
7760   # Extract the first word of "$ac_prog", so it can be a program name with args.
7761 set dummy $ac_prog; ac_word=$2
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7763 $as_echo_n "checking for $ac_word... " >&6; }
7764 if ${ac_cv_path_LS+:} false; then :
7765   $as_echo_n "(cached) " >&6
7766 else
7767   case $LS in
7768   [\\/]* | ?:[\\/]*)
7769   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7770   ;;
7771   *)
7772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7773 for as_dir in $PATH
7774 do
7775   IFS=$as_save_IFS
7776   test -z "$as_dir" && as_dir=.
7777     for ac_exec_ext in '' $ac_executable_extensions; do
7778   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7779     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7780     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7781     break 2
7782   fi
7783 done
7784   done
7785 IFS=$as_save_IFS
7786 
7787   ;;
7788 esac
7789 fi
7790 LS=$ac_cv_path_LS
7791 if test -n "$LS"; then
7792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7793 $as_echo "$LS" >&6; }
7794 else
7795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7796 $as_echo "no" >&6; }
7797 fi
7798 
7799 
7800   test -n "$LS" && break
7801 done
7802 
7803     else
7804       # If it succeeded, then it was overridden by the user. We will use it
7805       # for the tool.
7806 
7807       # First remove it from the list of overridden variables, so we can test
7808       # for unknown variables in the end.
7809       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7810 
7811       # Check if the provided tool contains a complete path.
7812       tool_specified="$LS"
7813       tool_basename="${tool_specified##*/}"
7814       if test "x$tool_basename" = "x$tool_specified"; then
7815         # A command without a complete path is provided, search $PATH.
7816         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7817 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7818         # Extract the first word of "$tool_basename", so it can be a program name with args.
7819 set dummy $tool_basename; ac_word=$2
7820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7821 $as_echo_n "checking for $ac_word... " >&6; }
7822 if ${ac_cv_path_LS+:} false; then :
7823   $as_echo_n "(cached) " >&6
7824 else
7825   case $LS in
7826   [\\/]* | ?:[\\/]*)
7827   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7828   ;;
7829   *)
7830   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7831 for as_dir in $PATH
7832 do
7833   IFS=$as_save_IFS
7834   test -z "$as_dir" && as_dir=.
7835     for ac_exec_ext in '' $ac_executable_extensions; do
7836   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7837     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7838     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7839     break 2
7840   fi
7841 done
7842   done
7843 IFS=$as_save_IFS
7844 
7845   ;;
7846 esac
7847 fi
7848 LS=$ac_cv_path_LS
7849 if test -n "$LS"; then
7850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7851 $as_echo "$LS" >&6; }
7852 else
7853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7854 $as_echo "no" >&6; }
7855 fi
7856 
7857 
7858         if test "x$LS" = x; then
7859           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7860         fi
7861       else
7862         # Otherwise we believe it is a complete path. Use it as it is.
7863         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7864 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7865         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7866 $as_echo_n "checking for LS... " >&6; }
7867         if test ! -x "$tool_specified"; then
7868           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7869 $as_echo "not found" >&6; }
7870           as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7871         fi
7872         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7873 $as_echo "$tool_specified" >&6; }
7874       fi
7875     fi
7876   fi
7877 
7878 
7879 
7880   if test "x$LS" = x; then
7881     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7882   fi
7883 
7884 
7885 
7886 
7887 
7888   # Publish this variable in the help.
7889 
7890 
7891   if test "x$MKDIR" = x; then
7892     # The variable is not set by user, try to locate tool using the code snippet
7893     for ac_prog in mkdir
7894 do
7895   # Extract the first word of "$ac_prog", so it can be a program name with args.
7896 set dummy $ac_prog; ac_word=$2
7897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7898 $as_echo_n "checking for $ac_word... " >&6; }
7899 if ${ac_cv_path_MKDIR+:} false; then :
7900   $as_echo_n "(cached) " >&6
7901 else
7902   case $MKDIR in
7903   [\\/]* | ?:[\\/]*)
7904   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7905   ;;
7906   *)
7907   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7908 for as_dir in $PATH
7909 do
7910   IFS=$as_save_IFS
7911   test -z "$as_dir" && as_dir=.
7912     for ac_exec_ext in '' $ac_executable_extensions; do
7913   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7914     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7915     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7916     break 2
7917   fi
7918 done
7919   done
7920 IFS=$as_save_IFS
7921 
7922   ;;
7923 esac
7924 fi
7925 MKDIR=$ac_cv_path_MKDIR
7926 if test -n "$MKDIR"; then
7927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7928 $as_echo "$MKDIR" >&6; }
7929 else
7930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7931 $as_echo "no" >&6; }
7932 fi
7933 
7934 
7935   test -n "$MKDIR" && break
7936 done
7937 
7938   else
7939     # The variable is set, but is it from the command line or the environment?
7940 
7941     # Try to remove the string !MKDIR! from our list.
7942     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7943     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7944       # If it failed, the variable was not from the command line. Ignore it,
7945       # but warn the user (except for BASH, which is always set by the calling BASH).
7946       if test "xMKDIR" != xBASH; then
7947         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7948 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7949       fi
7950       # Try to locate tool using the code snippet
7951       for ac_prog in mkdir
7952 do
7953   # Extract the first word of "$ac_prog", so it can be a program name with args.
7954 set dummy $ac_prog; ac_word=$2
7955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7956 $as_echo_n "checking for $ac_word... " >&6; }
7957 if ${ac_cv_path_MKDIR+:} false; then :
7958   $as_echo_n "(cached) " >&6
7959 else
7960   case $MKDIR in
7961   [\\/]* | ?:[\\/]*)
7962   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7963   ;;
7964   *)
7965   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7966 for as_dir in $PATH
7967 do
7968   IFS=$as_save_IFS
7969   test -z "$as_dir" && as_dir=.
7970     for ac_exec_ext in '' $ac_executable_extensions; do
7971   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7972     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7974     break 2
7975   fi
7976 done
7977   done
7978 IFS=$as_save_IFS
7979 
7980   ;;
7981 esac
7982 fi
7983 MKDIR=$ac_cv_path_MKDIR
7984 if test -n "$MKDIR"; then
7985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7986 $as_echo "$MKDIR" >&6; }
7987 else
7988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7989 $as_echo "no" >&6; }
7990 fi
7991 
7992 
7993   test -n "$MKDIR" && break
7994 done
7995 
7996     else
7997       # If it succeeded, then it was overridden by the user. We will use it
7998       # for the tool.
7999 
8000       # First remove it from the list of overridden variables, so we can test
8001       # for unknown variables in the end.
8002       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8003 
8004       # Check if the provided tool contains a complete path.
8005       tool_specified="$MKDIR"
8006       tool_basename="${tool_specified##*/}"
8007       if test "x$tool_basename" = "x$tool_specified"; then
8008         # A command without a complete path is provided, search $PATH.
8009         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8010 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8011         # Extract the first word of "$tool_basename", so it can be a program name with args.
8012 set dummy $tool_basename; ac_word=$2
8013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8014 $as_echo_n "checking for $ac_word... " >&6; }
8015 if ${ac_cv_path_MKDIR+:} false; then :
8016   $as_echo_n "(cached) " >&6
8017 else
8018   case $MKDIR in
8019   [\\/]* | ?:[\\/]*)
8020   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8021   ;;
8022   *)
8023   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8024 for as_dir in $PATH
8025 do
8026   IFS=$as_save_IFS
8027   test -z "$as_dir" && as_dir=.
8028     for ac_exec_ext in '' $ac_executable_extensions; do
8029   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8030     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8032     break 2
8033   fi
8034 done
8035   done
8036 IFS=$as_save_IFS
8037 
8038   ;;
8039 esac
8040 fi
8041 MKDIR=$ac_cv_path_MKDIR
8042 if test -n "$MKDIR"; then
8043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8044 $as_echo "$MKDIR" >&6; }
8045 else
8046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8047 $as_echo "no" >&6; }
8048 fi
8049 
8050 
8051         if test "x$MKDIR" = x; then
8052           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8053         fi
8054       else
8055         # Otherwise we believe it is a complete path. Use it as it is.
8056         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8057 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8058         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8059 $as_echo_n "checking for MKDIR... " >&6; }
8060         if test ! -x "$tool_specified"; then
8061           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8062 $as_echo "not found" >&6; }
8063           as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8064         fi
8065         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8066 $as_echo "$tool_specified" >&6; }
8067       fi
8068     fi
8069   fi
8070 
8071 
8072 
8073   if test "x$MKDIR" = x; then
8074     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8075   fi
8076 
8077 
8078 
8079 
8080 
8081   # Publish this variable in the help.
8082 
8083 
8084   if test "x$MKTEMP" = x; then
8085     # The variable is not set by user, try to locate tool using the code snippet
8086     for ac_prog in mktemp
8087 do
8088   # Extract the first word of "$ac_prog", so it can be a program name with args.
8089 set dummy $ac_prog; ac_word=$2
8090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8091 $as_echo_n "checking for $ac_word... " >&6; }
8092 if ${ac_cv_path_MKTEMP+:} false; then :
8093   $as_echo_n "(cached) " >&6
8094 else
8095   case $MKTEMP in
8096   [\\/]* | ?:[\\/]*)
8097   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8098   ;;
8099   *)
8100   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8101 for as_dir in $PATH
8102 do
8103   IFS=$as_save_IFS
8104   test -z "$as_dir" && as_dir=.
8105     for ac_exec_ext in '' $ac_executable_extensions; do
8106   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8107     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8108     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8109     break 2
8110   fi
8111 done
8112   done
8113 IFS=$as_save_IFS
8114 
8115   ;;
8116 esac
8117 fi
8118 MKTEMP=$ac_cv_path_MKTEMP
8119 if test -n "$MKTEMP"; then
8120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8121 $as_echo "$MKTEMP" >&6; }
8122 else
8123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8124 $as_echo "no" >&6; }
8125 fi
8126 
8127 
8128   test -n "$MKTEMP" && break
8129 done
8130 
8131   else
8132     # The variable is set, but is it from the command line or the environment?
8133 
8134     # Try to remove the string !MKTEMP! from our list.
8135     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8136     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8137       # If it failed, the variable was not from the command line. Ignore it,
8138       # but warn the user (except for BASH, which is always set by the calling BASH).
8139       if test "xMKTEMP" != xBASH; then
8140         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8141 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8142       fi
8143       # Try to locate tool using the code snippet
8144       for ac_prog in mktemp
8145 do
8146   # Extract the first word of "$ac_prog", so it can be a program name with args.
8147 set dummy $ac_prog; ac_word=$2
8148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8149 $as_echo_n "checking for $ac_word... " >&6; }
8150 if ${ac_cv_path_MKTEMP+:} false; then :
8151   $as_echo_n "(cached) " >&6
8152 else
8153   case $MKTEMP in
8154   [\\/]* | ?:[\\/]*)
8155   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8156   ;;
8157   *)
8158   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8159 for as_dir in $PATH
8160 do
8161   IFS=$as_save_IFS
8162   test -z "$as_dir" && as_dir=.
8163     for ac_exec_ext in '' $ac_executable_extensions; do
8164   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8165     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8166     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8167     break 2
8168   fi
8169 done
8170   done
8171 IFS=$as_save_IFS
8172 
8173   ;;
8174 esac
8175 fi
8176 MKTEMP=$ac_cv_path_MKTEMP
8177 if test -n "$MKTEMP"; then
8178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8179 $as_echo "$MKTEMP" >&6; }
8180 else
8181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8182 $as_echo "no" >&6; }
8183 fi
8184 
8185 
8186   test -n "$MKTEMP" && break
8187 done
8188 
8189     else
8190       # If it succeeded, then it was overridden by the user. We will use it
8191       # for the tool.
8192 
8193       # First remove it from the list of overridden variables, so we can test
8194       # for unknown variables in the end.
8195       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8196 
8197       # Check if the provided tool contains a complete path.
8198       tool_specified="$MKTEMP"
8199       tool_basename="${tool_specified##*/}"
8200       if test "x$tool_basename" = "x$tool_specified"; then
8201         # A command without a complete path is provided, search $PATH.
8202         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8203 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8204         # Extract the first word of "$tool_basename", so it can be a program name with args.
8205 set dummy $tool_basename; ac_word=$2
8206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8207 $as_echo_n "checking for $ac_word... " >&6; }
8208 if ${ac_cv_path_MKTEMP+:} false; then :
8209   $as_echo_n "(cached) " >&6
8210 else
8211   case $MKTEMP in
8212   [\\/]* | ?:[\\/]*)
8213   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8214   ;;
8215   *)
8216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8217 for as_dir in $PATH
8218 do
8219   IFS=$as_save_IFS
8220   test -z "$as_dir" && as_dir=.
8221     for ac_exec_ext in '' $ac_executable_extensions; do
8222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8223     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8225     break 2
8226   fi
8227 done
8228   done
8229 IFS=$as_save_IFS
8230 
8231   ;;
8232 esac
8233 fi
8234 MKTEMP=$ac_cv_path_MKTEMP
8235 if test -n "$MKTEMP"; then
8236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8237 $as_echo "$MKTEMP" >&6; }
8238 else
8239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8240 $as_echo "no" >&6; }
8241 fi
8242 
8243 
8244         if test "x$MKTEMP" = x; then
8245           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8246         fi
8247       else
8248         # Otherwise we believe it is a complete path. Use it as it is.
8249         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8250 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8251         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8252 $as_echo_n "checking for MKTEMP... " >&6; }
8253         if test ! -x "$tool_specified"; then
8254           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8255 $as_echo "not found" >&6; }
8256           as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8257         fi
8258         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8259 $as_echo "$tool_specified" >&6; }
8260       fi
8261     fi
8262   fi
8263 
8264 
8265 
8266   if test "x$MKTEMP" = x; then
8267     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8268   fi
8269 
8270 
8271 
8272 
8273 
8274   # Publish this variable in the help.
8275 
8276 
8277   if test "x$MV" = x; then
8278     # The variable is not set by user, try to locate tool using the code snippet
8279     for ac_prog in mv
8280 do
8281   # Extract the first word of "$ac_prog", so it can be a program name with args.
8282 set dummy $ac_prog; ac_word=$2
8283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8284 $as_echo_n "checking for $ac_word... " >&6; }
8285 if ${ac_cv_path_MV+:} false; then :
8286   $as_echo_n "(cached) " >&6
8287 else
8288   case $MV in
8289   [\\/]* | ?:[\\/]*)
8290   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8291   ;;
8292   *)
8293   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8294 for as_dir in $PATH
8295 do
8296   IFS=$as_save_IFS
8297   test -z "$as_dir" && as_dir=.
8298     for ac_exec_ext in '' $ac_executable_extensions; do
8299   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8300     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8301     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8302     break 2
8303   fi
8304 done
8305   done
8306 IFS=$as_save_IFS
8307 
8308   ;;
8309 esac
8310 fi
8311 MV=$ac_cv_path_MV
8312 if test -n "$MV"; then
8313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8314 $as_echo "$MV" >&6; }
8315 else
8316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8317 $as_echo "no" >&6; }
8318 fi
8319 
8320 
8321   test -n "$MV" && break
8322 done
8323 
8324   else
8325     # The variable is set, but is it from the command line or the environment?
8326 
8327     # Try to remove the string !MV! from our list.
8328     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8329     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8330       # If it failed, the variable was not from the command line. Ignore it,
8331       # but warn the user (except for BASH, which is always set by the calling BASH).
8332       if test "xMV" != xBASH; then
8333         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8334 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8335       fi
8336       # Try to locate tool using the code snippet
8337       for ac_prog in mv
8338 do
8339   # Extract the first word of "$ac_prog", so it can be a program name with args.
8340 set dummy $ac_prog; ac_word=$2
8341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8342 $as_echo_n "checking for $ac_word... " >&6; }
8343 if ${ac_cv_path_MV+:} false; then :
8344   $as_echo_n "(cached) " >&6
8345 else
8346   case $MV in
8347   [\\/]* | ?:[\\/]*)
8348   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8349   ;;
8350   *)
8351   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8352 for as_dir in $PATH
8353 do
8354   IFS=$as_save_IFS
8355   test -z "$as_dir" && as_dir=.
8356     for ac_exec_ext in '' $ac_executable_extensions; do
8357   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8358     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8359     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8360     break 2
8361   fi
8362 done
8363   done
8364 IFS=$as_save_IFS
8365 
8366   ;;
8367 esac
8368 fi
8369 MV=$ac_cv_path_MV
8370 if test -n "$MV"; then
8371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8372 $as_echo "$MV" >&6; }
8373 else
8374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8375 $as_echo "no" >&6; }
8376 fi
8377 
8378 
8379   test -n "$MV" && break
8380 done
8381 
8382     else
8383       # If it succeeded, then it was overridden by the user. We will use it
8384       # for the tool.
8385 
8386       # First remove it from the list of overridden variables, so we can test
8387       # for unknown variables in the end.
8388       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8389 
8390       # Check if the provided tool contains a complete path.
8391       tool_specified="$MV"
8392       tool_basename="${tool_specified##*/}"
8393       if test "x$tool_basename" = "x$tool_specified"; then
8394         # A command without a complete path is provided, search $PATH.
8395         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8396 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8397         # Extract the first word of "$tool_basename", so it can be a program name with args.
8398 set dummy $tool_basename; ac_word=$2
8399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8400 $as_echo_n "checking for $ac_word... " >&6; }
8401 if ${ac_cv_path_MV+:} false; then :
8402   $as_echo_n "(cached) " >&6
8403 else
8404   case $MV in
8405   [\\/]* | ?:[\\/]*)
8406   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8407   ;;
8408   *)
8409   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8410 for as_dir in $PATH
8411 do
8412   IFS=$as_save_IFS
8413   test -z "$as_dir" && as_dir=.
8414     for ac_exec_ext in '' $ac_executable_extensions; do
8415   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8416     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8417     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8418     break 2
8419   fi
8420 done
8421   done
8422 IFS=$as_save_IFS
8423 
8424   ;;
8425 esac
8426 fi
8427 MV=$ac_cv_path_MV
8428 if test -n "$MV"; then
8429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8430 $as_echo "$MV" >&6; }
8431 else
8432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8433 $as_echo "no" >&6; }
8434 fi
8435 
8436 
8437         if test "x$MV" = x; then
8438           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8439         fi
8440       else
8441         # Otherwise we believe it is a complete path. Use it as it is.
8442         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8443 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8444         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8445 $as_echo_n "checking for MV... " >&6; }
8446         if test ! -x "$tool_specified"; then
8447           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8448 $as_echo "not found" >&6; }
8449           as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8450         fi
8451         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8452 $as_echo "$tool_specified" >&6; }
8453       fi
8454     fi
8455   fi
8456 
8457 
8458 
8459   if test "x$MV" = x; then
8460     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8461   fi
8462 
8463 
8464 
8465 
8466 
8467   # Publish this variable in the help.
8468 
8469 
8470   if test "x$NAWK" = x; then
8471     # The variable is not set by user, try to locate tool using the code snippet
8472     for ac_prog in nawk gawk awk
8473 do
8474   # Extract the first word of "$ac_prog", so it can be a program name with args.
8475 set dummy $ac_prog; ac_word=$2
8476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8477 $as_echo_n "checking for $ac_word... " >&6; }
8478 if ${ac_cv_path_NAWK+:} false; then :
8479   $as_echo_n "(cached) " >&6
8480 else
8481   case $NAWK in
8482   [\\/]* | ?:[\\/]*)
8483   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8484   ;;
8485   *)
8486   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8487 for as_dir in $PATH
8488 do
8489   IFS=$as_save_IFS
8490   test -z "$as_dir" && as_dir=.
8491     for ac_exec_ext in '' $ac_executable_extensions; do
8492   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8493     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8494     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8495     break 2
8496   fi
8497 done
8498   done
8499 IFS=$as_save_IFS
8500 
8501   ;;
8502 esac
8503 fi
8504 NAWK=$ac_cv_path_NAWK
8505 if test -n "$NAWK"; then
8506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8507 $as_echo "$NAWK" >&6; }
8508 else
8509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8510 $as_echo "no" >&6; }
8511 fi
8512 
8513 
8514   test -n "$NAWK" && break
8515 done
8516 
8517   else
8518     # The variable is set, but is it from the command line or the environment?
8519 
8520     # Try to remove the string !NAWK! from our list.
8521     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8522     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8523       # If it failed, the variable was not from the command line. Ignore it,
8524       # but warn the user (except for BASH, which is always set by the calling BASH).
8525       if test "xNAWK" != xBASH; then
8526         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8527 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8528       fi
8529       # Try to locate tool using the code snippet
8530       for ac_prog in nawk gawk awk
8531 do
8532   # Extract the first word of "$ac_prog", so it can be a program name with args.
8533 set dummy $ac_prog; ac_word=$2
8534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8535 $as_echo_n "checking for $ac_word... " >&6; }
8536 if ${ac_cv_path_NAWK+:} false; then :
8537   $as_echo_n "(cached) " >&6
8538 else
8539   case $NAWK in
8540   [\\/]* | ?:[\\/]*)
8541   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8542   ;;
8543   *)
8544   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8545 for as_dir in $PATH
8546 do
8547   IFS=$as_save_IFS
8548   test -z "$as_dir" && as_dir=.
8549     for ac_exec_ext in '' $ac_executable_extensions; do
8550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8551     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8553     break 2
8554   fi
8555 done
8556   done
8557 IFS=$as_save_IFS
8558 
8559   ;;
8560 esac
8561 fi
8562 NAWK=$ac_cv_path_NAWK
8563 if test -n "$NAWK"; then
8564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8565 $as_echo "$NAWK" >&6; }
8566 else
8567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8568 $as_echo "no" >&6; }
8569 fi
8570 
8571 
8572   test -n "$NAWK" && break
8573 done
8574 
8575     else
8576       # If it succeeded, then it was overridden by the user. We will use it
8577       # for the tool.
8578 
8579       # First remove it from the list of overridden variables, so we can test
8580       # for unknown variables in the end.
8581       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8582 
8583       # Check if the provided tool contains a complete path.
8584       tool_specified="$NAWK"
8585       tool_basename="${tool_specified##*/}"
8586       if test "x$tool_basename" = "x$tool_specified"; then
8587         # A command without a complete path is provided, search $PATH.
8588         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8589 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8590         # Extract the first word of "$tool_basename", so it can be a program name with args.
8591 set dummy $tool_basename; ac_word=$2
8592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8593 $as_echo_n "checking for $ac_word... " >&6; }
8594 if ${ac_cv_path_NAWK+:} false; then :
8595   $as_echo_n "(cached) " >&6
8596 else
8597   case $NAWK in
8598   [\\/]* | ?:[\\/]*)
8599   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8600   ;;
8601   *)
8602   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8603 for as_dir in $PATH
8604 do
8605   IFS=$as_save_IFS
8606   test -z "$as_dir" && as_dir=.
8607     for ac_exec_ext in '' $ac_executable_extensions; do
8608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8609     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8611     break 2
8612   fi
8613 done
8614   done
8615 IFS=$as_save_IFS
8616 
8617   ;;
8618 esac
8619 fi
8620 NAWK=$ac_cv_path_NAWK
8621 if test -n "$NAWK"; then
8622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8623 $as_echo "$NAWK" >&6; }
8624 else
8625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8626 $as_echo "no" >&6; }
8627 fi
8628 
8629 
8630         if test "x$NAWK" = x; then
8631           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8632         fi
8633       else
8634         # Otherwise we believe it is a complete path. Use it as it is.
8635         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8636 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8637         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8638 $as_echo_n "checking for NAWK... " >&6; }
8639         if test ! -x "$tool_specified"; then
8640           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8641 $as_echo "not found" >&6; }
8642           as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8643         fi
8644         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8645 $as_echo "$tool_specified" >&6; }
8646       fi
8647     fi
8648   fi
8649 
8650 
8651 
8652   if test "x$NAWK" = x; then
8653     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8654   fi
8655 
8656 
8657 
8658 
8659 
8660   # Publish this variable in the help.
8661 
8662 
8663   if test "x$PRINTF" = x; then
8664     # The variable is not set by user, try to locate tool using the code snippet
8665     for ac_prog in printf
8666 do
8667   # Extract the first word of "$ac_prog", so it can be a program name with args.
8668 set dummy $ac_prog; ac_word=$2
8669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8670 $as_echo_n "checking for $ac_word... " >&6; }
8671 if ${ac_cv_path_PRINTF+:} false; then :
8672   $as_echo_n "(cached) " >&6
8673 else
8674   case $PRINTF in
8675   [\\/]* | ?:[\\/]*)
8676   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8677   ;;
8678   *)
8679   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8680 for as_dir in $PATH
8681 do
8682   IFS=$as_save_IFS
8683   test -z "$as_dir" && as_dir=.
8684     for ac_exec_ext in '' $ac_executable_extensions; do
8685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8686     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8688     break 2
8689   fi
8690 done
8691   done
8692 IFS=$as_save_IFS
8693 
8694   ;;
8695 esac
8696 fi
8697 PRINTF=$ac_cv_path_PRINTF
8698 if test -n "$PRINTF"; then
8699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8700 $as_echo "$PRINTF" >&6; }
8701 else
8702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8703 $as_echo "no" >&6; }
8704 fi
8705 
8706 
8707   test -n "$PRINTF" && break
8708 done
8709 
8710   else
8711     # The variable is set, but is it from the command line or the environment?
8712 
8713     # Try to remove the string !PRINTF! from our list.
8714     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8715     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8716       # If it failed, the variable was not from the command line. Ignore it,
8717       # but warn the user (except for BASH, which is always set by the calling BASH).
8718       if test "xPRINTF" != xBASH; then
8719         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8720 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8721       fi
8722       # Try to locate tool using the code snippet
8723       for ac_prog in printf
8724 do
8725   # Extract the first word of "$ac_prog", so it can be a program name with args.
8726 set dummy $ac_prog; ac_word=$2
8727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8728 $as_echo_n "checking for $ac_word... " >&6; }
8729 if ${ac_cv_path_PRINTF+:} false; then :
8730   $as_echo_n "(cached) " >&6
8731 else
8732   case $PRINTF in
8733   [\\/]* | ?:[\\/]*)
8734   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8735   ;;
8736   *)
8737   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8738 for as_dir in $PATH
8739 do
8740   IFS=$as_save_IFS
8741   test -z "$as_dir" && as_dir=.
8742     for ac_exec_ext in '' $ac_executable_extensions; do
8743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8744     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8746     break 2
8747   fi
8748 done
8749   done
8750 IFS=$as_save_IFS
8751 
8752   ;;
8753 esac
8754 fi
8755 PRINTF=$ac_cv_path_PRINTF
8756 if test -n "$PRINTF"; then
8757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8758 $as_echo "$PRINTF" >&6; }
8759 else
8760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8761 $as_echo "no" >&6; }
8762 fi
8763 
8764 
8765   test -n "$PRINTF" && break
8766 done
8767 
8768     else
8769       # If it succeeded, then it was overridden by the user. We will use it
8770       # for the tool.
8771 
8772       # First remove it from the list of overridden variables, so we can test
8773       # for unknown variables in the end.
8774       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8775 
8776       # Check if the provided tool contains a complete path.
8777       tool_specified="$PRINTF"
8778       tool_basename="${tool_specified##*/}"
8779       if test "x$tool_basename" = "x$tool_specified"; then
8780         # A command without a complete path is provided, search $PATH.
8781         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8782 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8783         # Extract the first word of "$tool_basename", so it can be a program name with args.
8784 set dummy $tool_basename; ac_word=$2
8785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8786 $as_echo_n "checking for $ac_word... " >&6; }
8787 if ${ac_cv_path_PRINTF+:} false; then :
8788   $as_echo_n "(cached) " >&6
8789 else
8790   case $PRINTF in
8791   [\\/]* | ?:[\\/]*)
8792   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8793   ;;
8794   *)
8795   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8796 for as_dir in $PATH
8797 do
8798   IFS=$as_save_IFS
8799   test -z "$as_dir" && as_dir=.
8800     for ac_exec_ext in '' $ac_executable_extensions; do
8801   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8802     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8803     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8804     break 2
8805   fi
8806 done
8807   done
8808 IFS=$as_save_IFS
8809 
8810   ;;
8811 esac
8812 fi
8813 PRINTF=$ac_cv_path_PRINTF
8814 if test -n "$PRINTF"; then
8815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8816 $as_echo "$PRINTF" >&6; }
8817 else
8818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8819 $as_echo "no" >&6; }
8820 fi
8821 
8822 
8823         if test "x$PRINTF" = x; then
8824           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8825         fi
8826       else
8827         # Otherwise we believe it is a complete path. Use it as it is.
8828         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8829 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8830         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8831 $as_echo_n "checking for PRINTF... " >&6; }
8832         if test ! -x "$tool_specified"; then
8833           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8834 $as_echo "not found" >&6; }
8835           as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8836         fi
8837         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8838 $as_echo "$tool_specified" >&6; }
8839       fi
8840     fi
8841   fi
8842 
8843 
8844 
8845   if test "x$PRINTF" = x; then
8846     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8847   fi
8848 
8849 
8850 
8851 
8852 
8853   # Publish this variable in the help.
8854 
8855 
8856   if test "x$RM" = x; then
8857     # The variable is not set by user, try to locate tool using the code snippet
8858     for ac_prog in rm
8859 do
8860   # Extract the first word of "$ac_prog", so it can be a program name with args.
8861 set dummy $ac_prog; ac_word=$2
8862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8863 $as_echo_n "checking for $ac_word... " >&6; }
8864 if ${ac_cv_path_RM+:} false; then :
8865   $as_echo_n "(cached) " >&6
8866 else
8867   case $RM in
8868   [\\/]* | ?:[\\/]*)
8869   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8870   ;;
8871   *)
8872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8873 for as_dir in $PATH
8874 do
8875   IFS=$as_save_IFS
8876   test -z "$as_dir" && as_dir=.
8877     for ac_exec_ext in '' $ac_executable_extensions; do
8878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8879     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8881     break 2
8882   fi
8883 done
8884   done
8885 IFS=$as_save_IFS
8886 
8887   ;;
8888 esac
8889 fi
8890 RM=$ac_cv_path_RM
8891 if test -n "$RM"; then
8892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8893 $as_echo "$RM" >&6; }
8894 else
8895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8896 $as_echo "no" >&6; }
8897 fi
8898 
8899 
8900   test -n "$RM" && break
8901 done
8902 
8903   else
8904     # The variable is set, but is it from the command line or the environment?
8905 
8906     # Try to remove the string !RM! from our list.
8907     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8908     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8909       # If it failed, the variable was not from the command line. Ignore it,
8910       # but warn the user (except for BASH, which is always set by the calling BASH).
8911       if test "xRM" != xBASH; then
8912         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8913 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8914       fi
8915       # Try to locate tool using the code snippet
8916       for ac_prog in rm
8917 do
8918   # Extract the first word of "$ac_prog", so it can be a program name with args.
8919 set dummy $ac_prog; ac_word=$2
8920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8921 $as_echo_n "checking for $ac_word... " >&6; }
8922 if ${ac_cv_path_RM+:} false; then :
8923   $as_echo_n "(cached) " >&6
8924 else
8925   case $RM in
8926   [\\/]* | ?:[\\/]*)
8927   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8928   ;;
8929   *)
8930   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8931 for as_dir in $PATH
8932 do
8933   IFS=$as_save_IFS
8934   test -z "$as_dir" && as_dir=.
8935     for ac_exec_ext in '' $ac_executable_extensions; do
8936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8937     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8939     break 2
8940   fi
8941 done
8942   done
8943 IFS=$as_save_IFS
8944 
8945   ;;
8946 esac
8947 fi
8948 RM=$ac_cv_path_RM
8949 if test -n "$RM"; then
8950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8951 $as_echo "$RM" >&6; }
8952 else
8953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8954 $as_echo "no" >&6; }
8955 fi
8956 
8957 
8958   test -n "$RM" && break
8959 done
8960 
8961     else
8962       # If it succeeded, then it was overridden by the user. We will use it
8963       # for the tool.
8964 
8965       # First remove it from the list of overridden variables, so we can test
8966       # for unknown variables in the end.
8967       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8968 
8969       # Check if the provided tool contains a complete path.
8970       tool_specified="$RM"
8971       tool_basename="${tool_specified##*/}"
8972       if test "x$tool_basename" = "x$tool_specified"; then
8973         # A command without a complete path is provided, search $PATH.
8974         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8975 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8976         # Extract the first word of "$tool_basename", so it can be a program name with args.
8977 set dummy $tool_basename; ac_word=$2
8978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8979 $as_echo_n "checking for $ac_word... " >&6; }
8980 if ${ac_cv_path_RM+:} false; then :
8981   $as_echo_n "(cached) " >&6
8982 else
8983   case $RM in
8984   [\\/]* | ?:[\\/]*)
8985   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8986   ;;
8987   *)
8988   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8989 for as_dir in $PATH
8990 do
8991   IFS=$as_save_IFS
8992   test -z "$as_dir" && as_dir=.
8993     for ac_exec_ext in '' $ac_executable_extensions; do
8994   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8995     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8997     break 2
8998   fi
8999 done
9000   done
9001 IFS=$as_save_IFS
9002 
9003   ;;
9004 esac
9005 fi
9006 RM=$ac_cv_path_RM
9007 if test -n "$RM"; then
9008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9009 $as_echo "$RM" >&6; }
9010 else
9011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9012 $as_echo "no" >&6; }
9013 fi
9014 
9015 
9016         if test "x$RM" = x; then
9017           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9018         fi
9019       else
9020         # Otherwise we believe it is a complete path. Use it as it is.
9021         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9022 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9023         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9024 $as_echo_n "checking for RM... " >&6; }
9025         if test ! -x "$tool_specified"; then
9026           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9027 $as_echo "not found" >&6; }
9028           as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9029         fi
9030         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9031 $as_echo "$tool_specified" >&6; }
9032       fi
9033     fi
9034   fi
9035 
9036 
9037 
9038   if test "x$RM" = x; then
9039     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9040   fi
9041 
9042 
9043 
9044 
9045 
9046   # Publish this variable in the help.
9047 
9048 
9049   if test "x$SH" = x; then
9050     # The variable is not set by user, try to locate tool using the code snippet
9051     for ac_prog in sh
9052 do
9053   # Extract the first word of "$ac_prog", so it can be a program name with args.
9054 set dummy $ac_prog; ac_word=$2
9055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9056 $as_echo_n "checking for $ac_word... " >&6; }
9057 if ${ac_cv_path_SH+:} false; then :
9058   $as_echo_n "(cached) " >&6
9059 else
9060   case $SH in
9061   [\\/]* | ?:[\\/]*)
9062   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9063   ;;
9064   *)
9065   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9066 for as_dir in $PATH
9067 do
9068   IFS=$as_save_IFS
9069   test -z "$as_dir" && as_dir=.
9070     for ac_exec_ext in '' $ac_executable_extensions; do
9071   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9072     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9073     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9074     break 2
9075   fi
9076 done
9077   done
9078 IFS=$as_save_IFS
9079 
9080   ;;
9081 esac
9082 fi
9083 SH=$ac_cv_path_SH
9084 if test -n "$SH"; then
9085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9086 $as_echo "$SH" >&6; }
9087 else
9088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9089 $as_echo "no" >&6; }
9090 fi
9091 
9092 
9093   test -n "$SH" && break
9094 done
9095 
9096   else
9097     # The variable is set, but is it from the command line or the environment?
9098 
9099     # Try to remove the string !SH! from our list.
9100     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9101     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9102       # If it failed, the variable was not from the command line. Ignore it,
9103       # but warn the user (except for BASH, which is always set by the calling BASH).
9104       if test "xSH" != xBASH; then
9105         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9106 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9107       fi
9108       # Try to locate tool using the code snippet
9109       for ac_prog in sh
9110 do
9111   # Extract the first word of "$ac_prog", so it can be a program name with args.
9112 set dummy $ac_prog; ac_word=$2
9113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9114 $as_echo_n "checking for $ac_word... " >&6; }
9115 if ${ac_cv_path_SH+:} false; then :
9116   $as_echo_n "(cached) " >&6
9117 else
9118   case $SH in
9119   [\\/]* | ?:[\\/]*)
9120   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9121   ;;
9122   *)
9123   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9124 for as_dir in $PATH
9125 do
9126   IFS=$as_save_IFS
9127   test -z "$as_dir" && as_dir=.
9128     for ac_exec_ext in '' $ac_executable_extensions; do
9129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9130     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9132     break 2
9133   fi
9134 done
9135   done
9136 IFS=$as_save_IFS
9137 
9138   ;;
9139 esac
9140 fi
9141 SH=$ac_cv_path_SH
9142 if test -n "$SH"; then
9143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9144 $as_echo "$SH" >&6; }
9145 else
9146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9147 $as_echo "no" >&6; }
9148 fi
9149 
9150 
9151   test -n "$SH" && break
9152 done
9153 
9154     else
9155       # If it succeeded, then it was overridden by the user. We will use it
9156       # for the tool.
9157 
9158       # First remove it from the list of overridden variables, so we can test
9159       # for unknown variables in the end.
9160       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9161 
9162       # Check if the provided tool contains a complete path.
9163       tool_specified="$SH"
9164       tool_basename="${tool_specified##*/}"
9165       if test "x$tool_basename" = "x$tool_specified"; then
9166         # A command without a complete path is provided, search $PATH.
9167         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9168 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9169         # Extract the first word of "$tool_basename", so it can be a program name with args.
9170 set dummy $tool_basename; ac_word=$2
9171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9172 $as_echo_n "checking for $ac_word... " >&6; }
9173 if ${ac_cv_path_SH+:} false; then :
9174   $as_echo_n "(cached) " >&6
9175 else
9176   case $SH in
9177   [\\/]* | ?:[\\/]*)
9178   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9179   ;;
9180   *)
9181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9182 for as_dir in $PATH
9183 do
9184   IFS=$as_save_IFS
9185   test -z "$as_dir" && as_dir=.
9186     for ac_exec_ext in '' $ac_executable_extensions; do
9187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9188     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9190     break 2
9191   fi
9192 done
9193   done
9194 IFS=$as_save_IFS
9195 
9196   ;;
9197 esac
9198 fi
9199 SH=$ac_cv_path_SH
9200 if test -n "$SH"; then
9201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9202 $as_echo "$SH" >&6; }
9203 else
9204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9205 $as_echo "no" >&6; }
9206 fi
9207 
9208 
9209         if test "x$SH" = x; then
9210           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9211         fi
9212       else
9213         # Otherwise we believe it is a complete path. Use it as it is.
9214         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9215 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9216         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9217 $as_echo_n "checking for SH... " >&6; }
9218         if test ! -x "$tool_specified"; then
9219           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9220 $as_echo "not found" >&6; }
9221           as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9222         fi
9223         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9224 $as_echo "$tool_specified" >&6; }
9225       fi
9226     fi
9227   fi
9228 
9229 
9230 
9231   if test "x$SH" = x; then
9232     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9233   fi
9234 
9235 
9236 
9237 
9238 
9239   # Publish this variable in the help.
9240 
9241 
9242   if test "x$SORT" = x; then
9243     # The variable is not set by user, try to locate tool using the code snippet
9244     for ac_prog in sort
9245 do
9246   # Extract the first word of "$ac_prog", so it can be a program name with args.
9247 set dummy $ac_prog; ac_word=$2
9248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9249 $as_echo_n "checking for $ac_word... " >&6; }
9250 if ${ac_cv_path_SORT+:} false; then :
9251   $as_echo_n "(cached) " >&6
9252 else
9253   case $SORT in
9254   [\\/]* | ?:[\\/]*)
9255   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9256   ;;
9257   *)
9258   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9259 for as_dir in $PATH
9260 do
9261   IFS=$as_save_IFS
9262   test -z "$as_dir" && as_dir=.
9263     for ac_exec_ext in '' $ac_executable_extensions; do
9264   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9265     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9267     break 2
9268   fi
9269 done
9270   done
9271 IFS=$as_save_IFS
9272 
9273   ;;
9274 esac
9275 fi
9276 SORT=$ac_cv_path_SORT
9277 if test -n "$SORT"; then
9278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9279 $as_echo "$SORT" >&6; }
9280 else
9281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9282 $as_echo "no" >&6; }
9283 fi
9284 
9285 
9286   test -n "$SORT" && break
9287 done
9288 
9289   else
9290     # The variable is set, but is it from the command line or the environment?
9291 
9292     # Try to remove the string !SORT! from our list.
9293     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9294     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9295       # If it failed, the variable was not from the command line. Ignore it,
9296       # but warn the user (except for BASH, which is always set by the calling BASH).
9297       if test "xSORT" != xBASH; then
9298         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9299 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9300       fi
9301       # Try to locate tool using the code snippet
9302       for ac_prog in sort
9303 do
9304   # Extract the first word of "$ac_prog", so it can be a program name with args.
9305 set dummy $ac_prog; ac_word=$2
9306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9307 $as_echo_n "checking for $ac_word... " >&6; }
9308 if ${ac_cv_path_SORT+:} false; then :
9309   $as_echo_n "(cached) " >&6
9310 else
9311   case $SORT in
9312   [\\/]* | ?:[\\/]*)
9313   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9314   ;;
9315   *)
9316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9317 for as_dir in $PATH
9318 do
9319   IFS=$as_save_IFS
9320   test -z "$as_dir" && as_dir=.
9321     for ac_exec_ext in '' $ac_executable_extensions; do
9322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9323     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9325     break 2
9326   fi
9327 done
9328   done
9329 IFS=$as_save_IFS
9330 
9331   ;;
9332 esac
9333 fi
9334 SORT=$ac_cv_path_SORT
9335 if test -n "$SORT"; then
9336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9337 $as_echo "$SORT" >&6; }
9338 else
9339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9340 $as_echo "no" >&6; }
9341 fi
9342 
9343 
9344   test -n "$SORT" && break
9345 done
9346 
9347     else
9348       # If it succeeded, then it was overridden by the user. We will use it
9349       # for the tool.
9350 
9351       # First remove it from the list of overridden variables, so we can test
9352       # for unknown variables in the end.
9353       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9354 
9355       # Check if the provided tool contains a complete path.
9356       tool_specified="$SORT"
9357       tool_basename="${tool_specified##*/}"
9358       if test "x$tool_basename" = "x$tool_specified"; then
9359         # A command without a complete path is provided, search $PATH.
9360         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9361 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9362         # Extract the first word of "$tool_basename", so it can be a program name with args.
9363 set dummy $tool_basename; ac_word=$2
9364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9365 $as_echo_n "checking for $ac_word... " >&6; }
9366 if ${ac_cv_path_SORT+:} false; then :
9367   $as_echo_n "(cached) " >&6
9368 else
9369   case $SORT in
9370   [\\/]* | ?:[\\/]*)
9371   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9372   ;;
9373   *)
9374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9375 for as_dir in $PATH
9376 do
9377   IFS=$as_save_IFS
9378   test -z "$as_dir" && as_dir=.
9379     for ac_exec_ext in '' $ac_executable_extensions; do
9380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9381     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9383     break 2
9384   fi
9385 done
9386   done
9387 IFS=$as_save_IFS
9388 
9389   ;;
9390 esac
9391 fi
9392 SORT=$ac_cv_path_SORT
9393 if test -n "$SORT"; then
9394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9395 $as_echo "$SORT" >&6; }
9396 else
9397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9398 $as_echo "no" >&6; }
9399 fi
9400 
9401 
9402         if test "x$SORT" = x; then
9403           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9404         fi
9405       else
9406         # Otherwise we believe it is a complete path. Use it as it is.
9407         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9408 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9409         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9410 $as_echo_n "checking for SORT... " >&6; }
9411         if test ! -x "$tool_specified"; then
9412           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9413 $as_echo "not found" >&6; }
9414           as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9415         fi
9416         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9417 $as_echo "$tool_specified" >&6; }
9418       fi
9419     fi
9420   fi
9421 
9422 
9423 
9424   if test "x$SORT" = x; then
9425     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9426   fi
9427 
9428 
9429 
9430 
9431 
9432   # Publish this variable in the help.
9433 
9434 
9435   if test "x$TAIL" = x; then
9436     # The variable is not set by user, try to locate tool using the code snippet
9437     for ac_prog in tail
9438 do
9439   # Extract the first word of "$ac_prog", so it can be a program name with args.
9440 set dummy $ac_prog; ac_word=$2
9441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9442 $as_echo_n "checking for $ac_word... " >&6; }
9443 if ${ac_cv_path_TAIL+:} false; then :
9444   $as_echo_n "(cached) " >&6
9445 else
9446   case $TAIL in
9447   [\\/]* | ?:[\\/]*)
9448   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9449   ;;
9450   *)
9451   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9452 for as_dir in $PATH
9453 do
9454   IFS=$as_save_IFS
9455   test -z "$as_dir" && as_dir=.
9456     for ac_exec_ext in '' $ac_executable_extensions; do
9457   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9458     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9459     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9460     break 2
9461   fi
9462 done
9463   done
9464 IFS=$as_save_IFS
9465 
9466   ;;
9467 esac
9468 fi
9469 TAIL=$ac_cv_path_TAIL
9470 if test -n "$TAIL"; then
9471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9472 $as_echo "$TAIL" >&6; }
9473 else
9474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9475 $as_echo "no" >&6; }
9476 fi
9477 
9478 
9479   test -n "$TAIL" && break
9480 done
9481 
9482   else
9483     # The variable is set, but is it from the command line or the environment?
9484 
9485     # Try to remove the string !TAIL! from our list.
9486     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9487     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9488       # If it failed, the variable was not from the command line. Ignore it,
9489       # but warn the user (except for BASH, which is always set by the calling BASH).
9490       if test "xTAIL" != xBASH; then
9491         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9492 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9493       fi
9494       # Try to locate tool using the code snippet
9495       for ac_prog in tail
9496 do
9497   # Extract the first word of "$ac_prog", so it can be a program name with args.
9498 set dummy $ac_prog; ac_word=$2
9499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9500 $as_echo_n "checking for $ac_word... " >&6; }
9501 if ${ac_cv_path_TAIL+:} false; then :
9502   $as_echo_n "(cached) " >&6
9503 else
9504   case $TAIL in
9505   [\\/]* | ?:[\\/]*)
9506   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9507   ;;
9508   *)
9509   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9510 for as_dir in $PATH
9511 do
9512   IFS=$as_save_IFS
9513   test -z "$as_dir" && as_dir=.
9514     for ac_exec_ext in '' $ac_executable_extensions; do
9515   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9516     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9518     break 2
9519   fi
9520 done
9521   done
9522 IFS=$as_save_IFS
9523 
9524   ;;
9525 esac
9526 fi
9527 TAIL=$ac_cv_path_TAIL
9528 if test -n "$TAIL"; then
9529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9530 $as_echo "$TAIL" >&6; }
9531 else
9532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9533 $as_echo "no" >&6; }
9534 fi
9535 
9536 
9537   test -n "$TAIL" && break
9538 done
9539 
9540     else
9541       # If it succeeded, then it was overridden by the user. We will use it
9542       # for the tool.
9543 
9544       # First remove it from the list of overridden variables, so we can test
9545       # for unknown variables in the end.
9546       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9547 
9548       # Check if the provided tool contains a complete path.
9549       tool_specified="$TAIL"
9550       tool_basename="${tool_specified##*/}"
9551       if test "x$tool_basename" = "x$tool_specified"; then
9552         # A command without a complete path is provided, search $PATH.
9553         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9554 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9555         # Extract the first word of "$tool_basename", so it can be a program name with args.
9556 set dummy $tool_basename; ac_word=$2
9557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9558 $as_echo_n "checking for $ac_word... " >&6; }
9559 if ${ac_cv_path_TAIL+:} false; then :
9560   $as_echo_n "(cached) " >&6
9561 else
9562   case $TAIL in
9563   [\\/]* | ?:[\\/]*)
9564   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9565   ;;
9566   *)
9567   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9568 for as_dir in $PATH
9569 do
9570   IFS=$as_save_IFS
9571   test -z "$as_dir" && as_dir=.
9572     for ac_exec_ext in '' $ac_executable_extensions; do
9573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9574     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9576     break 2
9577   fi
9578 done
9579   done
9580 IFS=$as_save_IFS
9581 
9582   ;;
9583 esac
9584 fi
9585 TAIL=$ac_cv_path_TAIL
9586 if test -n "$TAIL"; then
9587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9588 $as_echo "$TAIL" >&6; }
9589 else
9590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9591 $as_echo "no" >&6; }
9592 fi
9593 
9594 
9595         if test "x$TAIL" = x; then
9596           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9597         fi
9598       else
9599         # Otherwise we believe it is a complete path. Use it as it is.
9600         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9601 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9602         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9603 $as_echo_n "checking for TAIL... " >&6; }
9604         if test ! -x "$tool_specified"; then
9605           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9606 $as_echo "not found" >&6; }
9607           as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9608         fi
9609         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9610 $as_echo "$tool_specified" >&6; }
9611       fi
9612     fi
9613   fi
9614 
9615 
9616 
9617   if test "x$TAIL" = x; then
9618     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9619   fi
9620 
9621 
9622 
9623 
9624 
9625   # Publish this variable in the help.
9626 
9627 
9628   if test "x$TAR" = x; then
9629     # The variable is not set by user, try to locate tool using the code snippet
9630     for ac_prog in tar
9631 do
9632   # Extract the first word of "$ac_prog", so it can be a program name with args.
9633 set dummy $ac_prog; ac_word=$2
9634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9635 $as_echo_n "checking for $ac_word... " >&6; }
9636 if ${ac_cv_path_TAR+:} false; then :
9637   $as_echo_n "(cached) " >&6
9638 else
9639   case $TAR in
9640   [\\/]* | ?:[\\/]*)
9641   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9642   ;;
9643   *)
9644   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9645 for as_dir in $PATH
9646 do
9647   IFS=$as_save_IFS
9648   test -z "$as_dir" && as_dir=.
9649     for ac_exec_ext in '' $ac_executable_extensions; do
9650   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9651     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9652     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9653     break 2
9654   fi
9655 done
9656   done
9657 IFS=$as_save_IFS
9658 
9659   ;;
9660 esac
9661 fi
9662 TAR=$ac_cv_path_TAR
9663 if test -n "$TAR"; then
9664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9665 $as_echo "$TAR" >&6; }
9666 else
9667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9668 $as_echo "no" >&6; }
9669 fi
9670 
9671 
9672   test -n "$TAR" && break
9673 done
9674 
9675   else
9676     # The variable is set, but is it from the command line or the environment?
9677 
9678     # Try to remove the string !TAR! from our list.
9679     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9680     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9681       # If it failed, the variable was not from the command line. Ignore it,
9682       # but warn the user (except for BASH, which is always set by the calling BASH).
9683       if test "xTAR" != xBASH; then
9684         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9685 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9686       fi
9687       # Try to locate tool using the code snippet
9688       for ac_prog in tar
9689 do
9690   # Extract the first word of "$ac_prog", so it can be a program name with args.
9691 set dummy $ac_prog; ac_word=$2
9692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9693 $as_echo_n "checking for $ac_word... " >&6; }
9694 if ${ac_cv_path_TAR+:} false; then :
9695   $as_echo_n "(cached) " >&6
9696 else
9697   case $TAR in
9698   [\\/]* | ?:[\\/]*)
9699   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9700   ;;
9701   *)
9702   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9703 for as_dir in $PATH
9704 do
9705   IFS=$as_save_IFS
9706   test -z "$as_dir" && as_dir=.
9707     for ac_exec_ext in '' $ac_executable_extensions; do
9708   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9709     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9711     break 2
9712   fi
9713 done
9714   done
9715 IFS=$as_save_IFS
9716 
9717   ;;
9718 esac
9719 fi
9720 TAR=$ac_cv_path_TAR
9721 if test -n "$TAR"; then
9722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9723 $as_echo "$TAR" >&6; }
9724 else
9725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9726 $as_echo "no" >&6; }
9727 fi
9728 
9729 
9730   test -n "$TAR" && break
9731 done
9732 
9733     else
9734       # If it succeeded, then it was overridden by the user. We will use it
9735       # for the tool.
9736 
9737       # First remove it from the list of overridden variables, so we can test
9738       # for unknown variables in the end.
9739       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9740 
9741       # Check if the provided tool contains a complete path.
9742       tool_specified="$TAR"
9743       tool_basename="${tool_specified##*/}"
9744       if test "x$tool_basename" = "x$tool_specified"; then
9745         # A command without a complete path is provided, search $PATH.
9746         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9747 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9748         # Extract the first word of "$tool_basename", so it can be a program name with args.
9749 set dummy $tool_basename; ac_word=$2
9750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9751 $as_echo_n "checking for $ac_word... " >&6; }
9752 if ${ac_cv_path_TAR+:} false; then :
9753   $as_echo_n "(cached) " >&6
9754 else
9755   case $TAR in
9756   [\\/]* | ?:[\\/]*)
9757   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9758   ;;
9759   *)
9760   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9761 for as_dir in $PATH
9762 do
9763   IFS=$as_save_IFS
9764   test -z "$as_dir" && as_dir=.
9765     for ac_exec_ext in '' $ac_executable_extensions; do
9766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9767     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9769     break 2
9770   fi
9771 done
9772   done
9773 IFS=$as_save_IFS
9774 
9775   ;;
9776 esac
9777 fi
9778 TAR=$ac_cv_path_TAR
9779 if test -n "$TAR"; then
9780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9781 $as_echo "$TAR" >&6; }
9782 else
9783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9784 $as_echo "no" >&6; }
9785 fi
9786 
9787 
9788         if test "x$TAR" = x; then
9789           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9790         fi
9791       else
9792         # Otherwise we believe it is a complete path. Use it as it is.
9793         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9794 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9795         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9796 $as_echo_n "checking for TAR... " >&6; }
9797         if test ! -x "$tool_specified"; then
9798           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9799 $as_echo "not found" >&6; }
9800           as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9801         fi
9802         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9803 $as_echo "$tool_specified" >&6; }
9804       fi
9805     fi
9806   fi
9807 
9808 
9809 
9810   if test "x$TAR" = x; then
9811     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9812   fi
9813 
9814 
9815 
9816 
9817 
9818   # Publish this variable in the help.
9819 
9820 
9821   if test "x$TEE" = x; then
9822     # The variable is not set by user, try to locate tool using the code snippet
9823     for ac_prog in tee
9824 do
9825   # Extract the first word of "$ac_prog", so it can be a program name with args.
9826 set dummy $ac_prog; ac_word=$2
9827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9828 $as_echo_n "checking for $ac_word... " >&6; }
9829 if ${ac_cv_path_TEE+:} false; then :
9830   $as_echo_n "(cached) " >&6
9831 else
9832   case $TEE in
9833   [\\/]* | ?:[\\/]*)
9834   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9835   ;;
9836   *)
9837   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9838 for as_dir in $PATH
9839 do
9840   IFS=$as_save_IFS
9841   test -z "$as_dir" && as_dir=.
9842     for ac_exec_ext in '' $ac_executable_extensions; do
9843   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9844     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9846     break 2
9847   fi
9848 done
9849   done
9850 IFS=$as_save_IFS
9851 
9852   ;;
9853 esac
9854 fi
9855 TEE=$ac_cv_path_TEE
9856 if test -n "$TEE"; then
9857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9858 $as_echo "$TEE" >&6; }
9859 else
9860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9861 $as_echo "no" >&6; }
9862 fi
9863 
9864 
9865   test -n "$TEE" && break
9866 done
9867 
9868   else
9869     # The variable is set, but is it from the command line or the environment?
9870 
9871     # Try to remove the string !TEE! from our list.
9872     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9873     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9874       # If it failed, the variable was not from the command line. Ignore it,
9875       # but warn the user (except for BASH, which is always set by the calling BASH).
9876       if test "xTEE" != xBASH; then
9877         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9878 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9879       fi
9880       # Try to locate tool using the code snippet
9881       for ac_prog in tee
9882 do
9883   # Extract the first word of "$ac_prog", so it can be a program name with args.
9884 set dummy $ac_prog; ac_word=$2
9885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9886 $as_echo_n "checking for $ac_word... " >&6; }
9887 if ${ac_cv_path_TEE+:} false; then :
9888   $as_echo_n "(cached) " >&6
9889 else
9890   case $TEE in
9891   [\\/]* | ?:[\\/]*)
9892   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9893   ;;
9894   *)
9895   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9896 for as_dir in $PATH
9897 do
9898   IFS=$as_save_IFS
9899   test -z "$as_dir" && as_dir=.
9900     for ac_exec_ext in '' $ac_executable_extensions; do
9901   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9902     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9903     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9904     break 2
9905   fi
9906 done
9907   done
9908 IFS=$as_save_IFS
9909 
9910   ;;
9911 esac
9912 fi
9913 TEE=$ac_cv_path_TEE
9914 if test -n "$TEE"; then
9915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9916 $as_echo "$TEE" >&6; }
9917 else
9918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9919 $as_echo "no" >&6; }
9920 fi
9921 
9922 
9923   test -n "$TEE" && break
9924 done
9925 
9926     else
9927       # If it succeeded, then it was overridden by the user. We will use it
9928       # for the tool.
9929 
9930       # First remove it from the list of overridden variables, so we can test
9931       # for unknown variables in the end.
9932       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9933 
9934       # Check if the provided tool contains a complete path.
9935       tool_specified="$TEE"
9936       tool_basename="${tool_specified##*/}"
9937       if test "x$tool_basename" = "x$tool_specified"; then
9938         # A command without a complete path is provided, search $PATH.
9939         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9940 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9941         # Extract the first word of "$tool_basename", so it can be a program name with args.
9942 set dummy $tool_basename; ac_word=$2
9943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9944 $as_echo_n "checking for $ac_word... " >&6; }
9945 if ${ac_cv_path_TEE+:} false; then :
9946   $as_echo_n "(cached) " >&6
9947 else
9948   case $TEE in
9949   [\\/]* | ?:[\\/]*)
9950   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9951   ;;
9952   *)
9953   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9954 for as_dir in $PATH
9955 do
9956   IFS=$as_save_IFS
9957   test -z "$as_dir" && as_dir=.
9958     for ac_exec_ext in '' $ac_executable_extensions; do
9959   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9960     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9961     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9962     break 2
9963   fi
9964 done
9965   done
9966 IFS=$as_save_IFS
9967 
9968   ;;
9969 esac
9970 fi
9971 TEE=$ac_cv_path_TEE
9972 if test -n "$TEE"; then
9973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9974 $as_echo "$TEE" >&6; }
9975 else
9976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9977 $as_echo "no" >&6; }
9978 fi
9979 
9980 
9981         if test "x$TEE" = x; then
9982           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9983         fi
9984       else
9985         # Otherwise we believe it is a complete path. Use it as it is.
9986         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9987 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9988         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9989 $as_echo_n "checking for TEE... " >&6; }
9990         if test ! -x "$tool_specified"; then
9991           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9992 $as_echo "not found" >&6; }
9993           as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9994         fi
9995         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9996 $as_echo "$tool_specified" >&6; }
9997       fi
9998     fi
9999   fi
10000 
10001 
10002 
10003   if test "x$TEE" = x; then
10004     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10005   fi
10006 
10007 
10008 
10009 
10010 
10011   # Publish this variable in the help.
10012 
10013 
10014   if test "x$TOUCH" = x; then
10015     # The variable is not set by user, try to locate tool using the code snippet
10016     for ac_prog in touch
10017 do
10018   # Extract the first word of "$ac_prog", so it can be a program name with args.
10019 set dummy $ac_prog; ac_word=$2
10020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10021 $as_echo_n "checking for $ac_word... " >&6; }
10022 if ${ac_cv_path_TOUCH+:} false; then :
10023   $as_echo_n "(cached) " >&6
10024 else
10025   case $TOUCH in
10026   [\\/]* | ?:[\\/]*)
10027   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10028   ;;
10029   *)
10030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10031 for as_dir in $PATH
10032 do
10033   IFS=$as_save_IFS
10034   test -z "$as_dir" && as_dir=.
10035     for ac_exec_ext in '' $ac_executable_extensions; do
10036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10037     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10039     break 2
10040   fi
10041 done
10042   done
10043 IFS=$as_save_IFS
10044 
10045   ;;
10046 esac
10047 fi
10048 TOUCH=$ac_cv_path_TOUCH
10049 if test -n "$TOUCH"; then
10050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10051 $as_echo "$TOUCH" >&6; }
10052 else
10053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10054 $as_echo "no" >&6; }
10055 fi
10056 
10057 
10058   test -n "$TOUCH" && break
10059 done
10060 
10061   else
10062     # The variable is set, but is it from the command line or the environment?
10063 
10064     # Try to remove the string !TOUCH! from our list.
10065     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10066     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10067       # If it failed, the variable was not from the command line. Ignore it,
10068       # but warn the user (except for BASH, which is always set by the calling BASH).
10069       if test "xTOUCH" != xBASH; then
10070         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10071 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10072       fi
10073       # Try to locate tool using the code snippet
10074       for ac_prog in touch
10075 do
10076   # Extract the first word of "$ac_prog", so it can be a program name with args.
10077 set dummy $ac_prog; ac_word=$2
10078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10079 $as_echo_n "checking for $ac_word... " >&6; }
10080 if ${ac_cv_path_TOUCH+:} false; then :
10081   $as_echo_n "(cached) " >&6
10082 else
10083   case $TOUCH in
10084   [\\/]* | ?:[\\/]*)
10085   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10086   ;;
10087   *)
10088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10089 for as_dir in $PATH
10090 do
10091   IFS=$as_save_IFS
10092   test -z "$as_dir" && as_dir=.
10093     for ac_exec_ext in '' $ac_executable_extensions; do
10094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10095     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10097     break 2
10098   fi
10099 done
10100   done
10101 IFS=$as_save_IFS
10102 
10103   ;;
10104 esac
10105 fi
10106 TOUCH=$ac_cv_path_TOUCH
10107 if test -n "$TOUCH"; then
10108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10109 $as_echo "$TOUCH" >&6; }
10110 else
10111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10112 $as_echo "no" >&6; }
10113 fi
10114 
10115 
10116   test -n "$TOUCH" && break
10117 done
10118 
10119     else
10120       # If it succeeded, then it was overridden by the user. We will use it
10121       # for the tool.
10122 
10123       # First remove it from the list of overridden variables, so we can test
10124       # for unknown variables in the end.
10125       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10126 
10127       # Check if the provided tool contains a complete path.
10128       tool_specified="$TOUCH"
10129       tool_basename="${tool_specified##*/}"
10130       if test "x$tool_basename" = "x$tool_specified"; then
10131         # A command without a complete path is provided, search $PATH.
10132         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10133 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10134         # Extract the first word of "$tool_basename", so it can be a program name with args.
10135 set dummy $tool_basename; ac_word=$2
10136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10137 $as_echo_n "checking for $ac_word... " >&6; }
10138 if ${ac_cv_path_TOUCH+:} false; then :
10139   $as_echo_n "(cached) " >&6
10140 else
10141   case $TOUCH in
10142   [\\/]* | ?:[\\/]*)
10143   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10144   ;;
10145   *)
10146   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10147 for as_dir in $PATH
10148 do
10149   IFS=$as_save_IFS
10150   test -z "$as_dir" && as_dir=.
10151     for ac_exec_ext in '' $ac_executable_extensions; do
10152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10153     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10155     break 2
10156   fi
10157 done
10158   done
10159 IFS=$as_save_IFS
10160 
10161   ;;
10162 esac
10163 fi
10164 TOUCH=$ac_cv_path_TOUCH
10165 if test -n "$TOUCH"; then
10166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10167 $as_echo "$TOUCH" >&6; }
10168 else
10169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10170 $as_echo "no" >&6; }
10171 fi
10172 
10173 
10174         if test "x$TOUCH" = x; then
10175           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10176         fi
10177       else
10178         # Otherwise we believe it is a complete path. Use it as it is.
10179         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10180 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10181         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10182 $as_echo_n "checking for TOUCH... " >&6; }
10183         if test ! -x "$tool_specified"; then
10184           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10185 $as_echo "not found" >&6; }
10186           as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10187         fi
10188         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10189 $as_echo "$tool_specified" >&6; }
10190       fi
10191     fi
10192   fi
10193 
10194 
10195 
10196   if test "x$TOUCH" = x; then
10197     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10198   fi
10199 
10200 
10201 
10202 
10203 
10204   # Publish this variable in the help.
10205 
10206 
10207   if test "x$TR" = x; then
10208     # The variable is not set by user, try to locate tool using the code snippet
10209     for ac_prog in tr
10210 do
10211   # Extract the first word of "$ac_prog", so it can be a program name with args.
10212 set dummy $ac_prog; ac_word=$2
10213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10214 $as_echo_n "checking for $ac_word... " >&6; }
10215 if ${ac_cv_path_TR+:} false; then :
10216   $as_echo_n "(cached) " >&6
10217 else
10218   case $TR in
10219   [\\/]* | ?:[\\/]*)
10220   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10221   ;;
10222   *)
10223   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10224 for as_dir in $PATH
10225 do
10226   IFS=$as_save_IFS
10227   test -z "$as_dir" && as_dir=.
10228     for ac_exec_ext in '' $ac_executable_extensions; do
10229   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10230     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10231     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10232     break 2
10233   fi
10234 done
10235   done
10236 IFS=$as_save_IFS
10237 
10238   ;;
10239 esac
10240 fi
10241 TR=$ac_cv_path_TR
10242 if test -n "$TR"; then
10243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10244 $as_echo "$TR" >&6; }
10245 else
10246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10247 $as_echo "no" >&6; }
10248 fi
10249 
10250 
10251   test -n "$TR" && break
10252 done
10253 
10254   else
10255     # The variable is set, but is it from the command line or the environment?
10256 
10257     # Try to remove the string !TR! from our list.
10258     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10259     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10260       # If it failed, the variable was not from the command line. Ignore it,
10261       # but warn the user (except for BASH, which is always set by the calling BASH).
10262       if test "xTR" != xBASH; then
10263         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10264 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10265       fi
10266       # Try to locate tool using the code snippet
10267       for ac_prog in tr
10268 do
10269   # Extract the first word of "$ac_prog", so it can be a program name with args.
10270 set dummy $ac_prog; ac_word=$2
10271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10272 $as_echo_n "checking for $ac_word... " >&6; }
10273 if ${ac_cv_path_TR+:} false; then :
10274   $as_echo_n "(cached) " >&6
10275 else
10276   case $TR in
10277   [\\/]* | ?:[\\/]*)
10278   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10279   ;;
10280   *)
10281   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10282 for as_dir in $PATH
10283 do
10284   IFS=$as_save_IFS
10285   test -z "$as_dir" && as_dir=.
10286     for ac_exec_ext in '' $ac_executable_extensions; do
10287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10288     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10290     break 2
10291   fi
10292 done
10293   done
10294 IFS=$as_save_IFS
10295 
10296   ;;
10297 esac
10298 fi
10299 TR=$ac_cv_path_TR
10300 if test -n "$TR"; then
10301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10302 $as_echo "$TR" >&6; }
10303 else
10304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10305 $as_echo "no" >&6; }
10306 fi
10307 
10308 
10309   test -n "$TR" && break
10310 done
10311 
10312     else
10313       # If it succeeded, then it was overridden by the user. We will use it
10314       # for the tool.
10315 
10316       # First remove it from the list of overridden variables, so we can test
10317       # for unknown variables in the end.
10318       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10319 
10320       # Check if the provided tool contains a complete path.
10321       tool_specified="$TR"
10322       tool_basename="${tool_specified##*/}"
10323       if test "x$tool_basename" = "x$tool_specified"; then
10324         # A command without a complete path is provided, search $PATH.
10325         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10326 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10327         # Extract the first word of "$tool_basename", so it can be a program name with args.
10328 set dummy $tool_basename; ac_word=$2
10329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10330 $as_echo_n "checking for $ac_word... " >&6; }
10331 if ${ac_cv_path_TR+:} false; then :
10332   $as_echo_n "(cached) " >&6
10333 else
10334   case $TR in
10335   [\\/]* | ?:[\\/]*)
10336   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10337   ;;
10338   *)
10339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10340 for as_dir in $PATH
10341 do
10342   IFS=$as_save_IFS
10343   test -z "$as_dir" && as_dir=.
10344     for ac_exec_ext in '' $ac_executable_extensions; do
10345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10346     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10348     break 2
10349   fi
10350 done
10351   done
10352 IFS=$as_save_IFS
10353 
10354   ;;
10355 esac
10356 fi
10357 TR=$ac_cv_path_TR
10358 if test -n "$TR"; then
10359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10360 $as_echo "$TR" >&6; }
10361 else
10362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10363 $as_echo "no" >&6; }
10364 fi
10365 
10366 
10367         if test "x$TR" = x; then
10368           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10369         fi
10370       else
10371         # Otherwise we believe it is a complete path. Use it as it is.
10372         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10373 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10374         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10375 $as_echo_n "checking for TR... " >&6; }
10376         if test ! -x "$tool_specified"; then
10377           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10378 $as_echo "not found" >&6; }
10379           as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10380         fi
10381         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10382 $as_echo "$tool_specified" >&6; }
10383       fi
10384     fi
10385   fi
10386 
10387 
10388 
10389   if test "x$TR" = x; then
10390     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10391   fi
10392 
10393 
10394 
10395 
10396 
10397   # Publish this variable in the help.
10398 
10399 
10400   if test "x$UNAME" = x; then
10401     # The variable is not set by user, try to locate tool using the code snippet
10402     for ac_prog in uname
10403 do
10404   # Extract the first word of "$ac_prog", so it can be a program name with args.
10405 set dummy $ac_prog; ac_word=$2
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10407 $as_echo_n "checking for $ac_word... " >&6; }
10408 if ${ac_cv_path_UNAME+:} false; then :
10409   $as_echo_n "(cached) " >&6
10410 else
10411   case $UNAME in
10412   [\\/]* | ?:[\\/]*)
10413   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10414   ;;
10415   *)
10416   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10417 for as_dir in $PATH
10418 do
10419   IFS=$as_save_IFS
10420   test -z "$as_dir" && as_dir=.
10421     for ac_exec_ext in '' $ac_executable_extensions; do
10422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10423     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10425     break 2
10426   fi
10427 done
10428   done
10429 IFS=$as_save_IFS
10430 
10431   ;;
10432 esac
10433 fi
10434 UNAME=$ac_cv_path_UNAME
10435 if test -n "$UNAME"; then
10436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10437 $as_echo "$UNAME" >&6; }
10438 else
10439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10440 $as_echo "no" >&6; }
10441 fi
10442 
10443 
10444   test -n "$UNAME" && break
10445 done
10446 
10447   else
10448     # The variable is set, but is it from the command line or the environment?
10449 
10450     # Try to remove the string !UNAME! from our list.
10451     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10452     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10453       # If it failed, the variable was not from the command line. Ignore it,
10454       # but warn the user (except for BASH, which is always set by the calling BASH).
10455       if test "xUNAME" != xBASH; then
10456         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10457 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10458       fi
10459       # Try to locate tool using the code snippet
10460       for ac_prog in uname
10461 do
10462   # Extract the first word of "$ac_prog", so it can be a program name with args.
10463 set dummy $ac_prog; ac_word=$2
10464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10465 $as_echo_n "checking for $ac_word... " >&6; }
10466 if ${ac_cv_path_UNAME+:} false; then :
10467   $as_echo_n "(cached) " >&6
10468 else
10469   case $UNAME in
10470   [\\/]* | ?:[\\/]*)
10471   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10472   ;;
10473   *)
10474   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10475 for as_dir in $PATH
10476 do
10477   IFS=$as_save_IFS
10478   test -z "$as_dir" && as_dir=.
10479     for ac_exec_ext in '' $ac_executable_extensions; do
10480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10481     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10483     break 2
10484   fi
10485 done
10486   done
10487 IFS=$as_save_IFS
10488 
10489   ;;
10490 esac
10491 fi
10492 UNAME=$ac_cv_path_UNAME
10493 if test -n "$UNAME"; then
10494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10495 $as_echo "$UNAME" >&6; }
10496 else
10497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10498 $as_echo "no" >&6; }
10499 fi
10500 
10501 
10502   test -n "$UNAME" && break
10503 done
10504 
10505     else
10506       # If it succeeded, then it was overridden by the user. We will use it
10507       # for the tool.
10508 
10509       # First remove it from the list of overridden variables, so we can test
10510       # for unknown variables in the end.
10511       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10512 
10513       # Check if the provided tool contains a complete path.
10514       tool_specified="$UNAME"
10515       tool_basename="${tool_specified##*/}"
10516       if test "x$tool_basename" = "x$tool_specified"; then
10517         # A command without a complete path is provided, search $PATH.
10518         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10519 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10520         # Extract the first word of "$tool_basename", so it can be a program name with args.
10521 set dummy $tool_basename; ac_word=$2
10522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10523 $as_echo_n "checking for $ac_word... " >&6; }
10524 if ${ac_cv_path_UNAME+:} false; then :
10525   $as_echo_n "(cached) " >&6
10526 else
10527   case $UNAME in
10528   [\\/]* | ?:[\\/]*)
10529   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10530   ;;
10531   *)
10532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10533 for as_dir in $PATH
10534 do
10535   IFS=$as_save_IFS
10536   test -z "$as_dir" && as_dir=.
10537     for ac_exec_ext in '' $ac_executable_extensions; do
10538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10539     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10541     break 2
10542   fi
10543 done
10544   done
10545 IFS=$as_save_IFS
10546 
10547   ;;
10548 esac
10549 fi
10550 UNAME=$ac_cv_path_UNAME
10551 if test -n "$UNAME"; then
10552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10553 $as_echo "$UNAME" >&6; }
10554 else
10555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10556 $as_echo "no" >&6; }
10557 fi
10558 
10559 
10560         if test "x$UNAME" = x; then
10561           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10562         fi
10563       else
10564         # Otherwise we believe it is a complete path. Use it as it is.
10565         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10566 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10567         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10568 $as_echo_n "checking for UNAME... " >&6; }
10569         if test ! -x "$tool_specified"; then
10570           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10571 $as_echo "not found" >&6; }
10572           as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10573         fi
10574         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10575 $as_echo "$tool_specified" >&6; }
10576       fi
10577     fi
10578   fi
10579 
10580 
10581 
10582   if test "x$UNAME" = x; then
10583     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10584   fi
10585 
10586 
10587 
10588 
10589 
10590   # Publish this variable in the help.
10591 
10592 
10593   if test "x$UNIQ" = x; then
10594     # The variable is not set by user, try to locate tool using the code snippet
10595     for ac_prog in uniq
10596 do
10597   # Extract the first word of "$ac_prog", so it can be a program name with args.
10598 set dummy $ac_prog; ac_word=$2
10599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10600 $as_echo_n "checking for $ac_word... " >&6; }
10601 if ${ac_cv_path_UNIQ+:} false; then :
10602   $as_echo_n "(cached) " >&6
10603 else
10604   case $UNIQ in
10605   [\\/]* | ?:[\\/]*)
10606   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10607   ;;
10608   *)
10609   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10610 for as_dir in $PATH
10611 do
10612   IFS=$as_save_IFS
10613   test -z "$as_dir" && as_dir=.
10614     for ac_exec_ext in '' $ac_executable_extensions; do
10615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10616     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10618     break 2
10619   fi
10620 done
10621   done
10622 IFS=$as_save_IFS
10623 
10624   ;;
10625 esac
10626 fi
10627 UNIQ=$ac_cv_path_UNIQ
10628 if test -n "$UNIQ"; then
10629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10630 $as_echo "$UNIQ" >&6; }
10631 else
10632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10633 $as_echo "no" >&6; }
10634 fi
10635 
10636 
10637   test -n "$UNIQ" && break
10638 done
10639 
10640   else
10641     # The variable is set, but is it from the command line or the environment?
10642 
10643     # Try to remove the string !UNIQ! from our list.
10644     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10645     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10646       # If it failed, the variable was not from the command line. Ignore it,
10647       # but warn the user (except for BASH, which is always set by the calling BASH).
10648       if test "xUNIQ" != xBASH; then
10649         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10650 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10651       fi
10652       # Try to locate tool using the code snippet
10653       for ac_prog in uniq
10654 do
10655   # Extract the first word of "$ac_prog", so it can be a program name with args.
10656 set dummy $ac_prog; ac_word=$2
10657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10658 $as_echo_n "checking for $ac_word... " >&6; }
10659 if ${ac_cv_path_UNIQ+:} false; then :
10660   $as_echo_n "(cached) " >&6
10661 else
10662   case $UNIQ in
10663   [\\/]* | ?:[\\/]*)
10664   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10665   ;;
10666   *)
10667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10668 for as_dir in $PATH
10669 do
10670   IFS=$as_save_IFS
10671   test -z "$as_dir" && as_dir=.
10672     for ac_exec_ext in '' $ac_executable_extensions; do
10673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10674     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10676     break 2
10677   fi
10678 done
10679   done
10680 IFS=$as_save_IFS
10681 
10682   ;;
10683 esac
10684 fi
10685 UNIQ=$ac_cv_path_UNIQ
10686 if test -n "$UNIQ"; then
10687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10688 $as_echo "$UNIQ" >&6; }
10689 else
10690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10691 $as_echo "no" >&6; }
10692 fi
10693 
10694 
10695   test -n "$UNIQ" && break
10696 done
10697 
10698     else
10699       # If it succeeded, then it was overridden by the user. We will use it
10700       # for the tool.
10701 
10702       # First remove it from the list of overridden variables, so we can test
10703       # for unknown variables in the end.
10704       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10705 
10706       # Check if the provided tool contains a complete path.
10707       tool_specified="$UNIQ"
10708       tool_basename="${tool_specified##*/}"
10709       if test "x$tool_basename" = "x$tool_specified"; then
10710         # A command without a complete path is provided, search $PATH.
10711         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10712 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10713         # Extract the first word of "$tool_basename", so it can be a program name with args.
10714 set dummy $tool_basename; ac_word=$2
10715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10716 $as_echo_n "checking for $ac_word... " >&6; }
10717 if ${ac_cv_path_UNIQ+:} false; then :
10718   $as_echo_n "(cached) " >&6
10719 else
10720   case $UNIQ in
10721   [\\/]* | ?:[\\/]*)
10722   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10723   ;;
10724   *)
10725   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10726 for as_dir in $PATH
10727 do
10728   IFS=$as_save_IFS
10729   test -z "$as_dir" && as_dir=.
10730     for ac_exec_ext in '' $ac_executable_extensions; do
10731   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10732     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10733     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10734     break 2
10735   fi
10736 done
10737   done
10738 IFS=$as_save_IFS
10739 
10740   ;;
10741 esac
10742 fi
10743 UNIQ=$ac_cv_path_UNIQ
10744 if test -n "$UNIQ"; then
10745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10746 $as_echo "$UNIQ" >&6; }
10747 else
10748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10749 $as_echo "no" >&6; }
10750 fi
10751 
10752 
10753         if test "x$UNIQ" = x; then
10754           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10755         fi
10756       else
10757         # Otherwise we believe it is a complete path. Use it as it is.
10758         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10759 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10760         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10761 $as_echo_n "checking for UNIQ... " >&6; }
10762         if test ! -x "$tool_specified"; then
10763           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10764 $as_echo "not found" >&6; }
10765           as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10766         fi
10767         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10768 $as_echo "$tool_specified" >&6; }
10769       fi
10770     fi
10771   fi
10772 
10773 
10774 
10775   if test "x$UNIQ" = x; then
10776     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10777   fi
10778 
10779 
10780 
10781 
10782 
10783   # Publish this variable in the help.
10784 
10785 
10786   if test "x$WC" = x; then
10787     # The variable is not set by user, try to locate tool using the code snippet
10788     for ac_prog in wc
10789 do
10790   # Extract the first word of "$ac_prog", so it can be a program name with args.
10791 set dummy $ac_prog; ac_word=$2
10792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10793 $as_echo_n "checking for $ac_word... " >&6; }
10794 if ${ac_cv_path_WC+:} false; then :
10795   $as_echo_n "(cached) " >&6
10796 else
10797   case $WC in
10798   [\\/]* | ?:[\\/]*)
10799   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10800   ;;
10801   *)
10802   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10803 for as_dir in $PATH
10804 do
10805   IFS=$as_save_IFS
10806   test -z "$as_dir" && as_dir=.
10807     for ac_exec_ext in '' $ac_executable_extensions; do
10808   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10809     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10811     break 2
10812   fi
10813 done
10814   done
10815 IFS=$as_save_IFS
10816 
10817   ;;
10818 esac
10819 fi
10820 WC=$ac_cv_path_WC
10821 if test -n "$WC"; then
10822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10823 $as_echo "$WC" >&6; }
10824 else
10825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10826 $as_echo "no" >&6; }
10827 fi
10828 
10829 
10830   test -n "$WC" && break
10831 done
10832 
10833   else
10834     # The variable is set, but is it from the command line or the environment?
10835 
10836     # Try to remove the string !WC! from our list.
10837     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10838     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10839       # If it failed, the variable was not from the command line. Ignore it,
10840       # but warn the user (except for BASH, which is always set by the calling BASH).
10841       if test "xWC" != xBASH; then
10842         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10843 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10844       fi
10845       # Try to locate tool using the code snippet
10846       for ac_prog in wc
10847 do
10848   # Extract the first word of "$ac_prog", so it can be a program name with args.
10849 set dummy $ac_prog; ac_word=$2
10850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10851 $as_echo_n "checking for $ac_word... " >&6; }
10852 if ${ac_cv_path_WC+:} false; then :
10853   $as_echo_n "(cached) " >&6
10854 else
10855   case $WC in
10856   [\\/]* | ?:[\\/]*)
10857   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10858   ;;
10859   *)
10860   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10861 for as_dir in $PATH
10862 do
10863   IFS=$as_save_IFS
10864   test -z "$as_dir" && as_dir=.
10865     for ac_exec_ext in '' $ac_executable_extensions; do
10866   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10867     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10869     break 2
10870   fi
10871 done
10872   done
10873 IFS=$as_save_IFS
10874 
10875   ;;
10876 esac
10877 fi
10878 WC=$ac_cv_path_WC
10879 if test -n "$WC"; then
10880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10881 $as_echo "$WC" >&6; }
10882 else
10883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10884 $as_echo "no" >&6; }
10885 fi
10886 
10887 
10888   test -n "$WC" && break
10889 done
10890 
10891     else
10892       # If it succeeded, then it was overridden by the user. We will use it
10893       # for the tool.
10894 
10895       # First remove it from the list of overridden variables, so we can test
10896       # for unknown variables in the end.
10897       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10898 
10899       # Check if the provided tool contains a complete path.
10900       tool_specified="$WC"
10901       tool_basename="${tool_specified##*/}"
10902       if test "x$tool_basename" = "x$tool_specified"; then
10903         # A command without a complete path is provided, search $PATH.
10904         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10905 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10906         # Extract the first word of "$tool_basename", so it can be a program name with args.
10907 set dummy $tool_basename; ac_word=$2
10908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10909 $as_echo_n "checking for $ac_word... " >&6; }
10910 if ${ac_cv_path_WC+:} false; then :
10911   $as_echo_n "(cached) " >&6
10912 else
10913   case $WC in
10914   [\\/]* | ?:[\\/]*)
10915   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10916   ;;
10917   *)
10918   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10919 for as_dir in $PATH
10920 do
10921   IFS=$as_save_IFS
10922   test -z "$as_dir" && as_dir=.
10923     for ac_exec_ext in '' $ac_executable_extensions; do
10924   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10925     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10926     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10927     break 2
10928   fi
10929 done
10930   done
10931 IFS=$as_save_IFS
10932 
10933   ;;
10934 esac
10935 fi
10936 WC=$ac_cv_path_WC
10937 if test -n "$WC"; then
10938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10939 $as_echo "$WC" >&6; }
10940 else
10941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10942 $as_echo "no" >&6; }
10943 fi
10944 
10945 
10946         if test "x$WC" = x; then
10947           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10948         fi
10949       else
10950         # Otherwise we believe it is a complete path. Use it as it is.
10951         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10952 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10953         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10954 $as_echo_n "checking for WC... " >&6; }
10955         if test ! -x "$tool_specified"; then
10956           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10957 $as_echo "not found" >&6; }
10958           as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10959         fi
10960         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10961 $as_echo "$tool_specified" >&6; }
10962       fi
10963     fi
10964   fi
10965 
10966 
10967 
10968   if test "x$WC" = x; then
10969     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10970   fi
10971 
10972 
10973 
10974 
10975 
10976   # Publish this variable in the help.
10977 
10978 
10979   if test "x$WHICH" = x; then
10980     # The variable is not set by user, try to locate tool using the code snippet
10981     for ac_prog in which
10982 do
10983   # Extract the first word of "$ac_prog", so it can be a program name with args.
10984 set dummy $ac_prog; ac_word=$2
10985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10986 $as_echo_n "checking for $ac_word... " >&6; }
10987 if ${ac_cv_path_WHICH+:} false; then :
10988   $as_echo_n "(cached) " >&6
10989 else
10990   case $WHICH in
10991   [\\/]* | ?:[\\/]*)
10992   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10993   ;;
10994   *)
10995   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10996 for as_dir in $PATH
10997 do
10998   IFS=$as_save_IFS
10999   test -z "$as_dir" && as_dir=.
11000     for ac_exec_ext in '' $ac_executable_extensions; do
11001   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11002     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11003     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11004     break 2
11005   fi
11006 done
11007   done
11008 IFS=$as_save_IFS
11009 
11010   ;;
11011 esac
11012 fi
11013 WHICH=$ac_cv_path_WHICH
11014 if test -n "$WHICH"; then
11015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11016 $as_echo "$WHICH" >&6; }
11017 else
11018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11019 $as_echo "no" >&6; }
11020 fi
11021 
11022 
11023   test -n "$WHICH" && break
11024 done
11025 
11026   else
11027     # The variable is set, but is it from the command line or the environment?
11028 
11029     # Try to remove the string !WHICH! from our list.
11030     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11031     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11032       # If it failed, the variable was not from the command line. Ignore it,
11033       # but warn the user (except for BASH, which is always set by the calling BASH).
11034       if test "xWHICH" != xBASH; then
11035         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11036 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11037       fi
11038       # Try to locate tool using the code snippet
11039       for ac_prog in which
11040 do
11041   # Extract the first word of "$ac_prog", so it can be a program name with args.
11042 set dummy $ac_prog; ac_word=$2
11043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11044 $as_echo_n "checking for $ac_word... " >&6; }
11045 if ${ac_cv_path_WHICH+:} false; then :
11046   $as_echo_n "(cached) " >&6
11047 else
11048   case $WHICH in
11049   [\\/]* | ?:[\\/]*)
11050   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11051   ;;
11052   *)
11053   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11054 for as_dir in $PATH
11055 do
11056   IFS=$as_save_IFS
11057   test -z "$as_dir" && as_dir=.
11058     for ac_exec_ext in '' $ac_executable_extensions; do
11059   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11060     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11062     break 2
11063   fi
11064 done
11065   done
11066 IFS=$as_save_IFS
11067 
11068   ;;
11069 esac
11070 fi
11071 WHICH=$ac_cv_path_WHICH
11072 if test -n "$WHICH"; then
11073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11074 $as_echo "$WHICH" >&6; }
11075 else
11076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11077 $as_echo "no" >&6; }
11078 fi
11079 
11080 
11081   test -n "$WHICH" && break
11082 done
11083 
11084     else
11085       # If it succeeded, then it was overridden by the user. We will use it
11086       # for the tool.
11087 
11088       # First remove it from the list of overridden variables, so we can test
11089       # for unknown variables in the end.
11090       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11091 
11092       # Check if the provided tool contains a complete path.
11093       tool_specified="$WHICH"
11094       tool_basename="${tool_specified##*/}"
11095       if test "x$tool_basename" = "x$tool_specified"; then
11096         # A command without a complete path is provided, search $PATH.
11097         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11098 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11099         # Extract the first word of "$tool_basename", so it can be a program name with args.
11100 set dummy $tool_basename; ac_word=$2
11101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11102 $as_echo_n "checking for $ac_word... " >&6; }
11103 if ${ac_cv_path_WHICH+:} false; then :
11104   $as_echo_n "(cached) " >&6
11105 else
11106   case $WHICH in
11107   [\\/]* | ?:[\\/]*)
11108   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11109   ;;
11110   *)
11111   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11112 for as_dir in $PATH
11113 do
11114   IFS=$as_save_IFS
11115   test -z "$as_dir" && as_dir=.
11116     for ac_exec_ext in '' $ac_executable_extensions; do
11117   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11118     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11119     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11120     break 2
11121   fi
11122 done
11123   done
11124 IFS=$as_save_IFS
11125 
11126   ;;
11127 esac
11128 fi
11129 WHICH=$ac_cv_path_WHICH
11130 if test -n "$WHICH"; then
11131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11132 $as_echo "$WHICH" >&6; }
11133 else
11134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11135 $as_echo "no" >&6; }
11136 fi
11137 
11138 
11139         if test "x$WHICH" = x; then
11140           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11141         fi
11142       else
11143         # Otherwise we believe it is a complete path. Use it as it is.
11144         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11145 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11146         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11147 $as_echo_n "checking for WHICH... " >&6; }
11148         if test ! -x "$tool_specified"; then
11149           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11150 $as_echo "not found" >&6; }
11151           as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11152         fi
11153         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11154 $as_echo "$tool_specified" >&6; }
11155       fi
11156     fi
11157   fi
11158 
11159 
11160 
11161   if test "x$WHICH" = x; then
11162     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11163   fi
11164 
11165 
11166 
11167 
11168 
11169   # Publish this variable in the help.
11170 
11171 
11172   if test "x$XARGS" = x; then
11173     # The variable is not set by user, try to locate tool using the code snippet
11174     for ac_prog in xargs
11175 do
11176   # Extract the first word of "$ac_prog", so it can be a program name with args.
11177 set dummy $ac_prog; ac_word=$2
11178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11179 $as_echo_n "checking for $ac_word... " >&6; }
11180 if ${ac_cv_path_XARGS+:} false; then :
11181   $as_echo_n "(cached) " >&6
11182 else
11183   case $XARGS in
11184   [\\/]* | ?:[\\/]*)
11185   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11186   ;;
11187   *)
11188   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11189 for as_dir in $PATH
11190 do
11191   IFS=$as_save_IFS
11192   test -z "$as_dir" && as_dir=.
11193     for ac_exec_ext in '' $ac_executable_extensions; do
11194   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11195     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11196     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11197     break 2
11198   fi
11199 done
11200   done
11201 IFS=$as_save_IFS
11202 
11203   ;;
11204 esac
11205 fi
11206 XARGS=$ac_cv_path_XARGS
11207 if test -n "$XARGS"; then
11208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11209 $as_echo "$XARGS" >&6; }
11210 else
11211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11212 $as_echo "no" >&6; }
11213 fi
11214 
11215 
11216   test -n "$XARGS" && break
11217 done
11218 
11219   else
11220     # The variable is set, but is it from the command line or the environment?
11221 
11222     # Try to remove the string !XARGS! from our list.
11223     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11224     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11225       # If it failed, the variable was not from the command line. Ignore it,
11226       # but warn the user (except for BASH, which is always set by the calling BASH).
11227       if test "xXARGS" != xBASH; then
11228         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11229 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11230       fi
11231       # Try to locate tool using the code snippet
11232       for ac_prog in xargs
11233 do
11234   # Extract the first word of "$ac_prog", so it can be a program name with args.
11235 set dummy $ac_prog; ac_word=$2
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11237 $as_echo_n "checking for $ac_word... " >&6; }
11238 if ${ac_cv_path_XARGS+:} false; then :
11239   $as_echo_n "(cached) " >&6
11240 else
11241   case $XARGS in
11242   [\\/]* | ?:[\\/]*)
11243   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11244   ;;
11245   *)
11246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11247 for as_dir in $PATH
11248 do
11249   IFS=$as_save_IFS
11250   test -z "$as_dir" && as_dir=.
11251     for ac_exec_ext in '' $ac_executable_extensions; do
11252   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11253     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11255     break 2
11256   fi
11257 done
11258   done
11259 IFS=$as_save_IFS
11260 
11261   ;;
11262 esac
11263 fi
11264 XARGS=$ac_cv_path_XARGS
11265 if test -n "$XARGS"; then
11266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11267 $as_echo "$XARGS" >&6; }
11268 else
11269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11270 $as_echo "no" >&6; }
11271 fi
11272 
11273 
11274   test -n "$XARGS" && break
11275 done
11276 
11277     else
11278       # If it succeeded, then it was overridden by the user. We will use it
11279       # for the tool.
11280 
11281       # First remove it from the list of overridden variables, so we can test
11282       # for unknown variables in the end.
11283       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11284 
11285       # Check if the provided tool contains a complete path.
11286       tool_specified="$XARGS"
11287       tool_basename="${tool_specified##*/}"
11288       if test "x$tool_basename" = "x$tool_specified"; then
11289         # A command without a complete path is provided, search $PATH.
11290         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11291 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11292         # Extract the first word of "$tool_basename", so it can be a program name with args.
11293 set dummy $tool_basename; ac_word=$2
11294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11295 $as_echo_n "checking for $ac_word... " >&6; }
11296 if ${ac_cv_path_XARGS+:} false; then :
11297   $as_echo_n "(cached) " >&6
11298 else
11299   case $XARGS in
11300   [\\/]* | ?:[\\/]*)
11301   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11302   ;;
11303   *)
11304   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11305 for as_dir in $PATH
11306 do
11307   IFS=$as_save_IFS
11308   test -z "$as_dir" && as_dir=.
11309     for ac_exec_ext in '' $ac_executable_extensions; do
11310   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11311     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11312     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11313     break 2
11314   fi
11315 done
11316   done
11317 IFS=$as_save_IFS
11318 
11319   ;;
11320 esac
11321 fi
11322 XARGS=$ac_cv_path_XARGS
11323 if test -n "$XARGS"; then
11324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11325 $as_echo "$XARGS" >&6; }
11326 else
11327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11328 $as_echo "no" >&6; }
11329 fi
11330 
11331 
11332         if test "x$XARGS" = x; then
11333           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11334         fi
11335       else
11336         # Otherwise we believe it is a complete path. Use it as it is.
11337         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11338 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11339         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11340 $as_echo_n "checking for XARGS... " >&6; }
11341         if test ! -x "$tool_specified"; then
11342           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11343 $as_echo "not found" >&6; }
11344           as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11345         fi
11346         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11347 $as_echo "$tool_specified" >&6; }
11348       fi
11349     fi
11350   fi
11351 
11352 
11353 
11354   if test "x$XARGS" = x; then
11355     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11356   fi
11357 
11358 
11359 
11360   # Then required tools that require some special treatment.
11361 
11362 
11363   # Publish this variable in the help.
11364 
11365 
11366   if test "x$AWK" = x; then
11367     # The variable is not set by user, try to locate tool using the code snippet
11368     for ac_prog in gawk mawk nawk awk
11369 do
11370   # Extract the first word of "$ac_prog", so it can be a program name with args.
11371 set dummy $ac_prog; ac_word=$2
11372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11373 $as_echo_n "checking for $ac_word... " >&6; }
11374 if ${ac_cv_prog_AWK+:} false; then :
11375   $as_echo_n "(cached) " >&6
11376 else
11377   if test -n "$AWK"; then
11378   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11379 else
11380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11381 for as_dir in $PATH
11382 do
11383   IFS=$as_save_IFS
11384   test -z "$as_dir" && as_dir=.
11385     for ac_exec_ext in '' $ac_executable_extensions; do
11386   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11387     ac_cv_prog_AWK="$ac_prog"
11388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11389     break 2
11390   fi
11391 done
11392   done
11393 IFS=$as_save_IFS
11394 
11395 fi
11396 fi
11397 AWK=$ac_cv_prog_AWK
11398 if test -n "$AWK"; then
11399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11400 $as_echo "$AWK" >&6; }
11401 else
11402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11403 $as_echo "no" >&6; }
11404 fi
11405 
11406 
11407   test -n "$AWK" && break
11408 done
11409 
11410   else
11411     # The variable is set, but is it from the command line or the environment?
11412 
11413     # Try to remove the string !AWK! from our list.
11414     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11415     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11416       # If it failed, the variable was not from the command line. Ignore it,
11417       # but warn the user (except for BASH, which is always set by the calling BASH).
11418       if test "xAWK" != xBASH; then
11419         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11420 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11421       fi
11422       # Try to locate tool using the code snippet
11423       for ac_prog in gawk mawk nawk awk
11424 do
11425   # Extract the first word of "$ac_prog", so it can be a program name with args.
11426 set dummy $ac_prog; ac_word=$2
11427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11428 $as_echo_n "checking for $ac_word... " >&6; }
11429 if ${ac_cv_prog_AWK+:} false; then :
11430   $as_echo_n "(cached) " >&6
11431 else
11432   if test -n "$AWK"; then
11433   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11434 else
11435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11436 for as_dir in $PATH
11437 do
11438   IFS=$as_save_IFS
11439   test -z "$as_dir" && as_dir=.
11440     for ac_exec_ext in '' $ac_executable_extensions; do
11441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11442     ac_cv_prog_AWK="$ac_prog"
11443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11444     break 2
11445   fi
11446 done
11447   done
11448 IFS=$as_save_IFS
11449 
11450 fi
11451 fi
11452 AWK=$ac_cv_prog_AWK
11453 if test -n "$AWK"; then
11454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11455 $as_echo "$AWK" >&6; }
11456 else
11457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11458 $as_echo "no" >&6; }
11459 fi
11460 
11461 
11462   test -n "$AWK" && break
11463 done
11464 
11465     else
11466       # If it succeeded, then it was overridden by the user. We will use it
11467       # for the tool.
11468 
11469       # First remove it from the list of overridden variables, so we can test
11470       # for unknown variables in the end.
11471       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11472 
11473       # Check if the provided tool contains a complete path.
11474       tool_specified="$AWK"
11475       tool_basename="${tool_specified##*/}"
11476       if test "x$tool_basename" = "x$tool_specified"; then
11477         # A command without a complete path is provided, search $PATH.
11478         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11479 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11480         # Extract the first word of "$tool_basename", so it can be a program name with args.
11481 set dummy $tool_basename; ac_word=$2
11482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11483 $as_echo_n "checking for $ac_word... " >&6; }
11484 if ${ac_cv_path_AWK+:} false; then :
11485   $as_echo_n "(cached) " >&6
11486 else
11487   case $AWK in
11488   [\\/]* | ?:[\\/]*)
11489   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11490   ;;
11491   *)
11492   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11493 for as_dir in $PATH
11494 do
11495   IFS=$as_save_IFS
11496   test -z "$as_dir" && as_dir=.
11497     for ac_exec_ext in '' $ac_executable_extensions; do
11498   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11499     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11501     break 2
11502   fi
11503 done
11504   done
11505 IFS=$as_save_IFS
11506 
11507   ;;
11508 esac
11509 fi
11510 AWK=$ac_cv_path_AWK
11511 if test -n "$AWK"; then
11512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11513 $as_echo "$AWK" >&6; }
11514 else
11515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11516 $as_echo "no" >&6; }
11517 fi
11518 
11519 
11520         if test "x$AWK" = x; then
11521           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11522         fi
11523       else
11524         # Otherwise we believe it is a complete path. Use it as it is.
11525         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11526 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11527         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11528 $as_echo_n "checking for AWK... " >&6; }
11529         if test ! -x "$tool_specified"; then
11530           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11531 $as_echo "not found" >&6; }
11532           as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11533         fi
11534         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11535 $as_echo "$tool_specified" >&6; }
11536       fi
11537     fi
11538   fi
11539 
11540 
11541   if test "x$AWK" = x; then
11542     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11543   fi
11544 
11545 
11546 
11547 
11548   # Publish this variable in the help.
11549 
11550 
11551   if test "x$GREP" = x; then
11552     # The variable is not set by user, try to locate tool using the code snippet
11553     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11554 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11555 if ${ac_cv_path_GREP+:} false; then :
11556   $as_echo_n "(cached) " >&6
11557 else
11558   if test -z "$GREP"; then
11559   ac_path_GREP_found=false
11560   # Loop through the user's path and test for each of PROGNAME-LIST
11561   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11562 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11563 do
11564   IFS=$as_save_IFS
11565   test -z "$as_dir" && as_dir=.
11566     for ac_prog in grep ggrep; do
11567     for ac_exec_ext in '' $ac_executable_extensions; do
11568       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11569       as_fn_executable_p "$ac_path_GREP" || continue
11570 # Check for GNU ac_path_GREP and select it if it is found.
11571   # Check for GNU $ac_path_GREP
11572 case `"$ac_path_GREP" --version 2>&1` in
11573 *GNU*)
11574   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11575 *)
11576   ac_count=0
11577   $as_echo_n 0123456789 >"conftest.in"
11578   while :
11579   do
11580     cat "conftest.in" "conftest.in" >"conftest.tmp"
11581     mv "conftest.tmp" "conftest.in"
11582     cp "conftest.in" "conftest.nl"
11583     $as_echo 'GREP' >> "conftest.nl"
11584     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11585     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11586     as_fn_arith $ac_count + 1 && ac_count=$as_val
11587     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11588       # Best one so far, save it but keep looking for a better one
11589       ac_cv_path_GREP="$ac_path_GREP"
11590       ac_path_GREP_max=$ac_count
11591     fi
11592     # 10*(2^10) chars as input seems more than enough
11593     test $ac_count -gt 10 && break
11594   done
11595   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11596 esac
11597 
11598       $ac_path_GREP_found && break 3
11599     done
11600   done
11601   done
11602 IFS=$as_save_IFS
11603   if test -z "$ac_cv_path_GREP"; then
11604     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11605   fi
11606 else
11607   ac_cv_path_GREP=$GREP
11608 fi
11609 
11610 fi
11611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11612 $as_echo "$ac_cv_path_GREP" >&6; }
11613  GREP="$ac_cv_path_GREP"
11614 
11615 
11616   else
11617     # The variable is set, but is it from the command line or the environment?
11618 
11619     # Try to remove the string !GREP! from our list.
11620     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11621     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11622       # If it failed, the variable was not from the command line. Ignore it,
11623       # but warn the user (except for BASH, which is always set by the calling BASH).
11624       if test "xGREP" != xBASH; then
11625         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11626 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11627       fi
11628       # Try to locate tool using the code snippet
11629       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11630 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11631 if ${ac_cv_path_GREP+:} false; then :
11632   $as_echo_n "(cached) " >&6
11633 else
11634   if test -z "$GREP"; then
11635   ac_path_GREP_found=false
11636   # Loop through the user's path and test for each of PROGNAME-LIST
11637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11638 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11639 do
11640   IFS=$as_save_IFS
11641   test -z "$as_dir" && as_dir=.
11642     for ac_prog in grep ggrep; do
11643     for ac_exec_ext in '' $ac_executable_extensions; do
11644       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11645       as_fn_executable_p "$ac_path_GREP" || continue
11646 # Check for GNU ac_path_GREP and select it if it is found.
11647   # Check for GNU $ac_path_GREP
11648 case `"$ac_path_GREP" --version 2>&1` in
11649 *GNU*)
11650   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11651 *)
11652   ac_count=0
11653   $as_echo_n 0123456789 >"conftest.in"
11654   while :
11655   do
11656     cat "conftest.in" "conftest.in" >"conftest.tmp"
11657     mv "conftest.tmp" "conftest.in"
11658     cp "conftest.in" "conftest.nl"
11659     $as_echo 'GREP' >> "conftest.nl"
11660     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11661     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11662     as_fn_arith $ac_count + 1 && ac_count=$as_val
11663     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11664       # Best one so far, save it but keep looking for a better one
11665       ac_cv_path_GREP="$ac_path_GREP"
11666       ac_path_GREP_max=$ac_count
11667     fi
11668     # 10*(2^10) chars as input seems more than enough
11669     test $ac_count -gt 10 && break
11670   done
11671   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11672 esac
11673 
11674       $ac_path_GREP_found && break 3
11675     done
11676   done
11677   done
11678 IFS=$as_save_IFS
11679   if test -z "$ac_cv_path_GREP"; then
11680     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11681   fi
11682 else
11683   ac_cv_path_GREP=$GREP
11684 fi
11685 
11686 fi
11687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11688 $as_echo "$ac_cv_path_GREP" >&6; }
11689  GREP="$ac_cv_path_GREP"
11690 
11691 
11692     else
11693       # If it succeeded, then it was overridden by the user. We will use it
11694       # for the tool.
11695 
11696       # First remove it from the list of overridden variables, so we can test
11697       # for unknown variables in the end.
11698       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11699 
11700       # Check if the provided tool contains a complete path.
11701       tool_specified="$GREP"
11702       tool_basename="${tool_specified##*/}"
11703       if test "x$tool_basename" = "x$tool_specified"; then
11704         # A command without a complete path is provided, search $PATH.
11705         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11706 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11707         # Extract the first word of "$tool_basename", so it can be a program name with args.
11708 set dummy $tool_basename; ac_word=$2
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11710 $as_echo_n "checking for $ac_word... " >&6; }
11711 if ${ac_cv_path_GREP+:} false; then :
11712   $as_echo_n "(cached) " >&6
11713 else
11714   case $GREP in
11715   [\\/]* | ?:[\\/]*)
11716   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11717   ;;
11718   *)
11719   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11720 for as_dir in $PATH
11721 do
11722   IFS=$as_save_IFS
11723   test -z "$as_dir" && as_dir=.
11724     for ac_exec_ext in '' $ac_executable_extensions; do
11725   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11726     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11728     break 2
11729   fi
11730 done
11731   done
11732 IFS=$as_save_IFS
11733 
11734   ;;
11735 esac
11736 fi
11737 GREP=$ac_cv_path_GREP
11738 if test -n "$GREP"; then
11739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11740 $as_echo "$GREP" >&6; }
11741 else
11742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11743 $as_echo "no" >&6; }
11744 fi
11745 
11746 
11747         if test "x$GREP" = x; then
11748           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11749         fi
11750       else
11751         # Otherwise we believe it is a complete path. Use it as it is.
11752         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11753 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11754         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11755 $as_echo_n "checking for GREP... " >&6; }
11756         if test ! -x "$tool_specified"; then
11757           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11758 $as_echo "not found" >&6; }
11759           as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11760         fi
11761         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11762 $as_echo "$tool_specified" >&6; }
11763       fi
11764     fi
11765   fi
11766 
11767 
11768   if test "x$GREP" = x; then
11769     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11770   fi
11771 
11772 
11773 
11774 
11775   # Publish this variable in the help.
11776 
11777 
11778   if test "x$EGREP" = x; then
11779     # The variable is not set by user, try to locate tool using the code snippet
11780     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11781 $as_echo_n "checking for egrep... " >&6; }
11782 if ${ac_cv_path_EGREP+:} false; then :
11783   $as_echo_n "(cached) " >&6
11784 else
11785   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11786    then ac_cv_path_EGREP="$GREP -E"
11787    else
11788      if test -z "$EGREP"; then
11789   ac_path_EGREP_found=false
11790   # Loop through the user's path and test for each of PROGNAME-LIST
11791   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11792 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11793 do
11794   IFS=$as_save_IFS
11795   test -z "$as_dir" && as_dir=.
11796     for ac_prog in egrep; do
11797     for ac_exec_ext in '' $ac_executable_extensions; do
11798       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11799       as_fn_executable_p "$ac_path_EGREP" || continue
11800 # Check for GNU ac_path_EGREP and select it if it is found.
11801   # Check for GNU $ac_path_EGREP
11802 case `"$ac_path_EGREP" --version 2>&1` in
11803 *GNU*)
11804   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11805 *)
11806   ac_count=0
11807   $as_echo_n 0123456789 >"conftest.in"
11808   while :
11809   do
11810     cat "conftest.in" "conftest.in" >"conftest.tmp"
11811     mv "conftest.tmp" "conftest.in"
11812     cp "conftest.in" "conftest.nl"
11813     $as_echo 'EGREP' >> "conftest.nl"
11814     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11815     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11816     as_fn_arith $ac_count + 1 && ac_count=$as_val
11817     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11818       # Best one so far, save it but keep looking for a better one
11819       ac_cv_path_EGREP="$ac_path_EGREP"
11820       ac_path_EGREP_max=$ac_count
11821     fi
11822     # 10*(2^10) chars as input seems more than enough
11823     test $ac_count -gt 10 && break
11824   done
11825   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11826 esac
11827 
11828       $ac_path_EGREP_found && break 3
11829     done
11830   done
11831   done
11832 IFS=$as_save_IFS
11833   if test -z "$ac_cv_path_EGREP"; then
11834     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11835   fi
11836 else
11837   ac_cv_path_EGREP=$EGREP
11838 fi
11839 
11840    fi
11841 fi
11842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11843 $as_echo "$ac_cv_path_EGREP" >&6; }
11844  EGREP="$ac_cv_path_EGREP"
11845 
11846 
11847   else
11848     # The variable is set, but is it from the command line or the environment?
11849 
11850     # Try to remove the string !EGREP! from our list.
11851     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11852     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11853       # If it failed, the variable was not from the command line. Ignore it,
11854       # but warn the user (except for BASH, which is always set by the calling BASH).
11855       if test "xEGREP" != xBASH; then
11856         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11857 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11858       fi
11859       # Try to locate tool using the code snippet
11860       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11861 $as_echo_n "checking for egrep... " >&6; }
11862 if ${ac_cv_path_EGREP+:} false; then :
11863   $as_echo_n "(cached) " >&6
11864 else
11865   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11866    then ac_cv_path_EGREP="$GREP -E"
11867    else
11868      if test -z "$EGREP"; then
11869   ac_path_EGREP_found=false
11870   # Loop through the user's path and test for each of PROGNAME-LIST
11871   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11872 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11873 do
11874   IFS=$as_save_IFS
11875   test -z "$as_dir" && as_dir=.
11876     for ac_prog in egrep; do
11877     for ac_exec_ext in '' $ac_executable_extensions; do
11878       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11879       as_fn_executable_p "$ac_path_EGREP" || continue
11880 # Check for GNU ac_path_EGREP and select it if it is found.
11881   # Check for GNU $ac_path_EGREP
11882 case `"$ac_path_EGREP" --version 2>&1` in
11883 *GNU*)
11884   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11885 *)
11886   ac_count=0
11887   $as_echo_n 0123456789 >"conftest.in"
11888   while :
11889   do
11890     cat "conftest.in" "conftest.in" >"conftest.tmp"
11891     mv "conftest.tmp" "conftest.in"
11892     cp "conftest.in" "conftest.nl"
11893     $as_echo 'EGREP' >> "conftest.nl"
11894     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11895     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11896     as_fn_arith $ac_count + 1 && ac_count=$as_val
11897     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11898       # Best one so far, save it but keep looking for a better one
11899       ac_cv_path_EGREP="$ac_path_EGREP"
11900       ac_path_EGREP_max=$ac_count
11901     fi
11902     # 10*(2^10) chars as input seems more than enough
11903     test $ac_count -gt 10 && break
11904   done
11905   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11906 esac
11907 
11908       $ac_path_EGREP_found && break 3
11909     done
11910   done
11911   done
11912 IFS=$as_save_IFS
11913   if test -z "$ac_cv_path_EGREP"; then
11914     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11915   fi
11916 else
11917   ac_cv_path_EGREP=$EGREP
11918 fi
11919 
11920    fi
11921 fi
11922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11923 $as_echo "$ac_cv_path_EGREP" >&6; }
11924  EGREP="$ac_cv_path_EGREP"
11925 
11926 
11927     else
11928       # If it succeeded, then it was overridden by the user. We will use it
11929       # for the tool.
11930 
11931       # First remove it from the list of overridden variables, so we can test
11932       # for unknown variables in the end.
11933       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11934 
11935       # Check if the provided tool contains a complete path.
11936       tool_specified="$EGREP"
11937       tool_basename="${tool_specified##*/}"
11938       if test "x$tool_basename" = "x$tool_specified"; then
11939         # A command without a complete path is provided, search $PATH.
11940         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11941 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11942         # Extract the first word of "$tool_basename", so it can be a program name with args.
11943 set dummy $tool_basename; ac_word=$2
11944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11945 $as_echo_n "checking for $ac_word... " >&6; }
11946 if ${ac_cv_path_EGREP+:} false; then :
11947   $as_echo_n "(cached) " >&6
11948 else
11949   case $EGREP in
11950   [\\/]* | ?:[\\/]*)
11951   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11952   ;;
11953   *)
11954   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11955 for as_dir in $PATH
11956 do
11957   IFS=$as_save_IFS
11958   test -z "$as_dir" && as_dir=.
11959     for ac_exec_ext in '' $ac_executable_extensions; do
11960   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11961     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11963     break 2
11964   fi
11965 done
11966   done
11967 IFS=$as_save_IFS
11968 
11969   ;;
11970 esac
11971 fi
11972 EGREP=$ac_cv_path_EGREP
11973 if test -n "$EGREP"; then
11974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11975 $as_echo "$EGREP" >&6; }
11976 else
11977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11978 $as_echo "no" >&6; }
11979 fi
11980 
11981 
11982         if test "x$EGREP" = x; then
11983           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11984         fi
11985       else
11986         # Otherwise we believe it is a complete path. Use it as it is.
11987         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11988 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11989         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11990 $as_echo_n "checking for EGREP... " >&6; }
11991         if test ! -x "$tool_specified"; then
11992           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11993 $as_echo "not found" >&6; }
11994           as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11995         fi
11996         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11997 $as_echo "$tool_specified" >&6; }
11998       fi
11999     fi
12000   fi
12001 
12002 
12003   if test "x$EGREP" = x; then
12004     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12005   fi
12006 
12007 
12008 
12009 
12010   # Publish this variable in the help.
12011 
12012 
12013   if test "x$FGREP" = x; then
12014     # The variable is not set by user, try to locate tool using the code snippet
12015     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12016 $as_echo_n "checking for fgrep... " >&6; }
12017 if ${ac_cv_path_FGREP+:} false; then :
12018   $as_echo_n "(cached) " >&6
12019 else
12020   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12021    then ac_cv_path_FGREP="$GREP -F"
12022    else
12023      if test -z "$FGREP"; then
12024   ac_path_FGREP_found=false
12025   # Loop through the user's path and test for each of PROGNAME-LIST
12026   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12027 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12028 do
12029   IFS=$as_save_IFS
12030   test -z "$as_dir" && as_dir=.
12031     for ac_prog in fgrep; do
12032     for ac_exec_ext in '' $ac_executable_extensions; do
12033       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12034       as_fn_executable_p "$ac_path_FGREP" || continue
12035 # Check for GNU ac_path_FGREP and select it if it is found.
12036   # Check for GNU $ac_path_FGREP
12037 case `"$ac_path_FGREP" --version 2>&1` in
12038 *GNU*)
12039   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12040 *)
12041   ac_count=0
12042   $as_echo_n 0123456789 >"conftest.in"
12043   while :
12044   do
12045     cat "conftest.in" "conftest.in" >"conftest.tmp"
12046     mv "conftest.tmp" "conftest.in"
12047     cp "conftest.in" "conftest.nl"
12048     $as_echo 'FGREP' >> "conftest.nl"
12049     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12050     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12051     as_fn_arith $ac_count + 1 && ac_count=$as_val
12052     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12053       # Best one so far, save it but keep looking for a better one
12054       ac_cv_path_FGREP="$ac_path_FGREP"
12055       ac_path_FGREP_max=$ac_count
12056     fi
12057     # 10*(2^10) chars as input seems more than enough
12058     test $ac_count -gt 10 && break
12059   done
12060   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12061 esac
12062 
12063       $ac_path_FGREP_found && break 3
12064     done
12065   done
12066   done
12067 IFS=$as_save_IFS
12068   if test -z "$ac_cv_path_FGREP"; then
12069     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12070   fi
12071 else
12072   ac_cv_path_FGREP=$FGREP
12073 fi
12074 
12075    fi
12076 fi
12077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12078 $as_echo "$ac_cv_path_FGREP" >&6; }
12079  FGREP="$ac_cv_path_FGREP"
12080 
12081 
12082   else
12083     # The variable is set, but is it from the command line or the environment?
12084 
12085     # Try to remove the string !FGREP! from our list.
12086     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12087     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12088       # If it failed, the variable was not from the command line. Ignore it,
12089       # but warn the user (except for BASH, which is always set by the calling BASH).
12090       if test "xFGREP" != xBASH; then
12091         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12092 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12093       fi
12094       # Try to locate tool using the code snippet
12095       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12096 $as_echo_n "checking for fgrep... " >&6; }
12097 if ${ac_cv_path_FGREP+:} false; then :
12098   $as_echo_n "(cached) " >&6
12099 else
12100   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12101    then ac_cv_path_FGREP="$GREP -F"
12102    else
12103      if test -z "$FGREP"; then
12104   ac_path_FGREP_found=false
12105   # Loop through the user's path and test for each of PROGNAME-LIST
12106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12107 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12108 do
12109   IFS=$as_save_IFS
12110   test -z "$as_dir" && as_dir=.
12111     for ac_prog in fgrep; do
12112     for ac_exec_ext in '' $ac_executable_extensions; do
12113       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12114       as_fn_executable_p "$ac_path_FGREP" || continue
12115 # Check for GNU ac_path_FGREP and select it if it is found.
12116   # Check for GNU $ac_path_FGREP
12117 case `"$ac_path_FGREP" --version 2>&1` in
12118 *GNU*)
12119   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12120 *)
12121   ac_count=0
12122   $as_echo_n 0123456789 >"conftest.in"
12123   while :
12124   do
12125     cat "conftest.in" "conftest.in" >"conftest.tmp"
12126     mv "conftest.tmp" "conftest.in"
12127     cp "conftest.in" "conftest.nl"
12128     $as_echo 'FGREP' >> "conftest.nl"
12129     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12130     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12131     as_fn_arith $ac_count + 1 && ac_count=$as_val
12132     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12133       # Best one so far, save it but keep looking for a better one
12134       ac_cv_path_FGREP="$ac_path_FGREP"
12135       ac_path_FGREP_max=$ac_count
12136     fi
12137     # 10*(2^10) chars as input seems more than enough
12138     test $ac_count -gt 10 && break
12139   done
12140   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12141 esac
12142 
12143       $ac_path_FGREP_found && break 3
12144     done
12145   done
12146   done
12147 IFS=$as_save_IFS
12148   if test -z "$ac_cv_path_FGREP"; then
12149     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12150   fi
12151 else
12152   ac_cv_path_FGREP=$FGREP
12153 fi
12154 
12155    fi
12156 fi
12157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12158 $as_echo "$ac_cv_path_FGREP" >&6; }
12159  FGREP="$ac_cv_path_FGREP"
12160 
12161 
12162     else
12163       # If it succeeded, then it was overridden by the user. We will use it
12164       # for the tool.
12165 
12166       # First remove it from the list of overridden variables, so we can test
12167       # for unknown variables in the end.
12168       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12169 
12170       # Check if the provided tool contains a complete path.
12171       tool_specified="$FGREP"
12172       tool_basename="${tool_specified##*/}"
12173       if test "x$tool_basename" = "x$tool_specified"; then
12174         # A command without a complete path is provided, search $PATH.
12175         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12176 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12177         # Extract the first word of "$tool_basename", so it can be a program name with args.
12178 set dummy $tool_basename; ac_word=$2
12179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12180 $as_echo_n "checking for $ac_word... " >&6; }
12181 if ${ac_cv_path_FGREP+:} false; then :
12182   $as_echo_n "(cached) " >&6
12183 else
12184   case $FGREP in
12185   [\\/]* | ?:[\\/]*)
12186   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12187   ;;
12188   *)
12189   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12190 for as_dir in $PATH
12191 do
12192   IFS=$as_save_IFS
12193   test -z "$as_dir" && as_dir=.
12194     for ac_exec_ext in '' $ac_executable_extensions; do
12195   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12196     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12197     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12198     break 2
12199   fi
12200 done
12201   done
12202 IFS=$as_save_IFS
12203 
12204   ;;
12205 esac
12206 fi
12207 FGREP=$ac_cv_path_FGREP
12208 if test -n "$FGREP"; then
12209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12210 $as_echo "$FGREP" >&6; }
12211 else
12212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12213 $as_echo "no" >&6; }
12214 fi
12215 
12216 
12217         if test "x$FGREP" = x; then
12218           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12219         fi
12220       else
12221         # Otherwise we believe it is a complete path. Use it as it is.
12222         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12223 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12224         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12225 $as_echo_n "checking for FGREP... " >&6; }
12226         if test ! -x "$tool_specified"; then
12227           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12228 $as_echo "not found" >&6; }
12229           as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12230         fi
12231         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12232 $as_echo "$tool_specified" >&6; }
12233       fi
12234     fi
12235   fi
12236 
12237 
12238   if test "x$FGREP" = x; then
12239     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12240   fi
12241 
12242 
12243 
12244 
12245   # Publish this variable in the help.
12246 
12247 
12248   if test "x$SED" = x; then
12249     # The variable is not set by user, try to locate tool using the code snippet
12250     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12251 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12252 if ${ac_cv_path_SED+:} false; then :
12253   $as_echo_n "(cached) " >&6
12254 else
12255             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12256      for ac_i in 1 2 3 4 5 6 7; do
12257        ac_script="$ac_script$as_nl$ac_script"
12258      done
12259      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12260      { ac_script=; unset ac_script;}
12261      if test -z "$SED"; then
12262   ac_path_SED_found=false
12263   # Loop through the user's path and test for each of PROGNAME-LIST
12264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12265 for as_dir in $PATH
12266 do
12267   IFS=$as_save_IFS
12268   test -z "$as_dir" && as_dir=.
12269     for ac_prog in sed gsed; do
12270     for ac_exec_ext in '' $ac_executable_extensions; do
12271       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12272       as_fn_executable_p "$ac_path_SED" || continue
12273 # Check for GNU ac_path_SED and select it if it is found.
12274   # Check for GNU $ac_path_SED
12275 case `"$ac_path_SED" --version 2>&1` in
12276 *GNU*)
12277   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12278 *)
12279   ac_count=0
12280   $as_echo_n 0123456789 >"conftest.in"
12281   while :
12282   do
12283     cat "conftest.in" "conftest.in" >"conftest.tmp"
12284     mv "conftest.tmp" "conftest.in"
12285     cp "conftest.in" "conftest.nl"
12286     $as_echo '' >> "conftest.nl"
12287     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12288     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12289     as_fn_arith $ac_count + 1 && ac_count=$as_val
12290     if test $ac_count -gt ${ac_path_SED_max-0}; then
12291       # Best one so far, save it but keep looking for a better one
12292       ac_cv_path_SED="$ac_path_SED"
12293       ac_path_SED_max=$ac_count
12294     fi
12295     # 10*(2^10) chars as input seems more than enough
12296     test $ac_count -gt 10 && break
12297   done
12298   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12299 esac
12300 
12301       $ac_path_SED_found && break 3
12302     done
12303   done
12304   done
12305 IFS=$as_save_IFS
12306   if test -z "$ac_cv_path_SED"; then
12307     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12308   fi
12309 else
12310   ac_cv_path_SED=$SED
12311 fi
12312 
12313 fi
12314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12315 $as_echo "$ac_cv_path_SED" >&6; }
12316  SED="$ac_cv_path_SED"
12317   rm -f conftest.sed
12318 
12319   else
12320     # The variable is set, but is it from the command line or the environment?
12321 
12322     # Try to remove the string !SED! from our list.
12323     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12324     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12325       # If it failed, the variable was not from the command line. Ignore it,
12326       # but warn the user (except for BASH, which is always set by the calling BASH).
12327       if test "xSED" != xBASH; then
12328         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12329 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12330       fi
12331       # Try to locate tool using the code snippet
12332       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12333 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12334 if ${ac_cv_path_SED+:} false; then :
12335   $as_echo_n "(cached) " >&6
12336 else
12337             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12338      for ac_i in 1 2 3 4 5 6 7; do
12339        ac_script="$ac_script$as_nl$ac_script"
12340      done
12341      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12342      { ac_script=; unset ac_script;}
12343      if test -z "$SED"; then
12344   ac_path_SED_found=false
12345   # Loop through the user's path and test for each of PROGNAME-LIST
12346   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12347 for as_dir in $PATH
12348 do
12349   IFS=$as_save_IFS
12350   test -z "$as_dir" && as_dir=.
12351     for ac_prog in sed gsed; do
12352     for ac_exec_ext in '' $ac_executable_extensions; do
12353       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12354       as_fn_executable_p "$ac_path_SED" || continue
12355 # Check for GNU ac_path_SED and select it if it is found.
12356   # Check for GNU $ac_path_SED
12357 case `"$ac_path_SED" --version 2>&1` in
12358 *GNU*)
12359   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12360 *)
12361   ac_count=0
12362   $as_echo_n 0123456789 >"conftest.in"
12363   while :
12364   do
12365     cat "conftest.in" "conftest.in" >"conftest.tmp"
12366     mv "conftest.tmp" "conftest.in"
12367     cp "conftest.in" "conftest.nl"
12368     $as_echo '' >> "conftest.nl"
12369     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12370     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12371     as_fn_arith $ac_count + 1 && ac_count=$as_val
12372     if test $ac_count -gt ${ac_path_SED_max-0}; then
12373       # Best one so far, save it but keep looking for a better one
12374       ac_cv_path_SED="$ac_path_SED"
12375       ac_path_SED_max=$ac_count
12376     fi
12377     # 10*(2^10) chars as input seems more than enough
12378     test $ac_count -gt 10 && break
12379   done
12380   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12381 esac
12382 
12383       $ac_path_SED_found && break 3
12384     done
12385   done
12386   done
12387 IFS=$as_save_IFS
12388   if test -z "$ac_cv_path_SED"; then
12389     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12390   fi
12391 else
12392   ac_cv_path_SED=$SED
12393 fi
12394 
12395 fi
12396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12397 $as_echo "$ac_cv_path_SED" >&6; }
12398  SED="$ac_cv_path_SED"
12399   rm -f conftest.sed
12400 
12401     else
12402       # If it succeeded, then it was overridden by the user. We will use it
12403       # for the tool.
12404 
12405       # First remove it from the list of overridden variables, so we can test
12406       # for unknown variables in the end.
12407       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12408 
12409       # Check if the provided tool contains a complete path.
12410       tool_specified="$SED"
12411       tool_basename="${tool_specified##*/}"
12412       if test "x$tool_basename" = "x$tool_specified"; then
12413         # A command without a complete path is provided, search $PATH.
12414         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12415 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12416         # Extract the first word of "$tool_basename", so it can be a program name with args.
12417 set dummy $tool_basename; ac_word=$2
12418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12419 $as_echo_n "checking for $ac_word... " >&6; }
12420 if ${ac_cv_path_SED+:} false; then :
12421   $as_echo_n "(cached) " >&6
12422 else
12423   case $SED in
12424   [\\/]* | ?:[\\/]*)
12425   ac_cv_path_SED="$SED" # Let the user override the test with a path.
12426   ;;
12427   *)
12428   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12429 for as_dir in $PATH
12430 do
12431   IFS=$as_save_IFS
12432   test -z "$as_dir" && as_dir=.
12433     for ac_exec_ext in '' $ac_executable_extensions; do
12434   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12435     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12436     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12437     break 2
12438   fi
12439 done
12440   done
12441 IFS=$as_save_IFS
12442 
12443   ;;
12444 esac
12445 fi
12446 SED=$ac_cv_path_SED
12447 if test -n "$SED"; then
12448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12449 $as_echo "$SED" >&6; }
12450 else
12451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12452 $as_echo "no" >&6; }
12453 fi
12454 
12455 
12456         if test "x$SED" = x; then
12457           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12458         fi
12459       else
12460         # Otherwise we believe it is a complete path. Use it as it is.
12461         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12462 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12463         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12464 $as_echo_n "checking for SED... " >&6; }
12465         if test ! -x "$tool_specified"; then
12466           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12467 $as_echo "not found" >&6; }
12468           as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12469         fi
12470         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12471 $as_echo "$tool_specified" >&6; }
12472       fi
12473     fi
12474   fi
12475 
12476 
12477   if test "x$SED" = x; then
12478     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12479   fi
12480 
12481 
12482 
12483   # Always force rm.
12484   RM="$RM -f"
12485 
12486   # pwd behaves differently on various platforms and some don't support the -L flag.
12487   # Always use the bash builtin pwd to get uniform behavior.
12488   THEPWDCMD=pwd
12489 
12490   # These are not required on all platforms
12491 
12492 
12493   # Publish this variable in the help.
12494 
12495 
12496   if test "x$CYGPATH" = x; then
12497     # The variable is not set by user, try to locate tool using the code snippet
12498     for ac_prog in cygpath
12499 do
12500   # Extract the first word of "$ac_prog", so it can be a program name with args.
12501 set dummy $ac_prog; ac_word=$2
12502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12503 $as_echo_n "checking for $ac_word... " >&6; }
12504 if ${ac_cv_path_CYGPATH+:} false; then :
12505   $as_echo_n "(cached) " >&6
12506 else
12507   case $CYGPATH in
12508   [\\/]* | ?:[\\/]*)
12509   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12510   ;;
12511   *)
12512   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12513 for as_dir in $PATH
12514 do
12515   IFS=$as_save_IFS
12516   test -z "$as_dir" && as_dir=.
12517     for ac_exec_ext in '' $ac_executable_extensions; do
12518   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12519     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12520     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12521     break 2
12522   fi
12523 done
12524   done
12525 IFS=$as_save_IFS
12526 
12527   ;;
12528 esac
12529 fi
12530 CYGPATH=$ac_cv_path_CYGPATH
12531 if test -n "$CYGPATH"; then
12532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12533 $as_echo "$CYGPATH" >&6; }
12534 else
12535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12536 $as_echo "no" >&6; }
12537 fi
12538 
12539 
12540   test -n "$CYGPATH" && break
12541 done
12542 
12543   else
12544     # The variable is set, but is it from the command line or the environment?
12545 
12546     # Try to remove the string !CYGPATH! from our list.
12547     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12548     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12549       # If it failed, the variable was not from the command line. Ignore it,
12550       # but warn the user (except for BASH, which is always set by the calling BASH).
12551       if test "xCYGPATH" != xBASH; then
12552         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12553 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12554       fi
12555       # Try to locate tool using the code snippet
12556       for ac_prog in cygpath
12557 do
12558   # Extract the first word of "$ac_prog", so it can be a program name with args.
12559 set dummy $ac_prog; ac_word=$2
12560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12561 $as_echo_n "checking for $ac_word... " >&6; }
12562 if ${ac_cv_path_CYGPATH+:} false; then :
12563   $as_echo_n "(cached) " >&6
12564 else
12565   case $CYGPATH in
12566   [\\/]* | ?:[\\/]*)
12567   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12568   ;;
12569   *)
12570   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12571 for as_dir in $PATH
12572 do
12573   IFS=$as_save_IFS
12574   test -z "$as_dir" && as_dir=.
12575     for ac_exec_ext in '' $ac_executable_extensions; do
12576   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12577     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12578     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12579     break 2
12580   fi
12581 done
12582   done
12583 IFS=$as_save_IFS
12584 
12585   ;;
12586 esac
12587 fi
12588 CYGPATH=$ac_cv_path_CYGPATH
12589 if test -n "$CYGPATH"; then
12590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12591 $as_echo "$CYGPATH" >&6; }
12592 else
12593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12594 $as_echo "no" >&6; }
12595 fi
12596 
12597 
12598   test -n "$CYGPATH" && break
12599 done
12600 
12601     else
12602       # If it succeeded, then it was overridden by the user. We will use it
12603       # for the tool.
12604 
12605       # First remove it from the list of overridden variables, so we can test
12606       # for unknown variables in the end.
12607       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12608 
12609       # Check if the provided tool contains a complete path.
12610       tool_specified="$CYGPATH"
12611       tool_basename="${tool_specified##*/}"
12612       if test "x$tool_basename" = "x$tool_specified"; then
12613         # A command without a complete path is provided, search $PATH.
12614         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12615 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12616         # Extract the first word of "$tool_basename", so it can be a program name with args.
12617 set dummy $tool_basename; ac_word=$2
12618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12619 $as_echo_n "checking for $ac_word... " >&6; }
12620 if ${ac_cv_path_CYGPATH+:} false; then :
12621   $as_echo_n "(cached) " >&6
12622 else
12623   case $CYGPATH in
12624   [\\/]* | ?:[\\/]*)
12625   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12626   ;;
12627   *)
12628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12629 for as_dir in $PATH
12630 do
12631   IFS=$as_save_IFS
12632   test -z "$as_dir" && as_dir=.
12633     for ac_exec_ext in '' $ac_executable_extensions; do
12634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12635     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12637     break 2
12638   fi
12639 done
12640   done
12641 IFS=$as_save_IFS
12642 
12643   ;;
12644 esac
12645 fi
12646 CYGPATH=$ac_cv_path_CYGPATH
12647 if test -n "$CYGPATH"; then
12648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12649 $as_echo "$CYGPATH" >&6; }
12650 else
12651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12652 $as_echo "no" >&6; }
12653 fi
12654 
12655 
12656         if test "x$CYGPATH" = x; then
12657           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12658         fi
12659       else
12660         # Otherwise we believe it is a complete path. Use it as it is.
12661         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12662 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12663         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12664 $as_echo_n "checking for CYGPATH... " >&6; }
12665         if test ! -x "$tool_specified"; then
12666           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12667 $as_echo "not found" >&6; }
12668           as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12669         fi
12670         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12671 $as_echo "$tool_specified" >&6; }
12672       fi
12673     fi
12674   fi
12675 
12676 
12677 
12678 
12679   # Publish this variable in the help.
12680 
12681 
12682   if test "x$READLINK" = x; then
12683     # The variable is not set by user, try to locate tool using the code snippet
12684     for ac_prog in greadlink readlink
12685 do
12686   # Extract the first word of "$ac_prog", so it can be a program name with args.
12687 set dummy $ac_prog; ac_word=$2
12688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12689 $as_echo_n "checking for $ac_word... " >&6; }
12690 if ${ac_cv_path_READLINK+:} false; then :
12691   $as_echo_n "(cached) " >&6
12692 else
12693   case $READLINK in
12694   [\\/]* | ?:[\\/]*)
12695   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12696   ;;
12697   *)
12698   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12699 for as_dir in $PATH
12700 do
12701   IFS=$as_save_IFS
12702   test -z "$as_dir" && as_dir=.
12703     for ac_exec_ext in '' $ac_executable_extensions; do
12704   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12705     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12706     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12707     break 2
12708   fi
12709 done
12710   done
12711 IFS=$as_save_IFS
12712 
12713   ;;
12714 esac
12715 fi
12716 READLINK=$ac_cv_path_READLINK
12717 if test -n "$READLINK"; then
12718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12719 $as_echo "$READLINK" >&6; }
12720 else
12721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12722 $as_echo "no" >&6; }
12723 fi
12724 
12725 
12726   test -n "$READLINK" && break
12727 done
12728 
12729   else
12730     # The variable is set, but is it from the command line or the environment?
12731 
12732     # Try to remove the string !READLINK! from our list.
12733     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12734     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12735       # If it failed, the variable was not from the command line. Ignore it,
12736       # but warn the user (except for BASH, which is always set by the calling BASH).
12737       if test "xREADLINK" != xBASH; then
12738         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12739 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12740       fi
12741       # Try to locate tool using the code snippet
12742       for ac_prog in greadlink readlink
12743 do
12744   # Extract the first word of "$ac_prog", so it can be a program name with args.
12745 set dummy $ac_prog; ac_word=$2
12746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12747 $as_echo_n "checking for $ac_word... " >&6; }
12748 if ${ac_cv_path_READLINK+:} false; then :
12749   $as_echo_n "(cached) " >&6
12750 else
12751   case $READLINK in
12752   [\\/]* | ?:[\\/]*)
12753   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12754   ;;
12755   *)
12756   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12757 for as_dir in $PATH
12758 do
12759   IFS=$as_save_IFS
12760   test -z "$as_dir" && as_dir=.
12761     for ac_exec_ext in '' $ac_executable_extensions; do
12762   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12763     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12764     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12765     break 2
12766   fi
12767 done
12768   done
12769 IFS=$as_save_IFS
12770 
12771   ;;
12772 esac
12773 fi
12774 READLINK=$ac_cv_path_READLINK
12775 if test -n "$READLINK"; then
12776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12777 $as_echo "$READLINK" >&6; }
12778 else
12779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12780 $as_echo "no" >&6; }
12781 fi
12782 
12783 
12784   test -n "$READLINK" && break
12785 done
12786 
12787     else
12788       # If it succeeded, then it was overridden by the user. We will use it
12789       # for the tool.
12790 
12791       # First remove it from the list of overridden variables, so we can test
12792       # for unknown variables in the end.
12793       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12794 
12795       # Check if the provided tool contains a complete path.
12796       tool_specified="$READLINK"
12797       tool_basename="${tool_specified##*/}"
12798       if test "x$tool_basename" = "x$tool_specified"; then
12799         # A command without a complete path is provided, search $PATH.
12800         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12801 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12802         # Extract the first word of "$tool_basename", so it can be a program name with args.
12803 set dummy $tool_basename; ac_word=$2
12804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12805 $as_echo_n "checking for $ac_word... " >&6; }
12806 if ${ac_cv_path_READLINK+:} false; then :
12807   $as_echo_n "(cached) " >&6
12808 else
12809   case $READLINK in
12810   [\\/]* | ?:[\\/]*)
12811   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12812   ;;
12813   *)
12814   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12815 for as_dir in $PATH
12816 do
12817   IFS=$as_save_IFS
12818   test -z "$as_dir" && as_dir=.
12819     for ac_exec_ext in '' $ac_executable_extensions; do
12820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12821     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12823     break 2
12824   fi
12825 done
12826   done
12827 IFS=$as_save_IFS
12828 
12829   ;;
12830 esac
12831 fi
12832 READLINK=$ac_cv_path_READLINK
12833 if test -n "$READLINK"; then
12834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12835 $as_echo "$READLINK" >&6; }
12836 else
12837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12838 $as_echo "no" >&6; }
12839 fi
12840 
12841 
12842         if test "x$READLINK" = x; then
12843           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12844         fi
12845       else
12846         # Otherwise we believe it is a complete path. Use it as it is.
12847         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12848 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12849         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12850 $as_echo_n "checking for READLINK... " >&6; }
12851         if test ! -x "$tool_specified"; then
12852           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12853 $as_echo "not found" >&6; }
12854           as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12855         fi
12856         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12857 $as_echo "$tool_specified" >&6; }
12858       fi
12859     fi
12860   fi
12861 
12862 
12863 
12864 
12865   # Publish this variable in the help.
12866 
12867 
12868   if test "x$DF" = x; then
12869     # The variable is not set by user, try to locate tool using the code snippet
12870     for ac_prog in df
12871 do
12872   # Extract the first word of "$ac_prog", so it can be a program name with args.
12873 set dummy $ac_prog; ac_word=$2
12874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12875 $as_echo_n "checking for $ac_word... " >&6; }
12876 if ${ac_cv_path_DF+:} false; then :
12877   $as_echo_n "(cached) " >&6
12878 else
12879   case $DF in
12880   [\\/]* | ?:[\\/]*)
12881   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12882   ;;
12883   *)
12884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12885 for as_dir in $PATH
12886 do
12887   IFS=$as_save_IFS
12888   test -z "$as_dir" && as_dir=.
12889     for ac_exec_ext in '' $ac_executable_extensions; do
12890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12891     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12893     break 2
12894   fi
12895 done
12896   done
12897 IFS=$as_save_IFS
12898 
12899   ;;
12900 esac
12901 fi
12902 DF=$ac_cv_path_DF
12903 if test -n "$DF"; then
12904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12905 $as_echo "$DF" >&6; }
12906 else
12907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12908 $as_echo "no" >&6; }
12909 fi
12910 
12911 
12912   test -n "$DF" && break
12913 done
12914 
12915   else
12916     # The variable is set, but is it from the command line or the environment?
12917 
12918     # Try to remove the string !DF! from our list.
12919     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12920     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12921       # If it failed, the variable was not from the command line. Ignore it,
12922       # but warn the user (except for BASH, which is always set by the calling BASH).
12923       if test "xDF" != xBASH; then
12924         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12925 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12926       fi
12927       # Try to locate tool using the code snippet
12928       for ac_prog in df
12929 do
12930   # Extract the first word of "$ac_prog", so it can be a program name with args.
12931 set dummy $ac_prog; ac_word=$2
12932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12933 $as_echo_n "checking for $ac_word... " >&6; }
12934 if ${ac_cv_path_DF+:} false; then :
12935   $as_echo_n "(cached) " >&6
12936 else
12937   case $DF in
12938   [\\/]* | ?:[\\/]*)
12939   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12940   ;;
12941   *)
12942   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12943 for as_dir in $PATH
12944 do
12945   IFS=$as_save_IFS
12946   test -z "$as_dir" && as_dir=.
12947     for ac_exec_ext in '' $ac_executable_extensions; do
12948   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12949     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12950     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12951     break 2
12952   fi
12953 done
12954   done
12955 IFS=$as_save_IFS
12956 
12957   ;;
12958 esac
12959 fi
12960 DF=$ac_cv_path_DF
12961 if test -n "$DF"; then
12962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12963 $as_echo "$DF" >&6; }
12964 else
12965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12966 $as_echo "no" >&6; }
12967 fi
12968 
12969 
12970   test -n "$DF" && break
12971 done
12972 
12973     else
12974       # If it succeeded, then it was overridden by the user. We will use it
12975       # for the tool.
12976 
12977       # First remove it from the list of overridden variables, so we can test
12978       # for unknown variables in the end.
12979       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12980 
12981       # Check if the provided tool contains a complete path.
12982       tool_specified="$DF"
12983       tool_basename="${tool_specified##*/}"
12984       if test "x$tool_basename" = "x$tool_specified"; then
12985         # A command without a complete path is provided, search $PATH.
12986         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12987 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12988         # Extract the first word of "$tool_basename", so it can be a program name with args.
12989 set dummy $tool_basename; ac_word=$2
12990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12991 $as_echo_n "checking for $ac_word... " >&6; }
12992 if ${ac_cv_path_DF+:} false; then :
12993   $as_echo_n "(cached) " >&6
12994 else
12995   case $DF in
12996   [\\/]* | ?:[\\/]*)
12997   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12998   ;;
12999   *)
13000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13001 for as_dir in $PATH
13002 do
13003   IFS=$as_save_IFS
13004   test -z "$as_dir" && as_dir=.
13005     for ac_exec_ext in '' $ac_executable_extensions; do
13006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13007     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13009     break 2
13010   fi
13011 done
13012   done
13013 IFS=$as_save_IFS
13014 
13015   ;;
13016 esac
13017 fi
13018 DF=$ac_cv_path_DF
13019 if test -n "$DF"; then
13020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13021 $as_echo "$DF" >&6; }
13022 else
13023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13024 $as_echo "no" >&6; }
13025 fi
13026 
13027 
13028         if test "x$DF" = x; then
13029           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13030         fi
13031       else
13032         # Otherwise we believe it is a complete path. Use it as it is.
13033         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13034 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13035         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13036 $as_echo_n "checking for DF... " >&6; }
13037         if test ! -x "$tool_specified"; then
13038           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13039 $as_echo "not found" >&6; }
13040           as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13041         fi
13042         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13043 $as_echo "$tool_specified" >&6; }
13044       fi
13045     fi
13046   fi
13047 
13048 
13049 
13050 
13051   # Publish this variable in the help.
13052 
13053 
13054   if test "x$SETFILE" = x; then
13055     # The variable is not set by user, try to locate tool using the code snippet
13056     for ac_prog in SetFile
13057 do
13058   # Extract the first word of "$ac_prog", so it can be a program name with args.
13059 set dummy $ac_prog; ac_word=$2
13060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13061 $as_echo_n "checking for $ac_word... " >&6; }
13062 if ${ac_cv_path_SETFILE+:} false; then :
13063   $as_echo_n "(cached) " >&6
13064 else
13065   case $SETFILE in
13066   [\\/]* | ?:[\\/]*)
13067   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13068   ;;
13069   *)
13070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13071 for as_dir in $PATH
13072 do
13073   IFS=$as_save_IFS
13074   test -z "$as_dir" && as_dir=.
13075     for ac_exec_ext in '' $ac_executable_extensions; do
13076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13077     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13079     break 2
13080   fi
13081 done
13082   done
13083 IFS=$as_save_IFS
13084 
13085   ;;
13086 esac
13087 fi
13088 SETFILE=$ac_cv_path_SETFILE
13089 if test -n "$SETFILE"; then
13090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13091 $as_echo "$SETFILE" >&6; }
13092 else
13093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13094 $as_echo "no" >&6; }
13095 fi
13096 
13097 
13098   test -n "$SETFILE" && break
13099 done
13100 
13101   else
13102     # The variable is set, but is it from the command line or the environment?
13103 
13104     # Try to remove the string !SETFILE! from our list.
13105     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13106     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13107       # If it failed, the variable was not from the command line. Ignore it,
13108       # but warn the user (except for BASH, which is always set by the calling BASH).
13109       if test "xSETFILE" != xBASH; then
13110         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13111 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13112       fi
13113       # Try to locate tool using the code snippet
13114       for ac_prog in SetFile
13115 do
13116   # Extract the first word of "$ac_prog", so it can be a program name with args.
13117 set dummy $ac_prog; ac_word=$2
13118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13119 $as_echo_n "checking for $ac_word... " >&6; }
13120 if ${ac_cv_path_SETFILE+:} false; then :
13121   $as_echo_n "(cached) " >&6
13122 else
13123   case $SETFILE in
13124   [\\/]* | ?:[\\/]*)
13125   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13126   ;;
13127   *)
13128   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13129 for as_dir in $PATH
13130 do
13131   IFS=$as_save_IFS
13132   test -z "$as_dir" && as_dir=.
13133     for ac_exec_ext in '' $ac_executable_extensions; do
13134   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13135     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13137     break 2
13138   fi
13139 done
13140   done
13141 IFS=$as_save_IFS
13142 
13143   ;;
13144 esac
13145 fi
13146 SETFILE=$ac_cv_path_SETFILE
13147 if test -n "$SETFILE"; then
13148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13149 $as_echo "$SETFILE" >&6; }
13150 else
13151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13152 $as_echo "no" >&6; }
13153 fi
13154 
13155 
13156   test -n "$SETFILE" && break
13157 done
13158 
13159     else
13160       # If it succeeded, then it was overridden by the user. We will use it
13161       # for the tool.
13162 
13163       # First remove it from the list of overridden variables, so we can test
13164       # for unknown variables in the end.
13165       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13166 
13167       # Check if the provided tool contains a complete path.
13168       tool_specified="$SETFILE"
13169       tool_basename="${tool_specified##*/}"
13170       if test "x$tool_basename" = "x$tool_specified"; then
13171         # A command without a complete path is provided, search $PATH.
13172         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13173 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13174         # Extract the first word of "$tool_basename", so it can be a program name with args.
13175 set dummy $tool_basename; ac_word=$2
13176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13177 $as_echo_n "checking for $ac_word... " >&6; }
13178 if ${ac_cv_path_SETFILE+:} false; then :
13179   $as_echo_n "(cached) " >&6
13180 else
13181   case $SETFILE in
13182   [\\/]* | ?:[\\/]*)
13183   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13184   ;;
13185   *)
13186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13187 for as_dir in $PATH
13188 do
13189   IFS=$as_save_IFS
13190   test -z "$as_dir" && as_dir=.
13191     for ac_exec_ext in '' $ac_executable_extensions; do
13192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13193     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13195     break 2
13196   fi
13197 done
13198   done
13199 IFS=$as_save_IFS
13200 
13201   ;;
13202 esac
13203 fi
13204 SETFILE=$ac_cv_path_SETFILE
13205 if test -n "$SETFILE"; then
13206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13207 $as_echo "$SETFILE" >&6; }
13208 else
13209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13210 $as_echo "no" >&6; }
13211 fi
13212 
13213 
13214         if test "x$SETFILE" = x; then
13215           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13216         fi
13217       else
13218         # Otherwise we believe it is a complete path. Use it as it is.
13219         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13220 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13221         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13222 $as_echo_n "checking for SETFILE... " >&6; }
13223         if test ! -x "$tool_specified"; then
13224           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13225 $as_echo "not found" >&6; }
13226           as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13227         fi
13228         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13229 $as_echo "$tool_specified" >&6; }
13230       fi
13231     fi
13232   fi
13233 
13234 
13235 
13236 
13237   # Publish this variable in the help.
13238 
13239 
13240   if test "x$CPIO" = x; then
13241     # The variable is not set by user, try to locate tool using the code snippet
13242     for ac_prog in cpio bsdcpio
13243 do
13244   # Extract the first word of "$ac_prog", so it can be a program name with args.
13245 set dummy $ac_prog; ac_word=$2
13246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13247 $as_echo_n "checking for $ac_word... " >&6; }
13248 if ${ac_cv_path_CPIO+:} false; then :
13249   $as_echo_n "(cached) " >&6
13250 else
13251   case $CPIO in
13252   [\\/]* | ?:[\\/]*)
13253   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13254   ;;
13255   *)
13256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13257 for as_dir in $PATH
13258 do
13259   IFS=$as_save_IFS
13260   test -z "$as_dir" && as_dir=.
13261     for ac_exec_ext in '' $ac_executable_extensions; do
13262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13263     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13265     break 2
13266   fi
13267 done
13268   done
13269 IFS=$as_save_IFS
13270 
13271   ;;
13272 esac
13273 fi
13274 CPIO=$ac_cv_path_CPIO
13275 if test -n "$CPIO"; then
13276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13277 $as_echo "$CPIO" >&6; }
13278 else
13279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13280 $as_echo "no" >&6; }
13281 fi
13282 
13283 
13284   test -n "$CPIO" && break
13285 done
13286 
13287   else
13288     # The variable is set, but is it from the command line or the environment?
13289 
13290     # Try to remove the string !CPIO! from our list.
13291     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13292     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13293       # If it failed, the variable was not from the command line. Ignore it,
13294       # but warn the user (except for BASH, which is always set by the calling BASH).
13295       if test "xCPIO" != xBASH; then
13296         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13297 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13298       fi
13299       # Try to locate tool using the code snippet
13300       for ac_prog in cpio bsdcpio
13301 do
13302   # Extract the first word of "$ac_prog", so it can be a program name with args.
13303 set dummy $ac_prog; ac_word=$2
13304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13305 $as_echo_n "checking for $ac_word... " >&6; }
13306 if ${ac_cv_path_CPIO+:} false; then :
13307   $as_echo_n "(cached) " >&6
13308 else
13309   case $CPIO in
13310   [\\/]* | ?:[\\/]*)
13311   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13312   ;;
13313   *)
13314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13315 for as_dir in $PATH
13316 do
13317   IFS=$as_save_IFS
13318   test -z "$as_dir" && as_dir=.
13319     for ac_exec_ext in '' $ac_executable_extensions; do
13320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13321     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13323     break 2
13324   fi
13325 done
13326   done
13327 IFS=$as_save_IFS
13328 
13329   ;;
13330 esac
13331 fi
13332 CPIO=$ac_cv_path_CPIO
13333 if test -n "$CPIO"; then
13334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13335 $as_echo "$CPIO" >&6; }
13336 else
13337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13338 $as_echo "no" >&6; }
13339 fi
13340 
13341 
13342   test -n "$CPIO" && break
13343 done
13344 
13345     else
13346       # If it succeeded, then it was overridden by the user. We will use it
13347       # for the tool.
13348 
13349       # First remove it from the list of overridden variables, so we can test
13350       # for unknown variables in the end.
13351       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13352 
13353       # Check if the provided tool contains a complete path.
13354       tool_specified="$CPIO"
13355       tool_basename="${tool_specified##*/}"
13356       if test "x$tool_basename" = "x$tool_specified"; then
13357         # A command without a complete path is provided, search $PATH.
13358         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13359 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13360         # Extract the first word of "$tool_basename", so it can be a program name with args.
13361 set dummy $tool_basename; ac_word=$2
13362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13363 $as_echo_n "checking for $ac_word... " >&6; }
13364 if ${ac_cv_path_CPIO+:} false; then :
13365   $as_echo_n "(cached) " >&6
13366 else
13367   case $CPIO in
13368   [\\/]* | ?:[\\/]*)
13369   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13370   ;;
13371   *)
13372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13373 for as_dir in $PATH
13374 do
13375   IFS=$as_save_IFS
13376   test -z "$as_dir" && as_dir=.
13377     for ac_exec_ext in '' $ac_executable_extensions; do
13378   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13379     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13381     break 2
13382   fi
13383 done
13384   done
13385 IFS=$as_save_IFS
13386 
13387   ;;
13388 esac
13389 fi
13390 CPIO=$ac_cv_path_CPIO
13391 if test -n "$CPIO"; then
13392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13393 $as_echo "$CPIO" >&6; }
13394 else
13395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13396 $as_echo "no" >&6; }
13397 fi
13398 
13399 
13400         if test "x$CPIO" = x; then
13401           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13402         fi
13403       else
13404         # Otherwise we believe it is a complete path. Use it as it is.
13405         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13406 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13407         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13408 $as_echo_n "checking for CPIO... " >&6; }
13409         if test ! -x "$tool_specified"; then
13410           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13411 $as_echo "not found" >&6; }
13412           as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13413         fi
13414         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13415 $as_echo "$tool_specified" >&6; }
13416       fi
13417     fi
13418   fi
13419 
13420 
13421 
13422 
13423 # Now we can determine OpenJDK build and target platforms. This is required to
13424 # have early on.
13425 # Make sure we can run config.sub.
13426 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13427   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13428 
13429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13430 $as_echo_n "checking build system type... " >&6; }
13431 if ${ac_cv_build+:} false; then :
13432   $as_echo_n "(cached) " >&6
13433 else
13434   ac_build_alias=$build_alias
13435 test "x$ac_build_alias" = x &&
13436   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13437 test "x$ac_build_alias" = x &&
13438   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13439 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13440   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13441 
13442 fi
13443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13444 $as_echo "$ac_cv_build" >&6; }
13445 case $ac_cv_build in
13446 *-*-*) ;;
13447 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13448 esac
13449 build=$ac_cv_build
13450 ac_save_IFS=$IFS; IFS='-'
13451 set x $ac_cv_build
13452 shift
13453 build_cpu=$1
13454 build_vendor=$2
13455 shift; shift
13456 # Remember, the first character of IFS is used to create $*,
13457 # except with old shells:
13458 build_os=$*
13459 IFS=$ac_save_IFS
13460 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13461 
13462 
13463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13464 $as_echo_n "checking host system type... " >&6; }
13465 if ${ac_cv_host+:} false; then :
13466   $as_echo_n "(cached) " >&6
13467 else
13468   if test "x$host_alias" = x; then
13469   ac_cv_host=$ac_cv_build
13470 else
13471   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13472     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13473 fi
13474 
13475 fi
13476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13477 $as_echo "$ac_cv_host" >&6; }
13478 case $ac_cv_host in
13479 *-*-*) ;;
13480 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13481 esac
13482 host=$ac_cv_host
13483 ac_save_IFS=$IFS; IFS='-'
13484 set x $ac_cv_host
13485 shift
13486 host_cpu=$1
13487 host_vendor=$2
13488 shift; shift
13489 # Remember, the first character of IFS is used to create $*,
13490 # except with old shells:
13491 host_os=$*
13492 IFS=$ac_save_IFS
13493 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13494 
13495 
13496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13497 $as_echo_n "checking target system type... " >&6; }
13498 if ${ac_cv_target+:} false; then :
13499   $as_echo_n "(cached) " >&6
13500 else
13501   if test "x$target_alias" = x; then
13502   ac_cv_target=$ac_cv_host
13503 else
13504   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13505     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13506 fi
13507 
13508 fi
13509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13510 $as_echo "$ac_cv_target" >&6; }
13511 case $ac_cv_target in
13512 *-*-*) ;;
13513 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13514 esac
13515 target=$ac_cv_target
13516 ac_save_IFS=$IFS; IFS='-'
13517 set x $ac_cv_target
13518 shift
13519 target_cpu=$1
13520 target_vendor=$2
13521 shift; shift
13522 # Remember, the first character of IFS is used to create $*,
13523 # except with old shells:
13524 target_os=$*
13525 IFS=$ac_save_IFS
13526 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13527 
13528 
13529 # The aliases save the names the user supplied, while $host etc.
13530 # will get canonicalized.
13531 test -n "$target_alias" &&
13532   test "$program_prefix$program_suffix$program_transform_name" = \
13533     NONENONEs,x,x, &&
13534   program_prefix=${target_alias}-
13535 
13536   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13537   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13538   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13539   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13540   # to use the configure naming style.
13541 
13542 
13543 
13544 
13545 
13546   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13547   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13548   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13549   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13550   OPENJDK_TARGET_AUTOCONF_NAME="$host"
13551   OPENJDK_BUILD_AUTOCONF_NAME="$build"
13552 
13553 
13554 
13555   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13556 
13557   case "$build_os" in
13558     *linux*)
13559       VAR_OS=linux
13560       VAR_OS_API=posix
13561       VAR_OS_ENV=linux
13562       ;;
13563     *solaris*)
13564       VAR_OS=solaris
13565       VAR_OS_API=posix
13566       VAR_OS_ENV=solaris
13567       ;;
13568     *darwin*)
13569       VAR_OS=macosx
13570       VAR_OS_API=posix
13571       VAR_OS_ENV=macosx
13572       ;;
13573     *bsd*)
13574       VAR_OS=bsd
13575       VAR_OS_API=posix
13576       VAR_OS_ENV=bsd
13577       ;;
13578     *cygwin*)
13579       VAR_OS=windows
13580       VAR_OS_API=winapi
13581       VAR_OS_ENV=windows.cygwin
13582       ;;
13583     *mingw*)
13584       VAR_OS=windows
13585       VAR_OS_API=winapi
13586       VAR_OS_ENV=windows.msys
13587       ;;
13588     *aix*)
13589       VAR_OS=aix
13590       VAR_OS_API=posix
13591       VAR_OS_ENV=aix
13592       ;;
13593     *)
13594       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13595       ;;
13596   esac
13597 
13598 
13599   # First argument is the cpu name from the trip/quad
13600   case "$build_cpu" in
13601     x86_64)
13602       VAR_CPU=x86_64
13603       VAR_CPU_ARCH=x86
13604       VAR_CPU_BITS=64
13605       VAR_CPU_ENDIAN=little
13606       ;;
13607     i?86)
13608       VAR_CPU=x86
13609       VAR_CPU_ARCH=x86
13610       VAR_CPU_BITS=32
13611       VAR_CPU_ENDIAN=little
13612       ;;
13613     arm*)
13614       VAR_CPU=arm
13615       VAR_CPU_ARCH=arm
13616       VAR_CPU_BITS=32
13617       VAR_CPU_ENDIAN=little
13618       ;;
13619     aarch64)
13620       VAR_CPU=aarch64
13621       VAR_CPU_ARCH=aarch64
13622       VAR_CPU_BITS=64
13623       VAR_CPU_ENDIAN=little
13624       ;;
13625     powerpc)
13626       VAR_CPU=ppc
13627       VAR_CPU_ARCH=ppc
13628       VAR_CPU_BITS=32
13629       VAR_CPU_ENDIAN=big
13630       ;;
13631     powerpc64)
13632       VAR_CPU=ppc64
13633       VAR_CPU_ARCH=ppc
13634       VAR_CPU_BITS=64
13635       VAR_CPU_ENDIAN=big
13636       ;;
13637     powerpc64le)
13638       VAR_CPU=ppc64le
13639       VAR_CPU_ARCH=ppc
13640       VAR_CPU_BITS=64
13641       VAR_CPU_ENDIAN=little
13642       ;;
13643     s390)
13644       VAR_CPU=s390
13645       VAR_CPU_ARCH=s390
13646       VAR_CPU_BITS=32
13647       VAR_CPU_ENDIAN=big
13648       ;;
13649     s390x)
13650       VAR_CPU=s390x
13651       VAR_CPU_ARCH=s390
13652       VAR_CPU_BITS=64
13653       VAR_CPU_ENDIAN=big
13654       ;;
13655     sparc)
13656       VAR_CPU=sparc
13657       VAR_CPU_ARCH=sparc
13658       VAR_CPU_BITS=32
13659       VAR_CPU_ENDIAN=big
13660       ;;
13661     sparcv9|sparc64)
13662       VAR_CPU=sparcv9
13663       VAR_CPU_ARCH=sparc
13664       VAR_CPU_BITS=64
13665       VAR_CPU_ENDIAN=big
13666       ;;
13667     *)
13668       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13669       ;;
13670   esac
13671 
13672   # ..and setup our own variables. (Do this explicitely to facilitate searching)
13673   OPENJDK_BUILD_OS="$VAR_OS"
13674   OPENJDK_BUILD_OS_API="$VAR_OS_API"
13675   OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13676   OPENJDK_BUILD_CPU="$VAR_CPU"
13677   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13678   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13679   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13680 
13681 
13682 
13683 
13684 
13685 
13686 
13687 
13688   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13689 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
13690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13691 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13692 
13693   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13694 
13695   case "$host_os" in
13696     *linux*)
13697       VAR_OS=linux
13698       VAR_OS_API=posix
13699       VAR_OS_ENV=linux
13700       ;;
13701     *solaris*)
13702       VAR_OS=solaris
13703       VAR_OS_API=posix
13704       VAR_OS_ENV=solaris
13705       ;;
13706     *darwin*)
13707       VAR_OS=macosx
13708       VAR_OS_API=posix
13709       VAR_OS_ENV=macosx
13710       ;;
13711     *bsd*)
13712       VAR_OS=bsd
13713       VAR_OS_API=posix
13714       VAR_OS_ENV=bsd
13715       ;;
13716     *cygwin*)
13717       VAR_OS=windows
13718       VAR_OS_API=winapi
13719       VAR_OS_ENV=windows.cygwin
13720       ;;
13721     *mingw*)
13722       VAR_OS=windows
13723       VAR_OS_API=winapi
13724       VAR_OS_ENV=windows.msys
13725       ;;
13726     *aix*)
13727       VAR_OS=aix
13728       VAR_OS_API=posix
13729       VAR_OS_ENV=aix
13730       ;;
13731     *)
13732       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13733       ;;
13734   esac
13735 
13736 
13737   # First argument is the cpu name from the trip/quad
13738   case "$host_cpu" in
13739     x86_64)
13740       VAR_CPU=x86_64
13741       VAR_CPU_ARCH=x86
13742       VAR_CPU_BITS=64
13743       VAR_CPU_ENDIAN=little
13744       ;;
13745     i?86)
13746       VAR_CPU=x86
13747       VAR_CPU_ARCH=x86
13748       VAR_CPU_BITS=32
13749       VAR_CPU_ENDIAN=little
13750       ;;
13751     arm*)
13752       VAR_CPU=arm
13753       VAR_CPU_ARCH=arm
13754       VAR_CPU_BITS=32
13755       VAR_CPU_ENDIAN=little
13756       ;;
13757     aarch64)
13758       VAR_CPU=aarch64
13759       VAR_CPU_ARCH=aarch64
13760       VAR_CPU_BITS=64
13761       VAR_CPU_ENDIAN=little
13762       ;;
13763     powerpc)
13764       VAR_CPU=ppc
13765       VAR_CPU_ARCH=ppc
13766       VAR_CPU_BITS=32
13767       VAR_CPU_ENDIAN=big
13768       ;;
13769     powerpc64)
13770       VAR_CPU=ppc64
13771       VAR_CPU_ARCH=ppc
13772       VAR_CPU_BITS=64
13773       VAR_CPU_ENDIAN=big
13774       ;;
13775     powerpc64le)
13776       VAR_CPU=ppc64le
13777       VAR_CPU_ARCH=ppc
13778       VAR_CPU_BITS=64
13779       VAR_CPU_ENDIAN=little
13780       ;;
13781     s390)
13782       VAR_CPU=s390
13783       VAR_CPU_ARCH=s390
13784       VAR_CPU_BITS=32
13785       VAR_CPU_ENDIAN=big
13786       ;;
13787     s390x)
13788       VAR_CPU=s390x
13789       VAR_CPU_ARCH=s390
13790       VAR_CPU_BITS=64
13791       VAR_CPU_ENDIAN=big
13792       ;;
13793     sparc)
13794       VAR_CPU=sparc
13795       VAR_CPU_ARCH=sparc
13796       VAR_CPU_BITS=32
13797       VAR_CPU_ENDIAN=big
13798       ;;
13799     sparcv9|sparc64)
13800       VAR_CPU=sparcv9
13801       VAR_CPU_ARCH=sparc
13802       VAR_CPU_BITS=64
13803       VAR_CPU_ENDIAN=big
13804       ;;
13805     *)
13806       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13807       ;;
13808   esac
13809 
13810   # ... and setup our own variables. (Do this explicitely to facilitate searching)
13811   OPENJDK_TARGET_OS="$VAR_OS"
13812   OPENJDK_TARGET_OS_API="$VAR_OS_API"
13813   OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13814   OPENJDK_TARGET_CPU="$VAR_CPU"
13815   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13816   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13817   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13818 
13819 
13820 
13821 
13822 
13823 
13824 
13825 
13826   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13827 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
13828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13829 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13830 
13831 
13832 
13833 # Check whether --with-target-bits was given.
13834 if test "${with_target_bits+set}" = set; then :
13835   withval=$with_target_bits;
13836 fi
13837 
13838 
13839   # We have three types of compiles:
13840   # native  == normal compilation, target system == build system
13841   # cross   == traditional cross compilation, target system != build system; special toolchain needed
13842   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13843   #
13844   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13845     # We're doing a proper cross-compilation
13846     COMPILE_TYPE="cross"
13847   else
13848     COMPILE_TYPE="native"
13849   fi
13850 
13851   if test "x$with_target_bits" != x; then
13852     if test "x$COMPILE_TYPE" = "xcross"; then
13853       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13854     fi
13855 
13856     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13857       # A reduced build is requested
13858       COMPILE_TYPE="reduced"
13859       OPENJDK_TARGET_CPU_BITS=32
13860       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13861         OPENJDK_TARGET_CPU=x86
13862       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13863         OPENJDK_TARGET_CPU=sparc
13864       else
13865         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13866       fi
13867     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13868       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
13869     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13870       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13871 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13872     else
13873       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13874     fi
13875   fi
13876 
13877 
13878   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13879 $as_echo_n "checking compilation type... " >&6; }
13880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13881 $as_echo "$COMPILE_TYPE" >&6; }
13882 
13883 
13884   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13885     REQUIRED_OS_NAME=SunOS
13886     REQUIRED_OS_VERSION=5.10
13887   fi
13888   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13889     REQUIRED_OS_NAME=Linux
13890     REQUIRED_OS_VERSION=2.6
13891   fi
13892   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13893     REQUIRED_OS_NAME=Windows
13894     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13895       REQUIRED_OS_VERSION=5.2
13896     else
13897       REQUIRED_OS_VERSION=5.1
13898     fi
13899   fi
13900   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13901     REQUIRED_OS_NAME=Darwin
13902     REQUIRED_OS_VERSION=11.2
13903   fi
13904 
13905 
13906 
13907 
13908 
13909   # Also store the legacy naming of the cpu.
13910   # Ie i586 and amd64 instead of x86 and x86_64
13911   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13912   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13913     OPENJDK_TARGET_CPU_LEGACY="i586"
13914   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13915     # On all platforms except MacOSX replace x86_64 with amd64.
13916     OPENJDK_TARGET_CPU_LEGACY="amd64"
13917   fi
13918 
13919 
13920   # And the second legacy naming of the cpu.
13921   # Ie i386 and amd64 instead of x86 and x86_64.
13922   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13923   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13924     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13925   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13926     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13927   fi
13928 
13929 
13930   # This is the name of the cpu (but using i386 and amd64 instead of
13931   # x86 and x86_64, respectively), preceeded by a /, to be used when
13932   # locating libraries. On macosx, it's empty, though.
13933   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13934   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13935     OPENJDK_TARGET_CPU_LIBDIR=""
13936   fi
13937 
13938 
13939   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13940   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13941   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13942   OPENJDK_TARGET_CPU_ISADIR=""
13943   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13944     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13945       OPENJDK_TARGET_CPU_ISADIR="/amd64"
13946     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13947       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13948     fi
13949   fi
13950 
13951 
13952   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13953   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13954   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13955     # On linux only, we replace x86 with i386.
13956     OPENJDK_TARGET_CPU_OSARCH="i386"
13957   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13958     # On all platforms except macosx, we replace x86_64 with amd64.
13959     OPENJDK_TARGET_CPU_OSARCH="amd64"
13960   fi
13961 
13962 
13963   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13964   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13965     OPENJDK_TARGET_CPU_JLI="i386"
13966   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13967     # On all platforms except macosx, we replace x86_64 with amd64.
13968     OPENJDK_TARGET_CPU_JLI="amd64"
13969   fi
13970   # Now setup the -D flags for building libjli.
13971   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13972   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13973     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13974       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13975     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13976       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13977     fi
13978   fi
13979 
13980 
13981   # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13982   if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13983     OPENJDK_TARGET_OS_API_DIR="solaris"
13984   fi
13985   if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13986     OPENJDK_TARGET_OS_API_DIR="windows"
13987   fi
13988 
13989 
13990   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13991       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13992   else
13993       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13994   fi
13995 
13996 
13997   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13998     A_LP64="LP64:="
13999     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14000     # unpack200.exe
14001     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14002       ADD_LP64="-D_LP64=1"
14003     fi
14004   fi
14005   LP64=$A_LP64
14006 
14007 
14008   if test "x$COMPILE_TYPE" = "xcross"; then
14009     # FIXME: ... or should this include reduced builds..?
14010     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14011   else
14012     DEFINE_CROSS_COMPILE_ARCH=""
14013   fi
14014 
14015 
14016   # ZERO_ARCHDEF is used to enable architecture-specific code
14017   case "${OPENJDK_TARGET_CPU}" in
14018     ppc)     ZERO_ARCHDEF=PPC32 ;;
14019     ppc64)   ZERO_ARCHDEF=PPC64 ;;
14020     s390*)   ZERO_ARCHDEF=S390  ;;
14021     sparc*)  ZERO_ARCHDEF=SPARC ;;
14022     x86_64*) ZERO_ARCHDEF=AMD64 ;;
14023     x86)     ZERO_ARCHDEF=IA32  ;;
14024     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14025   esac
14026 
14027 
14028 
14029 
14030 # Continue setting up basic stuff. Most remaining code require fundamental tools.
14031 
14032   # Save the current directory this script was started from
14033   CURDIR="$PWD"
14034 
14035   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14036     PATH_SEP=";"
14037 
14038   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14039   if test $SRC_ROOT_LENGTH -gt 100; then
14040     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14041   fi
14042 
14043   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14044     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14045 $as_echo_n "checking cygwin release... " >&6; }
14046     CYGWIN_VERSION=`$UNAME -r`
14047     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14048 $as_echo "$CYGWIN_VERSION" >&6; }
14049     WINDOWS_ENV_VENDOR='cygwin'
14050     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14051 
14052     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14053     if test "x$CYGWIN_VERSION_OLD" != x; then
14054       { $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
14055 $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;}
14056       as_fn_error $? "Cannot continue" "$LINENO" 5
14057     fi
14058     if test "x$CYGPATH" = x; then
14059       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14060     fi
14061     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14062 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14063     # The cmd output ends with Windows line endings (CR/LF)
14064     cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
14065     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14066     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14067     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14068 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
14069     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14070     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14071     if test "x$test_cygdrive_prefix" = x; then
14072       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14073     fi
14074   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14075     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14076 $as_echo_n "checking msys release... " >&6; }
14077     MSYS_VERSION=`$UNAME -r`
14078     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14079 $as_echo "$MSYS_VERSION" >&6; }
14080 
14081     WINDOWS_ENV_VENDOR='msys'
14082     WINDOWS_ENV_VERSION="$MSYS_VERSION"
14083 
14084     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14085 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
14086     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14087     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14088 
14089   windows_path="$MSYS_ROOT_PATH"
14090   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14091     unix_path=`$CYGPATH -u "$windows_path"`
14092     MSYS_ROOT_PATH="$unix_path"
14093   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14094     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14095     MSYS_ROOT_PATH="$unix_path"
14096   fi
14097 
14098     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14099 $as_echo "$MSYS_ROOT_PATH" >&6; }
14100     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14101   else
14102     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14103   fi
14104 
14105   # Test if windows or unix (cygwin/msys) find is first in path.
14106   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14107 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14108   FIND_BINARY_OUTPUT=`find --version 2>&1`
14109   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14110     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14111 $as_echo "unix style" >&6; }
14112   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14113     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14114 $as_echo "Windows" >&6; }
14115     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14116 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14117     { $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
14118 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14119     as_fn_error $? "Cannot continue" "$LINENO" 5
14120   else
14121     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14122 $as_echo "unknown" >&6; }
14123     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14124 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14125   fi
14126 
14127   else
14128     PATH_SEP=":"
14129   fi
14130 
14131 
14132   # We get the top-level directory from the supporting wrappers.
14133   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14134 $as_echo_n "checking for top-level directory... " >&6; }
14135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14136 $as_echo "$TOPDIR" >&6; }
14137 
14138 
14139   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14140 
14141   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14142 
14143   # Input might be given as Windows format, start by converting to
14144   # unix format.
14145   path="$CURDIR"
14146   new_path=`$CYGPATH -u "$path"`
14147 
14148   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14149   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14150   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14151   # "foo.exe" is OK but "foo" is an error.
14152   #
14153   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14154   # It is also a way to make sure we got the proper file name for the real test later on.
14155   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14156   if test "x$test_shortpath" = x; then
14157     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14158 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14159     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14160   fi
14161 
14162   # Call helper function which possibly converts this using DOS-style short mode.
14163   # If so, the updated path is stored in $new_path.
14164 
14165   input_path="$new_path"
14166   # Check if we need to convert this using DOS-style short mode. If the path
14167   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14168   # take no chances and rewrite it.
14169   # Note: m4 eats our [], so we need to use [ and ] instead.
14170   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14171   if test "x$has_forbidden_chars" != x; then
14172     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14173     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14174     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14175     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14176       # Going to short mode and back again did indeed matter. Since short mode is
14177       # case insensitive, let's make it lowercase to improve readability.
14178       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14179       # Now convert it back to Unix-style (cygpath)
14180       input_path=`$CYGPATH -u "$shortmode_path"`
14181       new_path="$input_path"
14182     fi
14183   fi
14184 
14185   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14186   if test "x$test_cygdrive_prefix" = x; then
14187     # As a simple fix, exclude /usr/bin since it's not a real path.
14188     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14189       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14190       # a path prefixed by /cygdrive for fixpath to work.
14191       new_path="$CYGWIN_ROOT_PATH$input_path"
14192     fi
14193   fi
14194 
14195 
14196   if test "x$path" != "x$new_path"; then
14197     CURDIR="$new_path"
14198     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14199 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14200   fi
14201 
14202   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14203 
14204   path="$CURDIR"
14205   has_colon=`$ECHO $path | $GREP ^.:`
14206   new_path="$path"
14207   if test "x$has_colon" = x; then
14208     # Not in mixed or Windows style, start by that.
14209     new_path=`cmd //c echo $path`
14210   fi
14211 
14212 
14213   input_path="$new_path"
14214   # Check if we need to convert this using DOS-style short mode. If the path
14215   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14216   # take no chances and rewrite it.
14217   # Note: m4 eats our [], so we need to use [ and ] instead.
14218   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14219   if test "x$has_forbidden_chars" != x; then
14220     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14221     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14222   fi
14223 
14224 
14225   windows_path="$new_path"
14226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14227     unix_path=`$CYGPATH -u "$windows_path"`
14228     new_path="$unix_path"
14229   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14230     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14231     new_path="$unix_path"
14232   fi
14233 
14234   if test "x$path" != "x$new_path"; then
14235     CURDIR="$new_path"
14236     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14237 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14238   fi
14239 
14240   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14241   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14242 
14243   else
14244     # We're on a posix platform. Hooray! :)
14245     path="$CURDIR"
14246     has_space=`$ECHO "$path" | $GREP " "`
14247     if test "x$has_space" != x; then
14248       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14249 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14250       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14251     fi
14252 
14253     # Use eval to expand a potential ~
14254     eval path="$path"
14255     if test ! -f "$path" && test ! -d "$path"; then
14256       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14257     fi
14258 
14259     CURDIR="`cd "$path"; $THEPWDCMD -L`"
14260   fi
14261 
14262 
14263   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14264 
14265   # Input might be given as Windows format, start by converting to
14266   # unix format.
14267   path="$TOPDIR"
14268   new_path=`$CYGPATH -u "$path"`
14269 
14270   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14271   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14272   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14273   # "foo.exe" is OK but "foo" is an error.
14274   #
14275   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14276   # It is also a way to make sure we got the proper file name for the real test later on.
14277   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14278   if test "x$test_shortpath" = x; then
14279     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14280 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14281     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14282   fi
14283 
14284   # Call helper function which possibly converts this using DOS-style short mode.
14285   # If so, the updated path is stored in $new_path.
14286 
14287   input_path="$new_path"
14288   # Check if we need to convert this using DOS-style short mode. If the path
14289   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14290   # take no chances and rewrite it.
14291   # Note: m4 eats our [], so we need to use [ and ] instead.
14292   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14293   if test "x$has_forbidden_chars" != x; then
14294     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14295     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14296     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14297     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14298       # Going to short mode and back again did indeed matter. Since short mode is
14299       # case insensitive, let's make it lowercase to improve readability.
14300       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14301       # Now convert it back to Unix-style (cygpath)
14302       input_path=`$CYGPATH -u "$shortmode_path"`
14303       new_path="$input_path"
14304     fi
14305   fi
14306 
14307   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14308   if test "x$test_cygdrive_prefix" = x; then
14309     # As a simple fix, exclude /usr/bin since it's not a real path.
14310     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14311       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14312       # a path prefixed by /cygdrive for fixpath to work.
14313       new_path="$CYGWIN_ROOT_PATH$input_path"
14314     fi
14315   fi
14316 
14317 
14318   if test "x$path" != "x$new_path"; then
14319     TOPDIR="$new_path"
14320     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14321 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14322   fi
14323 
14324   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14325 
14326   path="$TOPDIR"
14327   has_colon=`$ECHO $path | $GREP ^.:`
14328   new_path="$path"
14329   if test "x$has_colon" = x; then
14330     # Not in mixed or Windows style, start by that.
14331     new_path=`cmd //c echo $path`
14332   fi
14333 
14334 
14335   input_path="$new_path"
14336   # Check if we need to convert this using DOS-style short mode. If the path
14337   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14338   # take no chances and rewrite it.
14339   # Note: m4 eats our [], so we need to use [ and ] instead.
14340   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14341   if test "x$has_forbidden_chars" != x; then
14342     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14343     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14344   fi
14345 
14346 
14347   windows_path="$new_path"
14348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14349     unix_path=`$CYGPATH -u "$windows_path"`
14350     new_path="$unix_path"
14351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14352     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14353     new_path="$unix_path"
14354   fi
14355 
14356   if test "x$path" != "x$new_path"; then
14357     TOPDIR="$new_path"
14358     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14359 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14360   fi
14361 
14362   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14363   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14364 
14365   else
14366     # We're on a posix platform. Hooray! :)
14367     path="$TOPDIR"
14368     has_space=`$ECHO "$path" | $GREP " "`
14369     if test "x$has_space" != x; then
14370       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14371 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14372       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14373     fi
14374 
14375     # Use eval to expand a potential ~
14376     eval path="$path"
14377     if test ! -f "$path" && test ! -d "$path"; then
14378       as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14379     fi
14380 
14381     TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14382   fi
14383 
14384   # SRC_ROOT is a traditional alias for TOPDIR.
14385   SRC_ROOT=$TOPDIR
14386 
14387   # Locate the directory of this script.
14388   AUTOCONF_DIR=$TOPDIR/common/autoconf
14389 
14390 
14391   # Setup default logging of stdout and stderr to build.log in the output root.
14392   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14393   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14394   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14395 
14396 
14397 
14398 
14399 
14400 # Check if it's a pure open build or if custom sources are to be used.
14401 
14402   # Check whether --enable-openjdk-only was given.
14403 if test "${enable_openjdk_only+set}" = set; then :
14404   enableval=$enable_openjdk_only;
14405 else
14406   enable_openjdk_only="no"
14407 fi
14408 
14409 
14410   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14411 $as_echo_n "checking for presence of closed sources... " >&6; }
14412   if test -d "$SRC_ROOT/jdk/src/closed"; then
14413     CLOSED_SOURCE_PRESENT=yes
14414   else
14415     CLOSED_SOURCE_PRESENT=no
14416   fi
14417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14418 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14419 
14420   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14421 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14422   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14424 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14425 
14426   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14427     OPENJDK=true
14428     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14429       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14430 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14431     fi
14432   else
14433     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14434       OPENJDK=true
14435     else
14436       OPENJDK=false
14437     fi
14438   fi
14439 
14440   if test "x$OPENJDK" = "xtrue"; then
14441     SET_OPENJDK="OPENJDK=true"
14442   fi
14443 
14444 
14445 
14446 
14447 # These are needed to be able to create a configuration name (and thus the output directory)
14448 
14449   ###############################################################################
14450   #
14451   # Check which variant of the JDK that we want to build.
14452   # Currently we have:
14453   #    normal:   standard edition
14454   # but the custom make system may add other variants
14455   #
14456   # Effectively the JDK variant gives a name to a specific set of
14457   # modules to compile into the JDK. In the future, these modules
14458   # might even be Jigsaw modules.
14459   #
14460   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14461 $as_echo_n "checking which variant of the JDK to build... " >&6; }
14462 
14463 # Check whether --with-jdk-variant was given.
14464 if test "${with_jdk_variant+set}" = set; then :
14465   withval=$with_jdk_variant;
14466 fi
14467 
14468 
14469   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14470     JDK_VARIANT="normal"
14471   else
14472     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14473   fi
14474 
14475 
14476 
14477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14478 $as_echo "$JDK_VARIANT" >&6; }
14479 
14480 
14481 ###############################################################################
14482 #
14483 # Check which interpreter of the JVM we want to build.
14484 # Currently we have:
14485 #    template: Template interpreter (the default)
14486 #    cpp     : C++ interpreter
14487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14488 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14489 
14490 # Check whether --with-jvm-interpreter was given.
14491 if test "${with_jvm_interpreter+set}" = set; then :
14492   withval=$with_jvm_interpreter;
14493 fi
14494 
14495 
14496 if test "x$with_jvm_interpreter" = x; then
14497      with_jvm_interpreter="template"
14498 fi
14499 
14500 JVM_INTERPRETER="$with_jvm_interpreter"
14501 
14502 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14503    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14504 fi
14505 
14506 
14507 
14508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14509 $as_echo "$with_jvm_interpreter" >&6; }
14510 
14511 
14512 
14513   ###############################################################################
14514   #
14515   # Check which variants of the JVM that we want to build.
14516   # Currently we have:
14517   #    server: normal interpreter and a tiered C1/C2 compiler
14518   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14519   #    minimal1: reduced form of client with optional VM services and features stripped out
14520   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14521   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14522   #    zero: no machine code interpreter, no compiler
14523   #    zeroshark: zero interpreter and shark/llvm compiler backend
14524 #    core: interpreter only, no compiler (only works on some platforms)
14525   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14526 $as_echo_n "checking which variants of the JVM to build... " >&6; }
14527 
14528 # Check whether --with-jvm-variants was given.
14529 if test "${with_jvm_variants+set}" = set; then :
14530   withval=$with_jvm_variants;
14531 fi
14532 
14533 
14534   if test "x$with_jvm_variants" = x; then
14535     with_jvm_variants="server"
14536   fi
14537 
14538   JVM_VARIANTS=",$with_jvm_variants,"
14539   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,//'`
14540 
14541   if test "x$TEST_VARIANTS" != "x,"; then
14542      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14543   fi
14544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14545 $as_echo "$with_jvm_variants" >&6; }
14546 
14547   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14548   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14549   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14550   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14551   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14552   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14553   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14554 
14555   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14556     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14557       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14558     fi
14559   fi
14560   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14561     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14562       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14563     fi
14564   fi
14565   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14566     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14567       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14568     fi
14569   fi
14570 
14571   # Replace the commas with AND for use in the build directory name.
14572   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14573   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/'`
14574   if test "x$COUNT_VARIANTS" != "x,1"; then
14575     BUILDING_MULTIPLE_JVM_VARIANTS=yes
14576   else
14577     BUILDING_MULTIPLE_JVM_VARIANTS=no
14578   fi
14579 
14580 
14581 
14582 
14583 
14584 
14585 
14586 
14587 
14588 
14589   INCLUDE_SA=true
14590   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14591     INCLUDE_SA=false
14592   fi
14593   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14594     INCLUDE_SA=false
14595   fi
14596   if test "x$VAR_CPU" = xppc64 -o "x$VAR_CPU" = xppc64le ; then
14597     INCLUDE_SA=false
14598   fi
14599   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14600     INCLUDE_SA=false
14601   fi
14602 
14603 
14604   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14605     MACOSX_UNIVERSAL="false"
14606   fi
14607 
14608 
14609 
14610 
14611   ###############################################################################
14612   #
14613   # Set the debug level
14614   #    release: no debug information, all optimizations, no asserts.
14615   #    fastdebug: debug information (-g), all optimizations, all asserts
14616   #    slowdebug: debug information (-g), no optimizations, all asserts
14617   #
14618   DEBUG_LEVEL="release"
14619   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14620 $as_echo_n "checking which debug level to use... " >&6; }
14621   # Check whether --enable-debug was given.
14622 if test "${enable_debug+set}" = set; then :
14623   enableval=$enable_debug;
14624         ENABLE_DEBUG="${enableval}"
14625         DEBUG_LEVEL="fastdebug"
14626 
14627 else
14628   ENABLE_DEBUG="no"
14629 fi
14630 
14631 
14632 
14633 # Check whether --with-debug-level was given.
14634 if test "${with_debug_level+set}" = set; then :
14635   withval=$with_debug_level;
14636         DEBUG_LEVEL="${withval}"
14637         if test "x$ENABLE_DEBUG" = xyes; then
14638           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14639         fi
14640 
14641 fi
14642 
14643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14644 $as_echo "$DEBUG_LEVEL" >&6; }
14645 
14646   if test "x$DEBUG_LEVEL" != xrelease && \
14647       test "x$DEBUG_LEVEL" != xfastdebug && \
14648       test "x$DEBUG_LEVEL" != xslowdebug; then
14649     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14650   fi
14651 
14652 
14653   ###############################################################################
14654   #
14655   # Setup legacy vars/targets and new vars to deal with different debug levels.
14656   #
14657 
14658   case $DEBUG_LEVEL in
14659     release )
14660       VARIANT="OPT"
14661       FASTDEBUG="false"
14662       DEBUG_CLASSFILES="false"
14663       BUILD_VARIANT_RELEASE=""
14664       HOTSPOT_DEBUG_LEVEL="product"
14665       HOTSPOT_EXPORT="product"
14666       ;;
14667     fastdebug )
14668       VARIANT="DBG"
14669       FASTDEBUG="true"
14670       DEBUG_CLASSFILES="true"
14671       BUILD_VARIANT_RELEASE="-fastdebug"
14672       HOTSPOT_DEBUG_LEVEL="fastdebug"
14673       HOTSPOT_EXPORT="fastdebug"
14674       ;;
14675     slowdebug )
14676       VARIANT="DBG"
14677       FASTDEBUG="false"
14678       DEBUG_CLASSFILES="true"
14679       BUILD_VARIANT_RELEASE="-debug"
14680       HOTSPOT_DEBUG_LEVEL="jvmg"
14681       HOTSPOT_EXPORT="debug"
14682       ;;
14683   esac
14684 
14685   #####
14686   # Generate the legacy makefile targets for hotspot.
14687   # The hotspot api for selecting the build artifacts, really, needs to be improved.
14688   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14689   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14690   # But until then ...
14691   HOTSPOT_TARGET=""
14692 
14693   if test "x$JVM_VARIANT_SERVER" = xtrue; then
14694     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14695   fi
14696 
14697   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14698     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14699   fi
14700 
14701   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14702     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14703   fi
14704 
14705   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14706     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14707   fi
14708 
14709   if test "x$JVM_VARIANT_ZERO" = xtrue; then
14710     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14711   fi
14712 
14713   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14714     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14715   fi
14716 
14717   if test "x$JVM_VARIANT_CORE" = xtrue; then
14718     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14719   fi
14720 
14721   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14722 
14723   # On Macosx universal binaries are produced, but they only contain
14724   # 64 bit intel. This invalidates control of which jvms are built
14725   # from configure, but only server is valid anyway. Fix this
14726   # when hotspot makefiles are rewritten.
14727   if test "x$MACOSX_UNIVERSAL" = xtrue; then
14728     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14729   fi
14730 
14731   #####
14732 
14733 
14734 
14735 
14736 
14737 
14738 
14739 
14740 # With basic setup done, call the custom early hook.
14741 
14742 
14743 # Check if we have devkits, extra paths or sysroot set.
14744 
14745 
14746 # Check whether --with-devkit was given.
14747 if test "${with_devkit+set}" = set; then :
14748   withval=$with_devkit;
14749 fi
14750 
14751 
14752   if test "x$with_devkit" = xyes; then
14753     as_fn_error $? "--with-devkit must have a value" "$LINENO" 5
14754   elif test "x$with_devkit" != x && test "x$with_devkit" != xno; then
14755 
14756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14757 
14758   # Input might be given as Windows format, start by converting to
14759   # unix format.
14760   path="$with_devkit"
14761   new_path=`$CYGPATH -u "$path"`
14762 
14763   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14764   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14765   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14766   # "foo.exe" is OK but "foo" is an error.
14767   #
14768   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14769   # It is also a way to make sure we got the proper file name for the real test later on.
14770   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14771   if test "x$test_shortpath" = x; then
14772     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14773 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14774     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14775   fi
14776 
14777   # Call helper function which possibly converts this using DOS-style short mode.
14778   # If so, the updated path is stored in $new_path.
14779 
14780   input_path="$new_path"
14781   # Check if we need to convert this using DOS-style short mode. If the path
14782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14783   # take no chances and rewrite it.
14784   # Note: m4 eats our [], so we need to use [ and ] instead.
14785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14786   if test "x$has_forbidden_chars" != x; then
14787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14788     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14789     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14790     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14791       # Going to short mode and back again did indeed matter. Since short mode is
14792       # case insensitive, let's make it lowercase to improve readability.
14793       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14794       # Now convert it back to Unix-style (cygpath)
14795       input_path=`$CYGPATH -u "$shortmode_path"`
14796       new_path="$input_path"
14797     fi
14798   fi
14799 
14800   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14801   if test "x$test_cygdrive_prefix" = x; then
14802     # As a simple fix, exclude /usr/bin since it's not a real path.
14803     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14804       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14805       # a path prefixed by /cygdrive for fixpath to work.
14806       new_path="$CYGWIN_ROOT_PATH$input_path"
14807     fi
14808   fi
14809 
14810 
14811   if test "x$path" != "x$new_path"; then
14812     with_devkit="$new_path"
14813     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14814 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14815   fi
14816 
14817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14818 
14819   path="$with_devkit"
14820   has_colon=`$ECHO $path | $GREP ^.:`
14821   new_path="$path"
14822   if test "x$has_colon" = x; then
14823     # Not in mixed or Windows style, start by that.
14824     new_path=`cmd //c echo $path`
14825   fi
14826 
14827 
14828   input_path="$new_path"
14829   # Check if we need to convert this using DOS-style short mode. If the path
14830   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14831   # take no chances and rewrite it.
14832   # Note: m4 eats our [], so we need to use [ and ] instead.
14833   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14834   if test "x$has_forbidden_chars" != x; then
14835     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14836     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14837   fi
14838 
14839 
14840   windows_path="$new_path"
14841   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14842     unix_path=`$CYGPATH -u "$windows_path"`
14843     new_path="$unix_path"
14844   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14845     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14846     new_path="$unix_path"
14847   fi
14848 
14849   if test "x$path" != "x$new_path"; then
14850     with_devkit="$new_path"
14851     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14852 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14853   fi
14854 
14855   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14856   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14857 
14858   else
14859     # We're on a posix platform. Hooray! :)
14860     path="$with_devkit"
14861     has_space=`$ECHO "$path" | $GREP " "`
14862     if test "x$has_space" != x; then
14863       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14864 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14865       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14866     fi
14867 
14868     # Use eval to expand a potential ~
14869     eval path="$path"
14870     if test ! -f "$path" && test ! -d "$path"; then
14871       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14872     fi
14873 
14874     with_devkit="`cd "$path"; $THEPWDCMD -L`"
14875   fi
14876 
14877     DEVKIT_ROOT="$with_devkit"
14878     # Check for a meta data info file in the root of the devkit
14879     if test -f "$DEVKIT_ROOT/devkit.info"; then
14880       . $DEVKIT_ROOT/devkit.info
14881       # This potentially sets the following:
14882       # A descriptive name of the devkit
14883 
14884   if test "x$DEVKIT_NAME" = x; then
14885     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14886   fi
14887 
14888       # Corresponds to --with-extra-path
14889 
14890   if test "x$DEVKIT_EXTRA_PATH" = x; then
14891     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14892   fi
14893 
14894       # Corresponds to --with-toolchain-path
14895 
14896   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14897     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14898   fi
14899 
14900       # Corresponds to --with-sysroot
14901 
14902   if test "x$DEVKIT_SYSROOT" = x; then
14903     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14904   fi
14905 
14906 
14907       # Identifies the Visual Studio version in the devkit
14908 
14909   if test "x$DEVKIT_VS_VERSION" = x; then
14910     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14911   fi
14912 
14913       # The Visual Studio include environment variable
14914 
14915   if test "x$DEVKIT_VS_INCLUDE" = x; then
14916     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14917   fi
14918 
14919       # The Visual Studio lib environment variable
14920 
14921   if test "x$DEVKIT_VS_LIB" = x; then
14922     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14923   fi
14924 
14925       # Corresponds to --with-msvcr-dll
14926 
14927   if test "x$DEVKIT_MSVCR_DLL" = x; then
14928     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14929   fi
14930 
14931       # Corresponds to --with-msvcp-dll
14932 
14933   if test "x$DEVKIT_MSVCP_DLL" = x; then
14934     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14935   fi
14936 
14937       # Corresponds to --with-ucrt-dll-dir
14938 
14939   if test "x$DEVKIT_UCRT_DLL_DIR" = x; then
14940     eval DEVKIT_UCRT_DLL_DIR="\${DEVKIT_UCRT_DLL_DIR_${OPENJDK_TARGET_CPU}}"
14941   fi
14942 
14943     fi
14944 
14945     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14946 $as_echo_n "checking for devkit... " >&6; }
14947     if test "x$DEVKIT_NAME" != x; then
14948       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14949 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14950     else
14951       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14952 $as_echo "$DEVKIT_ROOT" >&6; }
14953     fi
14954 
14955 
14956   if test "x$DEVKIT_EXTRA_PATH" != x; then
14957     if test "x$EXTRA_PATH" = x; then
14958       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14959     else
14960       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14961     fi
14962   fi
14963 
14964 
14965     # Fallback default of just /bin if DEVKIT_PATH is not defined
14966     if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14967       DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14968     fi
14969 
14970   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14971     if test "x$TOOLCHAIN_PATH" = x; then
14972       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14973     else
14974       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14975     fi
14976   fi
14977 
14978 
14979     # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14980     # places for backwards compatiblity.
14981     if test "x$DEVKIT_SYSROOT" != x; then
14982       SYSROOT="$DEVKIT_SYSROOT"
14983     elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14984       SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14985     elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14986       SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14987     fi
14988 
14989     if test "x$DEVKIT_ROOT" != x; then
14990       DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
14991       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14992         DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
14993       fi
14994 
14995     fi
14996   fi
14997 
14998   # You can force the sysroot if the sysroot encoded into the compiler tools
14999   # is not correct.
15000 
15001 # Check whether --with-sys-root was given.
15002 if test "${with_sys_root+set}" = set; then :
15003   withval=$with_sys_root; SYSROOT=$with_sys_root
15004 
15005 fi
15006 
15007 
15008 
15009 # Check whether --with-sysroot was given.
15010 if test "${with_sysroot+set}" = set; then :
15011   withval=$with_sysroot; SYSROOT=$with_sysroot
15012 
15013 fi
15014 
15015 
15016 
15017 # Check whether --with-tools-dir was given.
15018 if test "${with_tools_dir+set}" = set; then :
15019   withval=$with_tools_dir;
15020   if test "x$with_tools_dir" != x; then
15021     if test "x$TOOLCHAIN_PATH" = x; then
15022       TOOLCHAIN_PATH="$with_tools_dir"
15023     else
15024       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15025     fi
15026   fi
15027 
15028 
15029 fi
15030 
15031 
15032 
15033 # Check whether --with-toolchain-path was given.
15034 if test "${with_toolchain_path+set}" = set; then :
15035   withval=$with_toolchain_path;
15036   if test "x$with_toolchain_path" != x; then
15037     if test "x$TOOLCHAIN_PATH" = x; then
15038       TOOLCHAIN_PATH="$with_toolchain_path"
15039     else
15040       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15041     fi
15042   fi
15043 
15044 
15045 fi
15046 
15047 
15048 
15049 # Check whether --with-extra-path was given.
15050 if test "${with_extra_path+set}" = set; then :
15051   withval=$with_extra_path;
15052   if test "x$with_extra_path" != x; then
15053     if test "x$EXTRA_PATH" = x; then
15054       EXTRA_PATH="$with_extra_path"
15055     else
15056       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15057     fi
15058   fi
15059 
15060 
15061 fi
15062 
15063 
15064   # Prepend the extra path to the global path
15065 
15066   if test "x$EXTRA_PATH" != x; then
15067     if test "x$PATH" = x; then
15068       PATH="$EXTRA_PATH"
15069     else
15070       PATH="$EXTRA_PATH:$PATH"
15071     fi
15072   fi
15073 
15074 
15075   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15076     # Add extra search paths on solaris for utilities like ar and as etc...
15077     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15078   fi
15079 
15080   # Xcode version will be validated later
15081 
15082 # Check whether --with-xcode-path was given.
15083 if test "${with_xcode_path+set}" = set; then :
15084   withval=$with_xcode_path; XCODE_PATH=$with_xcode_path
15085 
15086 fi
15087 
15088 
15089   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15090 $as_echo_n "checking for sysroot... " >&6; }
15091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15092 $as_echo "$SYSROOT" >&6; }
15093   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15094 $as_echo_n "checking for toolchain path... " >&6; }
15095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15096 $as_echo "$TOOLCHAIN_PATH" >&6; }
15097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15098 $as_echo_n "checking for extra path... " >&6; }
15099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15100 $as_echo "$EXTRA_PATH" >&6; }
15101 
15102 
15103 # To properly create a configuration name, we need to have the OpenJDK target
15104 # and options (variants and debug level) parsed.
15105 
15106 
15107 
15108 # Check whether --with-conf-name was given.
15109 if test "${with_conf_name+set}" = set; then :
15110   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15111 fi
15112 
15113 
15114   # Test from where we are running configure, in or outside of src root.
15115   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15116 $as_echo_n "checking where to store configuration... " >&6; }
15117   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15118       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15119       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15120     # We are running configure from the src root.
15121     # Create a default ./build/target-variant-debuglevel output root.
15122     if test "x${CONF_NAME}" = x; then
15123       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15124 $as_echo "in default location" >&6; }
15125       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15126     else
15127       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15128 $as_echo "in build directory with custom name" >&6; }
15129     fi
15130     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15131     $MKDIR -p "$OUTPUT_ROOT"
15132     if test ! -d "$OUTPUT_ROOT"; then
15133       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15134     fi
15135   else
15136     # We are running configure from outside of the src dir.
15137     # Then use the current directory as output dir!
15138     # If configuration is situated in normal build directory, just use the build
15139     # directory name as configuration name, otherwise use the complete path.
15140     if test "x${CONF_NAME}" = x; then
15141       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15142     fi
15143     OUTPUT_ROOT="$CURDIR"
15144     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15145 $as_echo "in current directory" >&6; }
15146 
15147     # WARNING: This might be a bad thing to do. You need to be sure you want to
15148     # have a configuration in this directory. Do some sanity checks!
15149 
15150     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15151       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15152       # other files
15153       files_present=`$LS $OUTPUT_ROOT`
15154       # Configure has already touched config.log and confdefs.h in the current dir when this check
15155       # is performed.
15156       filtered_files=`$ECHO "$files_present" \
15157           | $SED -e 's/config.log//g' \
15158               -e 's/confdefs.h//g' \
15159               -e 's/fixpath.exe//g' \
15160               -e 's/ //g' \
15161           | $TR -d '\n'`
15162       if test "x$filtered_files" != x; then
15163         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15164 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
15165         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15166 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15167         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15168 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15169         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15170 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15171         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15172 $as_echo "$as_me: seriously mess up just about everything." >&6;}
15173         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15174 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15175         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15176 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15177         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15178       fi
15179     fi
15180   fi
15181   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15182 $as_echo_n "checking what configuration name to use... " >&6; }
15183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15184 $as_echo "$CONF_NAME" >&6; }
15185 
15186 
15187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15188 
15189   # Input might be given as Windows format, start by converting to
15190   # unix format.
15191   path="$OUTPUT_ROOT"
15192   new_path=`$CYGPATH -u "$path"`
15193 
15194   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15195   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15196   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15197   # "foo.exe" is OK but "foo" is an error.
15198   #
15199   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15200   # It is also a way to make sure we got the proper file name for the real test later on.
15201   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15202   if test "x$test_shortpath" = x; then
15203     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15204 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15205     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15206   fi
15207 
15208   # Call helper function which possibly converts this using DOS-style short mode.
15209   # If so, the updated path is stored in $new_path.
15210 
15211   input_path="$new_path"
15212   # Check if we need to convert this using DOS-style short mode. If the path
15213   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15214   # take no chances and rewrite it.
15215   # Note: m4 eats our [], so we need to use [ and ] instead.
15216   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15217   if test "x$has_forbidden_chars" != x; then
15218     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15219     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15220     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15221     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15222       # Going to short mode and back again did indeed matter. Since short mode is
15223       # case insensitive, let's make it lowercase to improve readability.
15224       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15225       # Now convert it back to Unix-style (cygpath)
15226       input_path=`$CYGPATH -u "$shortmode_path"`
15227       new_path="$input_path"
15228     fi
15229   fi
15230 
15231   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15232   if test "x$test_cygdrive_prefix" = x; then
15233     # As a simple fix, exclude /usr/bin since it's not a real path.
15234     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15235       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15236       # a path prefixed by /cygdrive for fixpath to work.
15237       new_path="$CYGWIN_ROOT_PATH$input_path"
15238     fi
15239   fi
15240 
15241 
15242   if test "x$path" != "x$new_path"; then
15243     OUTPUT_ROOT="$new_path"
15244     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15245 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15246   fi
15247 
15248   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15249 
15250   path="$OUTPUT_ROOT"
15251   has_colon=`$ECHO $path | $GREP ^.:`
15252   new_path="$path"
15253   if test "x$has_colon" = x; then
15254     # Not in mixed or Windows style, start by that.
15255     new_path=`cmd //c echo $path`
15256   fi
15257 
15258 
15259   input_path="$new_path"
15260   # Check if we need to convert this using DOS-style short mode. If the path
15261   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15262   # take no chances and rewrite it.
15263   # Note: m4 eats our [], so we need to use [ and ] instead.
15264   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15265   if test "x$has_forbidden_chars" != x; then
15266     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15267     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15268   fi
15269 
15270 
15271   windows_path="$new_path"
15272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15273     unix_path=`$CYGPATH -u "$windows_path"`
15274     new_path="$unix_path"
15275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15276     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15277     new_path="$unix_path"
15278   fi
15279 
15280   if test "x$path" != "x$new_path"; then
15281     OUTPUT_ROOT="$new_path"
15282     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15283 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15284   fi
15285 
15286   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15287   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15288 
15289   else
15290     # We're on a posix platform. Hooray! :)
15291     path="$OUTPUT_ROOT"
15292     has_space=`$ECHO "$path" | $GREP " "`
15293     if test "x$has_space" != x; then
15294       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15295 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15296       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15297     fi
15298 
15299     # Use eval to expand a potential ~
15300     eval path="$path"
15301     if test ! -f "$path" && test ! -d "$path"; then
15302       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15303     fi
15304 
15305     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15306   fi
15307 
15308 
15309   SPEC=$OUTPUT_ROOT/spec.gmk
15310 
15311   CONF_NAME=$CONF_NAME
15312 
15313   OUTPUT_ROOT=$OUTPUT_ROOT
15314 
15315 
15316   # Most of the probed defines are put into config.h
15317   ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15318 
15319   # The spec.gmk file contains all variables for the make system.
15320   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15321 
15322   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15323   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15324 
15325   # The bootcycle-spec.gmk file contains support for boot cycle builds.
15326   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15327 
15328   # The compare.sh is used to compare the build output to other builds.
15329   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15330 
15331   # Spec.sh is currently used by compare-objects.sh
15332   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15333 
15334   # The generated Makefile knows where the spec.gmk is and where the source is.
15335   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15336   # which will look for generated configurations
15337   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15338 
15339 
15340 
15341 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15342 
15343   for ac_prog in apt-get yum port pkgutil pkgadd
15344 do
15345   # Extract the first word of "$ac_prog", so it can be a program name with args.
15346 set dummy $ac_prog; ac_word=$2
15347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15348 $as_echo_n "checking for $ac_word... " >&6; }
15349 if ${ac_cv_prog_PKGHANDLER+:} false; then :
15350   $as_echo_n "(cached) " >&6
15351 else
15352   if test -n "$PKGHANDLER"; then
15353   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15354 else
15355 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15356 for as_dir in $PATH
15357 do
15358   IFS=$as_save_IFS
15359   test -z "$as_dir" && as_dir=.
15360     for ac_exec_ext in '' $ac_executable_extensions; do
15361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15362     ac_cv_prog_PKGHANDLER="$ac_prog"
15363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15364     break 2
15365   fi
15366 done
15367   done
15368 IFS=$as_save_IFS
15369 
15370 fi
15371 fi
15372 PKGHANDLER=$ac_cv_prog_PKGHANDLER
15373 if test -n "$PKGHANDLER"; then
15374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15375 $as_echo "$PKGHANDLER" >&6; }
15376 else
15377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15378 $as_echo "no" >&6; }
15379 fi
15380 
15381 
15382   test -n "$PKGHANDLER" && break
15383 done
15384 
15385 
15386 
15387 # Setup tools that requires more complex handling, or that is not needed by the configure script.
15388 
15389 
15390   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15391   if test "x$MAKE" != x; then
15392     # User has supplied a make, test it.
15393     if test ! -f "$MAKE"; then
15394       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15395     fi
15396 
15397   MAKE_CANDIDATE=""$MAKE""
15398   DESCRIPTION="user supplied MAKE=$MAKE"
15399   if test "x$MAKE_CANDIDATE" != x; then
15400     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15401 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15402     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15403     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15404     if test "x$IS_GNU_MAKE" = x; then
15405       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15406 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15407     else
15408       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15409       if test "x$IS_MODERN_MAKE" = x; then
15410         { $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
15411 $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;}
15412       else
15413         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15414           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15415             MAKE_EXPECTED_ENV='cygwin'
15416           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15417             MAKE_EXPECTED_ENV='msys'
15418           else
15419             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15420           fi
15421           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15422           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15423         else
15424           # Not relevant for non-Windows
15425           IS_MAKE_CORRECT_ENV=true
15426         fi
15427         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15428           { $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
15429 $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;}
15430         else
15431           FOUND_MAKE=$MAKE_CANDIDATE
15432 
15433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15434 
15435   # First separate the path from the arguments. This will split at the first
15436   # space.
15437   complete="$FOUND_MAKE"
15438   path="${complete%% *}"
15439   tmp="$complete EOL"
15440   arguments="${tmp#* }"
15441 
15442   # Input might be given as Windows format, start by converting to
15443   # unix format.
15444   new_path=`$CYGPATH -u "$path"`
15445 
15446   # Now try to locate executable using which
15447   new_path=`$WHICH "$new_path" 2> /dev/null`
15448   # bat and cmd files are not always considered executable in cygwin causing which
15449   # to not find them
15450   if test "x$new_path" = x \
15451       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15452       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15453     new_path=`$CYGPATH -u "$path"`
15454   fi
15455   if test "x$new_path" = x; then
15456     # Oops. Which didn't find the executable.
15457     # The splitting of arguments from the executable at a space might have been incorrect,
15458     # since paths with space are more likely in Windows. Give it another try with the whole
15459     # argument.
15460     path="$complete"
15461     arguments="EOL"
15462     new_path=`$CYGPATH -u "$path"`
15463     new_path=`$WHICH "$new_path" 2> /dev/null`
15464     # bat and cmd files are not always considered executable in cygwin causing which
15465     # to not find them
15466     if test "x$new_path" = x \
15467         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15468         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15469       new_path=`$CYGPATH -u "$path"`
15470     fi
15471     if test "x$new_path" = x; then
15472       # It's still not found. Now this is an unrecoverable error.
15473       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15474 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15475       has_space=`$ECHO "$complete" | $GREP " "`
15476       if test "x$has_space" != x; then
15477         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15478 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15479       fi
15480       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15481     fi
15482   fi
15483 
15484   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15485   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15486   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15487   # "foo.exe" is OK but "foo" is an error.
15488   #
15489   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15490   # It is also a way to make sure we got the proper file name for the real test later on.
15491   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15492   if test "x$test_shortpath" = x; then
15493     # Short path failed, file does not exist as specified.
15494     # Try adding .exe or .cmd
15495     if test -f "${new_path}.exe"; then
15496       input_to_shortpath="${new_path}.exe"
15497     elif test -f "${new_path}.cmd"; then
15498       input_to_shortpath="${new_path}.cmd"
15499     else
15500       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15501 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15502       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15503 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15504       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15505     fi
15506   else
15507     input_to_shortpath="$new_path"
15508   fi
15509 
15510   # Call helper function which possibly converts this using DOS-style short mode.
15511   # If so, the updated path is stored in $new_path.
15512   new_path="$input_to_shortpath"
15513 
15514   input_path="$input_to_shortpath"
15515   # Check if we need to convert this using DOS-style short mode. If the path
15516   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15517   # take no chances and rewrite it.
15518   # Note: m4 eats our [], so we need to use [ and ] instead.
15519   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15520   if test "x$has_forbidden_chars" != x; then
15521     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15522     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15523     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15524     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15525       # Going to short mode and back again did indeed matter. Since short mode is
15526       # case insensitive, let's make it lowercase to improve readability.
15527       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15528       # Now convert it back to Unix-style (cygpath)
15529       input_path=`$CYGPATH -u "$shortmode_path"`
15530       new_path="$input_path"
15531     fi
15532   fi
15533 
15534   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15535   if test "x$test_cygdrive_prefix" = x; then
15536     # As a simple fix, exclude /usr/bin since it's not a real path.
15537     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15538       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15539       # a path prefixed by /cygdrive for fixpath to work.
15540       new_path="$CYGWIN_ROOT_PATH$input_path"
15541     fi
15542   fi
15543 
15544   # remove trailing .exe if any
15545   new_path="${new_path/%.exe/}"
15546 
15547   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15548 
15549   # First separate the path from the arguments. This will split at the first
15550   # space.
15551   complete="$FOUND_MAKE"
15552   path="${complete%% *}"
15553   tmp="$complete EOL"
15554   arguments="${tmp#* }"
15555 
15556   # Input might be given as Windows format, start by converting to
15557   # unix format.
15558   new_path="$path"
15559 
15560   windows_path="$new_path"
15561   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15562     unix_path=`$CYGPATH -u "$windows_path"`
15563     new_path="$unix_path"
15564   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15565     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15566     new_path="$unix_path"
15567   fi
15568 
15569 
15570   # Now try to locate executable using which
15571   new_path=`$WHICH "$new_path" 2> /dev/null`
15572 
15573   if test "x$new_path" = x; then
15574     # Oops. Which didn't find the executable.
15575     # The splitting of arguments from the executable at a space might have been incorrect,
15576     # since paths with space are more likely in Windows. Give it another try with the whole
15577     # argument.
15578     path="$complete"
15579     arguments="EOL"
15580     new_path="$path"
15581 
15582   windows_path="$new_path"
15583   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15584     unix_path=`$CYGPATH -u "$windows_path"`
15585     new_path="$unix_path"
15586   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15587     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15588     new_path="$unix_path"
15589   fi
15590 
15591 
15592     new_path=`$WHICH "$new_path" 2> /dev/null`
15593     # bat and cmd files are not always considered executable in MSYS causing which
15594     # to not find them
15595     if test "x$new_path" = x \
15596         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15597         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15598       new_path="$path"
15599 
15600   windows_path="$new_path"
15601   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15602     unix_path=`$CYGPATH -u "$windows_path"`
15603     new_path="$unix_path"
15604   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15605     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15606     new_path="$unix_path"
15607   fi
15608 
15609     fi
15610 
15611     if test "x$new_path" = x; then
15612       # It's still not found. Now this is an unrecoverable error.
15613       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15614 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15615       has_space=`$ECHO "$complete" | $GREP " "`
15616       if test "x$has_space" != x; then
15617         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15618 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15619       fi
15620       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15621     fi
15622   fi
15623 
15624   # Now new_path has a complete unix path to the binary
15625   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15626     # Keep paths in /bin as-is, but remove trailing .exe if any
15627     new_path="${new_path/%.exe/}"
15628     # Do not save /bin paths to all_fixpath_prefixes!
15629   else
15630     # Not in mixed or Windows style, start by that.
15631     new_path=`cmd //c echo $new_path`
15632 
15633   input_path="$new_path"
15634   # Check if we need to convert this using DOS-style short mode. If the path
15635   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15636   # take no chances and rewrite it.
15637   # Note: m4 eats our [], so we need to use [ and ] instead.
15638   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15639   if test "x$has_forbidden_chars" != x; then
15640     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15641     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15642   fi
15643 
15644     # Output is in $new_path
15645 
15646   windows_path="$new_path"
15647   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15648     unix_path=`$CYGPATH -u "$windows_path"`
15649     new_path="$unix_path"
15650   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15651     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15652     new_path="$unix_path"
15653   fi
15654 
15655     # remove trailing .exe if any
15656     new_path="${new_path/%.exe/}"
15657 
15658     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15659     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15660   fi
15661 
15662   else
15663     # We're on a posix platform. Hooray! :)
15664     # First separate the path from the arguments. This will split at the first
15665     # space.
15666     complete="$FOUND_MAKE"
15667     path="${complete%% *}"
15668     tmp="$complete EOL"
15669     arguments="${tmp#* }"
15670 
15671     # Cannot rely on the command "which" here since it doesn't always work.
15672     is_absolute_path=`$ECHO "$path" | $GREP ^/`
15673     if test -z "$is_absolute_path"; then
15674       # Path to executable is not absolute. Find it.
15675       IFS_save="$IFS"
15676       IFS=:
15677       for p in $PATH; do
15678         if test -f "$p/$path" && test -x "$p/$path"; then
15679           new_path="$p/$path"
15680           break
15681         fi
15682       done
15683       IFS="$IFS_save"
15684     else
15685       # This is an absolute path, we can use it without further modifications.
15686       new_path="$path"
15687     fi
15688 
15689     if test "x$new_path" = x; then
15690       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15691 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15692       has_space=`$ECHO "$complete" | $GREP " "`
15693       if test "x$has_space" != x; then
15694         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15695 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15696       fi
15697       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15698     fi
15699   fi
15700 
15701   # Now join together the path and the arguments once again
15702   if test "x$arguments" != xEOL; then
15703     new_complete="$new_path ${arguments% *}"
15704   else
15705     new_complete="$new_path"
15706   fi
15707 
15708   if test "x$complete" != "x$new_complete"; then
15709     FOUND_MAKE="$new_complete"
15710     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15711 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15712   fi
15713 
15714         fi
15715       fi
15716     fi
15717   fi
15718 
15719     if test "x$FOUND_MAKE" = x; then
15720       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15721     fi
15722   else
15723     # Try our hardest to locate a correct version of GNU make
15724     for ac_prog in gmake
15725 do
15726   # Extract the first word of "$ac_prog", so it can be a program name with args.
15727 set dummy $ac_prog; ac_word=$2
15728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15729 $as_echo_n "checking for $ac_word... " >&6; }
15730 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15731   $as_echo_n "(cached) " >&6
15732 else
15733   case $CHECK_GMAKE in
15734   [\\/]* | ?:[\\/]*)
15735   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15736   ;;
15737   *)
15738   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15739 for as_dir in $PATH
15740 do
15741   IFS=$as_save_IFS
15742   test -z "$as_dir" && as_dir=.
15743     for ac_exec_ext in '' $ac_executable_extensions; do
15744   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15745     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15746     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15747     break 2
15748   fi
15749 done
15750   done
15751 IFS=$as_save_IFS
15752 
15753   ;;
15754 esac
15755 fi
15756 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15757 if test -n "$CHECK_GMAKE"; then
15758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15759 $as_echo "$CHECK_GMAKE" >&6; }
15760 else
15761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15762 $as_echo "no" >&6; }
15763 fi
15764 
15765 
15766   test -n "$CHECK_GMAKE" && break
15767 done
15768 
15769 
15770   MAKE_CANDIDATE=""$CHECK_GMAKE""
15771   DESCRIPTION="gmake in PATH"
15772   if test "x$MAKE_CANDIDATE" != x; then
15773     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15774 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15775     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15776     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15777     if test "x$IS_GNU_MAKE" = x; then
15778       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15779 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15780     else
15781       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15782       if test "x$IS_MODERN_MAKE" = x; then
15783         { $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
15784 $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;}
15785       else
15786         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15787           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15788             MAKE_EXPECTED_ENV='cygwin'
15789           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15790             MAKE_EXPECTED_ENV='msys'
15791           else
15792             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15793           fi
15794           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15795           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15796         else
15797           # Not relevant for non-Windows
15798           IS_MAKE_CORRECT_ENV=true
15799         fi
15800         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15801           { $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
15802 $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;}
15803         else
15804           FOUND_MAKE=$MAKE_CANDIDATE
15805 
15806   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15807 
15808   # First separate the path from the arguments. This will split at the first
15809   # space.
15810   complete="$FOUND_MAKE"
15811   path="${complete%% *}"
15812   tmp="$complete EOL"
15813   arguments="${tmp#* }"
15814 
15815   # Input might be given as Windows format, start by converting to
15816   # unix format.
15817   new_path=`$CYGPATH -u "$path"`
15818 
15819   # Now try to locate executable using which
15820   new_path=`$WHICH "$new_path" 2> /dev/null`
15821   # bat and cmd files are not always considered executable in cygwin causing which
15822   # to not find them
15823   if test "x$new_path" = x \
15824       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15825       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15826     new_path=`$CYGPATH -u "$path"`
15827   fi
15828   if test "x$new_path" = x; then
15829     # Oops. Which didn't find the executable.
15830     # The splitting of arguments from the executable at a space might have been incorrect,
15831     # since paths with space are more likely in Windows. Give it another try with the whole
15832     # argument.
15833     path="$complete"
15834     arguments="EOL"
15835     new_path=`$CYGPATH -u "$path"`
15836     new_path=`$WHICH "$new_path" 2> /dev/null`
15837     # bat and cmd files are not always considered executable in cygwin causing which
15838     # to not find them
15839     if test "x$new_path" = x \
15840         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15841         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15842       new_path=`$CYGPATH -u "$path"`
15843     fi
15844     if test "x$new_path" = x; then
15845       # It's still not found. Now this is an unrecoverable error.
15846       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15847 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15848       has_space=`$ECHO "$complete" | $GREP " "`
15849       if test "x$has_space" != x; then
15850         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15851 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15852       fi
15853       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15854     fi
15855   fi
15856 
15857   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15858   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15859   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15860   # "foo.exe" is OK but "foo" is an error.
15861   #
15862   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15863   # It is also a way to make sure we got the proper file name for the real test later on.
15864   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15865   if test "x$test_shortpath" = x; then
15866     # Short path failed, file does not exist as specified.
15867     # Try adding .exe or .cmd
15868     if test -f "${new_path}.exe"; then
15869       input_to_shortpath="${new_path}.exe"
15870     elif test -f "${new_path}.cmd"; then
15871       input_to_shortpath="${new_path}.cmd"
15872     else
15873       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15874 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15875       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15876 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15877       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15878     fi
15879   else
15880     input_to_shortpath="$new_path"
15881   fi
15882 
15883   # Call helper function which possibly converts this using DOS-style short mode.
15884   # If so, the updated path is stored in $new_path.
15885   new_path="$input_to_shortpath"
15886 
15887   input_path="$input_to_shortpath"
15888   # Check if we need to convert this using DOS-style short mode. If the path
15889   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15890   # take no chances and rewrite it.
15891   # Note: m4 eats our [], so we need to use [ and ] instead.
15892   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15893   if test "x$has_forbidden_chars" != x; then
15894     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15895     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15896     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15897     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15898       # Going to short mode and back again did indeed matter. Since short mode is
15899       # case insensitive, let's make it lowercase to improve readability.
15900       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15901       # Now convert it back to Unix-style (cygpath)
15902       input_path=`$CYGPATH -u "$shortmode_path"`
15903       new_path="$input_path"
15904     fi
15905   fi
15906 
15907   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15908   if test "x$test_cygdrive_prefix" = x; then
15909     # As a simple fix, exclude /usr/bin since it's not a real path.
15910     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15911       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15912       # a path prefixed by /cygdrive for fixpath to work.
15913       new_path="$CYGWIN_ROOT_PATH$input_path"
15914     fi
15915   fi
15916 
15917   # remove trailing .exe if any
15918   new_path="${new_path/%.exe/}"
15919 
15920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15921 
15922   # First separate the path from the arguments. This will split at the first
15923   # space.
15924   complete="$FOUND_MAKE"
15925   path="${complete%% *}"
15926   tmp="$complete EOL"
15927   arguments="${tmp#* }"
15928 
15929   # Input might be given as Windows format, start by converting to
15930   # unix format.
15931   new_path="$path"
15932 
15933   windows_path="$new_path"
15934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15935     unix_path=`$CYGPATH -u "$windows_path"`
15936     new_path="$unix_path"
15937   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15938     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15939     new_path="$unix_path"
15940   fi
15941 
15942 
15943   # Now try to locate executable using which
15944   new_path=`$WHICH "$new_path" 2> /dev/null`
15945 
15946   if test "x$new_path" = x; then
15947     # Oops. Which didn't find the executable.
15948     # The splitting of arguments from the executable at a space might have been incorrect,
15949     # since paths with space are more likely in Windows. Give it another try with the whole
15950     # argument.
15951     path="$complete"
15952     arguments="EOL"
15953     new_path="$path"
15954 
15955   windows_path="$new_path"
15956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15957     unix_path=`$CYGPATH -u "$windows_path"`
15958     new_path="$unix_path"
15959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15961     new_path="$unix_path"
15962   fi
15963 
15964 
15965     new_path=`$WHICH "$new_path" 2> /dev/null`
15966     # bat and cmd files are not always considered executable in MSYS causing which
15967     # to not find them
15968     if test "x$new_path" = x \
15969         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15970         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15971       new_path="$path"
15972 
15973   windows_path="$new_path"
15974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15975     unix_path=`$CYGPATH -u "$windows_path"`
15976     new_path="$unix_path"
15977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15979     new_path="$unix_path"
15980   fi
15981 
15982     fi
15983 
15984     if test "x$new_path" = x; then
15985       # It's still not found. Now this is an unrecoverable error.
15986       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15987 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15988       has_space=`$ECHO "$complete" | $GREP " "`
15989       if test "x$has_space" != x; then
15990         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15991 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15992       fi
15993       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15994     fi
15995   fi
15996 
15997   # Now new_path has a complete unix path to the binary
15998   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15999     # Keep paths in /bin as-is, but remove trailing .exe if any
16000     new_path="${new_path/%.exe/}"
16001     # Do not save /bin paths to all_fixpath_prefixes!
16002   else
16003     # Not in mixed or Windows style, start by that.
16004     new_path=`cmd //c echo $new_path`
16005 
16006   input_path="$new_path"
16007   # Check if we need to convert this using DOS-style short mode. If the path
16008   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16009   # take no chances and rewrite it.
16010   # Note: m4 eats our [], so we need to use [ and ] instead.
16011   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16012   if test "x$has_forbidden_chars" != x; then
16013     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16014     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16015   fi
16016 
16017     # Output is in $new_path
16018 
16019   windows_path="$new_path"
16020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16021     unix_path=`$CYGPATH -u "$windows_path"`
16022     new_path="$unix_path"
16023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16024     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16025     new_path="$unix_path"
16026   fi
16027 
16028     # remove trailing .exe if any
16029     new_path="${new_path/%.exe/}"
16030 
16031     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16032     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16033   fi
16034 
16035   else
16036     # We're on a posix platform. Hooray! :)
16037     # First separate the path from the arguments. This will split at the first
16038     # space.
16039     complete="$FOUND_MAKE"
16040     path="${complete%% *}"
16041     tmp="$complete EOL"
16042     arguments="${tmp#* }"
16043 
16044     # Cannot rely on the command "which" here since it doesn't always work.
16045     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16046     if test -z "$is_absolute_path"; then
16047       # Path to executable is not absolute. Find it.
16048       IFS_save="$IFS"
16049       IFS=:
16050       for p in $PATH; do
16051         if test -f "$p/$path" && test -x "$p/$path"; then
16052           new_path="$p/$path"
16053           break
16054         fi
16055       done
16056       IFS="$IFS_save"
16057     else
16058       # This is an absolute path, we can use it without further modifications.
16059       new_path="$path"
16060     fi
16061 
16062     if test "x$new_path" = x; then
16063       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16064 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16065       has_space=`$ECHO "$complete" | $GREP " "`
16066       if test "x$has_space" != x; then
16067         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16068 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16069       fi
16070       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16071     fi
16072   fi
16073 
16074   # Now join together the path and the arguments once again
16075   if test "x$arguments" != xEOL; then
16076     new_complete="$new_path ${arguments% *}"
16077   else
16078     new_complete="$new_path"
16079   fi
16080 
16081   if test "x$complete" != "x$new_complete"; then
16082     FOUND_MAKE="$new_complete"
16083     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16084 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16085   fi
16086 
16087         fi
16088       fi
16089     fi
16090   fi
16091 
16092 
16093     if test "x$FOUND_MAKE" = x; then
16094       for ac_prog in make
16095 do
16096   # Extract the first word of "$ac_prog", so it can be a program name with args.
16097 set dummy $ac_prog; ac_word=$2
16098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16099 $as_echo_n "checking for $ac_word... " >&6; }
16100 if ${ac_cv_path_CHECK_MAKE+:} false; then :
16101   $as_echo_n "(cached) " >&6
16102 else
16103   case $CHECK_MAKE in
16104   [\\/]* | ?:[\\/]*)
16105   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16106   ;;
16107   *)
16108   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16109 for as_dir in $PATH
16110 do
16111   IFS=$as_save_IFS
16112   test -z "$as_dir" && as_dir=.
16113     for ac_exec_ext in '' $ac_executable_extensions; do
16114   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16115     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16116     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16117     break 2
16118   fi
16119 done
16120   done
16121 IFS=$as_save_IFS
16122 
16123   ;;
16124 esac
16125 fi
16126 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16127 if test -n "$CHECK_MAKE"; then
16128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16129 $as_echo "$CHECK_MAKE" >&6; }
16130 else
16131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16132 $as_echo "no" >&6; }
16133 fi
16134 
16135 
16136   test -n "$CHECK_MAKE" && break
16137 done
16138 
16139 
16140   MAKE_CANDIDATE=""$CHECK_MAKE""
16141   DESCRIPTION="make in PATH"
16142   if test "x$MAKE_CANDIDATE" != x; then
16143     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16144 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16145     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16146     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16147     if test "x$IS_GNU_MAKE" = x; then
16148       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16149 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16150     else
16151       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16152       if test "x$IS_MODERN_MAKE" = x; then
16153         { $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
16154 $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;}
16155       else
16156         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16157           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16158             MAKE_EXPECTED_ENV='cygwin'
16159           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16160             MAKE_EXPECTED_ENV='msys'
16161           else
16162             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16163           fi
16164           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16165           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16166         else
16167           # Not relevant for non-Windows
16168           IS_MAKE_CORRECT_ENV=true
16169         fi
16170         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16171           { $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
16172 $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;}
16173         else
16174           FOUND_MAKE=$MAKE_CANDIDATE
16175 
16176   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16177 
16178   # First separate the path from the arguments. This will split at the first
16179   # space.
16180   complete="$FOUND_MAKE"
16181   path="${complete%% *}"
16182   tmp="$complete EOL"
16183   arguments="${tmp#* }"
16184 
16185   # Input might be given as Windows format, start by converting to
16186   # unix format.
16187   new_path=`$CYGPATH -u "$path"`
16188 
16189   # Now try to locate executable using which
16190   new_path=`$WHICH "$new_path" 2> /dev/null`
16191   # bat and cmd files are not always considered executable in cygwin causing which
16192   # to not find them
16193   if test "x$new_path" = x \
16194       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16195       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16196     new_path=`$CYGPATH -u "$path"`
16197   fi
16198   if test "x$new_path" = x; then
16199     # Oops. Which didn't find the executable.
16200     # The splitting of arguments from the executable at a space might have been incorrect,
16201     # since paths with space are more likely in Windows. Give it another try with the whole
16202     # argument.
16203     path="$complete"
16204     arguments="EOL"
16205     new_path=`$CYGPATH -u "$path"`
16206     new_path=`$WHICH "$new_path" 2> /dev/null`
16207     # bat and cmd files are not always considered executable in cygwin causing which
16208     # to not find them
16209     if test "x$new_path" = x \
16210         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16211         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16212       new_path=`$CYGPATH -u "$path"`
16213     fi
16214     if test "x$new_path" = x; then
16215       # It's still not found. Now this is an unrecoverable error.
16216       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16217 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16218       has_space=`$ECHO "$complete" | $GREP " "`
16219       if test "x$has_space" != x; then
16220         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16221 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16222       fi
16223       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16224     fi
16225   fi
16226 
16227   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16228   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16229   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16230   # "foo.exe" is OK but "foo" is an error.
16231   #
16232   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16233   # It is also a way to make sure we got the proper file name for the real test later on.
16234   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16235   if test "x$test_shortpath" = x; then
16236     # Short path failed, file does not exist as specified.
16237     # Try adding .exe or .cmd
16238     if test -f "${new_path}.exe"; then
16239       input_to_shortpath="${new_path}.exe"
16240     elif test -f "${new_path}.cmd"; then
16241       input_to_shortpath="${new_path}.cmd"
16242     else
16243       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16244 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16245       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16246 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16247       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16248     fi
16249   else
16250     input_to_shortpath="$new_path"
16251   fi
16252 
16253   # Call helper function which possibly converts this using DOS-style short mode.
16254   # If so, the updated path is stored in $new_path.
16255   new_path="$input_to_shortpath"
16256 
16257   input_path="$input_to_shortpath"
16258   # Check if we need to convert this using DOS-style short mode. If the path
16259   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16260   # take no chances and rewrite it.
16261   # Note: m4 eats our [], so we need to use [ and ] instead.
16262   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16263   if test "x$has_forbidden_chars" != x; then
16264     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16265     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16266     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16267     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16268       # Going to short mode and back again did indeed matter. Since short mode is
16269       # case insensitive, let's make it lowercase to improve readability.
16270       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16271       # Now convert it back to Unix-style (cygpath)
16272       input_path=`$CYGPATH -u "$shortmode_path"`
16273       new_path="$input_path"
16274     fi
16275   fi
16276 
16277   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16278   if test "x$test_cygdrive_prefix" = x; then
16279     # As a simple fix, exclude /usr/bin since it's not a real path.
16280     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16281       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16282       # a path prefixed by /cygdrive for fixpath to work.
16283       new_path="$CYGWIN_ROOT_PATH$input_path"
16284     fi
16285   fi
16286 
16287   # remove trailing .exe if any
16288   new_path="${new_path/%.exe/}"
16289 
16290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16291 
16292   # First separate the path from the arguments. This will split at the first
16293   # space.
16294   complete="$FOUND_MAKE"
16295   path="${complete%% *}"
16296   tmp="$complete EOL"
16297   arguments="${tmp#* }"
16298 
16299   # Input might be given as Windows format, start by converting to
16300   # unix format.
16301   new_path="$path"
16302 
16303   windows_path="$new_path"
16304   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16305     unix_path=`$CYGPATH -u "$windows_path"`
16306     new_path="$unix_path"
16307   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16308     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16309     new_path="$unix_path"
16310   fi
16311 
16312 
16313   # Now try to locate executable using which
16314   new_path=`$WHICH "$new_path" 2> /dev/null`
16315 
16316   if test "x$new_path" = x; then
16317     # Oops. Which didn't find the executable.
16318     # The splitting of arguments from the executable at a space might have been incorrect,
16319     # since paths with space are more likely in Windows. Give it another try with the whole
16320     # argument.
16321     path="$complete"
16322     arguments="EOL"
16323     new_path="$path"
16324 
16325   windows_path="$new_path"
16326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16327     unix_path=`$CYGPATH -u "$windows_path"`
16328     new_path="$unix_path"
16329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16330     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16331     new_path="$unix_path"
16332   fi
16333 
16334 
16335     new_path=`$WHICH "$new_path" 2> /dev/null`
16336     # bat and cmd files are not always considered executable in MSYS causing which
16337     # to not find them
16338     if test "x$new_path" = x \
16339         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16340         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16341       new_path="$path"
16342 
16343   windows_path="$new_path"
16344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16345     unix_path=`$CYGPATH -u "$windows_path"`
16346     new_path="$unix_path"
16347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16349     new_path="$unix_path"
16350   fi
16351 
16352     fi
16353 
16354     if test "x$new_path" = x; then
16355       # It's still not found. Now this is an unrecoverable error.
16356       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16357 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16358       has_space=`$ECHO "$complete" | $GREP " "`
16359       if test "x$has_space" != x; then
16360         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16361 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16362       fi
16363       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16364     fi
16365   fi
16366 
16367   # Now new_path has a complete unix path to the binary
16368   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16369     # Keep paths in /bin as-is, but remove trailing .exe if any
16370     new_path="${new_path/%.exe/}"
16371     # Do not save /bin paths to all_fixpath_prefixes!
16372   else
16373     # Not in mixed or Windows style, start by that.
16374     new_path=`cmd //c echo $new_path`
16375 
16376   input_path="$new_path"
16377   # Check if we need to convert this using DOS-style short mode. If the path
16378   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16379   # take no chances and rewrite it.
16380   # Note: m4 eats our [], so we need to use [ and ] instead.
16381   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16382   if test "x$has_forbidden_chars" != x; then
16383     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16384     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16385   fi
16386 
16387     # Output is in $new_path
16388 
16389   windows_path="$new_path"
16390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16391     unix_path=`$CYGPATH -u "$windows_path"`
16392     new_path="$unix_path"
16393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16394     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16395     new_path="$unix_path"
16396   fi
16397 
16398     # remove trailing .exe if any
16399     new_path="${new_path/%.exe/}"
16400 
16401     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16402     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16403   fi
16404 
16405   else
16406     # We're on a posix platform. Hooray! :)
16407     # First separate the path from the arguments. This will split at the first
16408     # space.
16409     complete="$FOUND_MAKE"
16410     path="${complete%% *}"
16411     tmp="$complete EOL"
16412     arguments="${tmp#* }"
16413 
16414     # Cannot rely on the command "which" here since it doesn't always work.
16415     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16416     if test -z "$is_absolute_path"; then
16417       # Path to executable is not absolute. Find it.
16418       IFS_save="$IFS"
16419       IFS=:
16420       for p in $PATH; do
16421         if test -f "$p/$path" && test -x "$p/$path"; then
16422           new_path="$p/$path"
16423           break
16424         fi
16425       done
16426       IFS="$IFS_save"
16427     else
16428       # This is an absolute path, we can use it without further modifications.
16429       new_path="$path"
16430     fi
16431 
16432     if test "x$new_path" = x; then
16433       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16434 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16435       has_space=`$ECHO "$complete" | $GREP " "`
16436       if test "x$has_space" != x; then
16437         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16438 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16439       fi
16440       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16441     fi
16442   fi
16443 
16444   # Now join together the path and the arguments once again
16445   if test "x$arguments" != xEOL; then
16446     new_complete="$new_path ${arguments% *}"
16447   else
16448     new_complete="$new_path"
16449   fi
16450 
16451   if test "x$complete" != "x$new_complete"; then
16452     FOUND_MAKE="$new_complete"
16453     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16454 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16455   fi
16456 
16457         fi
16458       fi
16459     fi
16460   fi
16461 
16462     fi
16463 
16464     if test "x$FOUND_MAKE" = x; then
16465       if test "x$TOOLCHAIN_PATH" != x; then
16466         # We have a toolchain path, check that as well before giving up.
16467         OLD_PATH=$PATH
16468         PATH=$TOOLCHAIN_PATH:$PATH
16469         for ac_prog in gmake
16470 do
16471   # Extract the first word of "$ac_prog", so it can be a program name with args.
16472 set dummy $ac_prog; ac_word=$2
16473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16474 $as_echo_n "checking for $ac_word... " >&6; }
16475 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16476   $as_echo_n "(cached) " >&6
16477 else
16478   case $CHECK_TOOLSDIR_GMAKE in
16479   [\\/]* | ?:[\\/]*)
16480   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16481   ;;
16482   *)
16483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16484 for as_dir in $PATH
16485 do
16486   IFS=$as_save_IFS
16487   test -z "$as_dir" && as_dir=.
16488     for ac_exec_ext in '' $ac_executable_extensions; do
16489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16490     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16492     break 2
16493   fi
16494 done
16495   done
16496 IFS=$as_save_IFS
16497 
16498   ;;
16499 esac
16500 fi
16501 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16502 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16504 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16505 else
16506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16507 $as_echo "no" >&6; }
16508 fi
16509 
16510 
16511   test -n "$CHECK_TOOLSDIR_GMAKE" && break
16512 done
16513 
16514 
16515   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16516   DESCRIPTION="gmake in tools-dir"
16517   if test "x$MAKE_CANDIDATE" != x; then
16518     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16519 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16520     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16521     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16522     if test "x$IS_GNU_MAKE" = x; then
16523       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16524 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16525     else
16526       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16527       if test "x$IS_MODERN_MAKE" = x; then
16528         { $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
16529 $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;}
16530       else
16531         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16532           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16533             MAKE_EXPECTED_ENV='cygwin'
16534           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16535             MAKE_EXPECTED_ENV='msys'
16536           else
16537             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16538           fi
16539           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16540           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16541         else
16542           # Not relevant for non-Windows
16543           IS_MAKE_CORRECT_ENV=true
16544         fi
16545         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16546           { $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
16547 $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;}
16548         else
16549           FOUND_MAKE=$MAKE_CANDIDATE
16550 
16551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16552 
16553   # First separate the path from the arguments. This will split at the first
16554   # space.
16555   complete="$FOUND_MAKE"
16556   path="${complete%% *}"
16557   tmp="$complete EOL"
16558   arguments="${tmp#* }"
16559 
16560   # Input might be given as Windows format, start by converting to
16561   # unix format.
16562   new_path=`$CYGPATH -u "$path"`
16563 
16564   # Now try to locate executable using which
16565   new_path=`$WHICH "$new_path" 2> /dev/null`
16566   # bat and cmd files are not always considered executable in cygwin causing which
16567   # to not find them
16568   if test "x$new_path" = x \
16569       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16570       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16571     new_path=`$CYGPATH -u "$path"`
16572   fi
16573   if test "x$new_path" = x; then
16574     # Oops. Which didn't find the executable.
16575     # The splitting of arguments from the executable at a space might have been incorrect,
16576     # since paths with space are more likely in Windows. Give it another try with the whole
16577     # argument.
16578     path="$complete"
16579     arguments="EOL"
16580     new_path=`$CYGPATH -u "$path"`
16581     new_path=`$WHICH "$new_path" 2> /dev/null`
16582     # bat and cmd files are not always considered executable in cygwin causing which
16583     # to not find them
16584     if test "x$new_path" = x \
16585         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16586         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16587       new_path=`$CYGPATH -u "$path"`
16588     fi
16589     if test "x$new_path" = x; then
16590       # It's still not found. Now this is an unrecoverable error.
16591       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16592 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16593       has_space=`$ECHO "$complete" | $GREP " "`
16594       if test "x$has_space" != x; then
16595         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16596 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16597       fi
16598       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16599     fi
16600   fi
16601 
16602   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16603   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16604   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16605   # "foo.exe" is OK but "foo" is an error.
16606   #
16607   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16608   # It is also a way to make sure we got the proper file name for the real test later on.
16609   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16610   if test "x$test_shortpath" = x; then
16611     # Short path failed, file does not exist as specified.
16612     # Try adding .exe or .cmd
16613     if test -f "${new_path}.exe"; then
16614       input_to_shortpath="${new_path}.exe"
16615     elif test -f "${new_path}.cmd"; then
16616       input_to_shortpath="${new_path}.cmd"
16617     else
16618       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16619 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16620       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16621 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16622       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16623     fi
16624   else
16625     input_to_shortpath="$new_path"
16626   fi
16627 
16628   # Call helper function which possibly converts this using DOS-style short mode.
16629   # If so, the updated path is stored in $new_path.
16630   new_path="$input_to_shortpath"
16631 
16632   input_path="$input_to_shortpath"
16633   # Check if we need to convert this using DOS-style short mode. If the path
16634   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16635   # take no chances and rewrite it.
16636   # Note: m4 eats our [], so we need to use [ and ] instead.
16637   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16638   if test "x$has_forbidden_chars" != x; then
16639     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16640     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16641     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16642     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16643       # Going to short mode and back again did indeed matter. Since short mode is
16644       # case insensitive, let's make it lowercase to improve readability.
16645       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16646       # Now convert it back to Unix-style (cygpath)
16647       input_path=`$CYGPATH -u "$shortmode_path"`
16648       new_path="$input_path"
16649     fi
16650   fi
16651 
16652   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16653   if test "x$test_cygdrive_prefix" = x; then
16654     # As a simple fix, exclude /usr/bin since it's not a real path.
16655     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16656       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16657       # a path prefixed by /cygdrive for fixpath to work.
16658       new_path="$CYGWIN_ROOT_PATH$input_path"
16659     fi
16660   fi
16661 
16662   # remove trailing .exe if any
16663   new_path="${new_path/%.exe/}"
16664 
16665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16666 
16667   # First separate the path from the arguments. This will split at the first
16668   # space.
16669   complete="$FOUND_MAKE"
16670   path="${complete%% *}"
16671   tmp="$complete EOL"
16672   arguments="${tmp#* }"
16673 
16674   # Input might be given as Windows format, start by converting to
16675   # unix format.
16676   new_path="$path"
16677 
16678   windows_path="$new_path"
16679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16680     unix_path=`$CYGPATH -u "$windows_path"`
16681     new_path="$unix_path"
16682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16683     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16684     new_path="$unix_path"
16685   fi
16686 
16687 
16688   # Now try to locate executable using which
16689   new_path=`$WHICH "$new_path" 2> /dev/null`
16690 
16691   if test "x$new_path" = x; then
16692     # Oops. Which didn't find the executable.
16693     # The splitting of arguments from the executable at a space might have been incorrect,
16694     # since paths with space are more likely in Windows. Give it another try with the whole
16695     # argument.
16696     path="$complete"
16697     arguments="EOL"
16698     new_path="$path"
16699 
16700   windows_path="$new_path"
16701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16702     unix_path=`$CYGPATH -u "$windows_path"`
16703     new_path="$unix_path"
16704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16706     new_path="$unix_path"
16707   fi
16708 
16709 
16710     new_path=`$WHICH "$new_path" 2> /dev/null`
16711     # bat and cmd files are not always considered executable in MSYS causing which
16712     # to not find them
16713     if test "x$new_path" = x \
16714         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16715         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16716       new_path="$path"
16717 
16718   windows_path="$new_path"
16719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16720     unix_path=`$CYGPATH -u "$windows_path"`
16721     new_path="$unix_path"
16722   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16723     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16724     new_path="$unix_path"
16725   fi
16726 
16727     fi
16728 
16729     if test "x$new_path" = x; then
16730       # It's still not found. Now this is an unrecoverable error.
16731       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16732 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16733       has_space=`$ECHO "$complete" | $GREP " "`
16734       if test "x$has_space" != x; then
16735         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16736 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16737       fi
16738       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16739     fi
16740   fi
16741 
16742   # Now new_path has a complete unix path to the binary
16743   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16744     # Keep paths in /bin as-is, but remove trailing .exe if any
16745     new_path="${new_path/%.exe/}"
16746     # Do not save /bin paths to all_fixpath_prefixes!
16747   else
16748     # Not in mixed or Windows style, start by that.
16749     new_path=`cmd //c echo $new_path`
16750 
16751   input_path="$new_path"
16752   # Check if we need to convert this using DOS-style short mode. If the path
16753   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16754   # take no chances and rewrite it.
16755   # Note: m4 eats our [], so we need to use [ and ] instead.
16756   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16757   if test "x$has_forbidden_chars" != x; then
16758     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16759     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16760   fi
16761 
16762     # Output is in $new_path
16763 
16764   windows_path="$new_path"
16765   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16766     unix_path=`$CYGPATH -u "$windows_path"`
16767     new_path="$unix_path"
16768   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16769     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16770     new_path="$unix_path"
16771   fi
16772 
16773     # remove trailing .exe if any
16774     new_path="${new_path/%.exe/}"
16775 
16776     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16777     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16778   fi
16779 
16780   else
16781     # We're on a posix platform. Hooray! :)
16782     # First separate the path from the arguments. This will split at the first
16783     # space.
16784     complete="$FOUND_MAKE"
16785     path="${complete%% *}"
16786     tmp="$complete EOL"
16787     arguments="${tmp#* }"
16788 
16789     # Cannot rely on the command "which" here since it doesn't always work.
16790     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16791     if test -z "$is_absolute_path"; then
16792       # Path to executable is not absolute. Find it.
16793       IFS_save="$IFS"
16794       IFS=:
16795       for p in $PATH; do
16796         if test -f "$p/$path" && test -x "$p/$path"; then
16797           new_path="$p/$path"
16798           break
16799         fi
16800       done
16801       IFS="$IFS_save"
16802     else
16803       # This is an absolute path, we can use it without further modifications.
16804       new_path="$path"
16805     fi
16806 
16807     if test "x$new_path" = x; then
16808       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16809 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16810       has_space=`$ECHO "$complete" | $GREP " "`
16811       if test "x$has_space" != x; then
16812         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16813 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16814       fi
16815       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16816     fi
16817   fi
16818 
16819   # Now join together the path and the arguments once again
16820   if test "x$arguments" != xEOL; then
16821     new_complete="$new_path ${arguments% *}"
16822   else
16823     new_complete="$new_path"
16824   fi
16825 
16826   if test "x$complete" != "x$new_complete"; then
16827     FOUND_MAKE="$new_complete"
16828     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16829 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16830   fi
16831 
16832         fi
16833       fi
16834     fi
16835   fi
16836 
16837         if test "x$FOUND_MAKE" = x; then
16838           for ac_prog in make
16839 do
16840   # Extract the first word of "$ac_prog", so it can be a program name with args.
16841 set dummy $ac_prog; ac_word=$2
16842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16843 $as_echo_n "checking for $ac_word... " >&6; }
16844 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16845   $as_echo_n "(cached) " >&6
16846 else
16847   case $CHECK_TOOLSDIR_MAKE in
16848   [\\/]* | ?:[\\/]*)
16849   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16850   ;;
16851   *)
16852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16853 for as_dir in $PATH
16854 do
16855   IFS=$as_save_IFS
16856   test -z "$as_dir" && as_dir=.
16857     for ac_exec_ext in '' $ac_executable_extensions; do
16858   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16859     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16861     break 2
16862   fi
16863 done
16864   done
16865 IFS=$as_save_IFS
16866 
16867   ;;
16868 esac
16869 fi
16870 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16871 if test -n "$CHECK_TOOLSDIR_MAKE"; then
16872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16873 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16874 else
16875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16876 $as_echo "no" >&6; }
16877 fi
16878 
16879 
16880   test -n "$CHECK_TOOLSDIR_MAKE" && break
16881 done
16882 
16883 
16884   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16885   DESCRIPTION="make in tools-dir"
16886   if test "x$MAKE_CANDIDATE" != x; then
16887     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16888 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16889     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16890     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16891     if test "x$IS_GNU_MAKE" = x; then
16892       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16893 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16894     else
16895       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16896       if test "x$IS_MODERN_MAKE" = x; then
16897         { $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
16898 $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;}
16899       else
16900         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16901           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16902             MAKE_EXPECTED_ENV='cygwin'
16903           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16904             MAKE_EXPECTED_ENV='msys'
16905           else
16906             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16907           fi
16908           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16909           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16910         else
16911           # Not relevant for non-Windows
16912           IS_MAKE_CORRECT_ENV=true
16913         fi
16914         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16915           { $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
16916 $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;}
16917         else
16918           FOUND_MAKE=$MAKE_CANDIDATE
16919 
16920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16921 
16922   # First separate the path from the arguments. This will split at the first
16923   # space.
16924   complete="$FOUND_MAKE"
16925   path="${complete%% *}"
16926   tmp="$complete EOL"
16927   arguments="${tmp#* }"
16928 
16929   # Input might be given as Windows format, start by converting to
16930   # unix format.
16931   new_path=`$CYGPATH -u "$path"`
16932 
16933   # Now try to locate executable using which
16934   new_path=`$WHICH "$new_path" 2> /dev/null`
16935   # bat and cmd files are not always considered executable in cygwin causing which
16936   # to not find them
16937   if test "x$new_path" = x \
16938       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16939       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16940     new_path=`$CYGPATH -u "$path"`
16941   fi
16942   if test "x$new_path" = x; then
16943     # Oops. Which didn't find the executable.
16944     # The splitting of arguments from the executable at a space might have been incorrect,
16945     # since paths with space are more likely in Windows. Give it another try with the whole
16946     # argument.
16947     path="$complete"
16948     arguments="EOL"
16949     new_path=`$CYGPATH -u "$path"`
16950     new_path=`$WHICH "$new_path" 2> /dev/null`
16951     # bat and cmd files are not always considered executable in cygwin causing which
16952     # to not find them
16953     if test "x$new_path" = x \
16954         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16955         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16956       new_path=`$CYGPATH -u "$path"`
16957     fi
16958     if test "x$new_path" = x; then
16959       # It's still not found. Now this is an unrecoverable error.
16960       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16961 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16962       has_space=`$ECHO "$complete" | $GREP " "`
16963       if test "x$has_space" != x; then
16964         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16965 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16966       fi
16967       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16968     fi
16969   fi
16970 
16971   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16972   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16973   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16974   # "foo.exe" is OK but "foo" is an error.
16975   #
16976   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16977   # It is also a way to make sure we got the proper file name for the real test later on.
16978   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16979   if test "x$test_shortpath" = x; then
16980     # Short path failed, file does not exist as specified.
16981     # Try adding .exe or .cmd
16982     if test -f "${new_path}.exe"; then
16983       input_to_shortpath="${new_path}.exe"
16984     elif test -f "${new_path}.cmd"; then
16985       input_to_shortpath="${new_path}.cmd"
16986     else
16987       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16988 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16989       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16990 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16991       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16992     fi
16993   else
16994     input_to_shortpath="$new_path"
16995   fi
16996 
16997   # Call helper function which possibly converts this using DOS-style short mode.
16998   # If so, the updated path is stored in $new_path.
16999   new_path="$input_to_shortpath"
17000 
17001   input_path="$input_to_shortpath"
17002   # Check if we need to convert this using DOS-style short mode. If the path
17003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17004   # take no chances and rewrite it.
17005   # Note: m4 eats our [], so we need to use [ and ] instead.
17006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17007   if test "x$has_forbidden_chars" != x; then
17008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17009     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17010     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17011     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17012       # Going to short mode and back again did indeed matter. Since short mode is
17013       # case insensitive, let's make it lowercase to improve readability.
17014       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17015       # Now convert it back to Unix-style (cygpath)
17016       input_path=`$CYGPATH -u "$shortmode_path"`
17017       new_path="$input_path"
17018     fi
17019   fi
17020 
17021   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17022   if test "x$test_cygdrive_prefix" = x; then
17023     # As a simple fix, exclude /usr/bin since it's not a real path.
17024     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17025       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17026       # a path prefixed by /cygdrive for fixpath to work.
17027       new_path="$CYGWIN_ROOT_PATH$input_path"
17028     fi
17029   fi
17030 
17031   # remove trailing .exe if any
17032   new_path="${new_path/%.exe/}"
17033 
17034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17035 
17036   # First separate the path from the arguments. This will split at the first
17037   # space.
17038   complete="$FOUND_MAKE"
17039   path="${complete%% *}"
17040   tmp="$complete EOL"
17041   arguments="${tmp#* }"
17042 
17043   # Input might be given as Windows format, start by converting to
17044   # unix format.
17045   new_path="$path"
17046 
17047   windows_path="$new_path"
17048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17049     unix_path=`$CYGPATH -u "$windows_path"`
17050     new_path="$unix_path"
17051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17052     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17053     new_path="$unix_path"
17054   fi
17055 
17056 
17057   # Now try to locate executable using which
17058   new_path=`$WHICH "$new_path" 2> /dev/null`
17059 
17060   if test "x$new_path" = x; then
17061     # Oops. Which didn't find the executable.
17062     # The splitting of arguments from the executable at a space might have been incorrect,
17063     # since paths with space are more likely in Windows. Give it another try with the whole
17064     # argument.
17065     path="$complete"
17066     arguments="EOL"
17067     new_path="$path"
17068 
17069   windows_path="$new_path"
17070   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17071     unix_path=`$CYGPATH -u "$windows_path"`
17072     new_path="$unix_path"
17073   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17074     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17075     new_path="$unix_path"
17076   fi
17077 
17078 
17079     new_path=`$WHICH "$new_path" 2> /dev/null`
17080     # bat and cmd files are not always considered executable in MSYS causing which
17081     # to not find them
17082     if test "x$new_path" = x \
17083         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17084         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17085       new_path="$path"
17086 
17087   windows_path="$new_path"
17088   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17089     unix_path=`$CYGPATH -u "$windows_path"`
17090     new_path="$unix_path"
17091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17092     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17093     new_path="$unix_path"
17094   fi
17095 
17096     fi
17097 
17098     if test "x$new_path" = x; then
17099       # It's still not found. Now this is an unrecoverable error.
17100       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17101 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17102       has_space=`$ECHO "$complete" | $GREP " "`
17103       if test "x$has_space" != x; then
17104         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17105 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17106       fi
17107       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17108     fi
17109   fi
17110 
17111   # Now new_path has a complete unix path to the binary
17112   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17113     # Keep paths in /bin as-is, but remove trailing .exe if any
17114     new_path="${new_path/%.exe/}"
17115     # Do not save /bin paths to all_fixpath_prefixes!
17116   else
17117     # Not in mixed or Windows style, start by that.
17118     new_path=`cmd //c echo $new_path`
17119 
17120   input_path="$new_path"
17121   # Check if we need to convert this using DOS-style short mode. If the path
17122   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17123   # take no chances and rewrite it.
17124   # Note: m4 eats our [], so we need to use [ and ] instead.
17125   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17126   if test "x$has_forbidden_chars" != x; then
17127     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17128     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17129   fi
17130 
17131     # Output is in $new_path
17132 
17133   windows_path="$new_path"
17134   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17135     unix_path=`$CYGPATH -u "$windows_path"`
17136     new_path="$unix_path"
17137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17138     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17139     new_path="$unix_path"
17140   fi
17141 
17142     # remove trailing .exe if any
17143     new_path="${new_path/%.exe/}"
17144 
17145     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17146     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17147   fi
17148 
17149   else
17150     # We're on a posix platform. Hooray! :)
17151     # First separate the path from the arguments. This will split at the first
17152     # space.
17153     complete="$FOUND_MAKE"
17154     path="${complete%% *}"
17155     tmp="$complete EOL"
17156     arguments="${tmp#* }"
17157 
17158     # Cannot rely on the command "which" here since it doesn't always work.
17159     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17160     if test -z "$is_absolute_path"; then
17161       # Path to executable is not absolute. Find it.
17162       IFS_save="$IFS"
17163       IFS=:
17164       for p in $PATH; do
17165         if test -f "$p/$path" && test -x "$p/$path"; then
17166           new_path="$p/$path"
17167           break
17168         fi
17169       done
17170       IFS="$IFS_save"
17171     else
17172       # This is an absolute path, we can use it without further modifications.
17173       new_path="$path"
17174     fi
17175 
17176     if test "x$new_path" = x; then
17177       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17178 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17179       has_space=`$ECHO "$complete" | $GREP " "`
17180       if test "x$has_space" != x; then
17181         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17182 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17183       fi
17184       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17185     fi
17186   fi
17187 
17188   # Now join together the path and the arguments once again
17189   if test "x$arguments" != xEOL; then
17190     new_complete="$new_path ${arguments% *}"
17191   else
17192     new_complete="$new_path"
17193   fi
17194 
17195   if test "x$complete" != "x$new_complete"; then
17196     FOUND_MAKE="$new_complete"
17197     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17198 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17199   fi
17200 
17201         fi
17202       fi
17203     fi
17204   fi
17205 
17206         fi
17207         PATH=$OLD_PATH
17208       fi
17209     fi
17210 
17211     if test "x$FOUND_MAKE" = x; then
17212       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
17213     fi
17214   fi
17215 
17216   MAKE=$FOUND_MAKE
17217 
17218   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17219 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17220 
17221 
17222 
17223   # Test if find supports -delete
17224   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17225 $as_echo_n "checking if find supports -delete... " >&6; }
17226   FIND_DELETE="-delete"
17227 
17228   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17229 
17230   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17231 
17232   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17233   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17234     # No, it does not.
17235     rm $DELETEDIR/TestIfFindSupportsDelete
17236     FIND_DELETE="-exec rm \{\} \+"
17237     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17238 $as_echo "no" >&6; }
17239   else
17240     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17241 $as_echo "yes" >&6; }
17242   fi
17243   rmdir $DELETEDIR
17244 
17245 
17246 
17247   # These tools might not be installed by default,
17248   # need hint on how to install them.
17249 
17250 
17251 
17252   # Publish this variable in the help.
17253 
17254 
17255   if test "x$UNZIP" = x; then
17256     # The variable is not set by user, try to locate tool using the code snippet
17257     for ac_prog in unzip
17258 do
17259   # Extract the first word of "$ac_prog", so it can be a program name with args.
17260 set dummy $ac_prog; ac_word=$2
17261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17262 $as_echo_n "checking for $ac_word... " >&6; }
17263 if ${ac_cv_path_UNZIP+:} false; then :
17264   $as_echo_n "(cached) " >&6
17265 else
17266   case $UNZIP in
17267   [\\/]* | ?:[\\/]*)
17268   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17269   ;;
17270   *)
17271   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17272 for as_dir in $PATH
17273 do
17274   IFS=$as_save_IFS
17275   test -z "$as_dir" && as_dir=.
17276     for ac_exec_ext in '' $ac_executable_extensions; do
17277   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17278     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17280     break 2
17281   fi
17282 done
17283   done
17284 IFS=$as_save_IFS
17285 
17286   ;;
17287 esac
17288 fi
17289 UNZIP=$ac_cv_path_UNZIP
17290 if test -n "$UNZIP"; then
17291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17292 $as_echo "$UNZIP" >&6; }
17293 else
17294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17295 $as_echo "no" >&6; }
17296 fi
17297 
17298 
17299   test -n "$UNZIP" && break
17300 done
17301 
17302   else
17303     # The variable is set, but is it from the command line or the environment?
17304 
17305     # Try to remove the string !UNZIP! from our list.
17306     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17307     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17308       # If it failed, the variable was not from the command line. Ignore it,
17309       # but warn the user (except for BASH, which is always set by the calling BASH).
17310       if test "xUNZIP" != xBASH; then
17311         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17312 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17313       fi
17314       # Try to locate tool using the code snippet
17315       for ac_prog in unzip
17316 do
17317   # Extract the first word of "$ac_prog", so it can be a program name with args.
17318 set dummy $ac_prog; ac_word=$2
17319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17320 $as_echo_n "checking for $ac_word... " >&6; }
17321 if ${ac_cv_path_UNZIP+:} false; then :
17322   $as_echo_n "(cached) " >&6
17323 else
17324   case $UNZIP in
17325   [\\/]* | ?:[\\/]*)
17326   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17327   ;;
17328   *)
17329   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17330 for as_dir in $PATH
17331 do
17332   IFS=$as_save_IFS
17333   test -z "$as_dir" && as_dir=.
17334     for ac_exec_ext in '' $ac_executable_extensions; do
17335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17336     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17338     break 2
17339   fi
17340 done
17341   done
17342 IFS=$as_save_IFS
17343 
17344   ;;
17345 esac
17346 fi
17347 UNZIP=$ac_cv_path_UNZIP
17348 if test -n "$UNZIP"; then
17349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17350 $as_echo "$UNZIP" >&6; }
17351 else
17352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17353 $as_echo "no" >&6; }
17354 fi
17355 
17356 
17357   test -n "$UNZIP" && break
17358 done
17359 
17360     else
17361       # If it succeeded, then it was overridden by the user. We will use it
17362       # for the tool.
17363 
17364       # First remove it from the list of overridden variables, so we can test
17365       # for unknown variables in the end.
17366       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17367 
17368       # Check if the provided tool contains a complete path.
17369       tool_specified="$UNZIP"
17370       tool_basename="${tool_specified##*/}"
17371       if test "x$tool_basename" = "x$tool_specified"; then
17372         # A command without a complete path is provided, search $PATH.
17373         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17374 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17375         # Extract the first word of "$tool_basename", so it can be a program name with args.
17376 set dummy $tool_basename; ac_word=$2
17377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17378 $as_echo_n "checking for $ac_word... " >&6; }
17379 if ${ac_cv_path_UNZIP+:} false; then :
17380   $as_echo_n "(cached) " >&6
17381 else
17382   case $UNZIP in
17383   [\\/]* | ?:[\\/]*)
17384   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17385   ;;
17386   *)
17387   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17388 for as_dir in $PATH
17389 do
17390   IFS=$as_save_IFS
17391   test -z "$as_dir" && as_dir=.
17392     for ac_exec_ext in '' $ac_executable_extensions; do
17393   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17394     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17395     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17396     break 2
17397   fi
17398 done
17399   done
17400 IFS=$as_save_IFS
17401 
17402   ;;
17403 esac
17404 fi
17405 UNZIP=$ac_cv_path_UNZIP
17406 if test -n "$UNZIP"; then
17407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17408 $as_echo "$UNZIP" >&6; }
17409 else
17410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17411 $as_echo "no" >&6; }
17412 fi
17413 
17414 
17415         if test "x$UNZIP" = x; then
17416           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17417         fi
17418       else
17419         # Otherwise we believe it is a complete path. Use it as it is.
17420         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17421 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17422         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17423 $as_echo_n "checking for UNZIP... " >&6; }
17424         if test ! -x "$tool_specified"; then
17425           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17426 $as_echo "not found" >&6; }
17427           as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17428         fi
17429         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17430 $as_echo "$tool_specified" >&6; }
17431       fi
17432     fi
17433   fi
17434 
17435 
17436 
17437   if test "x$UNZIP" = x; then
17438     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17439   fi
17440 
17441 
17442 
17443 
17444 
17445   # Publish this variable in the help.
17446 
17447 
17448   if test "x$ZIP" = x; then
17449     # The variable is not set by user, try to locate tool using the code snippet
17450     for ac_prog in zip
17451 do
17452   # Extract the first word of "$ac_prog", so it can be a program name with args.
17453 set dummy $ac_prog; ac_word=$2
17454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17455 $as_echo_n "checking for $ac_word... " >&6; }
17456 if ${ac_cv_path_ZIP+:} false; then :
17457   $as_echo_n "(cached) " >&6
17458 else
17459   case $ZIP in
17460   [\\/]* | ?:[\\/]*)
17461   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17462   ;;
17463   *)
17464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17465 for as_dir in $PATH
17466 do
17467   IFS=$as_save_IFS
17468   test -z "$as_dir" && as_dir=.
17469     for ac_exec_ext in '' $ac_executable_extensions; do
17470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17471     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17473     break 2
17474   fi
17475 done
17476   done
17477 IFS=$as_save_IFS
17478 
17479   ;;
17480 esac
17481 fi
17482 ZIP=$ac_cv_path_ZIP
17483 if test -n "$ZIP"; then
17484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17485 $as_echo "$ZIP" >&6; }
17486 else
17487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17488 $as_echo "no" >&6; }
17489 fi
17490 
17491 
17492   test -n "$ZIP" && break
17493 done
17494 
17495   else
17496     # The variable is set, but is it from the command line or the environment?
17497 
17498     # Try to remove the string !ZIP! from our list.
17499     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17500     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17501       # If it failed, the variable was not from the command line. Ignore it,
17502       # but warn the user (except for BASH, which is always set by the calling BASH).
17503       if test "xZIP" != xBASH; then
17504         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17505 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17506       fi
17507       # Try to locate tool using the code snippet
17508       for ac_prog in zip
17509 do
17510   # Extract the first word of "$ac_prog", so it can be a program name with args.
17511 set dummy $ac_prog; ac_word=$2
17512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17513 $as_echo_n "checking for $ac_word... " >&6; }
17514 if ${ac_cv_path_ZIP+:} false; then :
17515   $as_echo_n "(cached) " >&6
17516 else
17517   case $ZIP in
17518   [\\/]* | ?:[\\/]*)
17519   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17520   ;;
17521   *)
17522   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17523 for as_dir in $PATH
17524 do
17525   IFS=$as_save_IFS
17526   test -z "$as_dir" && as_dir=.
17527     for ac_exec_ext in '' $ac_executable_extensions; do
17528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17529     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17531     break 2
17532   fi
17533 done
17534   done
17535 IFS=$as_save_IFS
17536 
17537   ;;
17538 esac
17539 fi
17540 ZIP=$ac_cv_path_ZIP
17541 if test -n "$ZIP"; then
17542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17543 $as_echo "$ZIP" >&6; }
17544 else
17545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17546 $as_echo "no" >&6; }
17547 fi
17548 
17549 
17550   test -n "$ZIP" && break
17551 done
17552 
17553     else
17554       # If it succeeded, then it was overridden by the user. We will use it
17555       # for the tool.
17556 
17557       # First remove it from the list of overridden variables, so we can test
17558       # for unknown variables in the end.
17559       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17560 
17561       # Check if the provided tool contains a complete path.
17562       tool_specified="$ZIP"
17563       tool_basename="${tool_specified##*/}"
17564       if test "x$tool_basename" = "x$tool_specified"; then
17565         # A command without a complete path is provided, search $PATH.
17566         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17567 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17568         # Extract the first word of "$tool_basename", so it can be a program name with args.
17569 set dummy $tool_basename; ac_word=$2
17570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17571 $as_echo_n "checking for $ac_word... " >&6; }
17572 if ${ac_cv_path_ZIP+:} false; then :
17573   $as_echo_n "(cached) " >&6
17574 else
17575   case $ZIP in
17576   [\\/]* | ?:[\\/]*)
17577   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17578   ;;
17579   *)
17580   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17581 for as_dir in $PATH
17582 do
17583   IFS=$as_save_IFS
17584   test -z "$as_dir" && as_dir=.
17585     for ac_exec_ext in '' $ac_executable_extensions; do
17586   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17587     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17588     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17589     break 2
17590   fi
17591 done
17592   done
17593 IFS=$as_save_IFS
17594 
17595   ;;
17596 esac
17597 fi
17598 ZIP=$ac_cv_path_ZIP
17599 if test -n "$ZIP"; then
17600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17601 $as_echo "$ZIP" >&6; }
17602 else
17603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17604 $as_echo "no" >&6; }
17605 fi
17606 
17607 
17608         if test "x$ZIP" = x; then
17609           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17610         fi
17611       else
17612         # Otherwise we believe it is a complete path. Use it as it is.
17613         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17614 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17615         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17616 $as_echo_n "checking for ZIP... " >&6; }
17617         if test ! -x "$tool_specified"; then
17618           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17619 $as_echo "not found" >&6; }
17620           as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17621         fi
17622         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17623 $as_echo "$tool_specified" >&6; }
17624       fi
17625     fi
17626   fi
17627 
17628 
17629 
17630   if test "x$ZIP" = x; then
17631     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17632   fi
17633 
17634 
17635 
17636   # Non-required basic tools
17637 
17638 
17639 
17640   # Publish this variable in the help.
17641 
17642 
17643   if test "x$LDD" = x; then
17644     # The variable is not set by user, try to locate tool using the code snippet
17645     for ac_prog in ldd
17646 do
17647   # Extract the first word of "$ac_prog", so it can be a program name with args.
17648 set dummy $ac_prog; ac_word=$2
17649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17650 $as_echo_n "checking for $ac_word... " >&6; }
17651 if ${ac_cv_path_LDD+:} false; then :
17652   $as_echo_n "(cached) " >&6
17653 else
17654   case $LDD in
17655   [\\/]* | ?:[\\/]*)
17656   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17657   ;;
17658   *)
17659   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17660 for as_dir in $PATH
17661 do
17662   IFS=$as_save_IFS
17663   test -z "$as_dir" && as_dir=.
17664     for ac_exec_ext in '' $ac_executable_extensions; do
17665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17666     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17668     break 2
17669   fi
17670 done
17671   done
17672 IFS=$as_save_IFS
17673 
17674   ;;
17675 esac
17676 fi
17677 LDD=$ac_cv_path_LDD
17678 if test -n "$LDD"; then
17679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17680 $as_echo "$LDD" >&6; }
17681 else
17682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17683 $as_echo "no" >&6; }
17684 fi
17685 
17686 
17687   test -n "$LDD" && break
17688 done
17689 
17690   else
17691     # The variable is set, but is it from the command line or the environment?
17692 
17693     # Try to remove the string !LDD! from our list.
17694     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17695     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17696       # If it failed, the variable was not from the command line. Ignore it,
17697       # but warn the user (except for BASH, which is always set by the calling BASH).
17698       if test "xLDD" != xBASH; then
17699         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17700 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17701       fi
17702       # Try to locate tool using the code snippet
17703       for ac_prog in ldd
17704 do
17705   # Extract the first word of "$ac_prog", so it can be a program name with args.
17706 set dummy $ac_prog; ac_word=$2
17707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17708 $as_echo_n "checking for $ac_word... " >&6; }
17709 if ${ac_cv_path_LDD+:} false; then :
17710   $as_echo_n "(cached) " >&6
17711 else
17712   case $LDD in
17713   [\\/]* | ?:[\\/]*)
17714   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17715   ;;
17716   *)
17717   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17718 for as_dir in $PATH
17719 do
17720   IFS=$as_save_IFS
17721   test -z "$as_dir" && as_dir=.
17722     for ac_exec_ext in '' $ac_executable_extensions; do
17723   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17724     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17726     break 2
17727   fi
17728 done
17729   done
17730 IFS=$as_save_IFS
17731 
17732   ;;
17733 esac
17734 fi
17735 LDD=$ac_cv_path_LDD
17736 if test -n "$LDD"; then
17737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17738 $as_echo "$LDD" >&6; }
17739 else
17740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17741 $as_echo "no" >&6; }
17742 fi
17743 
17744 
17745   test -n "$LDD" && break
17746 done
17747 
17748     else
17749       # If it succeeded, then it was overridden by the user. We will use it
17750       # for the tool.
17751 
17752       # First remove it from the list of overridden variables, so we can test
17753       # for unknown variables in the end.
17754       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17755 
17756       # Check if the provided tool contains a complete path.
17757       tool_specified="$LDD"
17758       tool_basename="${tool_specified##*/}"
17759       if test "x$tool_basename" = "x$tool_specified"; then
17760         # A command without a complete path is provided, search $PATH.
17761         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17762 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17763         # Extract the first word of "$tool_basename", so it can be a program name with args.
17764 set dummy $tool_basename; ac_word=$2
17765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17766 $as_echo_n "checking for $ac_word... " >&6; }
17767 if ${ac_cv_path_LDD+:} false; then :
17768   $as_echo_n "(cached) " >&6
17769 else
17770   case $LDD in
17771   [\\/]* | ?:[\\/]*)
17772   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17773   ;;
17774   *)
17775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17776 for as_dir in $PATH
17777 do
17778   IFS=$as_save_IFS
17779   test -z "$as_dir" && as_dir=.
17780     for ac_exec_ext in '' $ac_executable_extensions; do
17781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17782     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17784     break 2
17785   fi
17786 done
17787   done
17788 IFS=$as_save_IFS
17789 
17790   ;;
17791 esac
17792 fi
17793 LDD=$ac_cv_path_LDD
17794 if test -n "$LDD"; then
17795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17796 $as_echo "$LDD" >&6; }
17797 else
17798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17799 $as_echo "no" >&6; }
17800 fi
17801 
17802 
17803         if test "x$LDD" = x; then
17804           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17805         fi
17806       else
17807         # Otherwise we believe it is a complete path. Use it as it is.
17808         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17809 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17810         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17811 $as_echo_n "checking for LDD... " >&6; }
17812         if test ! -x "$tool_specified"; then
17813           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17814 $as_echo "not found" >&6; }
17815           as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17816         fi
17817         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17818 $as_echo "$tool_specified" >&6; }
17819       fi
17820     fi
17821   fi
17822 
17823 
17824   if test "x$LDD" = "x"; then
17825     # List shared lib dependencies is used for
17826     # debug output and checking for forbidden dependencies.
17827     # We can build without it.
17828     LDD="true"
17829   fi
17830 
17831 
17832   # Publish this variable in the help.
17833 
17834 
17835   if test "x$READELF" = x; then
17836     # The variable is not set by user, try to locate tool using the code snippet
17837     for ac_prog in readelf greadelf
17838 do
17839   # Extract the first word of "$ac_prog", so it can be a program name with args.
17840 set dummy $ac_prog; ac_word=$2
17841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17842 $as_echo_n "checking for $ac_word... " >&6; }
17843 if ${ac_cv_path_READELF+:} false; then :
17844   $as_echo_n "(cached) " >&6
17845 else
17846   case $READELF in
17847   [\\/]* | ?:[\\/]*)
17848   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17849   ;;
17850   *)
17851   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17852 for as_dir in $PATH
17853 do
17854   IFS=$as_save_IFS
17855   test -z "$as_dir" && as_dir=.
17856     for ac_exec_ext in '' $ac_executable_extensions; do
17857   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17858     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17859     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17860     break 2
17861   fi
17862 done
17863   done
17864 IFS=$as_save_IFS
17865 
17866   ;;
17867 esac
17868 fi
17869 READELF=$ac_cv_path_READELF
17870 if test -n "$READELF"; then
17871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17872 $as_echo "$READELF" >&6; }
17873 else
17874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17875 $as_echo "no" >&6; }
17876 fi
17877 
17878 
17879   test -n "$READELF" && break
17880 done
17881 
17882   else
17883     # The variable is set, but is it from the command line or the environment?
17884 
17885     # Try to remove the string !READELF! from our list.
17886     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17887     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17888       # If it failed, the variable was not from the command line. Ignore it,
17889       # but warn the user (except for BASH, which is always set by the calling BASH).
17890       if test "xREADELF" != xBASH; then
17891         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17892 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17893       fi
17894       # Try to locate tool using the code snippet
17895       for ac_prog in readelf greadelf
17896 do
17897   # Extract the first word of "$ac_prog", so it can be a program name with args.
17898 set dummy $ac_prog; ac_word=$2
17899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17900 $as_echo_n "checking for $ac_word... " >&6; }
17901 if ${ac_cv_path_READELF+:} false; then :
17902   $as_echo_n "(cached) " >&6
17903 else
17904   case $READELF in
17905   [\\/]* | ?:[\\/]*)
17906   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17907   ;;
17908   *)
17909   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17910 for as_dir in $PATH
17911 do
17912   IFS=$as_save_IFS
17913   test -z "$as_dir" && as_dir=.
17914     for ac_exec_ext in '' $ac_executable_extensions; do
17915   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17916     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17917     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17918     break 2
17919   fi
17920 done
17921   done
17922 IFS=$as_save_IFS
17923 
17924   ;;
17925 esac
17926 fi
17927 READELF=$ac_cv_path_READELF
17928 if test -n "$READELF"; then
17929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17930 $as_echo "$READELF" >&6; }
17931 else
17932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17933 $as_echo "no" >&6; }
17934 fi
17935 
17936 
17937   test -n "$READELF" && break
17938 done
17939 
17940     else
17941       # If it succeeded, then it was overridden by the user. We will use it
17942       # for the tool.
17943 
17944       # First remove it from the list of overridden variables, so we can test
17945       # for unknown variables in the end.
17946       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17947 
17948       # Check if the provided tool contains a complete path.
17949       tool_specified="$READELF"
17950       tool_basename="${tool_specified##*/}"
17951       if test "x$tool_basename" = "x$tool_specified"; then
17952         # A command without a complete path is provided, search $PATH.
17953         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17954 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17955         # Extract the first word of "$tool_basename", so it can be a program name with args.
17956 set dummy $tool_basename; ac_word=$2
17957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17958 $as_echo_n "checking for $ac_word... " >&6; }
17959 if ${ac_cv_path_READELF+:} false; then :
17960   $as_echo_n "(cached) " >&6
17961 else
17962   case $READELF in
17963   [\\/]* | ?:[\\/]*)
17964   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17965   ;;
17966   *)
17967   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17968 for as_dir in $PATH
17969 do
17970   IFS=$as_save_IFS
17971   test -z "$as_dir" && as_dir=.
17972     for ac_exec_ext in '' $ac_executable_extensions; do
17973   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17974     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17975     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17976     break 2
17977   fi
17978 done
17979   done
17980 IFS=$as_save_IFS
17981 
17982   ;;
17983 esac
17984 fi
17985 READELF=$ac_cv_path_READELF
17986 if test -n "$READELF"; then
17987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17988 $as_echo "$READELF" >&6; }
17989 else
17990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17991 $as_echo "no" >&6; }
17992 fi
17993 
17994 
17995         if test "x$READELF" = x; then
17996           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17997         fi
17998       else
17999         # Otherwise we believe it is a complete path. Use it as it is.
18000         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18001 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18002         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18003 $as_echo_n "checking for READELF... " >&6; }
18004         if test ! -x "$tool_specified"; then
18005           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18006 $as_echo "not found" >&6; }
18007           as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18008         fi
18009         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18010 $as_echo "$tool_specified" >&6; }
18011       fi
18012     fi
18013   fi
18014 
18015 
18016 
18017 
18018   # Publish this variable in the help.
18019 
18020 
18021   if test "x$HG" = x; then
18022     # The variable is not set by user, try to locate tool using the code snippet
18023     for ac_prog in hg
18024 do
18025   # Extract the first word of "$ac_prog", so it can be a program name with args.
18026 set dummy $ac_prog; ac_word=$2
18027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18028 $as_echo_n "checking for $ac_word... " >&6; }
18029 if ${ac_cv_path_HG+:} false; then :
18030   $as_echo_n "(cached) " >&6
18031 else
18032   case $HG in
18033   [\\/]* | ?:[\\/]*)
18034   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18035   ;;
18036   *)
18037   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18038 for as_dir in $PATH
18039 do
18040   IFS=$as_save_IFS
18041   test -z "$as_dir" && as_dir=.
18042     for ac_exec_ext in '' $ac_executable_extensions; do
18043   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18044     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18045     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18046     break 2
18047   fi
18048 done
18049   done
18050 IFS=$as_save_IFS
18051 
18052   ;;
18053 esac
18054 fi
18055 HG=$ac_cv_path_HG
18056 if test -n "$HG"; then
18057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18058 $as_echo "$HG" >&6; }
18059 else
18060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18061 $as_echo "no" >&6; }
18062 fi
18063 
18064 
18065   test -n "$HG" && break
18066 done
18067 
18068   else
18069     # The variable is set, but is it from the command line or the environment?
18070 
18071     # Try to remove the string !HG! from our list.
18072     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18073     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18074       # If it failed, the variable was not from the command line. Ignore it,
18075       # but warn the user (except for BASH, which is always set by the calling BASH).
18076       if test "xHG" != xBASH; then
18077         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18078 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18079       fi
18080       # Try to locate tool using the code snippet
18081       for ac_prog in hg
18082 do
18083   # Extract the first word of "$ac_prog", so it can be a program name with args.
18084 set dummy $ac_prog; ac_word=$2
18085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18086 $as_echo_n "checking for $ac_word... " >&6; }
18087 if ${ac_cv_path_HG+:} false; then :
18088   $as_echo_n "(cached) " >&6
18089 else
18090   case $HG in
18091   [\\/]* | ?:[\\/]*)
18092   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18093   ;;
18094   *)
18095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18096 for as_dir in $PATH
18097 do
18098   IFS=$as_save_IFS
18099   test -z "$as_dir" && as_dir=.
18100     for ac_exec_ext in '' $ac_executable_extensions; do
18101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18102     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18104     break 2
18105   fi
18106 done
18107   done
18108 IFS=$as_save_IFS
18109 
18110   ;;
18111 esac
18112 fi
18113 HG=$ac_cv_path_HG
18114 if test -n "$HG"; then
18115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18116 $as_echo "$HG" >&6; }
18117 else
18118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18119 $as_echo "no" >&6; }
18120 fi
18121 
18122 
18123   test -n "$HG" && break
18124 done
18125 
18126     else
18127       # If it succeeded, then it was overridden by the user. We will use it
18128       # for the tool.
18129 
18130       # First remove it from the list of overridden variables, so we can test
18131       # for unknown variables in the end.
18132       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18133 
18134       # Check if the provided tool contains a complete path.
18135       tool_specified="$HG"
18136       tool_basename="${tool_specified##*/}"
18137       if test "x$tool_basename" = "x$tool_specified"; then
18138         # A command without a complete path is provided, search $PATH.
18139         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18140 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18141         # Extract the first word of "$tool_basename", so it can be a program name with args.
18142 set dummy $tool_basename; ac_word=$2
18143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18144 $as_echo_n "checking for $ac_word... " >&6; }
18145 if ${ac_cv_path_HG+:} false; then :
18146   $as_echo_n "(cached) " >&6
18147 else
18148   case $HG in
18149   [\\/]* | ?:[\\/]*)
18150   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18151   ;;
18152   *)
18153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18154 for as_dir in $PATH
18155 do
18156   IFS=$as_save_IFS
18157   test -z "$as_dir" && as_dir=.
18158     for ac_exec_ext in '' $ac_executable_extensions; do
18159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18160     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18162     break 2
18163   fi
18164 done
18165   done
18166 IFS=$as_save_IFS
18167 
18168   ;;
18169 esac
18170 fi
18171 HG=$ac_cv_path_HG
18172 if test -n "$HG"; then
18173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18174 $as_echo "$HG" >&6; }
18175 else
18176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18177 $as_echo "no" >&6; }
18178 fi
18179 
18180 
18181         if test "x$HG" = x; then
18182           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18183         fi
18184       else
18185         # Otherwise we believe it is a complete path. Use it as it is.
18186         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18187 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18188         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18189 $as_echo_n "checking for HG... " >&6; }
18190         if test ! -x "$tool_specified"; then
18191           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18192 $as_echo "not found" >&6; }
18193           as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18194         fi
18195         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18196 $as_echo "$tool_specified" >&6; }
18197       fi
18198     fi
18199   fi
18200 
18201 
18202 
18203 
18204   # Publish this variable in the help.
18205 
18206 
18207   if test "x$STAT" = x; then
18208     # The variable is not set by user, try to locate tool using the code snippet
18209     for ac_prog in stat
18210 do
18211   # Extract the first word of "$ac_prog", so it can be a program name with args.
18212 set dummy $ac_prog; ac_word=$2
18213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18214 $as_echo_n "checking for $ac_word... " >&6; }
18215 if ${ac_cv_path_STAT+:} false; then :
18216   $as_echo_n "(cached) " >&6
18217 else
18218   case $STAT in
18219   [\\/]* | ?:[\\/]*)
18220   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18221   ;;
18222   *)
18223   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18224 for as_dir in $PATH
18225 do
18226   IFS=$as_save_IFS
18227   test -z "$as_dir" && as_dir=.
18228     for ac_exec_ext in '' $ac_executable_extensions; do
18229   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18230     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18231     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18232     break 2
18233   fi
18234 done
18235   done
18236 IFS=$as_save_IFS
18237 
18238   ;;
18239 esac
18240 fi
18241 STAT=$ac_cv_path_STAT
18242 if test -n "$STAT"; then
18243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18244 $as_echo "$STAT" >&6; }
18245 else
18246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18247 $as_echo "no" >&6; }
18248 fi
18249 
18250 
18251   test -n "$STAT" && break
18252 done
18253 
18254   else
18255     # The variable is set, but is it from the command line or the environment?
18256 
18257     # Try to remove the string !STAT! from our list.
18258     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18259     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18260       # If it failed, the variable was not from the command line. Ignore it,
18261       # but warn the user (except for BASH, which is always set by the calling BASH).
18262       if test "xSTAT" != xBASH; then
18263         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18264 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18265       fi
18266       # Try to locate tool using the code snippet
18267       for ac_prog in stat
18268 do
18269   # Extract the first word of "$ac_prog", so it can be a program name with args.
18270 set dummy $ac_prog; ac_word=$2
18271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18272 $as_echo_n "checking for $ac_word... " >&6; }
18273 if ${ac_cv_path_STAT+:} false; then :
18274   $as_echo_n "(cached) " >&6
18275 else
18276   case $STAT in
18277   [\\/]* | ?:[\\/]*)
18278   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18279   ;;
18280   *)
18281   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18282 for as_dir in $PATH
18283 do
18284   IFS=$as_save_IFS
18285   test -z "$as_dir" && as_dir=.
18286     for ac_exec_ext in '' $ac_executable_extensions; do
18287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18288     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18290     break 2
18291   fi
18292 done
18293   done
18294 IFS=$as_save_IFS
18295 
18296   ;;
18297 esac
18298 fi
18299 STAT=$ac_cv_path_STAT
18300 if test -n "$STAT"; then
18301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18302 $as_echo "$STAT" >&6; }
18303 else
18304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18305 $as_echo "no" >&6; }
18306 fi
18307 
18308 
18309   test -n "$STAT" && break
18310 done
18311 
18312     else
18313       # If it succeeded, then it was overridden by the user. We will use it
18314       # for the tool.
18315 
18316       # First remove it from the list of overridden variables, so we can test
18317       # for unknown variables in the end.
18318       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18319 
18320       # Check if the provided tool contains a complete path.
18321       tool_specified="$STAT"
18322       tool_basename="${tool_specified##*/}"
18323       if test "x$tool_basename" = "x$tool_specified"; then
18324         # A command without a complete path is provided, search $PATH.
18325         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18326 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18327         # Extract the first word of "$tool_basename", so it can be a program name with args.
18328 set dummy $tool_basename; ac_word=$2
18329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18330 $as_echo_n "checking for $ac_word... " >&6; }
18331 if ${ac_cv_path_STAT+:} false; then :
18332   $as_echo_n "(cached) " >&6
18333 else
18334   case $STAT in
18335   [\\/]* | ?:[\\/]*)
18336   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18337   ;;
18338   *)
18339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18340 for as_dir in $PATH
18341 do
18342   IFS=$as_save_IFS
18343   test -z "$as_dir" && as_dir=.
18344     for ac_exec_ext in '' $ac_executable_extensions; do
18345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18346     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18348     break 2
18349   fi
18350 done
18351   done
18352 IFS=$as_save_IFS
18353 
18354   ;;
18355 esac
18356 fi
18357 STAT=$ac_cv_path_STAT
18358 if test -n "$STAT"; then
18359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18360 $as_echo "$STAT" >&6; }
18361 else
18362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18363 $as_echo "no" >&6; }
18364 fi
18365 
18366 
18367         if test "x$STAT" = x; then
18368           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18369         fi
18370       else
18371         # Otherwise we believe it is a complete path. Use it as it is.
18372         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18373 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18374         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18375 $as_echo_n "checking for STAT... " >&6; }
18376         if test ! -x "$tool_specified"; then
18377           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18378 $as_echo "not found" >&6; }
18379           as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18380         fi
18381         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18382 $as_echo "$tool_specified" >&6; }
18383       fi
18384     fi
18385   fi
18386 
18387 
18388 
18389 
18390   # Publish this variable in the help.
18391 
18392 
18393   if test "x$TIME" = x; then
18394     # The variable is not set by user, try to locate tool using the code snippet
18395     for ac_prog in time
18396 do
18397   # Extract the first word of "$ac_prog", so it can be a program name with args.
18398 set dummy $ac_prog; ac_word=$2
18399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18400 $as_echo_n "checking for $ac_word... " >&6; }
18401 if ${ac_cv_path_TIME+:} false; then :
18402   $as_echo_n "(cached) " >&6
18403 else
18404   case $TIME in
18405   [\\/]* | ?:[\\/]*)
18406   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18407   ;;
18408   *)
18409   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18410 for as_dir in $PATH
18411 do
18412   IFS=$as_save_IFS
18413   test -z "$as_dir" && as_dir=.
18414     for ac_exec_ext in '' $ac_executable_extensions; do
18415   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18416     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18417     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18418     break 2
18419   fi
18420 done
18421   done
18422 IFS=$as_save_IFS
18423 
18424   ;;
18425 esac
18426 fi
18427 TIME=$ac_cv_path_TIME
18428 if test -n "$TIME"; then
18429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18430 $as_echo "$TIME" >&6; }
18431 else
18432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18433 $as_echo "no" >&6; }
18434 fi
18435 
18436 
18437   test -n "$TIME" && break
18438 done
18439 
18440   else
18441     # The variable is set, but is it from the command line or the environment?
18442 
18443     # Try to remove the string !TIME! from our list.
18444     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18445     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18446       # If it failed, the variable was not from the command line. Ignore it,
18447       # but warn the user (except for BASH, which is always set by the calling BASH).
18448       if test "xTIME" != xBASH; then
18449         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18450 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18451       fi
18452       # Try to locate tool using the code snippet
18453       for ac_prog in time
18454 do
18455   # Extract the first word of "$ac_prog", so it can be a program name with args.
18456 set dummy $ac_prog; ac_word=$2
18457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18458 $as_echo_n "checking for $ac_word... " >&6; }
18459 if ${ac_cv_path_TIME+:} false; then :
18460   $as_echo_n "(cached) " >&6
18461 else
18462   case $TIME in
18463   [\\/]* | ?:[\\/]*)
18464   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18465   ;;
18466   *)
18467   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18468 for as_dir in $PATH
18469 do
18470   IFS=$as_save_IFS
18471   test -z "$as_dir" && as_dir=.
18472     for ac_exec_ext in '' $ac_executable_extensions; do
18473   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18474     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18476     break 2
18477   fi
18478 done
18479   done
18480 IFS=$as_save_IFS
18481 
18482   ;;
18483 esac
18484 fi
18485 TIME=$ac_cv_path_TIME
18486 if test -n "$TIME"; then
18487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18488 $as_echo "$TIME" >&6; }
18489 else
18490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18491 $as_echo "no" >&6; }
18492 fi
18493 
18494 
18495   test -n "$TIME" && break
18496 done
18497 
18498     else
18499       # If it succeeded, then it was overridden by the user. We will use it
18500       # for the tool.
18501 
18502       # First remove it from the list of overridden variables, so we can test
18503       # for unknown variables in the end.
18504       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18505 
18506       # Check if the provided tool contains a complete path.
18507       tool_specified="$TIME"
18508       tool_basename="${tool_specified##*/}"
18509       if test "x$tool_basename" = "x$tool_specified"; then
18510         # A command without a complete path is provided, search $PATH.
18511         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18512 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18513         # Extract the first word of "$tool_basename", so it can be a program name with args.
18514 set dummy $tool_basename; ac_word=$2
18515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18516 $as_echo_n "checking for $ac_word... " >&6; }
18517 if ${ac_cv_path_TIME+:} false; then :
18518   $as_echo_n "(cached) " >&6
18519 else
18520   case $TIME in
18521   [\\/]* | ?:[\\/]*)
18522   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18523   ;;
18524   *)
18525   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18526 for as_dir in $PATH
18527 do
18528   IFS=$as_save_IFS
18529   test -z "$as_dir" && as_dir=.
18530     for ac_exec_ext in '' $ac_executable_extensions; do
18531   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18532     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18534     break 2
18535   fi
18536 done
18537   done
18538 IFS=$as_save_IFS
18539 
18540   ;;
18541 esac
18542 fi
18543 TIME=$ac_cv_path_TIME
18544 if test -n "$TIME"; then
18545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18546 $as_echo "$TIME" >&6; }
18547 else
18548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18549 $as_echo "no" >&6; }
18550 fi
18551 
18552 
18553         if test "x$TIME" = x; then
18554           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18555         fi
18556       else
18557         # Otherwise we believe it is a complete path. Use it as it is.
18558         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18559 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18560         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18561 $as_echo_n "checking for TIME... " >&6; }
18562         if test ! -x "$tool_specified"; then
18563           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18564 $as_echo "not found" >&6; }
18565           as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18566         fi
18567         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18568 $as_echo "$tool_specified" >&6; }
18569       fi
18570     fi
18571   fi
18572 
18573 
18574   # Check if it's GNU time
18575   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18576   if test "x$IS_GNU_TIME" != x; then
18577     IS_GNU_TIME=yes
18578   else
18579     IS_GNU_TIME=no
18580   fi
18581 
18582 
18583   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18584 
18585 
18586 
18587   # Publish this variable in the help.
18588 
18589 
18590   if test "x$COMM" = x; then
18591     # The variable is not set by user, try to locate tool using the code snippet
18592     for ac_prog in comm
18593 do
18594   # Extract the first word of "$ac_prog", so it can be a program name with args.
18595 set dummy $ac_prog; ac_word=$2
18596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18597 $as_echo_n "checking for $ac_word... " >&6; }
18598 if ${ac_cv_path_COMM+:} false; then :
18599   $as_echo_n "(cached) " >&6
18600 else
18601   case $COMM in
18602   [\\/]* | ?:[\\/]*)
18603   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18604   ;;
18605   *)
18606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18607 for as_dir in $PATH
18608 do
18609   IFS=$as_save_IFS
18610   test -z "$as_dir" && as_dir=.
18611     for ac_exec_ext in '' $ac_executable_extensions; do
18612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18613     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18615     break 2
18616   fi
18617 done
18618   done
18619 IFS=$as_save_IFS
18620 
18621   ;;
18622 esac
18623 fi
18624 COMM=$ac_cv_path_COMM
18625 if test -n "$COMM"; then
18626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18627 $as_echo "$COMM" >&6; }
18628 else
18629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18630 $as_echo "no" >&6; }
18631 fi
18632 
18633 
18634   test -n "$COMM" && break
18635 done
18636 
18637   else
18638     # The variable is set, but is it from the command line or the environment?
18639 
18640     # Try to remove the string !COMM! from our list.
18641     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18642     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18643       # If it failed, the variable was not from the command line. Ignore it,
18644       # but warn the user (except for BASH, which is always set by the calling BASH).
18645       if test "xCOMM" != xBASH; then
18646         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18647 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18648       fi
18649       # Try to locate tool using the code snippet
18650       for ac_prog in comm
18651 do
18652   # Extract the first word of "$ac_prog", so it can be a program name with args.
18653 set dummy $ac_prog; ac_word=$2
18654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18655 $as_echo_n "checking for $ac_word... " >&6; }
18656 if ${ac_cv_path_COMM+:} false; then :
18657   $as_echo_n "(cached) " >&6
18658 else
18659   case $COMM in
18660   [\\/]* | ?:[\\/]*)
18661   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18662   ;;
18663   *)
18664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18665 for as_dir in $PATH
18666 do
18667   IFS=$as_save_IFS
18668   test -z "$as_dir" && as_dir=.
18669     for ac_exec_ext in '' $ac_executable_extensions; do
18670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18671     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18673     break 2
18674   fi
18675 done
18676   done
18677 IFS=$as_save_IFS
18678 
18679   ;;
18680 esac
18681 fi
18682 COMM=$ac_cv_path_COMM
18683 if test -n "$COMM"; then
18684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18685 $as_echo "$COMM" >&6; }
18686 else
18687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18688 $as_echo "no" >&6; }
18689 fi
18690 
18691 
18692   test -n "$COMM" && break
18693 done
18694 
18695     else
18696       # If it succeeded, then it was overridden by the user. We will use it
18697       # for the tool.
18698 
18699       # First remove it from the list of overridden variables, so we can test
18700       # for unknown variables in the end.
18701       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18702 
18703       # Check if the provided tool contains a complete path.
18704       tool_specified="$COMM"
18705       tool_basename="${tool_specified##*/}"
18706       if test "x$tool_basename" = "x$tool_specified"; then
18707         # A command without a complete path is provided, search $PATH.
18708         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18709 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18710         # Extract the first word of "$tool_basename", so it can be a program name with args.
18711 set dummy $tool_basename; ac_word=$2
18712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18713 $as_echo_n "checking for $ac_word... " >&6; }
18714 if ${ac_cv_path_COMM+:} false; then :
18715   $as_echo_n "(cached) " >&6
18716 else
18717   case $COMM in
18718   [\\/]* | ?:[\\/]*)
18719   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18720   ;;
18721   *)
18722   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18723 for as_dir in $PATH
18724 do
18725   IFS=$as_save_IFS
18726   test -z "$as_dir" && as_dir=.
18727     for ac_exec_ext in '' $ac_executable_extensions; do
18728   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18729     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18730     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18731     break 2
18732   fi
18733 done
18734   done
18735 IFS=$as_save_IFS
18736 
18737   ;;
18738 esac
18739 fi
18740 COMM=$ac_cv_path_COMM
18741 if test -n "$COMM"; then
18742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18743 $as_echo "$COMM" >&6; }
18744 else
18745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18746 $as_echo "no" >&6; }
18747 fi
18748 
18749 
18750         if test "x$COMM" = x; then
18751           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18752         fi
18753       else
18754         # Otherwise we believe it is a complete path. Use it as it is.
18755         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18756 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18757         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18758 $as_echo_n "checking for COMM... " >&6; }
18759         if test ! -x "$tool_specified"; then
18760           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18761 $as_echo "not found" >&6; }
18762           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18763         fi
18764         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18765 $as_echo "$tool_specified" >&6; }
18766       fi
18767     fi
18768   fi
18769 
18770 
18771 
18772   if test "x$COMM" = x; then
18773     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18774   fi
18775 
18776 
18777   fi
18778 
18779   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18780 
18781 
18782 
18783   # Publish this variable in the help.
18784 
18785 
18786   if test "x$DSYMUTIL" = x; then
18787     # The variable is not set by user, try to locate tool using the code snippet
18788     for ac_prog in dsymutil
18789 do
18790   # Extract the first word of "$ac_prog", so it can be a program name with args.
18791 set dummy $ac_prog; ac_word=$2
18792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18793 $as_echo_n "checking for $ac_word... " >&6; }
18794 if ${ac_cv_path_DSYMUTIL+:} false; then :
18795   $as_echo_n "(cached) " >&6
18796 else
18797   case $DSYMUTIL in
18798   [\\/]* | ?:[\\/]*)
18799   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18800   ;;
18801   *)
18802   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18803 for as_dir in $PATH
18804 do
18805   IFS=$as_save_IFS
18806   test -z "$as_dir" && as_dir=.
18807     for ac_exec_ext in '' $ac_executable_extensions; do
18808   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18809     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18811     break 2
18812   fi
18813 done
18814   done
18815 IFS=$as_save_IFS
18816 
18817   ;;
18818 esac
18819 fi
18820 DSYMUTIL=$ac_cv_path_DSYMUTIL
18821 if test -n "$DSYMUTIL"; then
18822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18823 $as_echo "$DSYMUTIL" >&6; }
18824 else
18825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18826 $as_echo "no" >&6; }
18827 fi
18828 
18829 
18830   test -n "$DSYMUTIL" && break
18831 done
18832 
18833   else
18834     # The variable is set, but is it from the command line or the environment?
18835 
18836     # Try to remove the string !DSYMUTIL! from our list.
18837     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18838     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18839       # If it failed, the variable was not from the command line. Ignore it,
18840       # but warn the user (except for BASH, which is always set by the calling BASH).
18841       if test "xDSYMUTIL" != xBASH; then
18842         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18843 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18844       fi
18845       # Try to locate tool using the code snippet
18846       for ac_prog in dsymutil
18847 do
18848   # Extract the first word of "$ac_prog", so it can be a program name with args.
18849 set dummy $ac_prog; ac_word=$2
18850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18851 $as_echo_n "checking for $ac_word... " >&6; }
18852 if ${ac_cv_path_DSYMUTIL+:} false; then :
18853   $as_echo_n "(cached) " >&6
18854 else
18855   case $DSYMUTIL in
18856   [\\/]* | ?:[\\/]*)
18857   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18858   ;;
18859   *)
18860   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18861 for as_dir in $PATH
18862 do
18863   IFS=$as_save_IFS
18864   test -z "$as_dir" && as_dir=.
18865     for ac_exec_ext in '' $ac_executable_extensions; do
18866   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18867     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18869     break 2
18870   fi
18871 done
18872   done
18873 IFS=$as_save_IFS
18874 
18875   ;;
18876 esac
18877 fi
18878 DSYMUTIL=$ac_cv_path_DSYMUTIL
18879 if test -n "$DSYMUTIL"; then
18880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18881 $as_echo "$DSYMUTIL" >&6; }
18882 else
18883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18884 $as_echo "no" >&6; }
18885 fi
18886 
18887 
18888   test -n "$DSYMUTIL" && break
18889 done
18890 
18891     else
18892       # If it succeeded, then it was overridden by the user. We will use it
18893       # for the tool.
18894 
18895       # First remove it from the list of overridden variables, so we can test
18896       # for unknown variables in the end.
18897       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18898 
18899       # Check if the provided tool contains a complete path.
18900       tool_specified="$DSYMUTIL"
18901       tool_basename="${tool_specified##*/}"
18902       if test "x$tool_basename" = "x$tool_specified"; then
18903         # A command without a complete path is provided, search $PATH.
18904         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18905 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18906         # Extract the first word of "$tool_basename", so it can be a program name with args.
18907 set dummy $tool_basename; ac_word=$2
18908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18909 $as_echo_n "checking for $ac_word... " >&6; }
18910 if ${ac_cv_path_DSYMUTIL+:} false; then :
18911   $as_echo_n "(cached) " >&6
18912 else
18913   case $DSYMUTIL in
18914   [\\/]* | ?:[\\/]*)
18915   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18916   ;;
18917   *)
18918   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18919 for as_dir in $PATH
18920 do
18921   IFS=$as_save_IFS
18922   test -z "$as_dir" && as_dir=.
18923     for ac_exec_ext in '' $ac_executable_extensions; do
18924   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18925     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18926     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18927     break 2
18928   fi
18929 done
18930   done
18931 IFS=$as_save_IFS
18932 
18933   ;;
18934 esac
18935 fi
18936 DSYMUTIL=$ac_cv_path_DSYMUTIL
18937 if test -n "$DSYMUTIL"; then
18938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18939 $as_echo "$DSYMUTIL" >&6; }
18940 else
18941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18942 $as_echo "no" >&6; }
18943 fi
18944 
18945 
18946         if test "x$DSYMUTIL" = x; then
18947           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18948         fi
18949       else
18950         # Otherwise we believe it is a complete path. Use it as it is.
18951         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18952 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18953         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18954 $as_echo_n "checking for DSYMUTIL... " >&6; }
18955         if test ! -x "$tool_specified"; then
18956           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18957 $as_echo "not found" >&6; }
18958           as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18959         fi
18960         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18961 $as_echo "$tool_specified" >&6; }
18962       fi
18963     fi
18964   fi
18965 
18966 
18967 
18968   if test "x$DSYMUTIL" = x; then
18969     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18970   fi
18971 
18972 
18973 
18974 
18975 
18976   # Publish this variable in the help.
18977 
18978 
18979   if test "x$XATTR" = x; then
18980     # The variable is not set by user, try to locate tool using the code snippet
18981     for ac_prog in xattr
18982 do
18983   # Extract the first word of "$ac_prog", so it can be a program name with args.
18984 set dummy $ac_prog; ac_word=$2
18985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18986 $as_echo_n "checking for $ac_word... " >&6; }
18987 if ${ac_cv_path_XATTR+:} false; then :
18988   $as_echo_n "(cached) " >&6
18989 else
18990   case $XATTR in
18991   [\\/]* | ?:[\\/]*)
18992   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18993   ;;
18994   *)
18995   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18996 for as_dir in $PATH
18997 do
18998   IFS=$as_save_IFS
18999   test -z "$as_dir" && as_dir=.
19000     for ac_exec_ext in '' $ac_executable_extensions; do
19001   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19002     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19003     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19004     break 2
19005   fi
19006 done
19007   done
19008 IFS=$as_save_IFS
19009 
19010   ;;
19011 esac
19012 fi
19013 XATTR=$ac_cv_path_XATTR
19014 if test -n "$XATTR"; then
19015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19016 $as_echo "$XATTR" >&6; }
19017 else
19018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19019 $as_echo "no" >&6; }
19020 fi
19021 
19022 
19023   test -n "$XATTR" && break
19024 done
19025 
19026   else
19027     # The variable is set, but is it from the command line or the environment?
19028 
19029     # Try to remove the string !XATTR! from our list.
19030     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19031     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19032       # If it failed, the variable was not from the command line. Ignore it,
19033       # but warn the user (except for BASH, which is always set by the calling BASH).
19034       if test "xXATTR" != xBASH; then
19035         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19036 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19037       fi
19038       # Try to locate tool using the code snippet
19039       for ac_prog in xattr
19040 do
19041   # Extract the first word of "$ac_prog", so it can be a program name with args.
19042 set dummy $ac_prog; ac_word=$2
19043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19044 $as_echo_n "checking for $ac_word... " >&6; }
19045 if ${ac_cv_path_XATTR+:} false; then :
19046   $as_echo_n "(cached) " >&6
19047 else
19048   case $XATTR in
19049   [\\/]* | ?:[\\/]*)
19050   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19051   ;;
19052   *)
19053   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19054 for as_dir in $PATH
19055 do
19056   IFS=$as_save_IFS
19057   test -z "$as_dir" && as_dir=.
19058     for ac_exec_ext in '' $ac_executable_extensions; do
19059   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19060     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19062     break 2
19063   fi
19064 done
19065   done
19066 IFS=$as_save_IFS
19067 
19068   ;;
19069 esac
19070 fi
19071 XATTR=$ac_cv_path_XATTR
19072 if test -n "$XATTR"; then
19073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19074 $as_echo "$XATTR" >&6; }
19075 else
19076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19077 $as_echo "no" >&6; }
19078 fi
19079 
19080 
19081   test -n "$XATTR" && break
19082 done
19083 
19084     else
19085       # If it succeeded, then it was overridden by the user. We will use it
19086       # for the tool.
19087 
19088       # First remove it from the list of overridden variables, so we can test
19089       # for unknown variables in the end.
19090       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19091 
19092       # Check if the provided tool contains a complete path.
19093       tool_specified="$XATTR"
19094       tool_basename="${tool_specified##*/}"
19095       if test "x$tool_basename" = "x$tool_specified"; then
19096         # A command without a complete path is provided, search $PATH.
19097         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19098 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19099         # Extract the first word of "$tool_basename", so it can be a program name with args.
19100 set dummy $tool_basename; ac_word=$2
19101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19102 $as_echo_n "checking for $ac_word... " >&6; }
19103 if ${ac_cv_path_XATTR+:} false; then :
19104   $as_echo_n "(cached) " >&6
19105 else
19106   case $XATTR in
19107   [\\/]* | ?:[\\/]*)
19108   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19109   ;;
19110   *)
19111   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19112 for as_dir in $PATH
19113 do
19114   IFS=$as_save_IFS
19115   test -z "$as_dir" && as_dir=.
19116     for ac_exec_ext in '' $ac_executable_extensions; do
19117   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19118     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19119     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19120     break 2
19121   fi
19122 done
19123   done
19124 IFS=$as_save_IFS
19125 
19126   ;;
19127 esac
19128 fi
19129 XATTR=$ac_cv_path_XATTR
19130 if test -n "$XATTR"; then
19131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19132 $as_echo "$XATTR" >&6; }
19133 else
19134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19135 $as_echo "no" >&6; }
19136 fi
19137 
19138 
19139         if test "x$XATTR" = x; then
19140           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19141         fi
19142       else
19143         # Otherwise we believe it is a complete path. Use it as it is.
19144         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19145 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19146         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19147 $as_echo_n "checking for XATTR... " >&6; }
19148         if test ! -x "$tool_specified"; then
19149           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19150 $as_echo "not found" >&6; }
19151           as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19152         fi
19153         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19154 $as_echo "$tool_specified" >&6; }
19155       fi
19156     fi
19157   fi
19158 
19159 
19160 
19161   if test "x$XATTR" = x; then
19162     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19163   fi
19164 
19165 
19166 
19167 
19168   # Publish this variable in the help.
19169 
19170 
19171   if test "x$CODESIGN" = x; then
19172     # The variable is not set by user, try to locate tool using the code snippet
19173     for ac_prog in codesign
19174 do
19175   # Extract the first word of "$ac_prog", so it can be a program name with args.
19176 set dummy $ac_prog; ac_word=$2
19177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19178 $as_echo_n "checking for $ac_word... " >&6; }
19179 if ${ac_cv_path_CODESIGN+:} false; then :
19180   $as_echo_n "(cached) " >&6
19181 else
19182   case $CODESIGN in
19183   [\\/]* | ?:[\\/]*)
19184   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19185   ;;
19186   *)
19187   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19188 for as_dir in $PATH
19189 do
19190   IFS=$as_save_IFS
19191   test -z "$as_dir" && as_dir=.
19192     for ac_exec_ext in '' $ac_executable_extensions; do
19193   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19194     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19195     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19196     break 2
19197   fi
19198 done
19199   done
19200 IFS=$as_save_IFS
19201 
19202   ;;
19203 esac
19204 fi
19205 CODESIGN=$ac_cv_path_CODESIGN
19206 if test -n "$CODESIGN"; then
19207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19208 $as_echo "$CODESIGN" >&6; }
19209 else
19210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19211 $as_echo "no" >&6; }
19212 fi
19213 
19214 
19215   test -n "$CODESIGN" && break
19216 done
19217 
19218   else
19219     # The variable is set, but is it from the command line or the environment?
19220 
19221     # Try to remove the string !CODESIGN! from our list.
19222     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19223     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19224       # If it failed, the variable was not from the command line. Ignore it,
19225       # but warn the user (except for BASH, which is always set by the calling BASH).
19226       if test "xCODESIGN" != xBASH; then
19227         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19228 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19229       fi
19230       # Try to locate tool using the code snippet
19231       for ac_prog in codesign
19232 do
19233   # Extract the first word of "$ac_prog", so it can be a program name with args.
19234 set dummy $ac_prog; ac_word=$2
19235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19236 $as_echo_n "checking for $ac_word... " >&6; }
19237 if ${ac_cv_path_CODESIGN+:} false; then :
19238   $as_echo_n "(cached) " >&6
19239 else
19240   case $CODESIGN in
19241   [\\/]* | ?:[\\/]*)
19242   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19243   ;;
19244   *)
19245   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19246 for as_dir in $PATH
19247 do
19248   IFS=$as_save_IFS
19249   test -z "$as_dir" && as_dir=.
19250     for ac_exec_ext in '' $ac_executable_extensions; do
19251   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19252     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19253     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19254     break 2
19255   fi
19256 done
19257   done
19258 IFS=$as_save_IFS
19259 
19260   ;;
19261 esac
19262 fi
19263 CODESIGN=$ac_cv_path_CODESIGN
19264 if test -n "$CODESIGN"; then
19265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19266 $as_echo "$CODESIGN" >&6; }
19267 else
19268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19269 $as_echo "no" >&6; }
19270 fi
19271 
19272 
19273   test -n "$CODESIGN" && break
19274 done
19275 
19276     else
19277       # If it succeeded, then it was overridden by the user. We will use it
19278       # for the tool.
19279 
19280       # First remove it from the list of overridden variables, so we can test
19281       # for unknown variables in the end.
19282       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19283 
19284       # Check if the provided tool contains a complete path.
19285       tool_specified="$CODESIGN"
19286       tool_basename="${tool_specified##*/}"
19287       if test "x$tool_basename" = "x$tool_specified"; then
19288         # A command without a complete path is provided, search $PATH.
19289         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19290 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19291         # Extract the first word of "$tool_basename", so it can be a program name with args.
19292 set dummy $tool_basename; ac_word=$2
19293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19294 $as_echo_n "checking for $ac_word... " >&6; }
19295 if ${ac_cv_path_CODESIGN+:} false; then :
19296   $as_echo_n "(cached) " >&6
19297 else
19298   case $CODESIGN in
19299   [\\/]* | ?:[\\/]*)
19300   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19301   ;;
19302   *)
19303   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19304 for as_dir in $PATH
19305 do
19306   IFS=$as_save_IFS
19307   test -z "$as_dir" && as_dir=.
19308     for ac_exec_ext in '' $ac_executable_extensions; do
19309   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19310     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19311     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19312     break 2
19313   fi
19314 done
19315   done
19316 IFS=$as_save_IFS
19317 
19318   ;;
19319 esac
19320 fi
19321 CODESIGN=$ac_cv_path_CODESIGN
19322 if test -n "$CODESIGN"; then
19323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19324 $as_echo "$CODESIGN" >&6; }
19325 else
19326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19327 $as_echo "no" >&6; }
19328 fi
19329 
19330 
19331         if test "x$CODESIGN" = x; then
19332           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19333         fi
19334       else
19335         # Otherwise we believe it is a complete path. Use it as it is.
19336         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19337 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19338         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19339 $as_echo_n "checking for CODESIGN... " >&6; }
19340         if test ! -x "$tool_specified"; then
19341           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19342 $as_echo "not found" >&6; }
19343           as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19344         fi
19345         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19346 $as_echo "$tool_specified" >&6; }
19347       fi
19348     fi
19349   fi
19350 
19351 
19352     if test "x$CODESIGN" != "x"; then
19353       # Verify that the openjdk_codesign certificate is present
19354       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19355 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19356       rm -f codesign-testfile
19357       touch codesign-testfile
19358       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19359       rm -f codesign-testfile
19360       if test "x$CODESIGN" = x; then
19361         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19362 $as_echo "no" >&6; }
19363       else
19364         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19365 $as_echo "yes" >&6; }
19366       fi
19367     fi
19368   fi
19369 
19370 
19371 # Check if pkg-config is available.
19372 
19373 
19374 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19375         if test -n "$ac_tool_prefix"; then
19376   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19377 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19379 $as_echo_n "checking for $ac_word... " >&6; }
19380 if ${ac_cv_path_PKG_CONFIG+:} false; then :
19381   $as_echo_n "(cached) " >&6
19382 else
19383   case $PKG_CONFIG in
19384   [\\/]* | ?:[\\/]*)
19385   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19386   ;;
19387   *)
19388   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19389 for as_dir in $PATH
19390 do
19391   IFS=$as_save_IFS
19392   test -z "$as_dir" && as_dir=.
19393     for ac_exec_ext in '' $ac_executable_extensions; do
19394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19395     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19397     break 2
19398   fi
19399 done
19400   done
19401 IFS=$as_save_IFS
19402 
19403   ;;
19404 esac
19405 fi
19406 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19407 if test -n "$PKG_CONFIG"; then
19408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19409 $as_echo "$PKG_CONFIG" >&6; }
19410 else
19411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19412 $as_echo "no" >&6; }
19413 fi
19414 
19415 
19416 fi
19417 if test -z "$ac_cv_path_PKG_CONFIG"; then
19418   ac_pt_PKG_CONFIG=$PKG_CONFIG
19419   # Extract the first word of "pkg-config", so it can be a program name with args.
19420 set dummy pkg-config; ac_word=$2
19421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19422 $as_echo_n "checking for $ac_word... " >&6; }
19423 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19424   $as_echo_n "(cached) " >&6
19425 else
19426   case $ac_pt_PKG_CONFIG in
19427   [\\/]* | ?:[\\/]*)
19428   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19429   ;;
19430   *)
19431   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19432 for as_dir in $PATH
19433 do
19434   IFS=$as_save_IFS
19435   test -z "$as_dir" && as_dir=.
19436     for ac_exec_ext in '' $ac_executable_extensions; do
19437   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19438     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19439     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19440     break 2
19441   fi
19442 done
19443   done
19444 IFS=$as_save_IFS
19445 
19446   ;;
19447 esac
19448 fi
19449 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19450 if test -n "$ac_pt_PKG_CONFIG"; then
19451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19452 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19453 else
19454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19455 $as_echo "no" >&6; }
19456 fi
19457 
19458   if test "x$ac_pt_PKG_CONFIG" = x; then
19459     PKG_CONFIG=""
19460   else
19461     case $cross_compiling:$ac_tool_warned in
19462 yes:)
19463 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19464 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19465 ac_tool_warned=yes ;;
19466 esac
19467     PKG_CONFIG=$ac_pt_PKG_CONFIG
19468   fi
19469 else
19470   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19471 fi
19472 
19473 fi
19474 if test -n "$PKG_CONFIG"; then
19475         _pkg_min_version=0.9.0
19476         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19477 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19478         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19479                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19480 $as_echo "yes" >&6; }
19481         else
19482                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19483 $as_echo "no" >&6; }
19484                 PKG_CONFIG=""
19485         fi
19486 
19487 fi
19488 
19489 # After basic tools have been setup, we can check build os specific details.
19490 
19491   ###############################################################################
19492 
19493   # Note that this is the build platform OS version!
19494 
19495   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19496   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19497   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19498   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19499 
19500 
19501 
19502 
19503 
19504 # Setup builddeps, for automatic downloading of tools we need.
19505 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19506 # boot-jdk setup, but we need to have basic tools setup first.
19507 
19508 
19509 # Check whether --with-builddeps-conf was given.
19510 if test "${with_builddeps_conf+set}" = set; then :
19511   withval=$with_builddeps_conf;
19512 fi
19513 
19514 
19515 
19516 # Check whether --with-builddeps-server was given.
19517 if test "${with_builddeps_server+set}" = set; then :
19518   withval=$with_builddeps_server;
19519 fi
19520 
19521 
19522 
19523 # Check whether --with-builddeps-dir was given.
19524 if test "${with_builddeps_dir+set}" = set; then :
19525   withval=$with_builddeps_dir;
19526 else
19527   with_builddeps_dir=/localhome/builddeps
19528 fi
19529 
19530 
19531 
19532 # Check whether --with-builddeps-group was given.
19533 if test "${with_builddeps_group+set}" = set; then :
19534   withval=$with_builddeps_group;
19535 fi
19536 
19537 
19538 
19539 
19540   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19541     if test "x$with_builddeps_conf" != x; then
19542       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19543 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19544       builddepsfile=$with_builddeps_conf
19545       if test -s $builddepsfile; then
19546         . $builddepsfile
19547         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19548 $as_echo "loaded!" >&6; }
19549       else
19550         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19551       fi
19552     else
19553       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19554 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19555       builddepsfile=`mktemp`
19556       touch $builddepsfile
19557       # Put all found confs into a single file.
19558       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19559       # Source the file to acquire the variables
19560       if test -s $builddepsfile; then
19561         . $builddepsfile
19562         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19563 $as_echo "found at least one!" >&6; }
19564       else
19565         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19566       fi
19567     fi
19568     # Create build and target names that use _ instead of "-" and ".".
19569     # This is necessary to use them in variable names.
19570     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19571     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19572     # Extract rewrite information for build and target
19573     eval rewritten_build=\${REWRITE_${build_var}}
19574     if test "x$rewritten_build" = x; then
19575       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19576       echo Build stays the same $rewritten_build
19577     else
19578       echo Rewriting build for builddeps into $rewritten_build
19579     fi
19580     eval rewritten_target=\${REWRITE_${target_var}}
19581     if test "x$rewritten_target" = x; then
19582       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19583       echo Target stays the same $rewritten_target
19584     else
19585       echo Rewriting target for builddeps into $rewritten_target
19586     fi
19587     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19588     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19589   fi
19590   for ac_prog in 7z unzip
19591 do
19592   # Extract the first word of "$ac_prog", so it can be a program name with args.
19593 set dummy $ac_prog; ac_word=$2
19594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19595 $as_echo_n "checking for $ac_word... " >&6; }
19596 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19597   $as_echo_n "(cached) " >&6
19598 else
19599   if test -n "$BDEPS_UNZIP"; then
19600   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19601 else
19602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19603 for as_dir in $PATH
19604 do
19605   IFS=$as_save_IFS
19606   test -z "$as_dir" && as_dir=.
19607     for ac_exec_ext in '' $ac_executable_extensions; do
19608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19609     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19611     break 2
19612   fi
19613 done
19614   done
19615 IFS=$as_save_IFS
19616 
19617 fi
19618 fi
19619 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19620 if test -n "$BDEPS_UNZIP"; then
19621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19622 $as_echo "$BDEPS_UNZIP" >&6; }
19623 else
19624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19625 $as_echo "no" >&6; }
19626 fi
19627 
19628 
19629   test -n "$BDEPS_UNZIP" && break
19630 done
19631 
19632   if test "x$BDEPS_UNZIP" = x7z; then
19633     BDEPS_UNZIP="7z x"
19634   fi
19635 
19636   for ac_prog in wget lftp ftp
19637 do
19638   # Extract the first word of "$ac_prog", so it can be a program name with args.
19639 set dummy $ac_prog; ac_word=$2
19640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19641 $as_echo_n "checking for $ac_word... " >&6; }
19642 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19643   $as_echo_n "(cached) " >&6
19644 else
19645   if test -n "$BDEPS_FTP"; then
19646   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19647 else
19648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19649 for as_dir in $PATH
19650 do
19651   IFS=$as_save_IFS
19652   test -z "$as_dir" && as_dir=.
19653     for ac_exec_ext in '' $ac_executable_extensions; do
19654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19655     ac_cv_prog_BDEPS_FTP="$ac_prog"
19656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19657     break 2
19658   fi
19659 done
19660   done
19661 IFS=$as_save_IFS
19662 
19663 fi
19664 fi
19665 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19666 if test -n "$BDEPS_FTP"; then
19667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19668 $as_echo "$BDEPS_FTP" >&6; }
19669 else
19670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19671 $as_echo "no" >&6; }
19672 fi
19673 
19674 
19675   test -n "$BDEPS_FTP" && break
19676 done
19677 
19678 
19679 
19680 ###############################################################################
19681 #
19682 # Determine OpenJDK variants, options and version numbers.
19683 #
19684 ###############################################################################
19685 
19686 # We need build & target for this.
19687 
19688 
19689   ###############################################################################
19690   #
19691   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19692   # We always build headless support.
19693   #
19694   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19695 $as_echo_n "checking headful support... " >&6; }
19696   # Check whether --enable-headful was given.
19697 if test "${enable_headful+set}" = set; then :
19698   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19699 else
19700   SUPPORT_HEADFUL=yes
19701 fi
19702 
19703 
19704   SUPPORT_HEADLESS=yes
19705   BUILD_HEADLESS="BUILD_HEADLESS:=true"
19706 
19707   if test "x$SUPPORT_HEADFUL" = xyes; then
19708     # We are building both headful and headless.
19709     headful_msg="include support for both headful and headless"
19710   fi
19711 
19712   if test "x$SUPPORT_HEADFUL" = xno; then
19713     # Thus we are building headless only.
19714     BUILD_HEADLESS="BUILD_HEADLESS:=true"
19715     headful_msg="headless only"
19716   fi
19717 
19718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19719 $as_echo "$headful_msg" >&6; }
19720 
19721 
19722 
19723 
19724 
19725   # Control wether Hotspot runs Queens test after build.
19726   # Check whether --enable-hotspot-test-in-build was given.
19727 if test "${enable_hotspot_test_in_build+set}" = set; then :
19728   enableval=$enable_hotspot_test_in_build;
19729 else
19730   enable_hotspot_test_in_build=no
19731 fi
19732 
19733   if test "x$enable_hotspot_test_in_build" = "xyes"; then
19734     TEST_IN_BUILD=true
19735   else
19736     TEST_IN_BUILD=false
19737   fi
19738 
19739 
19740   ###############################################################################
19741   #
19742   # Choose cacerts source file
19743   #
19744 
19745 # Check whether --with-cacerts-file was given.
19746 if test "${with_cacerts_file+set}" = set; then :
19747   withval=$with_cacerts_file;
19748 fi
19749 
19750   if test "x$with_cacerts_file" != x; then
19751     CACERTS_FILE=$with_cacerts_file
19752   else
19753     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19754   fi
19755 
19756 
19757   ###############################################################################
19758   #
19759   # Enable or disable unlimited crypto
19760   #
19761   # Check whether --enable-unlimited-crypto was given.
19762 if test "${enable_unlimited_crypto+set}" = set; then :
19763   enableval=$enable_unlimited_crypto;
19764 else
19765   enable_unlimited_crypto=no
19766 fi
19767 
19768   if test "x$enable_unlimited_crypto" = "xyes"; then
19769     UNLIMITED_CRYPTO=true
19770   else
19771     UNLIMITED_CRYPTO=false
19772   fi
19773 
19774 
19775   ###############################################################################
19776   #
19777   # Enable or disable the elliptic curve crypto implementation
19778   #
19779 
19780 
19781   ###############################################################################
19782   #
19783   # Compress jars
19784   #
19785   COMPRESS_JARS=false
19786 
19787 
19788 
19789 
19790   # Source the version numbers
19791   . $AUTOCONF_DIR/version-numbers
19792 
19793   # Get the settings from parameters
19794 
19795 # Check whether --with-milestone was given.
19796 if test "${with_milestone+set}" = set; then :
19797   withval=$with_milestone;
19798 fi
19799 
19800   if test "x$with_milestone" = xyes; then
19801     as_fn_error $? "Milestone must have a value" "$LINENO" 5
19802   elif test "x$with_milestone" != x; then
19803     MILESTONE="$with_milestone"
19804   fi
19805   if test "x$MILESTONE" = x; then
19806     MILESTONE=internal
19807   fi
19808 
19809 
19810 # Check whether --with-update-version was given.
19811 if test "${with_update_version+set}" = set; then :
19812   withval=$with_update_version;
19813 fi
19814 
19815   if test "x$with_update_version" = xyes; then
19816     as_fn_error $? "Update version must have a value" "$LINENO" 5
19817   elif test "x$with_update_version" != x; then
19818     JDK_UPDATE_VERSION="$with_update_version"
19819     # On macosx 10.7, it's not possible to set --with-update-version=0X due
19820     # to a bug in expr (which reduces it to just X). To work around this, we
19821     # always add a 0 to one digit update versions.
19822     if test "${#JDK_UPDATE_VERSION}" = "1"; then
19823       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19824     fi
19825   fi
19826 
19827 
19828 # Check whether --with-user-release-suffix was given.
19829 if test "${with_user_release_suffix+set}" = set; then :
19830   withval=$with_user_release_suffix;
19831 fi
19832 
19833   if test "x$with_user_release_suffix" = xyes; then
19834     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19835   elif test "x$with_user_release_suffix" != x; then
19836     USER_RELEASE_SUFFIX="$with_user_release_suffix"
19837   fi
19838 
19839 
19840 # Check whether --with-build-number was given.
19841 if test "${with_build_number+set}" = set; then :
19842   withval=$with_build_number;
19843 fi
19844 
19845   if test "x$with_build_number" = xyes; then
19846     as_fn_error $? "Build number must have a value" "$LINENO" 5
19847   elif test "x$with_build_number" != x; then
19848     JDK_BUILD_NUMBER="$with_build_number"
19849   fi
19850   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19851   if test "x$JDK_BUILD_NUMBER" = x; then
19852     JDK_BUILD_NUMBER=b00
19853     if test "x$USER_RELEASE_SUFFIX" = x; then
19854       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19855       # Avoid [:alnum:] since it depends on the locale.
19856       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19857       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19858     fi
19859   fi
19860 
19861   # Now set the JDK version, milestone, build number etc.
19862 
19863 
19864 
19865 
19866 
19867 
19868 
19869 
19870 
19871 
19872 
19873 
19874 
19875 
19876   # The vendor name, if any
19877 
19878 # Check whether --with-vendor-name was given.
19879 if test "${with_vendor_name+set}" = set; then :
19880   withval=$with_vendor_name;
19881 fi
19882 
19883   if test "x$with_vendor_name" = xyes; then
19884     as_fn_error $? "--with-vendor-name must have a value" "$LINENO" 5
19885   elif  ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ; then
19886     as_fn_error $? "--with--vendor-name contains non-printing characters: $with_vendor_name" "$LINENO" 5
19887   else
19888     COMPANY_NAME="$with_vendor_name"
19889   fi
19890 
19891 
19892 
19893 # Check whether --with-copyright-year was given.
19894 if test "${with_copyright_year+set}" = set; then :
19895   withval=$with_copyright_year;
19896 fi
19897 
19898   if test "x$with_copyright_year" = xyes; then
19899     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
19900   elif test "x$with_copyright_year" != x; then
19901     COPYRIGHT_YEAR="$with_copyright_year"
19902   else
19903     COPYRIGHT_YEAR=`date +'%Y'`
19904   fi
19905 
19906 
19907   if test "x$JDK_UPDATE_VERSION" != x; then
19908     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19909   else
19910     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19911   fi
19912 
19913 
19914   # The cooked update version used to encode trailing letters in the update
19915   # version into a trailing number. That is no longer needed, but need to
19916   # keep the format in 8u for compatibility.
19917   COOKED_JDK_UPDATE_VERSION="${JDK_UPDATE_VERSION}0"
19918 
19919 
19920   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19921 
19922 
19923 
19924 ###############################################################################
19925 #
19926 # Setup BootJDK, used to bootstrap the build.
19927 #
19928 ###############################################################################
19929 
19930 
19931   BOOT_JDK_FOUND=no
19932 
19933 # Check whether --with-boot-jdk was given.
19934 if test "${with_boot_jdk+set}" = set; then :
19935   withval=$with_boot_jdk;
19936 fi
19937 
19938 
19939   # We look for the Boot JDK through various means, going from more certain to
19940   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19941   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19942   # must check if this is indeed valid; otherwise we'll continue looking.
19943 
19944   # Test: Is bootjdk explicitely set by command line arguments?
19945 
19946   if test "x$BOOT_JDK_FOUND" = xno; then
19947     # Now execute the test
19948 
19949   if test "x$with_boot_jdk" != x; then
19950     BOOT_JDK=$with_boot_jdk
19951     BOOT_JDK_FOUND=maybe
19952     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19953 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19954   fi
19955 
19956 
19957     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19958     if test "x$BOOT_JDK_FOUND" = xmaybe; then
19959       # Do we have a bin/java?
19960       if test ! -x "$BOOT_JDK/bin/java"; then
19961         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19962 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19963         BOOT_JDK_FOUND=no
19964       else
19965         # Do we have a bin/javac?
19966         if test ! -x "$BOOT_JDK/bin/javac"; then
19967           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19968 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19969           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19970 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19971           BOOT_JDK_FOUND=no
19972         else
19973           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19974           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19975             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19976 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19977             BOOT_JDK_FOUND=no
19978           else
19979             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19980             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19981 
19982             # Extra M4 quote needed to protect [] in grep expression.
19983             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
19984             if test "x$FOUND_VERSION_78" = x; then
19985               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19986 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19987               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
19988 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
19989               BOOT_JDK_FOUND=no
19990             else
19991               # We're done! :-)
19992               BOOT_JDK_FOUND=yes
19993 
19994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19995 
19996   # Input might be given as Windows format, start by converting to
19997   # unix format.
19998   path="$BOOT_JDK"
19999   new_path=`$CYGPATH -u "$path"`
20000 
20001   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20002   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20003   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20004   # "foo.exe" is OK but "foo" is an error.
20005   #
20006   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20007   # It is also a way to make sure we got the proper file name for the real test later on.
20008   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20009   if test "x$test_shortpath" = x; then
20010     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20011 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20012     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20013   fi
20014 
20015   # Call helper function which possibly converts this using DOS-style short mode.
20016   # If so, the updated path is stored in $new_path.
20017 
20018   input_path="$new_path"
20019   # Check if we need to convert this using DOS-style short mode. If the path
20020   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20021   # take no chances and rewrite it.
20022   # Note: m4 eats our [], so we need to use [ and ] instead.
20023   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20024   if test "x$has_forbidden_chars" != x; then
20025     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20026     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20027     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20028     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20029       # Going to short mode and back again did indeed matter. Since short mode is
20030       # case insensitive, let's make it lowercase to improve readability.
20031       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20032       # Now convert it back to Unix-style (cygpath)
20033       input_path=`$CYGPATH -u "$shortmode_path"`
20034       new_path="$input_path"
20035     fi
20036   fi
20037 
20038   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20039   if test "x$test_cygdrive_prefix" = x; then
20040     # As a simple fix, exclude /usr/bin since it's not a real path.
20041     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20042       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20043       # a path prefixed by /cygdrive for fixpath to work.
20044       new_path="$CYGWIN_ROOT_PATH$input_path"
20045     fi
20046   fi
20047 
20048 
20049   if test "x$path" != "x$new_path"; then
20050     BOOT_JDK="$new_path"
20051     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20052 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20053   fi
20054 
20055   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20056 
20057   path="$BOOT_JDK"
20058   has_colon=`$ECHO $path | $GREP ^.:`
20059   new_path="$path"
20060   if test "x$has_colon" = x; then
20061     # Not in mixed or Windows style, start by that.
20062     new_path=`cmd //c echo $path`
20063   fi
20064 
20065 
20066   input_path="$new_path"
20067   # Check if we need to convert this using DOS-style short mode. If the path
20068   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20069   # take no chances and rewrite it.
20070   # Note: m4 eats our [], so we need to use [ and ] instead.
20071   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20072   if test "x$has_forbidden_chars" != x; then
20073     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20074     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20075   fi
20076 
20077 
20078   windows_path="$new_path"
20079   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20080     unix_path=`$CYGPATH -u "$windows_path"`
20081     new_path="$unix_path"
20082   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20083     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20084     new_path="$unix_path"
20085   fi
20086 
20087   if test "x$path" != "x$new_path"; then
20088     BOOT_JDK="$new_path"
20089     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20090 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20091   fi
20092 
20093   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20094   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20095 
20096   else
20097     # We're on a posix platform. Hooray! :)
20098     path="$BOOT_JDK"
20099     has_space=`$ECHO "$path" | $GREP " "`
20100     if test "x$has_space" != x; then
20101       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20102 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20103       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20104     fi
20105 
20106     # Use eval to expand a potential ~
20107     eval path="$path"
20108     if test ! -f "$path" && test ! -d "$path"; then
20109       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20110     fi
20111 
20112     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20113   fi
20114 
20115               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20116 $as_echo_n "checking for Boot JDK... " >&6; }
20117               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20118 $as_echo "$BOOT_JDK" >&6; }
20119               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20120 $as_echo_n "checking Boot JDK version... " >&6; }
20121               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20122               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20123 $as_echo "$BOOT_JDK_VERSION" >&6; }
20124             fi # end check jdk version
20125           fi # end check rt.jar
20126         fi # end check javac
20127       fi # end check java
20128     fi # end check boot jdk found
20129   fi
20130 
20131   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20132     # Having specified an argument which is incorrect will produce an instant failure;
20133     # we should not go on looking
20134     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20135   fi
20136 
20137   # Test: Is bootjdk available from builddeps?
20138 
20139   if test "x$BOOT_JDK_FOUND" = xno; then
20140     # Now execute the test
20141 
20142 
20143 
20144   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20145     # Source the builddeps file again, to make sure it uses the latest variables!
20146     . $builddepsfile
20147     # Look for a target and build machine specific resource!
20148     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20149     if test "x$resource" = x; then
20150       # Ok, lets instead look for a target specific resource
20151       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20152     fi
20153     if test "x$resource" = x; then
20154       # Ok, lets instead look for a build specific resource
20155       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20156     fi
20157     if test "x$resource" = x; then
20158       # Ok, lets instead look for a generic resource
20159       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20160       resource=${builddep_bootjdk}
20161     fi
20162     if test "x$resource" != x; then
20163       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20164 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20165       # If the resource in the builddeps.conf file is an existing directory,
20166       # for example /java/linux/cups
20167       if test -d ${resource}; then
20168         depdir=${resource}
20169       else
20170 
20171   # bootjdk is for example mymodule
20172   # $resource is for example libs/general/libmymod_1_2_3.zip
20173   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20174   # $with_builddeps_dir is for example /localhome/builddeps
20175   # depdir is the name of the variable into which we store the depdir, eg MYMOD
20176   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20177   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20178   filename=`basename $resource`
20179   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20180   filebase=${filename%%.*}
20181   extension=${filename#*.}
20182   installdir=$with_builddeps_dir/$filebase
20183   if test ! -f $installdir/$filename.unpacked; then
20184     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20185 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20186     if test ! -d $installdir; then
20187       mkdir -p $installdir
20188     fi
20189     if test ! -d $installdir; then
20190       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20191     fi
20192     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20193     touch $tmpfile
20194     if test ! -f $tmpfile; then
20195       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20196     fi
20197 
20198   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20199   # $tmpfile is the local file name for the downloaded file.
20200   VALID_TOOL=no
20201   if test "x$BDEPS_FTP" = xwget; then
20202     VALID_TOOL=yes
20203     wget -O $tmpfile $with_builddeps_server/$resource
20204   fi
20205   if test "x$BDEPS_FTP" = xlftp; then
20206     VALID_TOOL=yes
20207     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20208   fi
20209   if test "x$BDEPS_FTP" = xftp; then
20210     VALID_TOOL=yes
20211     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20212     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20213     FTPUSERPWD=${FTPSERVER%%@*}
20214     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20215       FTPUSER=${userpwd%%:*}
20216       FTPPWD=${userpwd#*@}
20217       FTPSERVER=${FTPSERVER#*@}
20218     else
20219       FTPUSER=ftp
20220       FTPPWD=ftp
20221     fi
20222     # the "pass" command does not work on some
20223     # ftp clients (read ftp.exe) but if it works,
20224     # passive mode is better!
20225     ( \
20226         echo "user $FTPUSER $FTPPWD"        ; \
20227         echo "pass"                         ; \
20228         echo "bin"                          ; \
20229         echo "get $FTPPATH $tmpfile"              ; \
20230     ) | ftp -in $FTPSERVER
20231   fi
20232   if test "x$VALID_TOOL" != xyes; then
20233     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20234   fi
20235 
20236     mv $tmpfile $installdir/$filename
20237     if test ! -s $installdir/$filename; then
20238       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20239     fi
20240     case "$extension" in
20241       zip)  echo "Unzipping $installdir/$filename..."
20242         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20243         ;;
20244       tar.gz) echo "Untaring $installdir/$filename..."
20245         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20246         ;;
20247       tgz) echo "Untaring $installdir/$filename..."
20248         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20249         ;;
20250       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20251         ;;
20252     esac
20253   fi
20254   if test -f $installdir/$filename.unpacked; then
20255     depdir=$installdir
20256   fi
20257 
20258       fi
20259       # Source the builddeps file again, because in the previous command, the depdir
20260       # was updated to point at the current build dependency install directory.
20261       . $builddepsfile
20262       # Now extract variables from the builddeps.conf files.
20263       theroot=${builddep_bootjdk_ROOT}
20264       thecflags=${builddep_bootjdk_CFLAGS}
20265       thelibs=${builddep_bootjdk_LIBS}
20266       if test "x$depdir" = x; then
20267         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20268       fi
20269       BOOT_JDK=$depdir
20270       if test "x$theroot" != x; then
20271         BOOT_JDK="$theroot"
20272       fi
20273       if test "x$thecflags" != x; then
20274         BOOT_JDK_CFLAGS="$thecflags"
20275       fi
20276       if test "x$thelibs" != x; then
20277         BOOT_JDK_LIBS="$thelibs"
20278       fi
20279       BOOT_JDK_FOUND=maybe
20280       else BOOT_JDK_FOUND=no
20281 
20282     fi
20283     else BOOT_JDK_FOUND=no
20284 
20285   fi
20286 
20287 
20288 
20289     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20290     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20291       # Do we have a bin/java?
20292       if test ! -x "$BOOT_JDK/bin/java"; then
20293         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20294 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20295         BOOT_JDK_FOUND=no
20296       else
20297         # Do we have a bin/javac?
20298         if test ! -x "$BOOT_JDK/bin/javac"; then
20299           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20300 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20301           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20302 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20303           BOOT_JDK_FOUND=no
20304         else
20305           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20306           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20307             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20308 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20309             BOOT_JDK_FOUND=no
20310           else
20311             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20312             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20313 
20314             # Extra M4 quote needed to protect [] in grep expression.
20315             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20316             if test "x$FOUND_VERSION_78" = x; then
20317               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20318 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20319               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20320 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20321               BOOT_JDK_FOUND=no
20322             else
20323               # We're done! :-)
20324               BOOT_JDK_FOUND=yes
20325 
20326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20327 
20328   # Input might be given as Windows format, start by converting to
20329   # unix format.
20330   path="$BOOT_JDK"
20331   new_path=`$CYGPATH -u "$path"`
20332 
20333   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20334   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20335   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20336   # "foo.exe" is OK but "foo" is an error.
20337   #
20338   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20339   # It is also a way to make sure we got the proper file name for the real test later on.
20340   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20341   if test "x$test_shortpath" = x; then
20342     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20343 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20344     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20345   fi
20346 
20347   # Call helper function which possibly converts this using DOS-style short mode.
20348   # If so, the updated path is stored in $new_path.
20349 
20350   input_path="$new_path"
20351   # Check if we need to convert this using DOS-style short mode. If the path
20352   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20353   # take no chances and rewrite it.
20354   # Note: m4 eats our [], so we need to use [ and ] instead.
20355   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20356   if test "x$has_forbidden_chars" != x; then
20357     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20358     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20359     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20360     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20361       # Going to short mode and back again did indeed matter. Since short mode is
20362       # case insensitive, let's make it lowercase to improve readability.
20363       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20364       # Now convert it back to Unix-style (cygpath)
20365       input_path=`$CYGPATH -u "$shortmode_path"`
20366       new_path="$input_path"
20367     fi
20368   fi
20369 
20370   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20371   if test "x$test_cygdrive_prefix" = x; then
20372     # As a simple fix, exclude /usr/bin since it's not a real path.
20373     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20374       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20375       # a path prefixed by /cygdrive for fixpath to work.
20376       new_path="$CYGWIN_ROOT_PATH$input_path"
20377     fi
20378   fi
20379 
20380 
20381   if test "x$path" != "x$new_path"; then
20382     BOOT_JDK="$new_path"
20383     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20384 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20385   fi
20386 
20387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20388 
20389   path="$BOOT_JDK"
20390   has_colon=`$ECHO $path | $GREP ^.:`
20391   new_path="$path"
20392   if test "x$has_colon" = x; then
20393     # Not in mixed or Windows style, start by that.
20394     new_path=`cmd //c echo $path`
20395   fi
20396 
20397 
20398   input_path="$new_path"
20399   # Check if we need to convert this using DOS-style short mode. If the path
20400   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20401   # take no chances and rewrite it.
20402   # Note: m4 eats our [], so we need to use [ and ] instead.
20403   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20404   if test "x$has_forbidden_chars" != x; then
20405     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20406     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20407   fi
20408 
20409 
20410   windows_path="$new_path"
20411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20412     unix_path=`$CYGPATH -u "$windows_path"`
20413     new_path="$unix_path"
20414   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20415     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20416     new_path="$unix_path"
20417   fi
20418 
20419   if test "x$path" != "x$new_path"; then
20420     BOOT_JDK="$new_path"
20421     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20422 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20423   fi
20424 
20425   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20426   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20427 
20428   else
20429     # We're on a posix platform. Hooray! :)
20430     path="$BOOT_JDK"
20431     has_space=`$ECHO "$path" | $GREP " "`
20432     if test "x$has_space" != x; then
20433       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20434 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20435       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20436     fi
20437 
20438     # Use eval to expand a potential ~
20439     eval path="$path"
20440     if test ! -f "$path" && test ! -d "$path"; then
20441       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20442     fi
20443 
20444     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20445   fi
20446 
20447               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20448 $as_echo_n "checking for Boot JDK... " >&6; }
20449               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20450 $as_echo "$BOOT_JDK" >&6; }
20451               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20452 $as_echo_n "checking Boot JDK version... " >&6; }
20453               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20454               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20455 $as_echo "$BOOT_JDK_VERSION" >&6; }
20456             fi # end check jdk version
20457           fi # end check rt.jar
20458         fi # end check javac
20459       fi # end check java
20460     fi # end check boot jdk found
20461   fi
20462 
20463 
20464   # Test: Is $JAVA_HOME set?
20465 
20466   if test "x$BOOT_JDK_FOUND" = xno; then
20467     # Now execute the test
20468 
20469   if test "x$JAVA_HOME" != x; then
20470     JAVA_HOME_PROCESSED="$JAVA_HOME"
20471 
20472   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20473 
20474   # Input might be given as Windows format, start by converting to
20475   # unix format.
20476   path="$JAVA_HOME_PROCESSED"
20477   new_path=`$CYGPATH -u "$path"`
20478 
20479   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20480   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20481   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20482   # "foo.exe" is OK but "foo" is an error.
20483   #
20484   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20485   # It is also a way to make sure we got the proper file name for the real test later on.
20486   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20487   if test "x$test_shortpath" = x; then
20488     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
20489 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
20490     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
20491   fi
20492 
20493   # Call helper function which possibly converts this using DOS-style short mode.
20494   # If so, the updated path is stored in $new_path.
20495 
20496   input_path="$new_path"
20497   # Check if we need to convert this using DOS-style short mode. If the path
20498   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20499   # take no chances and rewrite it.
20500   # Note: m4 eats our [], so we need to use [ and ] instead.
20501   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20502   if test "x$has_forbidden_chars" != x; then
20503     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20504     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20505     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20506     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20507       # Going to short mode and back again did indeed matter. Since short mode is
20508       # case insensitive, let's make it lowercase to improve readability.
20509       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20510       # Now convert it back to Unix-style (cygpath)
20511       input_path=`$CYGPATH -u "$shortmode_path"`
20512       new_path="$input_path"
20513     fi
20514   fi
20515 
20516   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20517   if test "x$test_cygdrive_prefix" = x; then
20518     # As a simple fix, exclude /usr/bin since it's not a real path.
20519     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20520       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20521       # a path prefixed by /cygdrive for fixpath to work.
20522       new_path="$CYGWIN_ROOT_PATH$input_path"
20523     fi
20524   fi
20525 
20526 
20527   if test "x$path" != "x$new_path"; then
20528     JAVA_HOME_PROCESSED="$new_path"
20529     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
20530 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
20531   fi
20532 
20533   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20534 
20535   path="$JAVA_HOME_PROCESSED"
20536   has_colon=`$ECHO $path | $GREP ^.:`
20537   new_path="$path"
20538   if test "x$has_colon" = x; then
20539     # Not in mixed or Windows style, start by that.
20540     new_path=`cmd //c echo $path`
20541   fi
20542 
20543 
20544   input_path="$new_path"
20545   # Check if we need to convert this using DOS-style short mode. If the path
20546   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20547   # take no chances and rewrite it.
20548   # Note: m4 eats our [], so we need to use [ and ] instead.
20549   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20550   if test "x$has_forbidden_chars" != x; then
20551     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20552     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20553   fi
20554 
20555 
20556   windows_path="$new_path"
20557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20558     unix_path=`$CYGPATH -u "$windows_path"`
20559     new_path="$unix_path"
20560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20561     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20562     new_path="$unix_path"
20563   fi
20564 
20565   if test "x$path" != "x$new_path"; then
20566     JAVA_HOME_PROCESSED="$new_path"
20567     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
20568 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
20569   fi
20570 
20571   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20572   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20573 
20574   else
20575     # We're on a posix platform. Hooray! :)
20576     path="$JAVA_HOME_PROCESSED"
20577     has_space=`$ECHO "$path" | $GREP " "`
20578     if test "x$has_space" != x; then
20579       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
20580 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
20581       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20582     fi
20583 
20584     # Use eval to expand a potential ~
20585     eval path="$path"
20586     if test ! -f "$path" && test ! -d "$path"; then
20587       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
20588     fi
20589 
20590     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
20591   fi
20592 
20593     if test ! -d "$JAVA_HOME_PROCESSED"; then
20594       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
20595 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
20596     else
20597       # Aha, the user has set a JAVA_HOME
20598       # let us use that as the Boot JDK.
20599       BOOT_JDK="$JAVA_HOME_PROCESSED"
20600       BOOT_JDK_FOUND=maybe
20601       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
20602 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
20603     fi
20604   fi
20605 
20606 
20607     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20608     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20609       # Do we have a bin/java?
20610       if test ! -x "$BOOT_JDK/bin/java"; then
20611         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20612 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20613         BOOT_JDK_FOUND=no
20614       else
20615         # Do we have a bin/javac?
20616         if test ! -x "$BOOT_JDK/bin/javac"; then
20617           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20618 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20619           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20620 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20621           BOOT_JDK_FOUND=no
20622         else
20623           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20624           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20625             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20626 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20627             BOOT_JDK_FOUND=no
20628           else
20629             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20630             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20631 
20632             # Extra M4 quote needed to protect [] in grep expression.
20633             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20634             if test "x$FOUND_VERSION_78" = x; then
20635               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20636 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20637               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20638 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20639               BOOT_JDK_FOUND=no
20640             else
20641               # We're done! :-)
20642               BOOT_JDK_FOUND=yes
20643 
20644   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20645 
20646   # Input might be given as Windows format, start by converting to
20647   # unix format.
20648   path="$BOOT_JDK"
20649   new_path=`$CYGPATH -u "$path"`
20650 
20651   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20652   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20653   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20654   # "foo.exe" is OK but "foo" is an error.
20655   #
20656   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20657   # It is also a way to make sure we got the proper file name for the real test later on.
20658   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20659   if test "x$test_shortpath" = x; then
20660     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20661 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20662     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20663   fi
20664 
20665   # Call helper function which possibly converts this using DOS-style short mode.
20666   # If so, the updated path is stored in $new_path.
20667 
20668   input_path="$new_path"
20669   # Check if we need to convert this using DOS-style short mode. If the path
20670   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20671   # take no chances and rewrite it.
20672   # Note: m4 eats our [], so we need to use [ and ] instead.
20673   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20674   if test "x$has_forbidden_chars" != x; then
20675     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20676     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20677     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20678     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20679       # Going to short mode and back again did indeed matter. Since short mode is
20680       # case insensitive, let's make it lowercase to improve readability.
20681       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20682       # Now convert it back to Unix-style (cygpath)
20683       input_path=`$CYGPATH -u "$shortmode_path"`
20684       new_path="$input_path"
20685     fi
20686   fi
20687 
20688   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20689   if test "x$test_cygdrive_prefix" = x; then
20690     # As a simple fix, exclude /usr/bin since it's not a real path.
20691     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20692       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20693       # a path prefixed by /cygdrive for fixpath to work.
20694       new_path="$CYGWIN_ROOT_PATH$input_path"
20695     fi
20696   fi
20697 
20698 
20699   if test "x$path" != "x$new_path"; then
20700     BOOT_JDK="$new_path"
20701     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20702 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20703   fi
20704 
20705   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20706 
20707   path="$BOOT_JDK"
20708   has_colon=`$ECHO $path | $GREP ^.:`
20709   new_path="$path"
20710   if test "x$has_colon" = x; then
20711     # Not in mixed or Windows style, start by that.
20712     new_path=`cmd //c echo $path`
20713   fi
20714 
20715 
20716   input_path="$new_path"
20717   # Check if we need to convert this using DOS-style short mode. If the path
20718   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20719   # take no chances and rewrite it.
20720   # Note: m4 eats our [], so we need to use [ and ] instead.
20721   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20722   if test "x$has_forbidden_chars" != x; then
20723     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20724     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20725   fi
20726 
20727 
20728   windows_path="$new_path"
20729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20730     unix_path=`$CYGPATH -u "$windows_path"`
20731     new_path="$unix_path"
20732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20733     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20734     new_path="$unix_path"
20735   fi
20736 
20737   if test "x$path" != "x$new_path"; then
20738     BOOT_JDK="$new_path"
20739     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20740 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20741   fi
20742 
20743   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20744   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20745 
20746   else
20747     # We're on a posix platform. Hooray! :)
20748     path="$BOOT_JDK"
20749     has_space=`$ECHO "$path" | $GREP " "`
20750     if test "x$has_space" != x; then
20751       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20752 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20753       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20754     fi
20755 
20756     # Use eval to expand a potential ~
20757     eval path="$path"
20758     if test ! -f "$path" && test ! -d "$path"; then
20759       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20760     fi
20761 
20762     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20763   fi
20764 
20765               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20766 $as_echo_n "checking for Boot JDK... " >&6; }
20767               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20768 $as_echo "$BOOT_JDK" >&6; }
20769               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20770 $as_echo_n "checking Boot JDK version... " >&6; }
20771               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20772               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20773 $as_echo "$BOOT_JDK_VERSION" >&6; }
20774             fi # end check jdk version
20775           fi # end check rt.jar
20776         fi # end check javac
20777       fi # end check java
20778     fi # end check boot jdk found
20779   fi
20780 
20781 
20782   # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
20783 
20784   if test "x$BOOT_JDK_FOUND" = xno; then
20785     # Now execute the test
20786 
20787   if test -x /usr/libexec/java_home; then
20788     BOOT_JDK=`/usr/libexec/java_home`
20789     BOOT_JDK_FOUND=maybe
20790     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
20791 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
20792   fi
20793 
20794 
20795     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20796     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20797       # Do we have a bin/java?
20798       if test ! -x "$BOOT_JDK/bin/java"; then
20799         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20800 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20801         BOOT_JDK_FOUND=no
20802       else
20803         # Do we have a bin/javac?
20804         if test ! -x "$BOOT_JDK/bin/javac"; then
20805           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20806 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20807           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20808 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20809           BOOT_JDK_FOUND=no
20810         else
20811           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20812           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20813             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20814 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20815             BOOT_JDK_FOUND=no
20816           else
20817             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20818             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20819 
20820             # Extra M4 quote needed to protect [] in grep expression.
20821             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20822             if test "x$FOUND_VERSION_78" = x; then
20823               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20824 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20825               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20826 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20827               BOOT_JDK_FOUND=no
20828             else
20829               # We're done! :-)
20830               BOOT_JDK_FOUND=yes
20831 
20832   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20833 
20834   # Input might be given as Windows format, start by converting to
20835   # unix format.
20836   path="$BOOT_JDK"
20837   new_path=`$CYGPATH -u "$path"`
20838 
20839   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20840   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20841   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20842   # "foo.exe" is OK but "foo" is an error.
20843   #
20844   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20845   # It is also a way to make sure we got the proper file name for the real test later on.
20846   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20847   if test "x$test_shortpath" = x; then
20848     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20849 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20850     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20851   fi
20852 
20853   # Call helper function which possibly converts this using DOS-style short mode.
20854   # If so, the updated path is stored in $new_path.
20855 
20856   input_path="$new_path"
20857   # Check if we need to convert this using DOS-style short mode. If the path
20858   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20859   # take no chances and rewrite it.
20860   # Note: m4 eats our [], so we need to use [ and ] instead.
20861   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20862   if test "x$has_forbidden_chars" != x; then
20863     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20864     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20865     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20866     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20867       # Going to short mode and back again did indeed matter. Since short mode is
20868       # case insensitive, let's make it lowercase to improve readability.
20869       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20870       # Now convert it back to Unix-style (cygpath)
20871       input_path=`$CYGPATH -u "$shortmode_path"`
20872       new_path="$input_path"
20873     fi
20874   fi
20875 
20876   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20877   if test "x$test_cygdrive_prefix" = x; then
20878     # As a simple fix, exclude /usr/bin since it's not a real path.
20879     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20880       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20881       # a path prefixed by /cygdrive for fixpath to work.
20882       new_path="$CYGWIN_ROOT_PATH$input_path"
20883     fi
20884   fi
20885 
20886 
20887   if test "x$path" != "x$new_path"; then
20888     BOOT_JDK="$new_path"
20889     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20890 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20891   fi
20892 
20893   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20894 
20895   path="$BOOT_JDK"
20896   has_colon=`$ECHO $path | $GREP ^.:`
20897   new_path="$path"
20898   if test "x$has_colon" = x; then
20899     # Not in mixed or Windows style, start by that.
20900     new_path=`cmd //c echo $path`
20901   fi
20902 
20903 
20904   input_path="$new_path"
20905   # Check if we need to convert this using DOS-style short mode. If the path
20906   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20907   # take no chances and rewrite it.
20908   # Note: m4 eats our [], so we need to use [ and ] instead.
20909   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20910   if test "x$has_forbidden_chars" != x; then
20911     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20912     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20913   fi
20914 
20915 
20916   windows_path="$new_path"
20917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20918     unix_path=`$CYGPATH -u "$windows_path"`
20919     new_path="$unix_path"
20920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20922     new_path="$unix_path"
20923   fi
20924 
20925   if test "x$path" != "x$new_path"; then
20926     BOOT_JDK="$new_path"
20927     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20928 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20929   fi
20930 
20931   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20932   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20933 
20934   else
20935     # We're on a posix platform. Hooray! :)
20936     path="$BOOT_JDK"
20937     has_space=`$ECHO "$path" | $GREP " "`
20938     if test "x$has_space" != x; then
20939       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20940 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20941       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20942     fi
20943 
20944     # Use eval to expand a potential ~
20945     eval path="$path"
20946     if test ! -f "$path" && test ! -d "$path"; then
20947       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20948     fi
20949 
20950     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20951   fi
20952 
20953               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20954 $as_echo_n "checking for Boot JDK... " >&6; }
20955               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20956 $as_echo "$BOOT_JDK" >&6; }
20957               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20958 $as_echo_n "checking Boot JDK version... " >&6; }
20959               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20960               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20961 $as_echo "$BOOT_JDK_VERSION" >&6; }
20962             fi # end check jdk version
20963           fi # end check rt.jar
20964         fi # end check javac
20965       fi # end check java
20966     fi # end check boot jdk found
20967   fi
20968 
20969 
20970   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
20971 
20972   if test "x$BOOT_JDK_FOUND" = xno; then
20973     # Now execute the test
20974 
20975   # Extract the first word of "javac", so it can be a program name with args.
20976 set dummy javac; ac_word=$2
20977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20978 $as_echo_n "checking for $ac_word... " >&6; }
20979 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
20980   $as_echo_n "(cached) " >&6
20981 else
20982   case $JAVAC_CHECK in
20983   [\\/]* | ?:[\\/]*)
20984   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
20985   ;;
20986   *)
20987   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20988 for as_dir in $PATH
20989 do
20990   IFS=$as_save_IFS
20991   test -z "$as_dir" && as_dir=.
20992     for ac_exec_ext in '' $ac_executable_extensions; do
20993   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20994     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
20995     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20996     break 2
20997   fi
20998 done
20999   done
21000 IFS=$as_save_IFS
21001 
21002   ;;
21003 esac
21004 fi
21005 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21006 if test -n "$JAVAC_CHECK"; then
21007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21008 $as_echo "$JAVAC_CHECK" >&6; }
21009 else
21010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21011 $as_echo "no" >&6; }
21012 fi
21013 
21014 
21015   # Extract the first word of "java", so it can be a program name with args.
21016 set dummy java; ac_word=$2
21017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21018 $as_echo_n "checking for $ac_word... " >&6; }
21019 if ${ac_cv_path_JAVA_CHECK+:} false; then :
21020   $as_echo_n "(cached) " >&6
21021 else
21022   case $JAVA_CHECK in
21023   [\\/]* | ?:[\\/]*)
21024   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21025   ;;
21026   *)
21027   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21028 for as_dir in $PATH
21029 do
21030   IFS=$as_save_IFS
21031   test -z "$as_dir" && as_dir=.
21032     for ac_exec_ext in '' $ac_executable_extensions; do
21033   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21034     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21035     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21036     break 2
21037   fi
21038 done
21039   done
21040 IFS=$as_save_IFS
21041 
21042   ;;
21043 esac
21044 fi
21045 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21046 if test -n "$JAVA_CHECK"; then
21047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21048 $as_echo "$JAVA_CHECK" >&6; }
21049 else
21050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21051 $as_echo "no" >&6; }
21052 fi
21053 
21054 
21055   BINARY="$JAVAC_CHECK"
21056   if test "x$JAVAC_CHECK" = x; then
21057     BINARY="$JAVA_CHECK"
21058   fi
21059   if test "x$BINARY" != x; then
21060     # So there is a java(c) binary, it might be part of a JDK.
21061     # Lets find the JDK/JRE directory by following symbolic links.
21062     # Linux/GNU systems often have links from /usr/bin/java to
21063     # /etc/alternatives/java to the real JDK binary.
21064 
21065   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21066     # Follow a chain of symbolic links. Use readlink
21067     # where it exists, else fall back to horribly
21068     # complicated shell code.
21069     if test "x$READLINK_TESTED" != yes; then
21070       # On MacOSX there is a readlink tool with a different
21071       # purpose than the GNU readlink tool. Check the found readlink.
21072       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21073       if test "x$ISGNU" = x; then
21074         # A readlink that we do not know how to use.
21075         # Are there other non-GNU readlinks out there?
21076         READLINK_TESTED=yes
21077         READLINK=
21078       fi
21079     fi
21080 
21081     if test "x$READLINK" != x; then
21082       BINARY=`$READLINK -f $BINARY`
21083     else
21084       # Save the current directory for restoring afterwards
21085       STARTDIR=$PWD
21086       COUNTER=0
21087       sym_link_dir=`$DIRNAME $BINARY`
21088       sym_link_file=`$BASENAME $BINARY`
21089       cd $sym_link_dir
21090       # Use -P flag to resolve symlinks in directories.
21091       cd `$THEPWDCMD -P`
21092       sym_link_dir=`$THEPWDCMD -P`
21093       # Resolve file symlinks
21094       while test $COUNTER -lt 20; do
21095         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21096         if test "x$ISLINK" == x; then
21097           # This is not a symbolic link! We are done!
21098           break
21099         fi
21100         # Again resolve directory symlinks since the target of the just found
21101         # link could be in a different directory
21102         cd `$DIRNAME $ISLINK`
21103         sym_link_dir=`$THEPWDCMD -P`
21104         sym_link_file=`$BASENAME $ISLINK`
21105         let COUNTER=COUNTER+1
21106       done
21107       cd $STARTDIR
21108       BINARY=$sym_link_dir/$sym_link_file
21109     fi
21110   fi
21111 
21112     BOOT_JDK=`dirname "$BINARY"`
21113     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21114     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21115       # Looks like we found ourselves an JDK
21116       BOOT_JDK_FOUND=maybe
21117       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21118 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21119     fi
21120   fi
21121 
21122 
21123     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21124     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21125       # Do we have a bin/java?
21126       if test ! -x "$BOOT_JDK/bin/java"; then
21127         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21128 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21129         BOOT_JDK_FOUND=no
21130       else
21131         # Do we have a bin/javac?
21132         if test ! -x "$BOOT_JDK/bin/javac"; then
21133           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21134 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21135           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21136 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21137           BOOT_JDK_FOUND=no
21138         else
21139           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21140           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21141             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21142 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21143             BOOT_JDK_FOUND=no
21144           else
21145             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21146             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21147 
21148             # Extra M4 quote needed to protect [] in grep expression.
21149             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21150             if test "x$FOUND_VERSION_78" = x; then
21151               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21152 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21153               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21154 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21155               BOOT_JDK_FOUND=no
21156             else
21157               # We're done! :-)
21158               BOOT_JDK_FOUND=yes
21159 
21160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21161 
21162   # Input might be given as Windows format, start by converting to
21163   # unix format.
21164   path="$BOOT_JDK"
21165   new_path=`$CYGPATH -u "$path"`
21166 
21167   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21168   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21169   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21170   # "foo.exe" is OK but "foo" is an error.
21171   #
21172   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21173   # It is also a way to make sure we got the proper file name for the real test later on.
21174   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21175   if test "x$test_shortpath" = x; then
21176     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21177 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21178     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21179   fi
21180 
21181   # Call helper function which possibly converts this using DOS-style short mode.
21182   # If so, the updated path is stored in $new_path.
21183 
21184   input_path="$new_path"
21185   # Check if we need to convert this using DOS-style short mode. If the path
21186   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21187   # take no chances and rewrite it.
21188   # Note: m4 eats our [], so we need to use [ and ] instead.
21189   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21190   if test "x$has_forbidden_chars" != x; then
21191     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21192     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21193     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21194     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21195       # Going to short mode and back again did indeed matter. Since short mode is
21196       # case insensitive, let's make it lowercase to improve readability.
21197       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21198       # Now convert it back to Unix-style (cygpath)
21199       input_path=`$CYGPATH -u "$shortmode_path"`
21200       new_path="$input_path"
21201     fi
21202   fi
21203 
21204   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21205   if test "x$test_cygdrive_prefix" = x; then
21206     # As a simple fix, exclude /usr/bin since it's not a real path.
21207     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21208       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21209       # a path prefixed by /cygdrive for fixpath to work.
21210       new_path="$CYGWIN_ROOT_PATH$input_path"
21211     fi
21212   fi
21213 
21214 
21215   if test "x$path" != "x$new_path"; then
21216     BOOT_JDK="$new_path"
21217     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21218 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21219   fi
21220 
21221   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21222 
21223   path="$BOOT_JDK"
21224   has_colon=`$ECHO $path | $GREP ^.:`
21225   new_path="$path"
21226   if test "x$has_colon" = x; then
21227     # Not in mixed or Windows style, start by that.
21228     new_path=`cmd //c echo $path`
21229   fi
21230 
21231 
21232   input_path="$new_path"
21233   # Check if we need to convert this using DOS-style short mode. If the path
21234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21235   # take no chances and rewrite it.
21236   # Note: m4 eats our [], so we need to use [ and ] instead.
21237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21238   if test "x$has_forbidden_chars" != x; then
21239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21240     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21241   fi
21242 
21243 
21244   windows_path="$new_path"
21245   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21246     unix_path=`$CYGPATH -u "$windows_path"`
21247     new_path="$unix_path"
21248   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21249     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21250     new_path="$unix_path"
21251   fi
21252 
21253   if test "x$path" != "x$new_path"; then
21254     BOOT_JDK="$new_path"
21255     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21256 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21257   fi
21258 
21259   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21260   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21261 
21262   else
21263     # We're on a posix platform. Hooray! :)
21264     path="$BOOT_JDK"
21265     has_space=`$ECHO "$path" | $GREP " "`
21266     if test "x$has_space" != x; then
21267       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21268 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21269       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21270     fi
21271 
21272     # Use eval to expand a potential ~
21273     eval path="$path"
21274     if test ! -f "$path" && test ! -d "$path"; then
21275       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21276     fi
21277 
21278     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21279   fi
21280 
21281               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21282 $as_echo_n "checking for Boot JDK... " >&6; }
21283               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21284 $as_echo "$BOOT_JDK" >&6; }
21285               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21286 $as_echo_n "checking Boot JDK version... " >&6; }
21287               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21288               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21289 $as_echo "$BOOT_JDK_VERSION" >&6; }
21290             fi # end check jdk version
21291           fi # end check rt.jar
21292         fi # end check javac
21293       fi # end check java
21294     fi # end check boot jdk found
21295   fi
21296 
21297 
21298   # Test: Is there a JDK installed in default, well-known locations?
21299 
21300   if test "x$BOOT_JDK_FOUND" = xno; then
21301     # Now execute the test
21302 
21303   if test "x$OPENJDK_TARGET_OS" = xwindows; then
21304 
21305   if test "x$BOOT_JDK_FOUND" = xno; then
21306     # Now execute the test
21307 
21308   if test "x$ProgramW6432" != x; then
21309     VIRTUAL_DIR="$ProgramW6432/Java"
21310 
21311   windows_path="$VIRTUAL_DIR"
21312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21313     unix_path=`$CYGPATH -u "$windows_path"`
21314     VIRTUAL_DIR="$unix_path"
21315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21316     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21317     VIRTUAL_DIR="$unix_path"
21318   fi
21319 
21320 
21321   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21322   BOOT_JDK_SUFFIX=""
21323   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21324   if test "x$ALL_JDKS_FOUND" != x; then
21325     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21326 
21327   if test "x$BOOT_JDK_FOUND" = xno; then
21328     # Now execute the test
21329 
21330         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21331         if test -d "$BOOT_JDK"; then
21332           BOOT_JDK_FOUND=maybe
21333           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21334 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21335         fi
21336 
21337 
21338     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21339     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21340       # Do we have a bin/java?
21341       if test ! -x "$BOOT_JDK/bin/java"; then
21342         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21343 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21344         BOOT_JDK_FOUND=no
21345       else
21346         # Do we have a bin/javac?
21347         if test ! -x "$BOOT_JDK/bin/javac"; then
21348           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21349 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21350           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21351 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21352           BOOT_JDK_FOUND=no
21353         else
21354           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21355           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21356             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21357 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21358             BOOT_JDK_FOUND=no
21359           else
21360             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21361             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21362 
21363             # Extra M4 quote needed to protect [] in grep expression.
21364             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21365             if test "x$FOUND_VERSION_78" = x; then
21366               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21367 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21368               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21369 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21370               BOOT_JDK_FOUND=no
21371             else
21372               # We're done! :-)
21373               BOOT_JDK_FOUND=yes
21374 
21375   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21376 
21377   # Input might be given as Windows format, start by converting to
21378   # unix format.
21379   path="$BOOT_JDK"
21380   new_path=`$CYGPATH -u "$path"`
21381 
21382   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21383   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21384   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21385   # "foo.exe" is OK but "foo" is an error.
21386   #
21387   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21388   # It is also a way to make sure we got the proper file name for the real test later on.
21389   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21390   if test "x$test_shortpath" = x; then
21391     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21392 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21393     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21394   fi
21395 
21396   # Call helper function which possibly converts this using DOS-style short mode.
21397   # If so, the updated path is stored in $new_path.
21398 
21399   input_path="$new_path"
21400   # Check if we need to convert this using DOS-style short mode. If the path
21401   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21402   # take no chances and rewrite it.
21403   # Note: m4 eats our [], so we need to use [ and ] instead.
21404   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21405   if test "x$has_forbidden_chars" != x; then
21406     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21407     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21408     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21409     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21410       # Going to short mode and back again did indeed matter. Since short mode is
21411       # case insensitive, let's make it lowercase to improve readability.
21412       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21413       # Now convert it back to Unix-style (cygpath)
21414       input_path=`$CYGPATH -u "$shortmode_path"`
21415       new_path="$input_path"
21416     fi
21417   fi
21418 
21419   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21420   if test "x$test_cygdrive_prefix" = x; then
21421     # As a simple fix, exclude /usr/bin since it's not a real path.
21422     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21423       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21424       # a path prefixed by /cygdrive for fixpath to work.
21425       new_path="$CYGWIN_ROOT_PATH$input_path"
21426     fi
21427   fi
21428 
21429 
21430   if test "x$path" != "x$new_path"; then
21431     BOOT_JDK="$new_path"
21432     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21433 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21434   fi
21435 
21436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21437 
21438   path="$BOOT_JDK"
21439   has_colon=`$ECHO $path | $GREP ^.:`
21440   new_path="$path"
21441   if test "x$has_colon" = x; then
21442     # Not in mixed or Windows style, start by that.
21443     new_path=`cmd //c echo $path`
21444   fi
21445 
21446 
21447   input_path="$new_path"
21448   # Check if we need to convert this using DOS-style short mode. If the path
21449   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21450   # take no chances and rewrite it.
21451   # Note: m4 eats our [], so we need to use [ and ] instead.
21452   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21453   if test "x$has_forbidden_chars" != x; then
21454     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21455     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21456   fi
21457 
21458 
21459   windows_path="$new_path"
21460   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21461     unix_path=`$CYGPATH -u "$windows_path"`
21462     new_path="$unix_path"
21463   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21464     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21465     new_path="$unix_path"
21466   fi
21467 
21468   if test "x$path" != "x$new_path"; then
21469     BOOT_JDK="$new_path"
21470     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21471 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21472   fi
21473 
21474   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21475   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21476 
21477   else
21478     # We're on a posix platform. Hooray! :)
21479     path="$BOOT_JDK"
21480     has_space=`$ECHO "$path" | $GREP " "`
21481     if test "x$has_space" != x; then
21482       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21483 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21484       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21485     fi
21486 
21487     # Use eval to expand a potential ~
21488     eval path="$path"
21489     if test ! -f "$path" && test ! -d "$path"; then
21490       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21491     fi
21492 
21493     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21494   fi
21495 
21496               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21497 $as_echo_n "checking for Boot JDK... " >&6; }
21498               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21499 $as_echo "$BOOT_JDK" >&6; }
21500               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21501 $as_echo_n "checking Boot JDK version... " >&6; }
21502               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21503               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21504 $as_echo "$BOOT_JDK_VERSION" >&6; }
21505             fi # end check jdk version
21506           fi # end check rt.jar
21507         fi # end check javac
21508       fi # end check java
21509     fi # end check boot jdk found
21510   fi
21511 
21512     done
21513   fi
21514 
21515   fi
21516 
21517 
21518     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21519     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21520       # Do we have a bin/java?
21521       if test ! -x "$BOOT_JDK/bin/java"; then
21522         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21523 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21524         BOOT_JDK_FOUND=no
21525       else
21526         # Do we have a bin/javac?
21527         if test ! -x "$BOOT_JDK/bin/javac"; then
21528           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21529 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21530           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21531 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21532           BOOT_JDK_FOUND=no
21533         else
21534           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21535           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21536             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21537 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21538             BOOT_JDK_FOUND=no
21539           else
21540             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21541             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21542 
21543             # Extra M4 quote needed to protect [] in grep expression.
21544             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21545             if test "x$FOUND_VERSION_78" = x; then
21546               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21547 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21548               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21549 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21550               BOOT_JDK_FOUND=no
21551             else
21552               # We're done! :-)
21553               BOOT_JDK_FOUND=yes
21554 
21555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21556 
21557   # Input might be given as Windows format, start by converting to
21558   # unix format.
21559   path="$BOOT_JDK"
21560   new_path=`$CYGPATH -u "$path"`
21561 
21562   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21563   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21564   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21565   # "foo.exe" is OK but "foo" is an error.
21566   #
21567   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21568   # It is also a way to make sure we got the proper file name for the real test later on.
21569   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21570   if test "x$test_shortpath" = x; then
21571     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21572 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21573     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21574   fi
21575 
21576   # Call helper function which possibly converts this using DOS-style short mode.
21577   # If so, the updated path is stored in $new_path.
21578 
21579   input_path="$new_path"
21580   # Check if we need to convert this using DOS-style short mode. If the path
21581   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21582   # take no chances and rewrite it.
21583   # Note: m4 eats our [], so we need to use [ and ] instead.
21584   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21585   if test "x$has_forbidden_chars" != x; then
21586     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21587     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21588     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21589     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21590       # Going to short mode and back again did indeed matter. Since short mode is
21591       # case insensitive, let's make it lowercase to improve readability.
21592       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21593       # Now convert it back to Unix-style (cygpath)
21594       input_path=`$CYGPATH -u "$shortmode_path"`
21595       new_path="$input_path"
21596     fi
21597   fi
21598 
21599   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21600   if test "x$test_cygdrive_prefix" = x; then
21601     # As a simple fix, exclude /usr/bin since it's not a real path.
21602     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21603       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21604       # a path prefixed by /cygdrive for fixpath to work.
21605       new_path="$CYGWIN_ROOT_PATH$input_path"
21606     fi
21607   fi
21608 
21609 
21610   if test "x$path" != "x$new_path"; then
21611     BOOT_JDK="$new_path"
21612     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21613 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21614   fi
21615 
21616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21617 
21618   path="$BOOT_JDK"
21619   has_colon=`$ECHO $path | $GREP ^.:`
21620   new_path="$path"
21621   if test "x$has_colon" = x; then
21622     # Not in mixed or Windows style, start by that.
21623     new_path=`cmd //c echo $path`
21624   fi
21625 
21626 
21627   input_path="$new_path"
21628   # Check if we need to convert this using DOS-style short mode. If the path
21629   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21630   # take no chances and rewrite it.
21631   # Note: m4 eats our [], so we need to use [ and ] instead.
21632   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21633   if test "x$has_forbidden_chars" != x; then
21634     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21635     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21636   fi
21637 
21638 
21639   windows_path="$new_path"
21640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21641     unix_path=`$CYGPATH -u "$windows_path"`
21642     new_path="$unix_path"
21643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21645     new_path="$unix_path"
21646   fi
21647 
21648   if test "x$path" != "x$new_path"; then
21649     BOOT_JDK="$new_path"
21650     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21651 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21652   fi
21653 
21654   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21655   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21656 
21657   else
21658     # We're on a posix platform. Hooray! :)
21659     path="$BOOT_JDK"
21660     has_space=`$ECHO "$path" | $GREP " "`
21661     if test "x$has_space" != x; then
21662       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21663 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21664       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21665     fi
21666 
21667     # Use eval to expand a potential ~
21668     eval path="$path"
21669     if test ! -f "$path" && test ! -d "$path"; then
21670       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21671     fi
21672 
21673     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21674   fi
21675 
21676               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21677 $as_echo_n "checking for Boot JDK... " >&6; }
21678               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21679 $as_echo "$BOOT_JDK" >&6; }
21680               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21681 $as_echo_n "checking Boot JDK version... " >&6; }
21682               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21683               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21684 $as_echo "$BOOT_JDK_VERSION" >&6; }
21685             fi # end check jdk version
21686           fi # end check rt.jar
21687         fi # end check javac
21688       fi # end check java
21689     fi # end check boot jdk found
21690   fi
21691 
21692 
21693   if test "x$BOOT_JDK_FOUND" = xno; then
21694     # Now execute the test
21695 
21696   if test "x$PROGRAMW6432" != x; then
21697     VIRTUAL_DIR="$PROGRAMW6432/Java"
21698 
21699   windows_path="$VIRTUAL_DIR"
21700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21701     unix_path=`$CYGPATH -u "$windows_path"`
21702     VIRTUAL_DIR="$unix_path"
21703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21704     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21705     VIRTUAL_DIR="$unix_path"
21706   fi
21707 
21708 
21709   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21710   BOOT_JDK_SUFFIX=""
21711   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21712   if test "x$ALL_JDKS_FOUND" != x; then
21713     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21714 
21715   if test "x$BOOT_JDK_FOUND" = xno; then
21716     # Now execute the test
21717 
21718         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21719         if test -d "$BOOT_JDK"; then
21720           BOOT_JDK_FOUND=maybe
21721           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21722 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21723         fi
21724 
21725 
21726     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21727     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21728       # Do we have a bin/java?
21729       if test ! -x "$BOOT_JDK/bin/java"; then
21730         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21731 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21732         BOOT_JDK_FOUND=no
21733       else
21734         # Do we have a bin/javac?
21735         if test ! -x "$BOOT_JDK/bin/javac"; then
21736           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21737 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21738           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21739 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21740           BOOT_JDK_FOUND=no
21741         else
21742           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21743           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21744             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21745 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21746             BOOT_JDK_FOUND=no
21747           else
21748             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21749             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21750 
21751             # Extra M4 quote needed to protect [] in grep expression.
21752             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21753             if test "x$FOUND_VERSION_78" = x; then
21754               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21755 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21756               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21757 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21758               BOOT_JDK_FOUND=no
21759             else
21760               # We're done! :-)
21761               BOOT_JDK_FOUND=yes
21762 
21763   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21764 
21765   # Input might be given as Windows format, start by converting to
21766   # unix format.
21767   path="$BOOT_JDK"
21768   new_path=`$CYGPATH -u "$path"`
21769 
21770   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21771   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21772   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21773   # "foo.exe" is OK but "foo" is an error.
21774   #
21775   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21776   # It is also a way to make sure we got the proper file name for the real test later on.
21777   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21778   if test "x$test_shortpath" = x; then
21779     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21780 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21781     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21782   fi
21783 
21784   # Call helper function which possibly converts this using DOS-style short mode.
21785   # If so, the updated path is stored in $new_path.
21786 
21787   input_path="$new_path"
21788   # Check if we need to convert this using DOS-style short mode. If the path
21789   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21790   # take no chances and rewrite it.
21791   # Note: m4 eats our [], so we need to use [ and ] instead.
21792   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21793   if test "x$has_forbidden_chars" != x; then
21794     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21795     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21796     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21797     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21798       # Going to short mode and back again did indeed matter. Since short mode is
21799       # case insensitive, let's make it lowercase to improve readability.
21800       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21801       # Now convert it back to Unix-style (cygpath)
21802       input_path=`$CYGPATH -u "$shortmode_path"`
21803       new_path="$input_path"
21804     fi
21805   fi
21806 
21807   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21808   if test "x$test_cygdrive_prefix" = x; then
21809     # As a simple fix, exclude /usr/bin since it's not a real path.
21810     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21811       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21812       # a path prefixed by /cygdrive for fixpath to work.
21813       new_path="$CYGWIN_ROOT_PATH$input_path"
21814     fi
21815   fi
21816 
21817 
21818   if test "x$path" != "x$new_path"; then
21819     BOOT_JDK="$new_path"
21820     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21821 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21822   fi
21823 
21824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21825 
21826   path="$BOOT_JDK"
21827   has_colon=`$ECHO $path | $GREP ^.:`
21828   new_path="$path"
21829   if test "x$has_colon" = x; then
21830     # Not in mixed or Windows style, start by that.
21831     new_path=`cmd //c echo $path`
21832   fi
21833 
21834 
21835   input_path="$new_path"
21836   # Check if we need to convert this using DOS-style short mode. If the path
21837   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21838   # take no chances and rewrite it.
21839   # Note: m4 eats our [], so we need to use [ and ] instead.
21840   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21841   if test "x$has_forbidden_chars" != x; then
21842     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21843     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21844   fi
21845 
21846 
21847   windows_path="$new_path"
21848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21849     unix_path=`$CYGPATH -u "$windows_path"`
21850     new_path="$unix_path"
21851   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21852     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21853     new_path="$unix_path"
21854   fi
21855 
21856   if test "x$path" != "x$new_path"; then
21857     BOOT_JDK="$new_path"
21858     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21859 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21860   fi
21861 
21862   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21863   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21864 
21865   else
21866     # We're on a posix platform. Hooray! :)
21867     path="$BOOT_JDK"
21868     has_space=`$ECHO "$path" | $GREP " "`
21869     if test "x$has_space" != x; then
21870       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21871 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21872       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21873     fi
21874 
21875     # Use eval to expand a potential ~
21876     eval path="$path"
21877     if test ! -f "$path" && test ! -d "$path"; then
21878       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21879     fi
21880 
21881     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21882   fi
21883 
21884               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21885 $as_echo_n "checking for Boot JDK... " >&6; }
21886               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21887 $as_echo "$BOOT_JDK" >&6; }
21888               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21889 $as_echo_n "checking Boot JDK version... " >&6; }
21890               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21891               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21892 $as_echo "$BOOT_JDK_VERSION" >&6; }
21893             fi # end check jdk version
21894           fi # end check rt.jar
21895         fi # end check javac
21896       fi # end check java
21897     fi # end check boot jdk found
21898   fi
21899 
21900     done
21901   fi
21902 
21903   fi
21904 
21905 
21906     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21907     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21908       # Do we have a bin/java?
21909       if test ! -x "$BOOT_JDK/bin/java"; then
21910         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21911 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21912         BOOT_JDK_FOUND=no
21913       else
21914         # Do we have a bin/javac?
21915         if test ! -x "$BOOT_JDK/bin/javac"; then
21916           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21917 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21918           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21919 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21920           BOOT_JDK_FOUND=no
21921         else
21922           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21923           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21924             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21925 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21926             BOOT_JDK_FOUND=no
21927           else
21928             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21929             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21930 
21931             # Extra M4 quote needed to protect [] in grep expression.
21932             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21933             if test "x$FOUND_VERSION_78" = x; then
21934               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21935 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21936               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21937 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21938               BOOT_JDK_FOUND=no
21939             else
21940               # We're done! :-)
21941               BOOT_JDK_FOUND=yes
21942 
21943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21944 
21945   # Input might be given as Windows format, start by converting to
21946   # unix format.
21947   path="$BOOT_JDK"
21948   new_path=`$CYGPATH -u "$path"`
21949 
21950   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21951   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21952   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21953   # "foo.exe" is OK but "foo" is an error.
21954   #
21955   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21956   # It is also a way to make sure we got the proper file name for the real test later on.
21957   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21958   if test "x$test_shortpath" = x; then
21959     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21960 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21961     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21962   fi
21963 
21964   # Call helper function which possibly converts this using DOS-style short mode.
21965   # If so, the updated path is stored in $new_path.
21966 
21967   input_path="$new_path"
21968   # Check if we need to convert this using DOS-style short mode. If the path
21969   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21970   # take no chances and rewrite it.
21971   # Note: m4 eats our [], so we need to use [ and ] instead.
21972   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21973   if test "x$has_forbidden_chars" != x; then
21974     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21975     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21976     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21977     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21978       # Going to short mode and back again did indeed matter. Since short mode is
21979       # case insensitive, let's make it lowercase to improve readability.
21980       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21981       # Now convert it back to Unix-style (cygpath)
21982       input_path=`$CYGPATH -u "$shortmode_path"`
21983       new_path="$input_path"
21984     fi
21985   fi
21986 
21987   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21988   if test "x$test_cygdrive_prefix" = x; then
21989     # As a simple fix, exclude /usr/bin since it's not a real path.
21990     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21991       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21992       # a path prefixed by /cygdrive for fixpath to work.
21993       new_path="$CYGWIN_ROOT_PATH$input_path"
21994     fi
21995   fi
21996 
21997 
21998   if test "x$path" != "x$new_path"; then
21999     BOOT_JDK="$new_path"
22000     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22001 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22002   fi
22003 
22004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22005 
22006   path="$BOOT_JDK"
22007   has_colon=`$ECHO $path | $GREP ^.:`
22008   new_path="$path"
22009   if test "x$has_colon" = x; then
22010     # Not in mixed or Windows style, start by that.
22011     new_path=`cmd //c echo $path`
22012   fi
22013 
22014 
22015   input_path="$new_path"
22016   # Check if we need to convert this using DOS-style short mode. If the path
22017   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22018   # take no chances and rewrite it.
22019   # Note: m4 eats our [], so we need to use [ and ] instead.
22020   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22021   if test "x$has_forbidden_chars" != x; then
22022     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22023     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22024   fi
22025 
22026 
22027   windows_path="$new_path"
22028   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22029     unix_path=`$CYGPATH -u "$windows_path"`
22030     new_path="$unix_path"
22031   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22032     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22033     new_path="$unix_path"
22034   fi
22035 
22036   if test "x$path" != "x$new_path"; then
22037     BOOT_JDK="$new_path"
22038     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22039 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22040   fi
22041 
22042   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22043   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22044 
22045   else
22046     # We're on a posix platform. Hooray! :)
22047     path="$BOOT_JDK"
22048     has_space=`$ECHO "$path" | $GREP " "`
22049     if test "x$has_space" != x; then
22050       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22051 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22052       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22053     fi
22054 
22055     # Use eval to expand a potential ~
22056     eval path="$path"
22057     if test ! -f "$path" && test ! -d "$path"; then
22058       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22059     fi
22060 
22061     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22062   fi
22063 
22064               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22065 $as_echo_n "checking for Boot JDK... " >&6; }
22066               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22067 $as_echo "$BOOT_JDK" >&6; }
22068               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22069 $as_echo_n "checking Boot JDK version... " >&6; }
22070               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22071               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22072 $as_echo "$BOOT_JDK_VERSION" >&6; }
22073             fi # end check jdk version
22074           fi # end check rt.jar
22075         fi # end check javac
22076       fi # end check java
22077     fi # end check boot jdk found
22078   fi
22079 
22080 
22081   if test "x$BOOT_JDK_FOUND" = xno; then
22082     # Now execute the test
22083 
22084   if test "x$PROGRAMFILES" != x; then
22085     VIRTUAL_DIR="$PROGRAMFILES/Java"
22086 
22087   windows_path="$VIRTUAL_DIR"
22088   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22089     unix_path=`$CYGPATH -u "$windows_path"`
22090     VIRTUAL_DIR="$unix_path"
22091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22092     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22093     VIRTUAL_DIR="$unix_path"
22094   fi
22095 
22096 
22097   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22098   BOOT_JDK_SUFFIX=""
22099   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22100   if test "x$ALL_JDKS_FOUND" != x; then
22101     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22102 
22103   if test "x$BOOT_JDK_FOUND" = xno; then
22104     # Now execute the test
22105 
22106         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22107         if test -d "$BOOT_JDK"; then
22108           BOOT_JDK_FOUND=maybe
22109           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22110 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22111         fi
22112 
22113 
22114     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22115     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22116       # Do we have a bin/java?
22117       if test ! -x "$BOOT_JDK/bin/java"; then
22118         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22119 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22120         BOOT_JDK_FOUND=no
22121       else
22122         # Do we have a bin/javac?
22123         if test ! -x "$BOOT_JDK/bin/javac"; then
22124           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22125 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22126           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22127 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22128           BOOT_JDK_FOUND=no
22129         else
22130           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22131           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22132             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22133 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22134             BOOT_JDK_FOUND=no
22135           else
22136             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22137             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22138 
22139             # Extra M4 quote needed to protect [] in grep expression.
22140             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22141             if test "x$FOUND_VERSION_78" = x; then
22142               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22143 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22144               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22145 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22146               BOOT_JDK_FOUND=no
22147             else
22148               # We're done! :-)
22149               BOOT_JDK_FOUND=yes
22150 
22151   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22152 
22153   # Input might be given as Windows format, start by converting to
22154   # unix format.
22155   path="$BOOT_JDK"
22156   new_path=`$CYGPATH -u "$path"`
22157 
22158   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22159   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22160   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22161   # "foo.exe" is OK but "foo" is an error.
22162   #
22163   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22164   # It is also a way to make sure we got the proper file name for the real test later on.
22165   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22166   if test "x$test_shortpath" = x; then
22167     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22168 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22169     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22170   fi
22171 
22172   # Call helper function which possibly converts this using DOS-style short mode.
22173   # If so, the updated path is stored in $new_path.
22174 
22175   input_path="$new_path"
22176   # Check if we need to convert this using DOS-style short mode. If the path
22177   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22178   # take no chances and rewrite it.
22179   # Note: m4 eats our [], so we need to use [ and ] instead.
22180   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22181   if test "x$has_forbidden_chars" != x; then
22182     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22183     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22184     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22185     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22186       # Going to short mode and back again did indeed matter. Since short mode is
22187       # case insensitive, let's make it lowercase to improve readability.
22188       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22189       # Now convert it back to Unix-style (cygpath)
22190       input_path=`$CYGPATH -u "$shortmode_path"`
22191       new_path="$input_path"
22192     fi
22193   fi
22194 
22195   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22196   if test "x$test_cygdrive_prefix" = x; then
22197     # As a simple fix, exclude /usr/bin since it's not a real path.
22198     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22199       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22200       # a path prefixed by /cygdrive for fixpath to work.
22201       new_path="$CYGWIN_ROOT_PATH$input_path"
22202     fi
22203   fi
22204 
22205 
22206   if test "x$path" != "x$new_path"; then
22207     BOOT_JDK="$new_path"
22208     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22209 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22210   fi
22211 
22212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22213 
22214   path="$BOOT_JDK"
22215   has_colon=`$ECHO $path | $GREP ^.:`
22216   new_path="$path"
22217   if test "x$has_colon" = x; then
22218     # Not in mixed or Windows style, start by that.
22219     new_path=`cmd //c echo $path`
22220   fi
22221 
22222 
22223   input_path="$new_path"
22224   # Check if we need to convert this using DOS-style short mode. If the path
22225   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22226   # take no chances and rewrite it.
22227   # Note: m4 eats our [], so we need to use [ and ] instead.
22228   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22229   if test "x$has_forbidden_chars" != x; then
22230     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22231     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22232   fi
22233 
22234 
22235   windows_path="$new_path"
22236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22237     unix_path=`$CYGPATH -u "$windows_path"`
22238     new_path="$unix_path"
22239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22240     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22241     new_path="$unix_path"
22242   fi
22243 
22244   if test "x$path" != "x$new_path"; then
22245     BOOT_JDK="$new_path"
22246     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22247 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22248   fi
22249 
22250   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22251   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22252 
22253   else
22254     # We're on a posix platform. Hooray! :)
22255     path="$BOOT_JDK"
22256     has_space=`$ECHO "$path" | $GREP " "`
22257     if test "x$has_space" != x; then
22258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22259 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22260       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22261     fi
22262 
22263     # Use eval to expand a potential ~
22264     eval path="$path"
22265     if test ! -f "$path" && test ! -d "$path"; then
22266       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22267     fi
22268 
22269     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22270   fi
22271 
22272               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22273 $as_echo_n "checking for Boot JDK... " >&6; }
22274               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22275 $as_echo "$BOOT_JDK" >&6; }
22276               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22277 $as_echo_n "checking Boot JDK version... " >&6; }
22278               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22279               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22280 $as_echo "$BOOT_JDK_VERSION" >&6; }
22281             fi # end check jdk version
22282           fi # end check rt.jar
22283         fi # end check javac
22284       fi # end check java
22285     fi # end check boot jdk found
22286   fi
22287 
22288     done
22289   fi
22290 
22291   fi
22292 
22293 
22294     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22295     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22296       # Do we have a bin/java?
22297       if test ! -x "$BOOT_JDK/bin/java"; then
22298         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22299 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22300         BOOT_JDK_FOUND=no
22301       else
22302         # Do we have a bin/javac?
22303         if test ! -x "$BOOT_JDK/bin/javac"; then
22304           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22305 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22306           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22307 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22308           BOOT_JDK_FOUND=no
22309         else
22310           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22311           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22312             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22313 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22314             BOOT_JDK_FOUND=no
22315           else
22316             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22317             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22318 
22319             # Extra M4 quote needed to protect [] in grep expression.
22320             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22321             if test "x$FOUND_VERSION_78" = x; then
22322               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22323 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22324               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22325 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22326               BOOT_JDK_FOUND=no
22327             else
22328               # We're done! :-)
22329               BOOT_JDK_FOUND=yes
22330 
22331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22332 
22333   # Input might be given as Windows format, start by converting to
22334   # unix format.
22335   path="$BOOT_JDK"
22336   new_path=`$CYGPATH -u "$path"`
22337 
22338   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22339   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22340   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22341   # "foo.exe" is OK but "foo" is an error.
22342   #
22343   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22344   # It is also a way to make sure we got the proper file name for the real test later on.
22345   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22346   if test "x$test_shortpath" = x; then
22347     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22348 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22349     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22350   fi
22351 
22352   # Call helper function which possibly converts this using DOS-style short mode.
22353   # If so, the updated path is stored in $new_path.
22354 
22355   input_path="$new_path"
22356   # Check if we need to convert this using DOS-style short mode. If the path
22357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22358   # take no chances and rewrite it.
22359   # Note: m4 eats our [], so we need to use [ and ] instead.
22360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22361   if test "x$has_forbidden_chars" != x; then
22362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22363     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22364     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22365     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22366       # Going to short mode and back again did indeed matter. Since short mode is
22367       # case insensitive, let's make it lowercase to improve readability.
22368       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22369       # Now convert it back to Unix-style (cygpath)
22370       input_path=`$CYGPATH -u "$shortmode_path"`
22371       new_path="$input_path"
22372     fi
22373   fi
22374 
22375   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22376   if test "x$test_cygdrive_prefix" = x; then
22377     # As a simple fix, exclude /usr/bin since it's not a real path.
22378     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22379       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22380       # a path prefixed by /cygdrive for fixpath to work.
22381       new_path="$CYGWIN_ROOT_PATH$input_path"
22382     fi
22383   fi
22384 
22385 
22386   if test "x$path" != "x$new_path"; then
22387     BOOT_JDK="$new_path"
22388     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22389 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22390   fi
22391 
22392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22393 
22394   path="$BOOT_JDK"
22395   has_colon=`$ECHO $path | $GREP ^.:`
22396   new_path="$path"
22397   if test "x$has_colon" = x; then
22398     # Not in mixed or Windows style, start by that.
22399     new_path=`cmd //c echo $path`
22400   fi
22401 
22402 
22403   input_path="$new_path"
22404   # Check if we need to convert this using DOS-style short mode. If the path
22405   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22406   # take no chances and rewrite it.
22407   # Note: m4 eats our [], so we need to use [ and ] instead.
22408   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22409   if test "x$has_forbidden_chars" != x; then
22410     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22411     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22412   fi
22413 
22414 
22415   windows_path="$new_path"
22416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22417     unix_path=`$CYGPATH -u "$windows_path"`
22418     new_path="$unix_path"
22419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22421     new_path="$unix_path"
22422   fi
22423 
22424   if test "x$path" != "x$new_path"; then
22425     BOOT_JDK="$new_path"
22426     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22427 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22428   fi
22429 
22430   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22431   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22432 
22433   else
22434     # We're on a posix platform. Hooray! :)
22435     path="$BOOT_JDK"
22436     has_space=`$ECHO "$path" | $GREP " "`
22437     if test "x$has_space" != x; then
22438       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22439 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22440       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22441     fi
22442 
22443     # Use eval to expand a potential ~
22444     eval path="$path"
22445     if test ! -f "$path" && test ! -d "$path"; then
22446       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22447     fi
22448 
22449     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22450   fi
22451 
22452               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22453 $as_echo_n "checking for Boot JDK... " >&6; }
22454               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22455 $as_echo "$BOOT_JDK" >&6; }
22456               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22457 $as_echo_n "checking Boot JDK version... " >&6; }
22458               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22459               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22460 $as_echo "$BOOT_JDK_VERSION" >&6; }
22461             fi # end check jdk version
22462           fi # end check rt.jar
22463         fi # end check javac
22464       fi # end check java
22465     fi # end check boot jdk found
22466   fi
22467 
22468 
22469   if test "x$BOOT_JDK_FOUND" = xno; then
22470     # Now execute the test
22471 
22472   if test "x$ProgramFiles" != x; then
22473     VIRTUAL_DIR="$ProgramFiles/Java"
22474 
22475   windows_path="$VIRTUAL_DIR"
22476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22477     unix_path=`$CYGPATH -u "$windows_path"`
22478     VIRTUAL_DIR="$unix_path"
22479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22481     VIRTUAL_DIR="$unix_path"
22482   fi
22483 
22484 
22485   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22486   BOOT_JDK_SUFFIX=""
22487   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22488   if test "x$ALL_JDKS_FOUND" != x; then
22489     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22490 
22491   if test "x$BOOT_JDK_FOUND" = xno; then
22492     # Now execute the test
22493 
22494         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22495         if test -d "$BOOT_JDK"; then
22496           BOOT_JDK_FOUND=maybe
22497           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22498 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22499         fi
22500 
22501 
22502     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22503     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22504       # Do we have a bin/java?
22505       if test ! -x "$BOOT_JDK/bin/java"; then
22506         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22507 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22508         BOOT_JDK_FOUND=no
22509       else
22510         # Do we have a bin/javac?
22511         if test ! -x "$BOOT_JDK/bin/javac"; then
22512           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22513 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22514           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22515 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22516           BOOT_JDK_FOUND=no
22517         else
22518           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22519           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22520             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22521 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22522             BOOT_JDK_FOUND=no
22523           else
22524             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22525             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22526 
22527             # Extra M4 quote needed to protect [] in grep expression.
22528             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22529             if test "x$FOUND_VERSION_78" = x; then
22530               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22531 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22532               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22533 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22534               BOOT_JDK_FOUND=no
22535             else
22536               # We're done! :-)
22537               BOOT_JDK_FOUND=yes
22538 
22539   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22540 
22541   # Input might be given as Windows format, start by converting to
22542   # unix format.
22543   path="$BOOT_JDK"
22544   new_path=`$CYGPATH -u "$path"`
22545 
22546   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22547   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22548   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22549   # "foo.exe" is OK but "foo" is an error.
22550   #
22551   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22552   # It is also a way to make sure we got the proper file name for the real test later on.
22553   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22554   if test "x$test_shortpath" = x; then
22555     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22556 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22557     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22558   fi
22559 
22560   # Call helper function which possibly converts this using DOS-style short mode.
22561   # If so, the updated path is stored in $new_path.
22562 
22563   input_path="$new_path"
22564   # Check if we need to convert this using DOS-style short mode. If the path
22565   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22566   # take no chances and rewrite it.
22567   # Note: m4 eats our [], so we need to use [ and ] instead.
22568   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22569   if test "x$has_forbidden_chars" != x; then
22570     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22571     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22572     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22573     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22574       # Going to short mode and back again did indeed matter. Since short mode is
22575       # case insensitive, let's make it lowercase to improve readability.
22576       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22577       # Now convert it back to Unix-style (cygpath)
22578       input_path=`$CYGPATH -u "$shortmode_path"`
22579       new_path="$input_path"
22580     fi
22581   fi
22582 
22583   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22584   if test "x$test_cygdrive_prefix" = x; then
22585     # As a simple fix, exclude /usr/bin since it's not a real path.
22586     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22587       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22588       # a path prefixed by /cygdrive for fixpath to work.
22589       new_path="$CYGWIN_ROOT_PATH$input_path"
22590     fi
22591   fi
22592 
22593 
22594   if test "x$path" != "x$new_path"; then
22595     BOOT_JDK="$new_path"
22596     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22597 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22598   fi
22599 
22600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22601 
22602   path="$BOOT_JDK"
22603   has_colon=`$ECHO $path | $GREP ^.:`
22604   new_path="$path"
22605   if test "x$has_colon" = x; then
22606     # Not in mixed or Windows style, start by that.
22607     new_path=`cmd //c echo $path`
22608   fi
22609 
22610 
22611   input_path="$new_path"
22612   # Check if we need to convert this using DOS-style short mode. If the path
22613   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22614   # take no chances and rewrite it.
22615   # Note: m4 eats our [], so we need to use [ and ] instead.
22616   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22617   if test "x$has_forbidden_chars" != x; then
22618     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22619     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22620   fi
22621 
22622 
22623   windows_path="$new_path"
22624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22625     unix_path=`$CYGPATH -u "$windows_path"`
22626     new_path="$unix_path"
22627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22628     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22629     new_path="$unix_path"
22630   fi
22631 
22632   if test "x$path" != "x$new_path"; then
22633     BOOT_JDK="$new_path"
22634     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22635 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22636   fi
22637 
22638   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22639   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22640 
22641   else
22642     # We're on a posix platform. Hooray! :)
22643     path="$BOOT_JDK"
22644     has_space=`$ECHO "$path" | $GREP " "`
22645     if test "x$has_space" != x; then
22646       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22647 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22648       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22649     fi
22650 
22651     # Use eval to expand a potential ~
22652     eval path="$path"
22653     if test ! -f "$path" && test ! -d "$path"; then
22654       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22655     fi
22656 
22657     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22658   fi
22659 
22660               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22661 $as_echo_n "checking for Boot JDK... " >&6; }
22662               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22663 $as_echo "$BOOT_JDK" >&6; }
22664               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22665 $as_echo_n "checking Boot JDK version... " >&6; }
22666               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22667               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22668 $as_echo "$BOOT_JDK_VERSION" >&6; }
22669             fi # end check jdk version
22670           fi # end check rt.jar
22671         fi # end check javac
22672       fi # end check java
22673     fi # end check boot jdk found
22674   fi
22675 
22676     done
22677   fi
22678 
22679   fi
22680 
22681 
22682     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22683     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22684       # Do we have a bin/java?
22685       if test ! -x "$BOOT_JDK/bin/java"; then
22686         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22687 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22688         BOOT_JDK_FOUND=no
22689       else
22690         # Do we have a bin/javac?
22691         if test ! -x "$BOOT_JDK/bin/javac"; then
22692           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22693 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22694           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22695 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22696           BOOT_JDK_FOUND=no
22697         else
22698           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22699           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22700             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22701 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22702             BOOT_JDK_FOUND=no
22703           else
22704             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22705             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22706 
22707             # Extra M4 quote needed to protect [] in grep expression.
22708             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22709             if test "x$FOUND_VERSION_78" = x; then
22710               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22711 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22712               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22713 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22714               BOOT_JDK_FOUND=no
22715             else
22716               # We're done! :-)
22717               BOOT_JDK_FOUND=yes
22718 
22719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22720 
22721   # Input might be given as Windows format, start by converting to
22722   # unix format.
22723   path="$BOOT_JDK"
22724   new_path=`$CYGPATH -u "$path"`
22725 
22726   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22727   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22728   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22729   # "foo.exe" is OK but "foo" is an error.
22730   #
22731   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22732   # It is also a way to make sure we got the proper file name for the real test later on.
22733   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22734   if test "x$test_shortpath" = x; then
22735     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22736 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22737     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22738   fi
22739 
22740   # Call helper function which possibly converts this using DOS-style short mode.
22741   # If so, the updated path is stored in $new_path.
22742 
22743   input_path="$new_path"
22744   # Check if we need to convert this using DOS-style short mode. If the path
22745   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22746   # take no chances and rewrite it.
22747   # Note: m4 eats our [], so we need to use [ and ] instead.
22748   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22749   if test "x$has_forbidden_chars" != x; then
22750     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22751     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22752     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22753     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22754       # Going to short mode and back again did indeed matter. Since short mode is
22755       # case insensitive, let's make it lowercase to improve readability.
22756       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22757       # Now convert it back to Unix-style (cygpath)
22758       input_path=`$CYGPATH -u "$shortmode_path"`
22759       new_path="$input_path"
22760     fi
22761   fi
22762 
22763   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22764   if test "x$test_cygdrive_prefix" = x; then
22765     # As a simple fix, exclude /usr/bin since it's not a real path.
22766     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22767       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22768       # a path prefixed by /cygdrive for fixpath to work.
22769       new_path="$CYGWIN_ROOT_PATH$input_path"
22770     fi
22771   fi
22772 
22773 
22774   if test "x$path" != "x$new_path"; then
22775     BOOT_JDK="$new_path"
22776     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22777 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22778   fi
22779 
22780   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22781 
22782   path="$BOOT_JDK"
22783   has_colon=`$ECHO $path | $GREP ^.:`
22784   new_path="$path"
22785   if test "x$has_colon" = x; then
22786     # Not in mixed or Windows style, start by that.
22787     new_path=`cmd //c echo $path`
22788   fi
22789 
22790 
22791   input_path="$new_path"
22792   # Check if we need to convert this using DOS-style short mode. If the path
22793   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22794   # take no chances and rewrite it.
22795   # Note: m4 eats our [], so we need to use [ and ] instead.
22796   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22797   if test "x$has_forbidden_chars" != x; then
22798     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22799     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22800   fi
22801 
22802 
22803   windows_path="$new_path"
22804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22805     unix_path=`$CYGPATH -u "$windows_path"`
22806     new_path="$unix_path"
22807   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22808     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22809     new_path="$unix_path"
22810   fi
22811 
22812   if test "x$path" != "x$new_path"; then
22813     BOOT_JDK="$new_path"
22814     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22815 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22816   fi
22817 
22818   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22819   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22820 
22821   else
22822     # We're on a posix platform. Hooray! :)
22823     path="$BOOT_JDK"
22824     has_space=`$ECHO "$path" | $GREP " "`
22825     if test "x$has_space" != x; then
22826       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22827 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22828       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22829     fi
22830 
22831     # Use eval to expand a potential ~
22832     eval path="$path"
22833     if test ! -f "$path" && test ! -d "$path"; then
22834       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22835     fi
22836 
22837     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22838   fi
22839 
22840               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22841 $as_echo_n "checking for Boot JDK... " >&6; }
22842               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22843 $as_echo "$BOOT_JDK" >&6; }
22844               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22845 $as_echo_n "checking Boot JDK version... " >&6; }
22846               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22847               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22848 $as_echo "$BOOT_JDK_VERSION" >&6; }
22849             fi # end check jdk version
22850           fi # end check rt.jar
22851         fi # end check javac
22852       fi # end check java
22853     fi # end check boot jdk found
22854   fi
22855 
22856 
22857   if test "x$BOOT_JDK_FOUND" = xno; then
22858     # Now execute the test
22859 
22860   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
22861   BOOT_JDK_SUFFIX=""
22862   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22863   if test "x$ALL_JDKS_FOUND" != x; then
22864     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22865 
22866   if test "x$BOOT_JDK_FOUND" = xno; then
22867     # Now execute the test
22868 
22869         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22870         if test -d "$BOOT_JDK"; then
22871           BOOT_JDK_FOUND=maybe
22872           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22873 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22874         fi
22875 
22876 
22877     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22878     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22879       # Do we have a bin/java?
22880       if test ! -x "$BOOT_JDK/bin/java"; then
22881         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22882 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22883         BOOT_JDK_FOUND=no
22884       else
22885         # Do we have a bin/javac?
22886         if test ! -x "$BOOT_JDK/bin/javac"; then
22887           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22888 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22889           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22890 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22891           BOOT_JDK_FOUND=no
22892         else
22893           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22894           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22895             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22896 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22897             BOOT_JDK_FOUND=no
22898           else
22899             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22900             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22901 
22902             # Extra M4 quote needed to protect [] in grep expression.
22903             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22904             if test "x$FOUND_VERSION_78" = x; then
22905               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22906 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22907               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22908 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22909               BOOT_JDK_FOUND=no
22910             else
22911               # We're done! :-)
22912               BOOT_JDK_FOUND=yes
22913 
22914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22915 
22916   # Input might be given as Windows format, start by converting to
22917   # unix format.
22918   path="$BOOT_JDK"
22919   new_path=`$CYGPATH -u "$path"`
22920 
22921   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22922   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22923   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22924   # "foo.exe" is OK but "foo" is an error.
22925   #
22926   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22927   # It is also a way to make sure we got the proper file name for the real test later on.
22928   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22929   if test "x$test_shortpath" = x; then
22930     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22931 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22932     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22933   fi
22934 
22935   # Call helper function which possibly converts this using DOS-style short mode.
22936   # If so, the updated path is stored in $new_path.
22937 
22938   input_path="$new_path"
22939   # Check if we need to convert this using DOS-style short mode. If the path
22940   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22941   # take no chances and rewrite it.
22942   # Note: m4 eats our [], so we need to use [ and ] instead.
22943   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22944   if test "x$has_forbidden_chars" != x; then
22945     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22946     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22947     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22948     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22949       # Going to short mode and back again did indeed matter. Since short mode is
22950       # case insensitive, let's make it lowercase to improve readability.
22951       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22952       # Now convert it back to Unix-style (cygpath)
22953       input_path=`$CYGPATH -u "$shortmode_path"`
22954       new_path="$input_path"
22955     fi
22956   fi
22957 
22958   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22959   if test "x$test_cygdrive_prefix" = x; then
22960     # As a simple fix, exclude /usr/bin since it's not a real path.
22961     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22962       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22963       # a path prefixed by /cygdrive for fixpath to work.
22964       new_path="$CYGWIN_ROOT_PATH$input_path"
22965     fi
22966   fi
22967 
22968 
22969   if test "x$path" != "x$new_path"; then
22970     BOOT_JDK="$new_path"
22971     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22972 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22973   fi
22974 
22975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22976 
22977   path="$BOOT_JDK"
22978   has_colon=`$ECHO $path | $GREP ^.:`
22979   new_path="$path"
22980   if test "x$has_colon" = x; then
22981     # Not in mixed or Windows style, start by that.
22982     new_path=`cmd //c echo $path`
22983   fi
22984 
22985 
22986   input_path="$new_path"
22987   # Check if we need to convert this using DOS-style short mode. If the path
22988   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22989   # take no chances and rewrite it.
22990   # Note: m4 eats our [], so we need to use [ and ] instead.
22991   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22992   if test "x$has_forbidden_chars" != x; then
22993     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22994     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22995   fi
22996 
22997 
22998   windows_path="$new_path"
22999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23000     unix_path=`$CYGPATH -u "$windows_path"`
23001     new_path="$unix_path"
23002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23003     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23004     new_path="$unix_path"
23005   fi
23006 
23007   if test "x$path" != "x$new_path"; then
23008     BOOT_JDK="$new_path"
23009     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23010 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23011   fi
23012 
23013   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23014   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23015 
23016   else
23017     # We're on a posix platform. Hooray! :)
23018     path="$BOOT_JDK"
23019     has_space=`$ECHO "$path" | $GREP " "`
23020     if test "x$has_space" != x; then
23021       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23022 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23023       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23024     fi
23025 
23026     # Use eval to expand a potential ~
23027     eval path="$path"
23028     if test ! -f "$path" && test ! -d "$path"; then
23029       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23030     fi
23031 
23032     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23033   fi
23034 
23035               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23036 $as_echo_n "checking for Boot JDK... " >&6; }
23037               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23038 $as_echo "$BOOT_JDK" >&6; }
23039               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23040 $as_echo_n "checking Boot JDK version... " >&6; }
23041               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23042               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23043 $as_echo "$BOOT_JDK_VERSION" >&6; }
23044             fi # end check jdk version
23045           fi # end check rt.jar
23046         fi # end check javac
23047       fi # end check java
23048     fi # end check boot jdk found
23049   fi
23050 
23051     done
23052   fi
23053 
23054 
23055     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23056     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23057       # Do we have a bin/java?
23058       if test ! -x "$BOOT_JDK/bin/java"; then
23059         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23060 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23061         BOOT_JDK_FOUND=no
23062       else
23063         # Do we have a bin/javac?
23064         if test ! -x "$BOOT_JDK/bin/javac"; then
23065           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23066 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23067           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23068 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23069           BOOT_JDK_FOUND=no
23070         else
23071           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23072           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23073             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23074 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23075             BOOT_JDK_FOUND=no
23076           else
23077             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23078             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23079 
23080             # Extra M4 quote needed to protect [] in grep expression.
23081             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23082             if test "x$FOUND_VERSION_78" = x; then
23083               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23084 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23085               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23086 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23087               BOOT_JDK_FOUND=no
23088             else
23089               # We're done! :-)
23090               BOOT_JDK_FOUND=yes
23091 
23092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23093 
23094   # Input might be given as Windows format, start by converting to
23095   # unix format.
23096   path="$BOOT_JDK"
23097   new_path=`$CYGPATH -u "$path"`
23098 
23099   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23100   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23101   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23102   # "foo.exe" is OK but "foo" is an error.
23103   #
23104   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23105   # It is also a way to make sure we got the proper file name for the real test later on.
23106   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23107   if test "x$test_shortpath" = x; then
23108     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23109 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23110     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23111   fi
23112 
23113   # Call helper function which possibly converts this using DOS-style short mode.
23114   # If so, the updated path is stored in $new_path.
23115 
23116   input_path="$new_path"
23117   # Check if we need to convert this using DOS-style short mode. If the path
23118   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23119   # take no chances and rewrite it.
23120   # Note: m4 eats our [], so we need to use [ and ] instead.
23121   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23122   if test "x$has_forbidden_chars" != x; then
23123     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23124     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23125     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23126     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23127       # Going to short mode and back again did indeed matter. Since short mode is
23128       # case insensitive, let's make it lowercase to improve readability.
23129       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23130       # Now convert it back to Unix-style (cygpath)
23131       input_path=`$CYGPATH -u "$shortmode_path"`
23132       new_path="$input_path"
23133     fi
23134   fi
23135 
23136   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23137   if test "x$test_cygdrive_prefix" = x; then
23138     # As a simple fix, exclude /usr/bin since it's not a real path.
23139     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23140       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23141       # a path prefixed by /cygdrive for fixpath to work.
23142       new_path="$CYGWIN_ROOT_PATH$input_path"
23143     fi
23144   fi
23145 
23146 
23147   if test "x$path" != "x$new_path"; then
23148     BOOT_JDK="$new_path"
23149     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23150 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23151   fi
23152 
23153   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23154 
23155   path="$BOOT_JDK"
23156   has_colon=`$ECHO $path | $GREP ^.:`
23157   new_path="$path"
23158   if test "x$has_colon" = x; then
23159     # Not in mixed or Windows style, start by that.
23160     new_path=`cmd //c echo $path`
23161   fi
23162 
23163 
23164   input_path="$new_path"
23165   # Check if we need to convert this using DOS-style short mode. If the path
23166   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23167   # take no chances and rewrite it.
23168   # Note: m4 eats our [], so we need to use [ and ] instead.
23169   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23170   if test "x$has_forbidden_chars" != x; then
23171     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23172     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23173   fi
23174 
23175 
23176   windows_path="$new_path"
23177   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23178     unix_path=`$CYGPATH -u "$windows_path"`
23179     new_path="$unix_path"
23180   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23181     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23182     new_path="$unix_path"
23183   fi
23184 
23185   if test "x$path" != "x$new_path"; then
23186     BOOT_JDK="$new_path"
23187     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23188 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23189   fi
23190 
23191   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23192   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23193 
23194   else
23195     # We're on a posix platform. Hooray! :)
23196     path="$BOOT_JDK"
23197     has_space=`$ECHO "$path" | $GREP " "`
23198     if test "x$has_space" != x; then
23199       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23200 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23201       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23202     fi
23203 
23204     # Use eval to expand a potential ~
23205     eval path="$path"
23206     if test ! -f "$path" && test ! -d "$path"; then
23207       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23208     fi
23209 
23210     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23211   fi
23212 
23213               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23214 $as_echo_n "checking for Boot JDK... " >&6; }
23215               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23216 $as_echo "$BOOT_JDK" >&6; }
23217               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23218 $as_echo_n "checking Boot JDK version... " >&6; }
23219               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23220               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23221 $as_echo "$BOOT_JDK_VERSION" >&6; }
23222             fi # end check jdk version
23223           fi # end check rt.jar
23224         fi # end check javac
23225       fi # end check java
23226     fi # end check boot jdk found
23227   fi
23228 
23229   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23230 
23231   if test "x$BOOT_JDK_FOUND" = xno; then
23232     # Now execute the test
23233 
23234   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23235   BOOT_JDK_SUFFIX="/Contents/Home"
23236   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23237   if test "x$ALL_JDKS_FOUND" != x; then
23238     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23239 
23240   if test "x$BOOT_JDK_FOUND" = xno; then
23241     # Now execute the test
23242 
23243         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23244         if test -d "$BOOT_JDK"; then
23245           BOOT_JDK_FOUND=maybe
23246           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23247 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23248         fi
23249 
23250 
23251     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23252     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23253       # Do we have a bin/java?
23254       if test ! -x "$BOOT_JDK/bin/java"; then
23255         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23256 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23257         BOOT_JDK_FOUND=no
23258       else
23259         # Do we have a bin/javac?
23260         if test ! -x "$BOOT_JDK/bin/javac"; then
23261           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23262 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23263           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23264 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23265           BOOT_JDK_FOUND=no
23266         else
23267           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23268           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23269             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23270 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23271             BOOT_JDK_FOUND=no
23272           else
23273             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23274             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23275 
23276             # Extra M4 quote needed to protect [] in grep expression.
23277             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23278             if test "x$FOUND_VERSION_78" = x; then
23279               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23280 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23281               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23282 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23283               BOOT_JDK_FOUND=no
23284             else
23285               # We're done! :-)
23286               BOOT_JDK_FOUND=yes
23287 
23288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23289 
23290   # Input might be given as Windows format, start by converting to
23291   # unix format.
23292   path="$BOOT_JDK"
23293   new_path=`$CYGPATH -u "$path"`
23294 
23295   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23296   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23297   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23298   # "foo.exe" is OK but "foo" is an error.
23299   #
23300   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23301   # It is also a way to make sure we got the proper file name for the real test later on.
23302   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23303   if test "x$test_shortpath" = x; then
23304     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23305 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23306     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23307   fi
23308 
23309   # Call helper function which possibly converts this using DOS-style short mode.
23310   # If so, the updated path is stored in $new_path.
23311 
23312   input_path="$new_path"
23313   # Check if we need to convert this using DOS-style short mode. If the path
23314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23315   # take no chances and rewrite it.
23316   # Note: m4 eats our [], so we need to use [ and ] instead.
23317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23318   if test "x$has_forbidden_chars" != x; then
23319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23320     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23321     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23322     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23323       # Going to short mode and back again did indeed matter. Since short mode is
23324       # case insensitive, let's make it lowercase to improve readability.
23325       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23326       # Now convert it back to Unix-style (cygpath)
23327       input_path=`$CYGPATH -u "$shortmode_path"`
23328       new_path="$input_path"
23329     fi
23330   fi
23331 
23332   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23333   if test "x$test_cygdrive_prefix" = x; then
23334     # As a simple fix, exclude /usr/bin since it's not a real path.
23335     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23336       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23337       # a path prefixed by /cygdrive for fixpath to work.
23338       new_path="$CYGWIN_ROOT_PATH$input_path"
23339     fi
23340   fi
23341 
23342 
23343   if test "x$path" != "x$new_path"; then
23344     BOOT_JDK="$new_path"
23345     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23346 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23347   fi
23348 
23349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23350 
23351   path="$BOOT_JDK"
23352   has_colon=`$ECHO $path | $GREP ^.:`
23353   new_path="$path"
23354   if test "x$has_colon" = x; then
23355     # Not in mixed or Windows style, start by that.
23356     new_path=`cmd //c echo $path`
23357   fi
23358 
23359 
23360   input_path="$new_path"
23361   # Check if we need to convert this using DOS-style short mode. If the path
23362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23363   # take no chances and rewrite it.
23364   # Note: m4 eats our [], so we need to use [ and ] instead.
23365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23366   if test "x$has_forbidden_chars" != x; then
23367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23368     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23369   fi
23370 
23371 
23372   windows_path="$new_path"
23373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23374     unix_path=`$CYGPATH -u "$windows_path"`
23375     new_path="$unix_path"
23376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23378     new_path="$unix_path"
23379   fi
23380 
23381   if test "x$path" != "x$new_path"; then
23382     BOOT_JDK="$new_path"
23383     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23384 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23385   fi
23386 
23387   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23388   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23389 
23390   else
23391     # We're on a posix platform. Hooray! :)
23392     path="$BOOT_JDK"
23393     has_space=`$ECHO "$path" | $GREP " "`
23394     if test "x$has_space" != x; then
23395       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23396 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23397       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23398     fi
23399 
23400     # Use eval to expand a potential ~
23401     eval path="$path"
23402     if test ! -f "$path" && test ! -d "$path"; then
23403       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23404     fi
23405 
23406     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23407   fi
23408 
23409               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23410 $as_echo_n "checking for Boot JDK... " >&6; }
23411               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23412 $as_echo "$BOOT_JDK" >&6; }
23413               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23414 $as_echo_n "checking Boot JDK version... " >&6; }
23415               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23416               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23417 $as_echo "$BOOT_JDK_VERSION" >&6; }
23418             fi # end check jdk version
23419           fi # end check rt.jar
23420         fi # end check javac
23421       fi # end check java
23422     fi # end check boot jdk found
23423   fi
23424 
23425     done
23426   fi
23427 
23428 
23429     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23430     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23431       # Do we have a bin/java?
23432       if test ! -x "$BOOT_JDK/bin/java"; then
23433         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23434 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23435         BOOT_JDK_FOUND=no
23436       else
23437         # Do we have a bin/javac?
23438         if test ! -x "$BOOT_JDK/bin/javac"; then
23439           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23440 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23441           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23442 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23443           BOOT_JDK_FOUND=no
23444         else
23445           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23446           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23447             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23448 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23449             BOOT_JDK_FOUND=no
23450           else
23451             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23452             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23453 
23454             # Extra M4 quote needed to protect [] in grep expression.
23455             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23456             if test "x$FOUND_VERSION_78" = x; then
23457               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23458 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23459               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23460 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23461               BOOT_JDK_FOUND=no
23462             else
23463               # We're done! :-)
23464               BOOT_JDK_FOUND=yes
23465 
23466   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23467 
23468   # Input might be given as Windows format, start by converting to
23469   # unix format.
23470   path="$BOOT_JDK"
23471   new_path=`$CYGPATH -u "$path"`
23472 
23473   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23474   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23475   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23476   # "foo.exe" is OK but "foo" is an error.
23477   #
23478   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23479   # It is also a way to make sure we got the proper file name for the real test later on.
23480   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23481   if test "x$test_shortpath" = x; then
23482     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23483 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23484     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23485   fi
23486 
23487   # Call helper function which possibly converts this using DOS-style short mode.
23488   # If so, the updated path is stored in $new_path.
23489 
23490   input_path="$new_path"
23491   # Check if we need to convert this using DOS-style short mode. If the path
23492   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23493   # take no chances and rewrite it.
23494   # Note: m4 eats our [], so we need to use [ and ] instead.
23495   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23496   if test "x$has_forbidden_chars" != x; then
23497     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23498     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23499     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23500     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23501       # Going to short mode and back again did indeed matter. Since short mode is
23502       # case insensitive, let's make it lowercase to improve readability.
23503       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23504       # Now convert it back to Unix-style (cygpath)
23505       input_path=`$CYGPATH -u "$shortmode_path"`
23506       new_path="$input_path"
23507     fi
23508   fi
23509 
23510   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23511   if test "x$test_cygdrive_prefix" = x; then
23512     # As a simple fix, exclude /usr/bin since it's not a real path.
23513     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23514       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23515       # a path prefixed by /cygdrive for fixpath to work.
23516       new_path="$CYGWIN_ROOT_PATH$input_path"
23517     fi
23518   fi
23519 
23520 
23521   if test "x$path" != "x$new_path"; then
23522     BOOT_JDK="$new_path"
23523     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23524 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23525   fi
23526 
23527   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23528 
23529   path="$BOOT_JDK"
23530   has_colon=`$ECHO $path | $GREP ^.:`
23531   new_path="$path"
23532   if test "x$has_colon" = x; then
23533     # Not in mixed or Windows style, start by that.
23534     new_path=`cmd //c echo $path`
23535   fi
23536 
23537 
23538   input_path="$new_path"
23539   # Check if we need to convert this using DOS-style short mode. If the path
23540   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23541   # take no chances and rewrite it.
23542   # Note: m4 eats our [], so we need to use [ and ] instead.
23543   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23544   if test "x$has_forbidden_chars" != x; then
23545     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23546     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23547   fi
23548 
23549 
23550   windows_path="$new_path"
23551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23552     unix_path=`$CYGPATH -u "$windows_path"`
23553     new_path="$unix_path"
23554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23555     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23556     new_path="$unix_path"
23557   fi
23558 
23559   if test "x$path" != "x$new_path"; then
23560     BOOT_JDK="$new_path"
23561     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23562 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23563   fi
23564 
23565   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23566   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23567 
23568   else
23569     # We're on a posix platform. Hooray! :)
23570     path="$BOOT_JDK"
23571     has_space=`$ECHO "$path" | $GREP " "`
23572     if test "x$has_space" != x; then
23573       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23574 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23575       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23576     fi
23577 
23578     # Use eval to expand a potential ~
23579     eval path="$path"
23580     if test ! -f "$path" && test ! -d "$path"; then
23581       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23582     fi
23583 
23584     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23585   fi
23586 
23587               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23588 $as_echo_n "checking for Boot JDK... " >&6; }
23589               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23590 $as_echo "$BOOT_JDK" >&6; }
23591               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23592 $as_echo_n "checking Boot JDK version... " >&6; }
23593               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23594               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23595 $as_echo "$BOOT_JDK_VERSION" >&6; }
23596             fi # end check jdk version
23597           fi # end check rt.jar
23598         fi # end check javac
23599       fi # end check java
23600     fi # end check boot jdk found
23601   fi
23602 
23603 
23604   if test "x$BOOT_JDK_FOUND" = xno; then
23605     # Now execute the test
23606 
23607   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
23608   BOOT_JDK_SUFFIX="/Contents/Home"
23609   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23610   if test "x$ALL_JDKS_FOUND" != x; then
23611     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23612 
23613   if test "x$BOOT_JDK_FOUND" = xno; then
23614     # Now execute the test
23615 
23616         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23617         if test -d "$BOOT_JDK"; then
23618           BOOT_JDK_FOUND=maybe
23619           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23620 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23621         fi
23622 
23623 
23624     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23625     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23626       # Do we have a bin/java?
23627       if test ! -x "$BOOT_JDK/bin/java"; then
23628         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23629 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23630         BOOT_JDK_FOUND=no
23631       else
23632         # Do we have a bin/javac?
23633         if test ! -x "$BOOT_JDK/bin/javac"; then
23634           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23635 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23636           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23637 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23638           BOOT_JDK_FOUND=no
23639         else
23640           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23641           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23642             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23643 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23644             BOOT_JDK_FOUND=no
23645           else
23646             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23647             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23648 
23649             # Extra M4 quote needed to protect [] in grep expression.
23650             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23651             if test "x$FOUND_VERSION_78" = x; then
23652               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23653 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23654               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23655 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23656               BOOT_JDK_FOUND=no
23657             else
23658               # We're done! :-)
23659               BOOT_JDK_FOUND=yes
23660 
23661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23662 
23663   # Input might be given as Windows format, start by converting to
23664   # unix format.
23665   path="$BOOT_JDK"
23666   new_path=`$CYGPATH -u "$path"`
23667 
23668   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23669   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23670   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23671   # "foo.exe" is OK but "foo" is an error.
23672   #
23673   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23674   # It is also a way to make sure we got the proper file name for the real test later on.
23675   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23676   if test "x$test_shortpath" = x; then
23677     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23678 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23679     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23680   fi
23681 
23682   # Call helper function which possibly converts this using DOS-style short mode.
23683   # If so, the updated path is stored in $new_path.
23684 
23685   input_path="$new_path"
23686   # Check if we need to convert this using DOS-style short mode. If the path
23687   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23688   # take no chances and rewrite it.
23689   # Note: m4 eats our [], so we need to use [ and ] instead.
23690   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23691   if test "x$has_forbidden_chars" != x; then
23692     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23693     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23694     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23695     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23696       # Going to short mode and back again did indeed matter. Since short mode is
23697       # case insensitive, let's make it lowercase to improve readability.
23698       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23699       # Now convert it back to Unix-style (cygpath)
23700       input_path=`$CYGPATH -u "$shortmode_path"`
23701       new_path="$input_path"
23702     fi
23703   fi
23704 
23705   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23706   if test "x$test_cygdrive_prefix" = x; then
23707     # As a simple fix, exclude /usr/bin since it's not a real path.
23708     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23709       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23710       # a path prefixed by /cygdrive for fixpath to work.
23711       new_path="$CYGWIN_ROOT_PATH$input_path"
23712     fi
23713   fi
23714 
23715 
23716   if test "x$path" != "x$new_path"; then
23717     BOOT_JDK="$new_path"
23718     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23719 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23720   fi
23721 
23722   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23723 
23724   path="$BOOT_JDK"
23725   has_colon=`$ECHO $path | $GREP ^.:`
23726   new_path="$path"
23727   if test "x$has_colon" = x; then
23728     # Not in mixed or Windows style, start by that.
23729     new_path=`cmd //c echo $path`
23730   fi
23731 
23732 
23733   input_path="$new_path"
23734   # Check if we need to convert this using DOS-style short mode. If the path
23735   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23736   # take no chances and rewrite it.
23737   # Note: m4 eats our [], so we need to use [ and ] instead.
23738   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23739   if test "x$has_forbidden_chars" != x; then
23740     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23741     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23742   fi
23743 
23744 
23745   windows_path="$new_path"
23746   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23747     unix_path=`$CYGPATH -u "$windows_path"`
23748     new_path="$unix_path"
23749   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23750     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23751     new_path="$unix_path"
23752   fi
23753 
23754   if test "x$path" != "x$new_path"; then
23755     BOOT_JDK="$new_path"
23756     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23757 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23758   fi
23759 
23760   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23761   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23762 
23763   else
23764     # We're on a posix platform. Hooray! :)
23765     path="$BOOT_JDK"
23766     has_space=`$ECHO "$path" | $GREP " "`
23767     if test "x$has_space" != x; then
23768       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23769 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23770       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23771     fi
23772 
23773     # Use eval to expand a potential ~
23774     eval path="$path"
23775     if test ! -f "$path" && test ! -d "$path"; then
23776       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23777     fi
23778 
23779     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23780   fi
23781 
23782               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23783 $as_echo_n "checking for Boot JDK... " >&6; }
23784               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23785 $as_echo "$BOOT_JDK" >&6; }
23786               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23787 $as_echo_n "checking Boot JDK version... " >&6; }
23788               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23789               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23790 $as_echo "$BOOT_JDK_VERSION" >&6; }
23791             fi # end check jdk version
23792           fi # end check rt.jar
23793         fi # end check javac
23794       fi # end check java
23795     fi # end check boot jdk found
23796   fi
23797 
23798     done
23799   fi
23800 
23801 
23802     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23803     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23804       # Do we have a bin/java?
23805       if test ! -x "$BOOT_JDK/bin/java"; then
23806         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23807 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23808         BOOT_JDK_FOUND=no
23809       else
23810         # Do we have a bin/javac?
23811         if test ! -x "$BOOT_JDK/bin/javac"; then
23812           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23813 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23814           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23815 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23816           BOOT_JDK_FOUND=no
23817         else
23818           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23819           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23820             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23821 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23822             BOOT_JDK_FOUND=no
23823           else
23824             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23825             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23826 
23827             # Extra M4 quote needed to protect [] in grep expression.
23828             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23829             if test "x$FOUND_VERSION_78" = x; then
23830               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23831 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23832               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23833 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23834               BOOT_JDK_FOUND=no
23835             else
23836               # We're done! :-)
23837               BOOT_JDK_FOUND=yes
23838 
23839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23840 
23841   # Input might be given as Windows format, start by converting to
23842   # unix format.
23843   path="$BOOT_JDK"
23844   new_path=`$CYGPATH -u "$path"`
23845 
23846   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23847   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23848   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23849   # "foo.exe" is OK but "foo" is an error.
23850   #
23851   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23852   # It is also a way to make sure we got the proper file name for the real test later on.
23853   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23854   if test "x$test_shortpath" = x; then
23855     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23856 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23857     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23858   fi
23859 
23860   # Call helper function which possibly converts this using DOS-style short mode.
23861   # If so, the updated path is stored in $new_path.
23862 
23863   input_path="$new_path"
23864   # Check if we need to convert this using DOS-style short mode. If the path
23865   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23866   # take no chances and rewrite it.
23867   # Note: m4 eats our [], so we need to use [ and ] instead.
23868   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23869   if test "x$has_forbidden_chars" != x; then
23870     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23871     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23872     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23873     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23874       # Going to short mode and back again did indeed matter. Since short mode is
23875       # case insensitive, let's make it lowercase to improve readability.
23876       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23877       # Now convert it back to Unix-style (cygpath)
23878       input_path=`$CYGPATH -u "$shortmode_path"`
23879       new_path="$input_path"
23880     fi
23881   fi
23882 
23883   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23884   if test "x$test_cygdrive_prefix" = x; then
23885     # As a simple fix, exclude /usr/bin since it's not a real path.
23886     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23887       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23888       # a path prefixed by /cygdrive for fixpath to work.
23889       new_path="$CYGWIN_ROOT_PATH$input_path"
23890     fi
23891   fi
23892 
23893 
23894   if test "x$path" != "x$new_path"; then
23895     BOOT_JDK="$new_path"
23896     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23897 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23898   fi
23899 
23900   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23901 
23902   path="$BOOT_JDK"
23903   has_colon=`$ECHO $path | $GREP ^.:`
23904   new_path="$path"
23905   if test "x$has_colon" = x; then
23906     # Not in mixed or Windows style, start by that.
23907     new_path=`cmd //c echo $path`
23908   fi
23909 
23910 
23911   input_path="$new_path"
23912   # Check if we need to convert this using DOS-style short mode. If the path
23913   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23914   # take no chances and rewrite it.
23915   # Note: m4 eats our [], so we need to use [ and ] instead.
23916   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23917   if test "x$has_forbidden_chars" != x; then
23918     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23919     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23920   fi
23921 
23922 
23923   windows_path="$new_path"
23924   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23925     unix_path=`$CYGPATH -u "$windows_path"`
23926     new_path="$unix_path"
23927   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23928     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23929     new_path="$unix_path"
23930   fi
23931 
23932   if test "x$path" != "x$new_path"; then
23933     BOOT_JDK="$new_path"
23934     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23935 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23936   fi
23937 
23938   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23939   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23940 
23941   else
23942     # We're on a posix platform. Hooray! :)
23943     path="$BOOT_JDK"
23944     has_space=`$ECHO "$path" | $GREP " "`
23945     if test "x$has_space" != x; then
23946       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23947 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23948       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23949     fi
23950 
23951     # Use eval to expand a potential ~
23952     eval path="$path"
23953     if test ! -f "$path" && test ! -d "$path"; then
23954       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23955     fi
23956 
23957     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23958   fi
23959 
23960               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23961 $as_echo_n "checking for Boot JDK... " >&6; }
23962               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23963 $as_echo "$BOOT_JDK" >&6; }
23964               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23965 $as_echo_n "checking Boot JDK version... " >&6; }
23966               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23967               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23968 $as_echo "$BOOT_JDK_VERSION" >&6; }
23969             fi # end check jdk version
23970           fi # end check rt.jar
23971         fi # end check javac
23972       fi # end check java
23973     fi # end check boot jdk found
23974   fi
23975 
23976   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
23977 
23978   if test "x$BOOT_JDK_FOUND" = xno; then
23979     # Now execute the test
23980 
23981   BOOT_JDK_PREFIX="/usr/lib/jvm"
23982   BOOT_JDK_SUFFIX=""
23983   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23984   if test "x$ALL_JDKS_FOUND" != x; then
23985     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23986 
23987   if test "x$BOOT_JDK_FOUND" = xno; then
23988     # Now execute the test
23989 
23990         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23991         if test -d "$BOOT_JDK"; then
23992           BOOT_JDK_FOUND=maybe
23993           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23994 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23995         fi
23996 
23997 
23998     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23999     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24000       # Do we have a bin/java?
24001       if test ! -x "$BOOT_JDK/bin/java"; then
24002         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24003 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24004         BOOT_JDK_FOUND=no
24005       else
24006         # Do we have a bin/javac?
24007         if test ! -x "$BOOT_JDK/bin/javac"; then
24008           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24009 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24010           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24011 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24012           BOOT_JDK_FOUND=no
24013         else
24014           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24015           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24016             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24017 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24018             BOOT_JDK_FOUND=no
24019           else
24020             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24021             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24022 
24023             # Extra M4 quote needed to protect [] in grep expression.
24024             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
24025             if test "x$FOUND_VERSION_78" = x; then
24026               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24027 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24028               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
24029 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
24030               BOOT_JDK_FOUND=no
24031             else
24032               # We're done! :-)
24033               BOOT_JDK_FOUND=yes
24034 
24035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24036 
24037   # Input might be given as Windows format, start by converting to
24038   # unix format.
24039   path="$BOOT_JDK"
24040   new_path=`$CYGPATH -u "$path"`
24041 
24042   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24043   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24044   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24045   # "foo.exe" is OK but "foo" is an error.
24046   #
24047   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24048   # It is also a way to make sure we got the proper file name for the real test later on.
24049   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24050   if test "x$test_shortpath" = x; then
24051     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24052 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24053     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24054   fi
24055 
24056   # Call helper function which possibly converts this using DOS-style short mode.
24057   # If so, the updated path is stored in $new_path.
24058 
24059   input_path="$new_path"
24060   # Check if we need to convert this using DOS-style short mode. If the path
24061   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24062   # take no chances and rewrite it.
24063   # Note: m4 eats our [], so we need to use [ and ] instead.
24064   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24065   if test "x$has_forbidden_chars" != x; then
24066     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24067     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24068     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24069     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24070       # Going to short mode and back again did indeed matter. Since short mode is
24071       # case insensitive, let's make it lowercase to improve readability.
24072       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24073       # Now convert it back to Unix-style (cygpath)
24074       input_path=`$CYGPATH -u "$shortmode_path"`
24075       new_path="$input_path"
24076     fi
24077   fi
24078 
24079   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24080   if test "x$test_cygdrive_prefix" = x; then
24081     # As a simple fix, exclude /usr/bin since it's not a real path.
24082     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24083       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24084       # a path prefixed by /cygdrive for fixpath to work.
24085       new_path="$CYGWIN_ROOT_PATH$input_path"
24086     fi
24087   fi
24088 
24089 
24090   if test "x$path" != "x$new_path"; then
24091     BOOT_JDK="$new_path"
24092     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24093 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24094   fi
24095 
24096   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24097 
24098   path="$BOOT_JDK"
24099   has_colon=`$ECHO $path | $GREP ^.:`
24100   new_path="$path"
24101   if test "x$has_colon" = x; then
24102     # Not in mixed or Windows style, start by that.
24103     new_path=`cmd //c echo $path`
24104   fi
24105 
24106 
24107   input_path="$new_path"
24108   # Check if we need to convert this using DOS-style short mode. If the path
24109   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24110   # take no chances and rewrite it.
24111   # Note: m4 eats our [], so we need to use [ and ] instead.
24112   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24113   if test "x$has_forbidden_chars" != x; then
24114     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24115     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24116   fi
24117 
24118 
24119   windows_path="$new_path"
24120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24121     unix_path=`$CYGPATH -u "$windows_path"`
24122     new_path="$unix_path"
24123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24124     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24125     new_path="$unix_path"
24126   fi
24127 
24128   if test "x$path" != "x$new_path"; then
24129     BOOT_JDK="$new_path"
24130     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24131 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24132   fi
24133 
24134   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24135   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24136 
24137   else
24138     # We're on a posix platform. Hooray! :)
24139     path="$BOOT_JDK"
24140     has_space=`$ECHO "$path" | $GREP " "`
24141     if test "x$has_space" != x; then
24142       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24143 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24144       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24145     fi
24146 
24147     # Use eval to expand a potential ~
24148     eval path="$path"
24149     if test ! -f "$path" && test ! -d "$path"; then
24150       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24151     fi
24152 
24153     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24154   fi
24155 
24156               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24157 $as_echo_n "checking for Boot JDK... " >&6; }
24158               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24159 $as_echo "$BOOT_JDK" >&6; }
24160               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24161 $as_echo_n "checking Boot JDK version... " >&6; }
24162               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24163               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24164 $as_echo "$BOOT_JDK_VERSION" >&6; }
24165             fi # end check jdk version
24166           fi # end check rt.jar
24167         fi # end check javac
24168       fi # end check java
24169     fi # end check boot jdk found
24170   fi
24171 
24172     done
24173   fi
24174 
24175 
24176     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24177     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24178       # Do we have a bin/java?
24179       if test ! -x "$BOOT_JDK/bin/java"; then
24180         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24181 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24182         BOOT_JDK_FOUND=no
24183       else
24184         # Do we have a bin/javac?
24185         if test ! -x "$BOOT_JDK/bin/javac"; then
24186           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24187 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24188           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24189 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24190           BOOT_JDK_FOUND=no
24191         else
24192           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24193           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24194             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24195 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24196             BOOT_JDK_FOUND=no
24197           else
24198             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24199             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24200 
24201             # Extra M4 quote needed to protect [] in grep expression.
24202             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
24203             if test "x$FOUND_VERSION_78" = x; then
24204               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24205 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24206               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
24207 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
24208               BOOT_JDK_FOUND=no
24209             else
24210               # We're done! :-)
24211               BOOT_JDK_FOUND=yes
24212 
24213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24214 
24215   # Input might be given as Windows format, start by converting to
24216   # unix format.
24217   path="$BOOT_JDK"
24218   new_path=`$CYGPATH -u "$path"`
24219 
24220   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24221   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24222   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24223   # "foo.exe" is OK but "foo" is an error.
24224   #
24225   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24226   # It is also a way to make sure we got the proper file name for the real test later on.
24227   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24228   if test "x$test_shortpath" = x; then
24229     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24230 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24231     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24232   fi
24233 
24234   # Call helper function which possibly converts this using DOS-style short mode.
24235   # If so, the updated path is stored in $new_path.
24236 
24237   input_path="$new_path"
24238   # Check if we need to convert this using DOS-style short mode. If the path
24239   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24240   # take no chances and rewrite it.
24241   # Note: m4 eats our [], so we need to use [ and ] instead.
24242   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24243   if test "x$has_forbidden_chars" != x; then
24244     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24245     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24246     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24247     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24248       # Going to short mode and back again did indeed matter. Since short mode is
24249       # case insensitive, let's make it lowercase to improve readability.
24250       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24251       # Now convert it back to Unix-style (cygpath)
24252       input_path=`$CYGPATH -u "$shortmode_path"`
24253       new_path="$input_path"
24254     fi
24255   fi
24256 
24257   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24258   if test "x$test_cygdrive_prefix" = x; then
24259     # As a simple fix, exclude /usr/bin since it's not a real path.
24260     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24261       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24262       # a path prefixed by /cygdrive for fixpath to work.
24263       new_path="$CYGWIN_ROOT_PATH$input_path"
24264     fi
24265   fi
24266 
24267 
24268   if test "x$path" != "x$new_path"; then
24269     BOOT_JDK="$new_path"
24270     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24271 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24272   fi
24273 
24274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24275 
24276   path="$BOOT_JDK"
24277   has_colon=`$ECHO $path | $GREP ^.:`
24278   new_path="$path"
24279   if test "x$has_colon" = x; then
24280     # Not in mixed or Windows style, start by that.
24281     new_path=`cmd //c echo $path`
24282   fi
24283 
24284 
24285   input_path="$new_path"
24286   # Check if we need to convert this using DOS-style short mode. If the path
24287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24288   # take no chances and rewrite it.
24289   # Note: m4 eats our [], so we need to use [ and ] instead.
24290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24291   if test "x$has_forbidden_chars" != x; then
24292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24293     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24294   fi
24295 
24296 
24297   windows_path="$new_path"
24298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24299     unix_path=`$CYGPATH -u "$windows_path"`
24300     new_path="$unix_path"
24301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24302     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24303     new_path="$unix_path"
24304   fi
24305 
24306   if test "x$path" != "x$new_path"; then
24307     BOOT_JDK="$new_path"
24308     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24309 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24310   fi
24311 
24312   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24313   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24314 
24315   else
24316     # We're on a posix platform. Hooray! :)
24317     path="$BOOT_JDK"
24318     has_space=`$ECHO "$path" | $GREP " "`
24319     if test "x$has_space" != x; then
24320       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24321 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24322       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24323     fi
24324 
24325     # Use eval to expand a potential ~
24326     eval path="$path"
24327     if test ! -f "$path" && test ! -d "$path"; then
24328       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24329     fi
24330 
24331     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24332   fi
24333 
24334               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24335 $as_echo_n "checking for Boot JDK... " >&6; }
24336               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24337 $as_echo "$BOOT_JDK" >&6; }
24338               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24339 $as_echo_n "checking Boot JDK version... " >&6; }
24340               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24341               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24342 $as_echo "$BOOT_JDK_VERSION" >&6; }
24343             fi # end check jdk version
24344           fi # end check rt.jar
24345         fi # end check javac
24346       fi # end check java
24347     fi # end check boot jdk found
24348   fi
24349 
24350   fi
24351 
24352 
24353     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24354     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24355       # Do we have a bin/java?
24356       if test ! -x "$BOOT_JDK/bin/java"; then
24357         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24358 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24359         BOOT_JDK_FOUND=no
24360       else
24361         # Do we have a bin/javac?
24362         if test ! -x "$BOOT_JDK/bin/javac"; then
24363           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24364 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24365           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24366 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24367           BOOT_JDK_FOUND=no
24368         else
24369           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24370           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24371             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24372 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24373             BOOT_JDK_FOUND=no
24374           else
24375             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24376             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24377 
24378             # Extra M4 quote needed to protect [] in grep expression.
24379             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
24380             if test "x$FOUND_VERSION_78" = x; then
24381               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24382 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24383               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
24384 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
24385               BOOT_JDK_FOUND=no
24386             else
24387               # We're done! :-)
24388               BOOT_JDK_FOUND=yes
24389 
24390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24391 
24392   # Input might be given as Windows format, start by converting to
24393   # unix format.
24394   path="$BOOT_JDK"
24395   new_path=`$CYGPATH -u "$path"`
24396 
24397   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24398   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24399   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24400   # "foo.exe" is OK but "foo" is an error.
24401   #
24402   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24403   # It is also a way to make sure we got the proper file name for the real test later on.
24404   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24405   if test "x$test_shortpath" = x; then
24406     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24407 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24408     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24409   fi
24410 
24411   # Call helper function which possibly converts this using DOS-style short mode.
24412   # If so, the updated path is stored in $new_path.
24413 
24414   input_path="$new_path"
24415   # Check if we need to convert this using DOS-style short mode. If the path
24416   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24417   # take no chances and rewrite it.
24418   # Note: m4 eats our [], so we need to use [ and ] instead.
24419   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24420   if test "x$has_forbidden_chars" != x; then
24421     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24422     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24423     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24424     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24425       # Going to short mode and back again did indeed matter. Since short mode is
24426       # case insensitive, let's make it lowercase to improve readability.
24427       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24428       # Now convert it back to Unix-style (cygpath)
24429       input_path=`$CYGPATH -u "$shortmode_path"`
24430       new_path="$input_path"
24431     fi
24432   fi
24433 
24434   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24435   if test "x$test_cygdrive_prefix" = x; then
24436     # As a simple fix, exclude /usr/bin since it's not a real path.
24437     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24438       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24439       # a path prefixed by /cygdrive for fixpath to work.
24440       new_path="$CYGWIN_ROOT_PATH$input_path"
24441     fi
24442   fi
24443 
24444 
24445   if test "x$path" != "x$new_path"; then
24446     BOOT_JDK="$new_path"
24447     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24448 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24449   fi
24450 
24451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24452 
24453   path="$BOOT_JDK"
24454   has_colon=`$ECHO $path | $GREP ^.:`
24455   new_path="$path"
24456   if test "x$has_colon" = x; then
24457     # Not in mixed or Windows style, start by that.
24458     new_path=`cmd //c echo $path`
24459   fi
24460 
24461 
24462   input_path="$new_path"
24463   # Check if we need to convert this using DOS-style short mode. If the path
24464   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24465   # take no chances and rewrite it.
24466   # Note: m4 eats our [], so we need to use [ and ] instead.
24467   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24468   if test "x$has_forbidden_chars" != x; then
24469     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24470     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24471   fi
24472 
24473 
24474   windows_path="$new_path"
24475   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24476     unix_path=`$CYGPATH -u "$windows_path"`
24477     new_path="$unix_path"
24478   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24479     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24480     new_path="$unix_path"
24481   fi
24482 
24483   if test "x$path" != "x$new_path"; then
24484     BOOT_JDK="$new_path"
24485     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24486 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24487   fi
24488 
24489   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24490   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24491 
24492   else
24493     # We're on a posix platform. Hooray! :)
24494     path="$BOOT_JDK"
24495     has_space=`$ECHO "$path" | $GREP " "`
24496     if test "x$has_space" != x; then
24497       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24498 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24499       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24500     fi
24501 
24502     # Use eval to expand a potential ~
24503     eval path="$path"
24504     if test ! -f "$path" && test ! -d "$path"; then
24505       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24506     fi
24507 
24508     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24509   fi
24510 
24511               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24512 $as_echo_n "checking for Boot JDK... " >&6; }
24513               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24514 $as_echo "$BOOT_JDK" >&6; }
24515               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24516 $as_echo_n "checking Boot JDK version... " >&6; }
24517               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24518               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24519 $as_echo "$BOOT_JDK_VERSION" >&6; }
24520             fi # end check jdk version
24521           fi # end check rt.jar
24522         fi # end check javac
24523       fi # end check java
24524     fi # end check boot jdk found
24525   fi
24526 
24527 
24528   # If we haven't found anything yet, we've truly lost. Give up.
24529   if test "x$BOOT_JDK_FOUND" = xno; then
24530 
24531   # Print a helpful message on how to acquire the necessary build dependency.
24532   # openjdk is the help tag: freetype, cups, pulse, alsa etc
24533   MISSING_DEPENDENCY=openjdk
24534 
24535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24536     cygwin_help $MISSING_DEPENDENCY
24537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24538     msys_help $MISSING_DEPENDENCY
24539   else
24540     PKGHANDLER_COMMAND=
24541 
24542     case $PKGHANDLER in
24543       apt-get)
24544         apt_help     $MISSING_DEPENDENCY ;;
24545       yum)
24546         yum_help     $MISSING_DEPENDENCY ;;
24547       port)
24548         port_help    $MISSING_DEPENDENCY ;;
24549       pkgutil)
24550         pkgutil_help $MISSING_DEPENDENCY ;;
24551       pkgadd)
24552         pkgadd_help  $MISSING_DEPENDENCY ;;
24553     esac
24554 
24555     if test "x$PKGHANDLER_COMMAND" != x; then
24556       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24557     fi
24558   fi
24559 
24560     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
24561 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
24562     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
24563 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24564     as_fn_error $? "Cannot continue" "$LINENO" 5
24565   fi
24566 
24567   # Setup proper paths for what we found
24568   BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
24569   if test ! -f "$BOOT_RTJAR"; then
24570     # On MacOSX it is called classes.jar
24571     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
24572     if test -f "$BOOT_RTJAR"; then
24573       # Remove the ..
24574       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
24575     fi
24576   fi
24577   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
24578   BOOT_JDK="$BOOT_JDK"
24579 
24580 
24581 
24582 
24583   # Setup tools from the Boot JDK.
24584 
24585   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
24586 $as_echo_n "checking for java in Boot JDK... " >&6; }
24587   JAVA=$BOOT_JDK/bin/java
24588   if test ! -x $JAVA; then
24589     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24590 $as_echo "not found" >&6; }
24591     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24592 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24593     as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
24594   fi
24595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24596 $as_echo "ok" >&6; }
24597 
24598 
24599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
24600 $as_echo_n "checking for javac in Boot JDK... " >&6; }
24601   JAVAC=$BOOT_JDK/bin/javac
24602   if test ! -x $JAVAC; then
24603     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24604 $as_echo "not found" >&6; }
24605     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24606 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24607     as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
24608   fi
24609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24610 $as_echo "ok" >&6; }
24611 
24612 
24613   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
24614 $as_echo_n "checking for javah in Boot JDK... " >&6; }
24615   JAVAH=$BOOT_JDK/bin/javah
24616   if test ! -x $JAVAH; then
24617     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24618 $as_echo "not found" >&6; }
24619     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24620 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24621     as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
24622   fi
24623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24624 $as_echo "ok" >&6; }
24625 
24626 
24627   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
24628 $as_echo_n "checking for javap in Boot JDK... " >&6; }
24629   JAVAP=$BOOT_JDK/bin/javap
24630   if test ! -x $JAVAP; then
24631     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24632 $as_echo "not found" >&6; }
24633     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24634 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24635     as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
24636   fi
24637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24638 $as_echo "ok" >&6; }
24639 
24640 
24641   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
24642 $as_echo_n "checking for jar in Boot JDK... " >&6; }
24643   JAR=$BOOT_JDK/bin/jar
24644   if test ! -x $JAR; then
24645     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24646 $as_echo "not found" >&6; }
24647     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24648 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24649     as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
24650   fi
24651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24652 $as_echo "ok" >&6; }
24653 
24654 
24655   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
24656 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
24657   RMIC=$BOOT_JDK/bin/rmic
24658   if test ! -x $RMIC; then
24659     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24660 $as_echo "not found" >&6; }
24661     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24662 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24663     as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
24664   fi
24665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24666 $as_echo "ok" >&6; }
24667 
24668 
24669   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
24670 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
24671   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
24672   if test ! -x $NATIVE2ASCII; then
24673     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24674 $as_echo "not found" >&6; }
24675     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24676 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24677     as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
24678   fi
24679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24680 $as_echo "ok" >&6; }
24681 
24682 
24683   # Finally, set some other options...
24684 
24685   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
24686   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
24687 
24688 
24689 
24690   # Check if the boot jdk is 32 or 64 bit
24691   if "$JAVA" -d64 -version > /dev/null 2>&1; then
24692     BOOT_JDK_BITS="64"
24693   else
24694     BOOT_JDK_BITS="32"
24695   fi
24696   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
24697 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
24698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
24699 $as_echo "$BOOT_JDK_BITS" >&6; }
24700 
24701 
24702 
24703   ##############################################################################
24704   #
24705   # Specify options for anything that is run with the Boot JDK.
24706   #
24707 
24708 # Check whether --with-boot-jdk-jvmargs was given.
24709 if test "${with_boot_jdk_jvmargs+set}" = set; then :
24710   withval=$with_boot_jdk_jvmargs;
24711 fi
24712 
24713 
24714   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
24715 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
24716 
24717   # Disable special log output when a debug build is used as Boot JDK...
24718 
24719   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
24720   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
24721   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
24722   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24723   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24724   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24725     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
24726     JVM_ARG_OK=true
24727   else
24728     $ECHO "Arg failed:" >&5
24729     $ECHO "$OUTPUT" >&5
24730     JVM_ARG_OK=false
24731   fi
24732 
24733 
24734   # Apply user provided options.
24735 
24736   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
24737   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
24738   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
24739   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24740   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24741   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24742     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
24743     JVM_ARG_OK=true
24744   else
24745     $ECHO "Arg failed:" >&5
24746     $ECHO "$OUTPUT" >&5
24747     JVM_ARG_OK=false
24748   fi
24749 
24750 
24751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
24752 $as_echo "$boot_jdk_jvmargs" >&6; }
24753 
24754   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
24755   JAVA_FLAGS=$boot_jdk_jvmargs
24756 
24757 
24758 
24759   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
24760 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
24761 
24762   # Starting amount of heap memory.
24763 
24764   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
24765   $ECHO "Command: $JAVA -Xms64M -version" >&5
24766   OUTPUT=`$JAVA -Xms64M -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 -Xms64M"
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   # Maximum amount of heap memory.
24780   # Maximum stack size.
24781   if test "x$BOOT_JDK_BITS" = x32; then
24782     JVM_MAX_HEAP=768M
24783     STACK_SIZE=768
24784   else
24785     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
24786     # pointers are used. Apparently, we need to increase the heap and stack
24787     # space for the jvm. More specifically, when running javac to build huge
24788     # jdk batch
24789     JVM_MAX_HEAP=1600M
24790     STACK_SIZE=1536
24791   fi
24792 
24793   $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
24794   $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
24795   OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
24796   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24797   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24798   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24799     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
24800     JVM_ARG_OK=true
24801   else
24802     $ECHO "Arg failed:" >&5
24803     $ECHO "$OUTPUT" >&5
24804     JVM_ARG_OK=false
24805   fi
24806 
24807 
24808   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
24809   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
24810   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
24811   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24812   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24813   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24814     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
24815     JVM_ARG_OK=true
24816   else
24817     $ECHO "Arg failed:" >&5
24818     $ECHO "$OUTPUT" >&5
24819     JVM_ARG_OK=false
24820   fi
24821 
24822 
24823   $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
24824   $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
24825   OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
24826   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24827   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24828   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24829     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:PermSize=32m"
24830     JVM_ARG_OK=true
24831   else
24832     $ECHO "Arg failed:" >&5
24833     $ECHO "$OUTPUT" >&5
24834     JVM_ARG_OK=false
24835   fi
24836 
24837 
24838   $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
24839   $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
24840   OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
24841   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24842   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24843   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24844     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:MaxPermSize=160m"
24845     JVM_ARG_OK=true
24846   else
24847     $ECHO "Arg failed:" >&5
24848     $ECHO "$OUTPUT" >&5
24849     JVM_ARG_OK=false
24850   fi
24851 
24852 
24853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
24854 $as_echo "$boot_jdk_jvmargs_big" >&6; }
24855 
24856   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
24857 
24858 
24859 
24860   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
24861 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
24862 
24863   # Use serial gc for small short lived tools if possible
24864 
24865   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
24866   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
24867   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
24868   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24869   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24870   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24871     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
24872     JVM_ARG_OK=true
24873   else
24874     $ECHO "Arg failed:" >&5
24875     $ECHO "$OUTPUT" >&5
24876     JVM_ARG_OK=false
24877   fi
24878 
24879 
24880   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
24881   $ECHO "Command: $JAVA -Xms32M -version" >&5
24882   OUTPUT=`$JAVA -Xms32M -version 2>&1`
24883   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24884   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24885   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24886     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
24887     JVM_ARG_OK=true
24888   else
24889     $ECHO "Arg failed:" >&5
24890     $ECHO "$OUTPUT" >&5
24891     JVM_ARG_OK=false
24892   fi
24893 
24894 
24895   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
24896   $ECHO "Command: $JAVA -Xmx512M -version" >&5
24897   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
24898   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24899   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24900   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24901     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
24902     JVM_ARG_OK=true
24903   else
24904     $ECHO "Arg failed:" >&5
24905     $ECHO "$OUTPUT" >&5
24906     JVM_ARG_OK=false
24907   fi
24908 
24909 
24910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
24911 $as_echo "$boot_jdk_jvmargs_small" >&6; }
24912 
24913   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
24914 
24915 
24916 
24917 ###############################################################################
24918 #
24919 # Configure the sources to use. We can add or override individual directories.
24920 #
24921 ###############################################################################
24922 
24923 
24924   # Where are the sources. Any of these can be overridden
24925   # using --with-override-corba and the likes.
24926   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
24927   CORBA_TOPDIR="$SRC_ROOT/corba"
24928   JAXP_TOPDIR="$SRC_ROOT/jaxp"
24929   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
24930   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
24931   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
24932   JDK_TOPDIR="$SRC_ROOT/jdk"
24933 
24934 
24935 
24936 
24937 
24938 
24939 
24940 
24941 
24942 
24943   ###############################################################################
24944   #
24945   # Pickup additional source for a component from outside of the source root
24946   # or override source for a component.
24947   #
24948 
24949 # Check whether --with-add-source-root was given.
24950 if test "${with_add_source_root+set}" = set; then :
24951   withval=$with_add_source_root;
24952 fi
24953 
24954 
24955 
24956 # Check whether --with-override-source-root was given.
24957 if test "${with_override_source_root+set}" = set; then :
24958   withval=$with_override_source_root;
24959 fi
24960 
24961 
24962 
24963 # Check whether --with-adds-and-overrides was given.
24964 if test "${with_adds_and_overrides+set}" = set; then :
24965   withval=$with_adds_and_overrides;
24966 fi
24967 
24968 
24969   if test "x$with_adds_and_overrides" != x; then
24970     with_add_source_root="$with_adds_and_overrides/adds"
24971     with_override_source_root="$with_adds_and_overrides/overrides"
24972   fi
24973 
24974   if test "x$with_add_source_root" != x; then
24975     if ! test -d $with_add_source_root; then
24976       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
24977     fi
24978     CURDIR="$PWD"
24979     cd "$with_add_source_root"
24980     ADD_SRC_ROOT="`pwd`"
24981     cd "$CURDIR"
24982     # Verify that the addon source root does not have any root makefiles.
24983     # If it does, then it is usually an error, prevent this.
24984     if test -f $with_add_source_root/langtools/make/Makefile; then
24985       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
24986     fi
24987     if test -f $with_add_source_root/corba/make/Makefile; then
24988       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
24989     fi
24990     if test -f $with_add_source_root/jaxp/make/Makefile; then
24991       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
24992     fi
24993     if test -f $with_add_source_root/jaxws/make/Makefile; then
24994       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
24995     fi
24996     if test -f $with_add_source_root/hotspot/make/Makefile; then
24997       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
24998     fi
24999     if test -f $with_add_source_root/nashorn/make/Makefile; then
25000       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
25001     fi
25002     if test -f $with_add_source_root/jdk/make/Makefile; then
25003       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
25004     fi
25005   fi
25006 
25007 
25008   if test "x$with_override_source_root" != x; then
25009     if ! test -d $with_override_source_root; then
25010       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
25011     fi
25012     CURDIR="$PWD"
25013     cd "$with_override_source_root"
25014     OVERRIDE_SRC_ROOT="`pwd`"
25015     cd "$CURDIR"
25016     if test -f $with_override_source_root/langtools/make/Makefile; then
25017       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
25018     fi
25019     if test -f $with_override_source_root/corba/make/Makefile; then
25020       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
25021     fi
25022     if test -f $with_override_source_root/jaxp/make/Makefile; then
25023       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
25024     fi
25025     if test -f $with_override_source_root/jaxws/make/Makefile; then
25026       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
25027     fi
25028     if test -f $with_override_source_root/hotspot/make/Makefile; then
25029       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
25030     fi
25031     if test -f $with_override_source_root/nashorn/make/Makefile; then
25032       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
25033     fi
25034     if test -f $with_override_source_root/jdk/make/Makefile; then
25035       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
25036     fi
25037   fi
25038 
25039 
25040   ###############################################################################
25041   #
25042   # Override a repo completely, this is used for example when you have 3 small
25043   # development sandboxes of the langtools sources and want to avoid having 3 full
25044   # OpenJDK sources checked out on disk.
25045   #
25046   # Assuming that the 3 langtools sandboxes are located here:
25047   # /home/fredrik/sandbox1/langtools
25048   # /home/fredrik/sandbox2/langtools
25049   # /home/fredrik/sandbox3/langtools
25050   #
25051   # From the source root you create build subdirs manually:
25052   #     mkdir -p build1 build2 build3
25053   # in each build directory run:
25054   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
25055   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
25056   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
25057   #
25058 
25059 
25060 # Check whether --with-override-langtools was given.
25061 if test "${with_override_langtools+set}" = set; then :
25062   withval=$with_override_langtools;
25063 fi
25064 
25065 
25066 
25067 # Check whether --with-override-corba was given.
25068 if test "${with_override_corba+set}" = set; then :
25069   withval=$with_override_corba;
25070 fi
25071 
25072 
25073 
25074 # Check whether --with-override-jaxp was given.
25075 if test "${with_override_jaxp+set}" = set; then :
25076   withval=$with_override_jaxp;
25077 fi
25078 
25079 
25080 
25081 # Check whether --with-override-jaxws was given.
25082 if test "${with_override_jaxws+set}" = set; then :
25083   withval=$with_override_jaxws;
25084 fi
25085 
25086 
25087 
25088 # Check whether --with-override-hotspot was given.
25089 if test "${with_override_hotspot+set}" = set; then :
25090   withval=$with_override_hotspot;
25091 fi
25092 
25093 
25094 
25095 # Check whether --with-override-nashorn was given.
25096 if test "${with_override_nashorn+set}" = set; then :
25097   withval=$with_override_nashorn;
25098 fi
25099 
25100 
25101 
25102 # Check whether --with-override-jdk was given.
25103 if test "${with_override_jdk+set}" = set; then :
25104   withval=$with_override_jdk;
25105 fi
25106 
25107 
25108   if test "x$with_override_langtools" != x; then
25109     CURDIR="$PWD"
25110     cd "$with_override_langtools"
25111     LANGTOOLS_TOPDIR="`pwd`"
25112     cd "$CURDIR"
25113     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
25114       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
25115     fi
25116     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
25117 $as_echo_n "checking if langtools should be overridden... " >&6; }
25118     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
25119 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
25120   fi
25121   if test "x$with_override_corba" != x; then
25122     CURDIR="$PWD"
25123     cd "$with_override_corba"
25124     CORBA_TOPDIR="`pwd`"
25125     cd "$CURDIR"
25126     if ! test -f $CORBA_TOPDIR/make/Makefile; then
25127       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
25128     fi
25129     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
25130 $as_echo_n "checking if corba should be overridden... " >&6; }
25131     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
25132 $as_echo "yes with $CORBA_TOPDIR" >&6; }
25133   fi
25134   if test "x$with_override_jaxp" != x; then
25135     CURDIR="$PWD"
25136     cd "$with_override_jaxp"
25137     JAXP_TOPDIR="`pwd`"
25138     cd "$CURDIR"
25139     if ! test -f $JAXP_TOPDIR/make/Makefile; then
25140       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
25141     fi
25142     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
25143 $as_echo_n "checking if jaxp should be overridden... " >&6; }
25144     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
25145 $as_echo "yes with $JAXP_TOPDIR" >&6; }
25146   fi
25147   if test "x$with_override_jaxws" != x; then
25148     CURDIR="$PWD"
25149     cd "$with_override_jaxws"
25150     JAXWS_TOPDIR="`pwd`"
25151     cd "$CURDIR"
25152     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
25153       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
25154     fi
25155     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
25156 $as_echo_n "checking if jaxws should be overridden... " >&6; }
25157     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
25158 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
25159   fi
25160   if test "x$with_override_hotspot" != x; then
25161     CURDIR="$PWD"
25162     cd "$with_override_hotspot"
25163     HOTSPOT_TOPDIR="`pwd`"
25164     cd "$CURDIR"
25165     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
25166       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
25167     fi
25168     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
25169 $as_echo_n "checking if hotspot should be overridden... " >&6; }
25170     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
25171 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
25172   fi
25173   if test "x$with_override_nashorn" != x; then
25174     CURDIR="$PWD"
25175     cd "$with_override_nashorn"
25176     NASHORN_TOPDIR="`pwd`"
25177     cd "$CURDIR"
25178     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
25179       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
25180     fi
25181     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
25182 $as_echo_n "checking if nashorn should be overridden... " >&6; }
25183     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
25184 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
25185   fi
25186   if test "x$with_override_jdk" != x; then
25187     CURDIR="$PWD"
25188     cd "$with_override_jdk"
25189     JDK_TOPDIR="`pwd`"
25190     cd "$CURDIR"
25191     if ! test -f $JDK_TOPDIR/make/Makefile; then
25192       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
25193     fi
25194     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
25195 $as_echo_n "checking if JDK should be overridden... " >&6; }
25196     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
25197 $as_echo "yes with $JDK_TOPDIR" >&6; }
25198   fi
25199 
25200 
25201   BUILD_OUTPUT="$OUTPUT_ROOT"
25202 
25203 
25204   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
25205   BUILD_HOTSPOT=true
25206 
25207 
25208 
25209 # Check whether --with-import-hotspot was given.
25210 if test "${with_import_hotspot+set}" = set; then :
25211   withval=$with_import_hotspot;
25212 fi
25213 
25214   if test "x$with_import_hotspot" != x; then
25215     CURDIR="$PWD"
25216     cd "$with_import_hotspot"
25217     HOTSPOT_DIST="`pwd`"
25218     cd "$CURDIR"
25219     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
25220       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
25221     fi
25222     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
25223 $as_echo_n "checking if hotspot should be imported... " >&6; }
25224     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
25225 $as_echo "yes from $HOTSPOT_DIST" >&6; }
25226     BUILD_HOTSPOT=false
25227   fi
25228 
25229   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
25230 
25231 
25232 ###############################################################################
25233 #
25234 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
25235 # native code.
25236 #
25237 ###############################################################################
25238 
25239 # First determine the toolchain type (compiler family)
25240 
25241 
25242 # Check whether --with-toolchain-type was given.
25243 if test "${with_toolchain_type+set}" = set; then :
25244   withval=$with_toolchain_type;
25245 fi
25246 
25247 
25248   # Use indirect variable referencing
25249   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
25250   VALID_TOOLCHAINS=${!toolchain_var_name}
25251   # First toolchain type in the list is the default
25252   DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
25253 
25254   if test "x$with_toolchain_type" = xlist; then
25255     # List all toolchains
25256     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
25257 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
25258     for toolchain in $VALID_TOOLCHAINS; do
25259       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
25260       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
25261       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
25262     done
25263 
25264     exit 0
25265   elif test "x$with_toolchain_type" != x; then
25266     # User override; check that it is valid
25267     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
25268       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
25269 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
25270       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
25271 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
25272       as_fn_error $? "Cannot continue." "$LINENO" 5
25273     fi
25274     TOOLCHAIN_TYPE=$with_toolchain_type
25275   else
25276     # No flag given, use default
25277     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
25278   fi
25279 
25280 
25281   TOOLCHAIN_CC_BINARY_clang="clang"
25282   TOOLCHAIN_CC_BINARY_gcc="gcc"
25283   TOOLCHAIN_CC_BINARY_microsoft="cl"
25284   TOOLCHAIN_CC_BINARY_solstudio="cc"
25285   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
25286 
25287   TOOLCHAIN_CXX_BINARY_clang="clang++"
25288   TOOLCHAIN_CXX_BINARY_gcc="g++"
25289   TOOLCHAIN_CXX_BINARY_microsoft="cl"
25290   TOOLCHAIN_CXX_BINARY_solstudio="CC"
25291   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
25292 
25293   # Use indirect variable referencing
25294   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
25295   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
25296   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
25297   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
25298   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
25299   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
25300 
25301 
25302   # Define filename patterns
25303   if test "x$OPENJDK_TARGET_OS" = xwindows; then
25304     LIBRARY_PREFIX=
25305     SHARED_LIBRARY_SUFFIX='.dll'
25306     STATIC_LIBRARY_SUFFIX='.lib'
25307     SHARED_LIBRARY='$1.dll'
25308     STATIC_LIBRARY='$1.lib'
25309     OBJ_SUFFIX='.obj'
25310     EXE_SUFFIX='.exe'
25311   else
25312     LIBRARY_PREFIX=lib
25313     SHARED_LIBRARY_SUFFIX='.so'
25314     STATIC_LIBRARY_SUFFIX='.a'
25315     SHARED_LIBRARY='lib$1.so'
25316     STATIC_LIBRARY='lib$1.a'
25317     OBJ_SUFFIX='.o'
25318     EXE_SUFFIX=''
25319     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25320       SHARED_LIBRARY='lib$1.dylib'
25321       SHARED_LIBRARY_SUFFIX='.dylib'
25322     fi
25323   fi
25324 
25325 
25326 
25327 
25328 
25329 
25330 
25331 
25332 
25333 
25334   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
25335     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
25336 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
25337   else
25338     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
25339 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
25340   fi
25341 
25342 
25343 # Then detect the actual binaries needed
25344 
25345   # FIXME: Is this needed?
25346   ac_ext=cpp
25347 ac_cpp='$CXXCPP $CPPFLAGS'
25348 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25349 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25350 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25351 
25352 
25353   # Store the CFLAGS etal passed to the configure script.
25354   ORG_CFLAGS="$CFLAGS"
25355   ORG_CXXFLAGS="$CXXFLAGS"
25356   ORG_OBJCFLAGS="$OBJCFLAGS"
25357 
25358   # autoconf magic only relies on PATH, so update it if tools dir is specified
25359   OLD_PATH="$PATH"
25360 
25361   # On Windows, we need to detect the visual studio installation first.
25362   # This will change the PATH, but we need to keep that new PATH even
25363   # after toolchain detection is done, since the compiler (on x86) uses
25364   # it for DLL resolution in runtime.
25365   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
25366       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
25367 
25368   # Store path to cygwin link.exe to help excluding it when searching for
25369   # VS linker. This must be done before changing the PATH when looking for VS.
25370   # Extract the first word of "link", so it can be a program name with args.
25371 set dummy link; ac_word=$2
25372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25373 $as_echo_n "checking for $ac_word... " >&6; }
25374 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
25375   $as_echo_n "(cached) " >&6
25376 else
25377   case $CYGWIN_LINK in
25378   [\\/]* | ?:[\\/]*)
25379   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
25380   ;;
25381   *)
25382   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25383 for as_dir in $PATH
25384 do
25385   IFS=$as_save_IFS
25386   test -z "$as_dir" && as_dir=.
25387     for ac_exec_ext in '' $ac_executable_extensions; do
25388   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25389     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
25390     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25391     break 2
25392   fi
25393 done
25394   done
25395 IFS=$as_save_IFS
25396 
25397   ;;
25398 esac
25399 fi
25400 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
25401 if test -n "$CYGWIN_LINK"; then
25402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
25403 $as_echo "$CYGWIN_LINK" >&6; }
25404 else
25405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25406 $as_echo "no" >&6; }
25407 fi
25408 
25409 
25410   if test "x$CYGWIN_LINK" != x; then
25411     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
25412 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
25413     "$CYGWIN_LINK" --version > /dev/null
25414     if test $? -eq 0 ; then
25415       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25416 $as_echo "yes" >&6; }
25417     else
25418       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25419 $as_echo "no" >&6; }
25420       # This might be the VS linker. Don't exclude it later on.
25421       CYGWIN_LINK=""
25422     fi
25423   fi
25424 
25425   # First-hand choice is to locate and run the vsvars bat file.
25426 
25427 
25428 # Check whether --with-toolchain-version was given.
25429 if test "${with_toolchain_version+set}" = set; then :
25430   withval=$with_toolchain_version;
25431 fi
25432 
25433 
25434   if test "x$with_toolchain_version" = xlist; then
25435     # List all toolchains
25436     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
25437 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
25438     for version in $VALID_VS_VERSIONS; do
25439       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
25440       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
25441     done
25442 
25443     exit 0
25444   elif test "x$DEVKIT_VS_VERSION" != x; then
25445     VS_VERSION=$DEVKIT_VS_VERSION
25446     TOOLCHAIN_VERSION=$VS_VERSION
25447     # If the devkit has a name, use that as description
25448     VS_DESCRIPTION="$DEVKIT_NAME"
25449     if test "x$VS_DESCRIPTION" = x; then
25450       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
25451     fi
25452     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
25453     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
25454     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
25455     eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
25456     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25457     VS_PATH="$TOOLCHAIN_PATH:$PATH"
25458 
25459     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
25460     # can still be exported as INCLUDE for compiler invocations without
25461     # SYSROOT_CFLAGS
25462     OLDIFS="$IFS"
25463     IFS=";"
25464     for i in $DEVKIT_VS_INCLUDE; do
25465       ipath=$i
25466 
25467   unix_path="$ipath"
25468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25469     windows_path=`$CYGPATH -m "$unix_path"`
25470     ipath="$windows_path"
25471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25472     windows_path=`cmd //c echo $unix_path`
25473     ipath="$windows_path"
25474   fi
25475 
25476       VS_INCLUDE="$VS_INCLUDE;$ipath"
25477     done
25478     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
25479     # as LIB for compiler invocations without SYSROOT_LDFLAGS
25480     for i in $DEVKIT_VS_LIB; do
25481       libpath=$i
25482 
25483   unix_path="$libpath"
25484   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25485     windows_path=`$CYGPATH -m "$unix_path"`
25486     libpath="$windows_path"
25487   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25488     windows_path=`cmd //c echo $unix_path`
25489     libpath="$windows_path"
25490   fi
25491 
25492       VS_LIB="$VS_LIB;$libpath"
25493     done
25494     IFS="$OLDIFS"
25495 
25496     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
25497 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
25498 
25499   elif test "x$with_toolchain_version" != x; then
25500     # User override; check that it is valid
25501     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
25502       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
25503 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
25504       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
25505 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
25506       as_fn_error $? "Cannot continue." "$LINENO" 5
25507     fi
25508     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
25509   else
25510     # No flag given, use default
25511     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
25512   fi
25513 
25514   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
25515 
25516   VS_VERSION="$VS_VERSION"
25517   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
25518   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
25519   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
25520   eval VS_EDITIONS="\${VS_EDITIONS_${VS_VERSION}}"
25521   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
25522   eval VS_ENV_ARGS="\${VS_ENV_ARGS_${VS_VERSION}}"
25523 
25524   # When using --with-tools-dir, assume it points to the correct and default
25525   # version of Visual Studio or that --with-toolchain-version was also set.
25526   if test "x$with_tools_dir" != x; then
25527 
25528   if test "x$VS_ENV_CMD" = x; then
25529     VS_VERSION="${VS_VERSION}"
25530     VS_BASE="$with_tools_dir/../.."
25531     METHOD="--with-tools-dir"
25532 
25533 
25534   windows_path="$VS_BASE"
25535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25536     unix_path=`$CYGPATH -u "$windows_path"`
25537     VS_BASE="$unix_path"
25538   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25539     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25540     VS_BASE="$unix_path"
25541   fi
25542 
25543     # In VS 2017, the default installation is in a subdir named after the edition.
25544     # Find the first one present and use that.
25545     if test "x$VS_EDITIONS" != x; then
25546       for edition in $VS_EDITIONS; do
25547         if test -d "$VS_BASE/$edition"; then
25548           VS_BASE="$VS_BASE/$edition"
25549           break
25550         fi
25551       done
25552     fi
25553 
25554     if test -d "$VS_BASE"; then
25555       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25556 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25557       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25558         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25559       else
25560         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25561             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25562       fi
25563 
25564       for VCVARSFILE in $VCVARSFILES; do
25565         if test -f "$VS_BASE/$VCVARSFILE"; then
25566           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25567           break
25568         fi
25569       done
25570 
25571       if test "x$VS_ENV_CMD" = x; then
25572         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25573 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25574       else
25575         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25576         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25577         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25578         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25579 
25580       fi
25581     fi
25582   fi
25583 
25584 
25585   if test "x$VS_ENV_CMD" = x; then
25586     VS_VERSION="${VS_VERSION}"
25587     VS_BASE="$with_tools_dir/../../.."
25588     METHOD="--with-tools-dir"
25589 
25590 
25591   windows_path="$VS_BASE"
25592   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25593     unix_path=`$CYGPATH -u "$windows_path"`
25594     VS_BASE="$unix_path"
25595   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25596     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25597     VS_BASE="$unix_path"
25598   fi
25599 
25600     # In VS 2017, the default installation is in a subdir named after the edition.
25601     # Find the first one present and use that.
25602     if test "x$VS_EDITIONS" != x; then
25603       for edition in $VS_EDITIONS; do
25604         if test -d "$VS_BASE/$edition"; then
25605           VS_BASE="$VS_BASE/$edition"
25606           break
25607         fi
25608       done
25609     fi
25610 
25611     if test -d "$VS_BASE"; then
25612       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25613 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25614       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25615         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25616       else
25617         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25618             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25619       fi
25620 
25621       for VCVARSFILE in $VCVARSFILES; do
25622         if test -f "$VS_BASE/$VCVARSFILE"; then
25623           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25624           break
25625         fi
25626       done
25627 
25628       if test "x$VS_ENV_CMD" = x; then
25629         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25630 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25631       else
25632         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25633         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25634         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25635         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25636 
25637       fi
25638     fi
25639   fi
25640 
25641     if test "x$VS_ENV_CMD" = x; then
25642       # Having specified an argument which is incorrect will produce an instant failure;
25643       # we should not go on looking
25644       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
25645 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
25646       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
25647 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
25648       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
25649 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
25650       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
25651     fi
25652   fi
25653 
25654   VS_ENV_CMD=""
25655 
25656   if test "x$VS_COMNTOOLS" != x; then
25657 
25658   if test "x$VS_ENV_CMD" = x; then
25659     VS_VERSION="${VS_VERSION}"
25660     VS_BASE="$VS_COMNTOOLS/../.."
25661     METHOD="$VS_COMNTOOLS_VAR variable"
25662 
25663 
25664   windows_path="$VS_BASE"
25665   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25666     unix_path=`$CYGPATH -u "$windows_path"`
25667     VS_BASE="$unix_path"
25668   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25669     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25670     VS_BASE="$unix_path"
25671   fi
25672 
25673     # In VS 2017, the default installation is in a subdir named after the edition.
25674     # Find the first one present and use that.
25675     if test "x$VS_EDITIONS" != x; then
25676       for edition in $VS_EDITIONS; do
25677         if test -d "$VS_BASE/$edition"; then
25678           VS_BASE="$VS_BASE/$edition"
25679           break
25680         fi
25681       done
25682     fi
25683 
25684     if test -d "$VS_BASE"; then
25685       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25686 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25687       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25688         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25689       else
25690         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25691             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25692       fi
25693 
25694       for VCVARSFILE in $VCVARSFILES; do
25695         if test -f "$VS_BASE/$VCVARSFILE"; then
25696           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25697           break
25698         fi
25699       done
25700 
25701       if test "x$VS_ENV_CMD" = x; then
25702         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25703 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25704       else
25705         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25706         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25707         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25708         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25709 
25710       fi
25711     fi
25712   fi
25713 
25714   fi
25715   if test "x$PROGRAMFILES" != x; then
25716 
25717   if test "x$VS_ENV_CMD" = x; then
25718     VS_VERSION="${VS_VERSION}"
25719     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
25720     METHOD="well-known name"
25721 
25722 
25723   windows_path="$VS_BASE"
25724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25725     unix_path=`$CYGPATH -u "$windows_path"`
25726     VS_BASE="$unix_path"
25727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25729     VS_BASE="$unix_path"
25730   fi
25731 
25732     # In VS 2017, the default installation is in a subdir named after the edition.
25733     # Find the first one present and use that.
25734     if test "x$VS_EDITIONS" != x; then
25735       for edition in $VS_EDITIONS; do
25736         if test -d "$VS_BASE/$edition"; then
25737           VS_BASE="$VS_BASE/$edition"
25738           break
25739         fi
25740       done
25741     fi
25742 
25743     if test -d "$VS_BASE"; then
25744       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25745 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25746       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25747         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25748       else
25749         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25750             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25751       fi
25752 
25753       for VCVARSFILE in $VCVARSFILES; do
25754         if test -f "$VS_BASE/$VCVARSFILE"; then
25755           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25756           break
25757         fi
25758       done
25759 
25760       if test "x$VS_ENV_CMD" = x; then
25761         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25762 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25763       else
25764         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25765         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25766         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25767         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25768 
25769       fi
25770     fi
25771   fi
25772 
25773   fi
25774   # Work around the insanely named ProgramFiles(x86) env variable
25775   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
25776   if test "x$PROGRAMFILES_X86" != x; then
25777 
25778   if test "x$VS_ENV_CMD" = x; then
25779     VS_VERSION="${VS_VERSION}"
25780     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
25781     METHOD="well-known name"
25782 
25783 
25784   windows_path="$VS_BASE"
25785   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25786     unix_path=`$CYGPATH -u "$windows_path"`
25787     VS_BASE="$unix_path"
25788   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25789     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25790     VS_BASE="$unix_path"
25791   fi
25792 
25793     # In VS 2017, the default installation is in a subdir named after the edition.
25794     # Find the first one present and use that.
25795     if test "x$VS_EDITIONS" != x; then
25796       for edition in $VS_EDITIONS; do
25797         if test -d "$VS_BASE/$edition"; then
25798           VS_BASE="$VS_BASE/$edition"
25799           break
25800         fi
25801       done
25802     fi
25803 
25804     if test -d "$VS_BASE"; then
25805       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25806 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25807       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25808         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25809       else
25810         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25811             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25812       fi
25813 
25814       for VCVARSFILE in $VCVARSFILES; do
25815         if test -f "$VS_BASE/$VCVARSFILE"; then
25816           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25817           break
25818         fi
25819       done
25820 
25821       if test "x$VS_ENV_CMD" = x; then
25822         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25823 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25824       else
25825         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25826         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25827         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25828         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25829 
25830       fi
25831     fi
25832   fi
25833 
25834   fi
25835 
25836   if test "x$VS_ENV_CMD" = x; then
25837     VS_VERSION="${VS_VERSION}"
25838     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
25839     METHOD="well-known name"
25840 
25841 
25842   windows_path="$VS_BASE"
25843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25844     unix_path=`$CYGPATH -u "$windows_path"`
25845     VS_BASE="$unix_path"
25846   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25847     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25848     VS_BASE="$unix_path"
25849   fi
25850 
25851     # In VS 2017, the default installation is in a subdir named after the edition.
25852     # Find the first one present and use that.
25853     if test "x$VS_EDITIONS" != x; then
25854       for edition in $VS_EDITIONS; do
25855         if test -d "$VS_BASE/$edition"; then
25856           VS_BASE="$VS_BASE/$edition"
25857           break
25858         fi
25859       done
25860     fi
25861 
25862     if test -d "$VS_BASE"; then
25863       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25864 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25865       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25866         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25867       else
25868         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25869             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25870       fi
25871 
25872       for VCVARSFILE in $VCVARSFILES; do
25873         if test -f "$VS_BASE/$VCVARSFILE"; then
25874           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25875           break
25876         fi
25877       done
25878 
25879       if test "x$VS_ENV_CMD" = x; then
25880         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25881 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25882       else
25883         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25884         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25885         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25886         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25887 
25888       fi
25889     fi
25890   fi
25891 
25892 
25893   if test "x$VS_ENV_CMD" = x; then
25894     VS_VERSION="${VS_VERSION}"
25895     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
25896     METHOD="well-known name"
25897 
25898 
25899   windows_path="$VS_BASE"
25900   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25901     unix_path=`$CYGPATH -u "$windows_path"`
25902     VS_BASE="$unix_path"
25903   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25904     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25905     VS_BASE="$unix_path"
25906   fi
25907 
25908     # In VS 2017, the default installation is in a subdir named after the edition.
25909     # Find the first one present and use that.
25910     if test "x$VS_EDITIONS" != x; then
25911       for edition in $VS_EDITIONS; do
25912         if test -d "$VS_BASE/$edition"; then
25913           VS_BASE="$VS_BASE/$edition"
25914           break
25915         fi
25916       done
25917     fi
25918 
25919     if test -d "$VS_BASE"; then
25920       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25921 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25922       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25923         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25924       else
25925         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25926             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25927       fi
25928 
25929       for VCVARSFILE in $VCVARSFILES; do
25930         if test -f "$VS_BASE/$VCVARSFILE"; then
25931           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25932           break
25933         fi
25934       done
25935 
25936       if test "x$VS_ENV_CMD" = x; then
25937         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25938 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25939       else
25940         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25941         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25942         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25943         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25944 
25945       fi
25946     fi
25947   fi
25948 
25949 
25950   if test "x$SDK_INSTALL_DIR" != x; then
25951     if test "x$ProgramW6432" != x; then
25952 
25953   if test "x$VS_ENV_CMD" = x; then
25954     VS_VERSION="${VS_VERSION}"
25955     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
25956     METHOD="well-known name"
25957 
25958   windows_path="$WIN_SDK_BASE"
25959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25960     unix_path=`$CYGPATH -u "$windows_path"`
25961     WIN_SDK_BASE="$unix_path"
25962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25964     WIN_SDK_BASE="$unix_path"
25965   fi
25966 
25967     if test -d "$WIN_SDK_BASE"; then
25968       # There have been cases of partial or broken SDK installations. A missing
25969       # lib dir is not going to work.
25970       if test ! -d "$WIN_SDK_BASE/lib"; then
25971         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25972 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25973         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25974 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25975       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
25976         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25977 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25978         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
25979         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25980           VS_ENV_ARGS="/x86"
25981         else
25982           VS_ENV_ARGS="/x64"
25983         fi
25984         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
25985         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
25986         # TODO: improve detection for other versions of SDK
25987         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
25988       else
25989         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25990 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25991         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25992 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25993       fi
25994     fi
25995   fi
25996 
25997     fi
25998     if test "x$PROGRAMW6432" != x; then
25999 
26000   if test "x$VS_ENV_CMD" = x; then
26001     VS_VERSION="${VS_VERSION}"
26002     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
26003     METHOD="well-known name"
26004 
26005   windows_path="$WIN_SDK_BASE"
26006   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26007     unix_path=`$CYGPATH -u "$windows_path"`
26008     WIN_SDK_BASE="$unix_path"
26009   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26010     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26011     WIN_SDK_BASE="$unix_path"
26012   fi
26013 
26014     if test -d "$WIN_SDK_BASE"; then
26015       # There have been cases of partial or broken SDK installations. A missing
26016       # lib dir is not going to work.
26017       if test ! -d "$WIN_SDK_BASE/lib"; then
26018         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26019 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26020         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26021 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26022       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26023         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26024 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26025         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26026         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26027           VS_ENV_ARGS="/x86"
26028         else
26029           VS_ENV_ARGS="/x64"
26030         fi
26031         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26032         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26033         # TODO: improve detection for other versions of SDK
26034         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26035       else
26036         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26037 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26038         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26039 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26040       fi
26041     fi
26042   fi
26043 
26044     fi
26045     if test "x$PROGRAMFILES" != x; then
26046 
26047   if test "x$VS_ENV_CMD" = x; then
26048     VS_VERSION="${VS_VERSION}"
26049     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
26050     METHOD="well-known name"
26051 
26052   windows_path="$WIN_SDK_BASE"
26053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26054     unix_path=`$CYGPATH -u "$windows_path"`
26055     WIN_SDK_BASE="$unix_path"
26056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26057     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26058     WIN_SDK_BASE="$unix_path"
26059   fi
26060 
26061     if test -d "$WIN_SDK_BASE"; then
26062       # There have been cases of partial or broken SDK installations. A missing
26063       # lib dir is not going to work.
26064       if test ! -d "$WIN_SDK_BASE/lib"; then
26065         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26066 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26067         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26068 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26069       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26070         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26071 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26072         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26073         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26074           VS_ENV_ARGS="/x86"
26075         else
26076           VS_ENV_ARGS="/x64"
26077         fi
26078         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26079         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26080         # TODO: improve detection for other versions of SDK
26081         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26082       else
26083         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26084 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26085         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26086 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26087       fi
26088     fi
26089   fi
26090 
26091     fi
26092 
26093   if test "x$VS_ENV_CMD" = x; then
26094     VS_VERSION="${VS_VERSION}"
26095     WIN_SDK_BASE="C:/Program Files/$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 
26138   if test "x$VS_ENV_CMD" = x; then
26139     VS_VERSION="${VS_VERSION}"
26140     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
26141     METHOD="well-known name"
26142 
26143   windows_path="$WIN_SDK_BASE"
26144   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26145     unix_path=`$CYGPATH -u "$windows_path"`
26146     WIN_SDK_BASE="$unix_path"
26147   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26148     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26149     WIN_SDK_BASE="$unix_path"
26150   fi
26151 
26152     if test -d "$WIN_SDK_BASE"; then
26153       # There have been cases of partial or broken SDK installations. A missing
26154       # lib dir is not going to work.
26155       if test ! -d "$WIN_SDK_BASE/lib"; then
26156         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26157 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26158         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26159 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26160       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26161         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26162 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26163         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26164         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26165           VS_ENV_ARGS="/x86"
26166         else
26167           VS_ENV_ARGS="/x64"
26168         fi
26169         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26170         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26171         # TODO: improve detection for other versions of SDK
26172         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26173       else
26174         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26175 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26176         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26177 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26178       fi
26179     fi
26180   fi
26181 
26182   fi
26183 
26184     if test "x$VS_ENV_CMD" != x; then
26185       TOOLCHAIN_VERSION=$VS_VERSION
26186       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
26187       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
26188       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
26189       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
26190       eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
26191       # The rest of the variables are already evaled while probing
26192       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
26193 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
26194       break
26195     fi
26196   done
26197 
26198   TOOLCHAIN_DESCRIPTION="$VS_DESCRIPTION"
26199   if test "$TOOLCHAIN_VERSION" -gt 2013; then
26200     UNSUPPORTED_TOOLCHAIN_VERSION=yes
26201   fi
26202 
26203 
26204   # If we have a devkit, skip all of the below.
26205   if test "x$DEVKIT_VS_VERSION" = x; then
26206     if test "x$VS_ENV_CMD" != x; then
26207       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26208 
26209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26210 
26211   # First separate the path from the arguments. This will split at the first
26212   # space.
26213   complete="$VS_ENV_CMD"
26214   path="${complete%% *}"
26215   tmp="$complete EOL"
26216   arguments="${tmp#* }"
26217 
26218   # Input might be given as Windows format, start by converting to
26219   # unix format.
26220   new_path=`$CYGPATH -u "$path"`
26221 
26222   # Now try to locate executable using which
26223   new_path=`$WHICH "$new_path" 2> /dev/null`
26224   # bat and cmd files are not always considered executable in cygwin causing which
26225   # to not find them
26226   if test "x$new_path" = x \
26227       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26228       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26229     new_path=`$CYGPATH -u "$path"`
26230   fi
26231   if test "x$new_path" = x; then
26232     # Oops. Which didn't find the executable.
26233     # The splitting of arguments from the executable at a space might have been incorrect,
26234     # since paths with space are more likely in Windows. Give it another try with the whole
26235     # argument.
26236     path="$complete"
26237     arguments="EOL"
26238     new_path=`$CYGPATH -u "$path"`
26239     new_path=`$WHICH "$new_path" 2> /dev/null`
26240     # bat and cmd files are not always considered executable in cygwin causing which
26241     # to not find them
26242     if test "x$new_path" = x \
26243         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26244         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26245       new_path=`$CYGPATH -u "$path"`
26246     fi
26247     if test "x$new_path" = x; then
26248       # It's still not found. Now this is an unrecoverable error.
26249       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26250 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26251       has_space=`$ECHO "$complete" | $GREP " "`
26252       if test "x$has_space" != x; then
26253         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26254 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26255       fi
26256       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26257     fi
26258   fi
26259 
26260   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26261   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26262   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26263   # "foo.exe" is OK but "foo" is an error.
26264   #
26265   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26266   # It is also a way to make sure we got the proper file name for the real test later on.
26267   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26268   if test "x$test_shortpath" = x; then
26269     # Short path failed, file does not exist as specified.
26270     # Try adding .exe or .cmd
26271     if test -f "${new_path}.exe"; then
26272       input_to_shortpath="${new_path}.exe"
26273     elif test -f "${new_path}.cmd"; then
26274       input_to_shortpath="${new_path}.cmd"
26275     else
26276       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
26277 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
26278       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26279 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26280       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26281     fi
26282   else
26283     input_to_shortpath="$new_path"
26284   fi
26285 
26286   # Call helper function which possibly converts this using DOS-style short mode.
26287   # If so, the updated path is stored in $new_path.
26288   new_path="$input_to_shortpath"
26289 
26290   input_path="$input_to_shortpath"
26291   # Check if we need to convert this using DOS-style short mode. If the path
26292   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26293   # take no chances and rewrite it.
26294   # Note: m4 eats our [], so we need to use [ and ] instead.
26295   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26296   if test "x$has_forbidden_chars" != x; then
26297     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26298     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26299     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26300     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26301       # Going to short mode and back again did indeed matter. Since short mode is
26302       # case insensitive, let's make it lowercase to improve readability.
26303       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26304       # Now convert it back to Unix-style (cygpath)
26305       input_path=`$CYGPATH -u "$shortmode_path"`
26306       new_path="$input_path"
26307     fi
26308   fi
26309 
26310   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26311   if test "x$test_cygdrive_prefix" = x; then
26312     # As a simple fix, exclude /usr/bin since it's not a real path.
26313     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26314       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26315       # a path prefixed by /cygdrive for fixpath to work.
26316       new_path="$CYGWIN_ROOT_PATH$input_path"
26317     fi
26318   fi
26319 
26320   # remove trailing .exe if any
26321   new_path="${new_path/%.exe/}"
26322 
26323   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26324 
26325   # First separate the path from the arguments. This will split at the first
26326   # space.
26327   complete="$VS_ENV_CMD"
26328   path="${complete%% *}"
26329   tmp="$complete EOL"
26330   arguments="${tmp#* }"
26331 
26332   # Input might be given as Windows format, start by converting to
26333   # unix format.
26334   new_path="$path"
26335 
26336   windows_path="$new_path"
26337   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26338     unix_path=`$CYGPATH -u "$windows_path"`
26339     new_path="$unix_path"
26340   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26341     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26342     new_path="$unix_path"
26343   fi
26344 
26345 
26346   # Now try to locate executable using which
26347   new_path=`$WHICH "$new_path" 2> /dev/null`
26348 
26349   if test "x$new_path" = x; then
26350     # Oops. Which didn't find the executable.
26351     # The splitting of arguments from the executable at a space might have been incorrect,
26352     # since paths with space are more likely in Windows. Give it another try with the whole
26353     # argument.
26354     path="$complete"
26355     arguments="EOL"
26356     new_path="$path"
26357 
26358   windows_path="$new_path"
26359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26360     unix_path=`$CYGPATH -u "$windows_path"`
26361     new_path="$unix_path"
26362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26364     new_path="$unix_path"
26365   fi
26366 
26367 
26368     new_path=`$WHICH "$new_path" 2> /dev/null`
26369     # bat and cmd files are not always considered executable in MSYS causing which
26370     # to not find them
26371     if test "x$new_path" = x \
26372         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26373         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26374       new_path="$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     fi
26386 
26387     if test "x$new_path" = x; then
26388       # It's still not found. Now this is an unrecoverable error.
26389       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26390 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26391       has_space=`$ECHO "$complete" | $GREP " "`
26392       if test "x$has_space" != x; then
26393         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26394 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26395       fi
26396       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26397     fi
26398   fi
26399 
26400   # Now new_path has a complete unix path to the binary
26401   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26402     # Keep paths in /bin as-is, but remove trailing .exe if any
26403     new_path="${new_path/%.exe/}"
26404     # Do not save /bin paths to all_fixpath_prefixes!
26405   else
26406     # Not in mixed or Windows style, start by that.
26407     new_path=`cmd //c echo $new_path`
26408 
26409   input_path="$new_path"
26410   # Check if we need to convert this using DOS-style short mode. If the path
26411   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26412   # take no chances and rewrite it.
26413   # Note: m4 eats our [], so we need to use [ and ] instead.
26414   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26415   if test "x$has_forbidden_chars" != x; then
26416     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26417     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26418   fi
26419 
26420     # Output is in $new_path
26421 
26422   windows_path="$new_path"
26423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26424     unix_path=`$CYGPATH -u "$windows_path"`
26425     new_path="$unix_path"
26426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26427     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26428     new_path="$unix_path"
26429   fi
26430 
26431     # remove trailing .exe if any
26432     new_path="${new_path/%.exe/}"
26433 
26434     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26435     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26436   fi
26437 
26438   else
26439     # We're on a posix platform. Hooray! :)
26440     # First separate the path from the arguments. This will split at the first
26441     # space.
26442     complete="$VS_ENV_CMD"
26443     path="${complete%% *}"
26444     tmp="$complete EOL"
26445     arguments="${tmp#* }"
26446 
26447     # Cannot rely on the command "which" here since it doesn't always work.
26448     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26449     if test -z "$is_absolute_path"; then
26450       # Path to executable is not absolute. Find it.
26451       IFS_save="$IFS"
26452       IFS=:
26453       for p in $PATH; do
26454         if test -f "$p/$path" && test -x "$p/$path"; then
26455           new_path="$p/$path"
26456           break
26457         fi
26458       done
26459       IFS="$IFS_save"
26460     else
26461       # This is an absolute path, we can use it without further modifications.
26462       new_path="$path"
26463     fi
26464 
26465     if test "x$new_path" = x; then
26466       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26467 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26468       has_space=`$ECHO "$complete" | $GREP " "`
26469       if test "x$has_space" != x; then
26470         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26471 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26472       fi
26473       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26474     fi
26475   fi
26476 
26477   # Now join together the path and the arguments once again
26478   if test "x$arguments" != xEOL; then
26479     new_complete="$new_path ${arguments% *}"
26480   else
26481     new_complete="$new_path"
26482   fi
26483 
26484   if test "x$complete" != "x$new_complete"; then
26485     VS_ENV_CMD="$new_complete"
26486     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
26487 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
26488   fi
26489 
26490 
26491       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
26492       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
26493 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
26494 
26495       # We need to create a couple of temporary files.
26496       VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
26497       $MKDIR -p $VS_ENV_TMP_DIR
26498 
26499       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
26500       # Instead create a shell script which will set the relevant variables when run.
26501       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
26502 
26503   unix_path="$WINPATH_VS_ENV_CMD"
26504   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26505     windows_path=`$CYGPATH -m "$unix_path"`
26506     WINPATH_VS_ENV_CMD="$windows_path"
26507   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26508     windows_path=`cmd //c echo $unix_path`
26509     WINPATH_VS_ENV_CMD="$windows_path"
26510   fi
26511 
26512       WINPATH_BASH="$BASH"
26513 
26514   unix_path="$WINPATH_BASH"
26515   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26516     windows_path=`$CYGPATH -m "$unix_path"`
26517     WINPATH_BASH="$windows_path"
26518   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26519     windows_path=`cmd //c echo $unix_path`
26520     WINPATH_BASH="$windows_path"
26521   fi
26522 
26523 
26524       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
26525       # script (executable by bash) that will setup the important variables.
26526       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
26527       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
26528       # This will end up something like:
26529       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
26530       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
26531       # In some cases, the VS_ENV_CMD will change directory, change back so
26532       # the set-vs-env.sh ends up in the right place.
26533       $ECHO 'cd %~dp0' >> $EXTRACT_VC_ENV_BAT_FILE
26534       # These will end up something like:
26535       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
26536       # The trailing space for everyone except PATH is no typo, but is needed due
26537       # to trailing \ in the Windows paths. These will be stripped later.
26538       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
26539           >> $EXTRACT_VC_ENV_BAT_FILE
26540       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' \
26541           >> $EXTRACT_VC_ENV_BAT_FILE
26542       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' \
26543           >> $EXTRACT_VC_ENV_BAT_FILE
26544       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
26545           >> $EXTRACT_VC_ENV_BAT_FILE
26546       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
26547           >> $EXTRACT_VC_ENV_BAT_FILE
26548       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
26549           >> $EXTRACT_VC_ENV_BAT_FILE
26550 
26551       # Now execute the newly created bat file.
26552       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
26553       # Change directory so we don't need to mess with Windows paths in redirects.
26554       cd $VS_ENV_TMP_DIR
26555       cmd /c extract-vs-env.bat | $CAT
26556       cd $CURDIR
26557 
26558       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
26559         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
26560 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
26561         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
26562 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
26563         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
26564 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
26565         as_fn_error $? "Cannot continue" "$LINENO" 5
26566       fi
26567 
26568       # Now set all paths and other env variables. This will allow the rest of
26569       # the configure script to find and run the compiler in the proper way.
26570       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
26571 $as_echo "$as_me: Setting extracted environment variables" >&6;}
26572       . $VS_ENV_TMP_DIR/set-vs-env.sh
26573       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
26574       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
26575     else
26576       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
26577      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
26578 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
26579     fi
26580   fi
26581 
26582   # At this point, we should have correct variables in the environment, or we can't continue.
26583   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
26584 $as_echo_n "checking for Visual Studio variables... " >&6; }
26585 
26586   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
26587       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
26588     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
26589       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
26590 $as_echo "present but broken" >&6; }
26591       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
26592     else
26593       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26594 $as_echo "ok" >&6; }
26595       # Remove any trailing "\" and " " from the variables.
26596       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
26597       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
26598       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
26599       WindowsSdkDir=`$ECHO "$WindowsSdkDir" | $SED 's/\\\\* *$//'`
26600       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
26601       if test -z "$WINDOWSSDKDIR"; then
26602         WINDOWSSDKDIR="$WindowsSdkDir"
26603       fi
26604       # Remove any paths containing # (typically F#) as that messes up make. This
26605       # is needed if visual studio was installed with F# support.
26606       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
26607 
26608 
26609 
26610 
26611     fi
26612   else
26613     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26614 $as_echo "not found" >&6; }
26615 
26616     if test "x$VS_ENV_CMD" = x; then
26617       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
26618 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
26619       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
26620 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
26621     else
26622       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
26623 $as_echo "$as_me: Running the extraction script failed." >&6;}
26624     fi
26625     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
26626 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
26627     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
26628 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
26629     as_fn_error $? "Cannot continue" "$LINENO" 5
26630   fi
26631 
26632     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
26633     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
26634     PATH="$VS_PATH"
26635     # The microsoft toolchain also requires INCLUDE and LIB to be set.
26636     export INCLUDE="$VS_INCLUDE"
26637     export LIB="$VS_LIB"
26638   fi
26639 
26640   # Before we locate the compilers, we need to sanitize the Xcode build environment
26641   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26642     # determine path to Xcode developer directory
26643     # can be empty in which case all the tools will rely on a sane Xcode 4 installation
26644     SET_DEVELOPER_DIR=
26645 
26646     if test -n "$XCODE_PATH"; then
26647       DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
26648     fi
26649 
26650     # DEVELOPER_DIR could also be provided directly
26651     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining if we need to set DEVELOPER_DIR" >&5
26652 $as_echo_n "checking Determining if we need to set DEVELOPER_DIR... " >&6; }
26653     if test -n "$DEVELOPER_DIR"; then
26654       if test ! -d "$DEVELOPER_DIR"; then
26655         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
26656       fi
26657       if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then
26658         as_fn_error $? "Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle" "$LINENO" 5
26659       fi
26660       # make it visible to all the tools immediately
26661       export DEVELOPER_DIR
26662       SET_DEVELOPER_DIR="export DEVELOPER_DIR := $DEVELOPER_DIR"
26663       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEVELOPER_DIR)" >&5
26664 $as_echo "yes ($DEVELOPER_DIR)" >&6; }
26665     else
26666       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26667 $as_echo "no" >&6; }
26668     fi
26669 
26670 
26671     # Extract the first word of "xcodebuild", so it can be a program name with args.
26672 set dummy xcodebuild; ac_word=$2
26673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26674 $as_echo_n "checking for $ac_word... " >&6; }
26675 if ${ac_cv_path_XCODEBUILD+:} false; then :
26676   $as_echo_n "(cached) " >&6
26677 else
26678   case $XCODEBUILD in
26679   [\\/]* | ?:[\\/]*)
26680   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
26681   ;;
26682   *)
26683   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26684 for as_dir in $PATH
26685 do
26686   IFS=$as_save_IFS
26687   test -z "$as_dir" && as_dir=.
26688     for ac_exec_ext in '' $ac_executable_extensions; do
26689   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26690     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
26691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26692     break 2
26693   fi
26694 done
26695   done
26696 IFS=$as_save_IFS
26697 
26698   ;;
26699 esac
26700 fi
26701 XCODEBUILD=$ac_cv_path_XCODEBUILD
26702 if test -n "$XCODEBUILD"; then
26703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
26704 $as_echo "$XCODEBUILD" >&6; }
26705 else
26706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26707 $as_echo "no" >&6; }
26708 fi
26709 
26710 
26711     if test -z "$XCODEBUILD"; then
26712       as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
26713     fi
26714 
26715     # Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later
26716     XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
26717     XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
26718     if test ! "${XC_VERSION_PARTS[0]}" = "4"; then
26719       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
26720     fi
26721 
26722     # Some versions of Xcode 5 command line tools install gcc and g++ as symlinks to
26723     # clang and clang++, which will break the build. So handle that here if we need to.
26724     if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
26725       # use xcrun to find the real gcc and add it's directory to PATH
26726       # then autoconf magic will find it
26727       { $as_echo "$as_me:${as_lineno-$LINENO}: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&5
26728 $as_echo "$as_me: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&6;}
26729       XCODE_BIN_PATH=$(dirname `xcrun -find gcc`)
26730       PATH="$XCODE_BIN_PATH":$PATH
26731     fi
26732 
26733     # Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools
26734     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining Xcode SDK path" >&5
26735 $as_echo_n "checking Determining Xcode SDK path... " >&6; }
26736     # allow SDKNAME to be set to override the default SDK selection
26737     SDKPATH=`"$XCODEBUILD" -sdk ${SDKNAME:-macosx} -version | grep '^Path: ' | sed 's/Path: //'`
26738     if test -n "$SDKPATH"; then
26739       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKPATH" >&5
26740 $as_echo "$SDKPATH" >&6; }
26741     else
26742       { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none, will use system headers and frameworks)" >&5
26743 $as_echo "(none, will use system headers and frameworks)" >&6; }
26744     fi
26745 
26746 
26747     # Perform a basic sanity test
26748     if test ! -f "$SDKPATH/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
26749       as_fn_error $? "Unable to find required framework headers, provide a valid path to Xcode 4 using --with-xcode-path" "$LINENO" 5
26750     fi
26751 
26752     # if SDKPATH is non-empty then we need to add -isysroot and -iframework for gcc and g++
26753     if test -n "$SDKPATH"; then
26754       # We need -isysroot <path> and -iframework<path>/System/Library/Frameworks
26755       CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26756       CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26757       LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26758     fi
26759 
26760     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
26761     # setting this here means it doesn't have to be peppered throughout the forest
26762     CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26763     CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26764     LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26765   fi
26766 
26767   # For solaris we really need solaris tools, and not the GNU equivalent.
26768   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
26769   # so add that to path before starting to probe.
26770   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
26771   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
26772     PATH="/usr/ccs/bin:$PATH"
26773   fi
26774 
26775   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
26776   # override all other locations.
26777   if test "x$TOOLCHAIN_PATH" != x; then
26778     PATH=$TOOLCHAIN_PATH:$PATH
26779   fi
26780 
26781 
26782   #
26783   # Setup the compilers (CC and CXX)
26784   #
26785 
26786   COMPILER_NAME=C
26787   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
26788 
26789   if test "x$CC" != x; then
26790     # User has supplied compiler name already, always let that override.
26791     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
26792 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
26793     if test "x`basename $CC`" = "x$CC"; then
26794       # A command without a complete path is provided, search $PATH.
26795 
26796       for ac_prog in $CC
26797 do
26798   # Extract the first word of "$ac_prog", so it can be a program name with args.
26799 set dummy $ac_prog; ac_word=$2
26800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26801 $as_echo_n "checking for $ac_word... " >&6; }
26802 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
26803   $as_echo_n "(cached) " >&6
26804 else
26805   case $POTENTIAL_CC in
26806   [\\/]* | ?:[\\/]*)
26807   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
26808   ;;
26809   *)
26810   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26811 for as_dir in $PATH
26812 do
26813   IFS=$as_save_IFS
26814   test -z "$as_dir" && as_dir=.
26815     for ac_exec_ext in '' $ac_executable_extensions; do
26816   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26817     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
26818     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26819     break 2
26820   fi
26821 done
26822   done
26823 IFS=$as_save_IFS
26824 
26825   ;;
26826 esac
26827 fi
26828 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
26829 if test -n "$POTENTIAL_CC"; then
26830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
26831 $as_echo "$POTENTIAL_CC" >&6; }
26832 else
26833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26834 $as_echo "no" >&6; }
26835 fi
26836 
26837 
26838   test -n "$POTENTIAL_CC" && break
26839 done
26840 
26841       if test "x$POTENTIAL_CC" != x; then
26842         CC=$POTENTIAL_CC
26843       else
26844         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
26845       fi
26846     else
26847       # Otherwise it might already be a complete path
26848       if test ! -x "$CC"; then
26849         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
26850       fi
26851     fi
26852   else
26853     # No user supplied value. Locate compiler ourselves.
26854 
26855     # If we are cross compiling, assume cross compilation tools follows the
26856     # cross compilation standard where they are prefixed with the autoconf
26857     # standard name for the target. For example the binary
26858     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
26859     # If we are not cross compiling, then the default compiler name will be
26860     # used.
26861 
26862     CC=
26863     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
26864     # before checking the rest of the PATH.
26865     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
26866     # step, this should not be necessary.
26867     if test -n "$TOOLCHAIN_PATH"; then
26868       PATH_save="$PATH"
26869       PATH="$TOOLCHAIN_PATH"
26870       for ac_prog in $SEARCH_LIST
26871 do
26872   # Extract the first word of "$ac_prog", so it can be a program name with args.
26873 set dummy $ac_prog; ac_word=$2
26874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26875 $as_echo_n "checking for $ac_word... " >&6; }
26876 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
26877   $as_echo_n "(cached) " >&6
26878 else
26879   case $TOOLCHAIN_PATH_CC in
26880   [\\/]* | ?:[\\/]*)
26881   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
26882   ;;
26883   *)
26884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26885 for as_dir in $PATH
26886 do
26887   IFS=$as_save_IFS
26888   test -z "$as_dir" && as_dir=.
26889     for ac_exec_ext in '' $ac_executable_extensions; do
26890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26891     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
26892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26893     break 2
26894   fi
26895 done
26896   done
26897 IFS=$as_save_IFS
26898 
26899   ;;
26900 esac
26901 fi
26902 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
26903 if test -n "$TOOLCHAIN_PATH_CC"; then
26904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
26905 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
26906 else
26907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26908 $as_echo "no" >&6; }
26909 fi
26910 
26911 
26912   test -n "$TOOLCHAIN_PATH_CC" && break
26913 done
26914 
26915       CC=$TOOLCHAIN_PATH_CC
26916       PATH="$PATH_save"
26917     fi
26918 
26919     # AC_PATH_PROGS can't be run multiple times with the same variable,
26920     # so create a new name for this run.
26921     if test "x$CC" = x; then
26922       for ac_prog in $TOOLCHAIN_CC_BINARY
26923 do
26924   # Extract the first word of "$ac_prog", so it can be a program name with args.
26925 set dummy $ac_prog; ac_word=$2
26926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26927 $as_echo_n "checking for $ac_word... " >&6; }
26928 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
26929   $as_echo_n "(cached) " >&6
26930 else
26931   case $POTENTIAL_CC in
26932   [\\/]* | ?:[\\/]*)
26933   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
26934   ;;
26935   *)
26936   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26937 for as_dir in $PATH
26938 do
26939   IFS=$as_save_IFS
26940   test -z "$as_dir" && as_dir=.
26941     for ac_exec_ext in '' $ac_executable_extensions; do
26942   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26943     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
26944     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26945     break 2
26946   fi
26947 done
26948   done
26949 IFS=$as_save_IFS
26950 
26951   ;;
26952 esac
26953 fi
26954 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
26955 if test -n "$POTENTIAL_CC"; then
26956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
26957 $as_echo "$POTENTIAL_CC" >&6; }
26958 else
26959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26960 $as_echo "no" >&6; }
26961 fi
26962 
26963 
26964   test -n "$POTENTIAL_CC" && break
26965 done
26966 
26967       CC=$POTENTIAL_CC
26968     fi
26969 
26970     if test "x$CC" = x; then
26971 
26972   # Print a helpful message on how to acquire the necessary build dependency.
26973   # devkit is the help tag: freetype, cups, pulse, alsa etc
26974   MISSING_DEPENDENCY=devkit
26975 
26976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26977     cygwin_help $MISSING_DEPENDENCY
26978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26979     msys_help $MISSING_DEPENDENCY
26980   else
26981     PKGHANDLER_COMMAND=
26982 
26983     case $PKGHANDLER in
26984       apt-get)
26985         apt_help     $MISSING_DEPENDENCY ;;
26986       yum)
26987         yum_help     $MISSING_DEPENDENCY ;;
26988       port)
26989         port_help    $MISSING_DEPENDENCY ;;
26990       pkgutil)
26991         pkgutil_help $MISSING_DEPENDENCY ;;
26992       pkgadd)
26993         pkgadd_help  $MISSING_DEPENDENCY ;;
26994     esac
26995 
26996     if test "x$PKGHANDLER_COMMAND" != x; then
26997       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
26998     fi
26999   fi
27000 
27001       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27002     fi
27003   fi
27004 
27005   # Now we have a compiler binary in CC. Make sure it's okay.
27006 
27007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27008 
27009   # First separate the path from the arguments. This will split at the first
27010   # space.
27011   complete="$CC"
27012   path="${complete%% *}"
27013   tmp="$complete EOL"
27014   arguments="${tmp#* }"
27015 
27016   # Input might be given as Windows format, start by converting to
27017   # unix format.
27018   new_path=`$CYGPATH -u "$path"`
27019 
27020   # Now try to locate executable using which
27021   new_path=`$WHICH "$new_path" 2> /dev/null`
27022   # bat and cmd files are not always considered executable in cygwin causing which
27023   # to not find them
27024   if test "x$new_path" = x \
27025       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27026       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27027     new_path=`$CYGPATH -u "$path"`
27028   fi
27029   if test "x$new_path" = x; then
27030     # Oops. Which didn't find the executable.
27031     # The splitting of arguments from the executable at a space might have been incorrect,
27032     # since paths with space are more likely in Windows. Give it another try with the whole
27033     # argument.
27034     path="$complete"
27035     arguments="EOL"
27036     new_path=`$CYGPATH -u "$path"`
27037     new_path=`$WHICH "$new_path" 2> /dev/null`
27038     # bat and cmd files are not always considered executable in cygwin causing which
27039     # to not find them
27040     if test "x$new_path" = x \
27041         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27042         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27043       new_path=`$CYGPATH -u "$path"`
27044     fi
27045     if test "x$new_path" = x; then
27046       # It's still not found. Now this is an unrecoverable error.
27047       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27048 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27049       has_space=`$ECHO "$complete" | $GREP " "`
27050       if test "x$has_space" != x; then
27051         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27052 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27053       fi
27054       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27055     fi
27056   fi
27057 
27058   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27059   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27060   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27061   # "foo.exe" is OK but "foo" is an error.
27062   #
27063   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27064   # It is also a way to make sure we got the proper file name for the real test later on.
27065   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27066   if test "x$test_shortpath" = x; then
27067     # Short path failed, file does not exist as specified.
27068     # Try adding .exe or .cmd
27069     if test -f "${new_path}.exe"; then
27070       input_to_shortpath="${new_path}.exe"
27071     elif test -f "${new_path}.cmd"; then
27072       input_to_shortpath="${new_path}.cmd"
27073     else
27074       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27075 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27076       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27077 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27078       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27079     fi
27080   else
27081     input_to_shortpath="$new_path"
27082   fi
27083 
27084   # Call helper function which possibly converts this using DOS-style short mode.
27085   # If so, the updated path is stored in $new_path.
27086   new_path="$input_to_shortpath"
27087 
27088   input_path="$input_to_shortpath"
27089   # Check if we need to convert this using DOS-style short mode. If the path
27090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27091   # take no chances and rewrite it.
27092   # Note: m4 eats our [], so we need to use [ and ] instead.
27093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27094   if test "x$has_forbidden_chars" != x; then
27095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27096     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27097     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27098     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27099       # Going to short mode and back again did indeed matter. Since short mode is
27100       # case insensitive, let's make it lowercase to improve readability.
27101       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27102       # Now convert it back to Unix-style (cygpath)
27103       input_path=`$CYGPATH -u "$shortmode_path"`
27104       new_path="$input_path"
27105     fi
27106   fi
27107 
27108   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27109   if test "x$test_cygdrive_prefix" = x; then
27110     # As a simple fix, exclude /usr/bin since it's not a real path.
27111     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27112       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27113       # a path prefixed by /cygdrive for fixpath to work.
27114       new_path="$CYGWIN_ROOT_PATH$input_path"
27115     fi
27116   fi
27117 
27118   # remove trailing .exe if any
27119   new_path="${new_path/%.exe/}"
27120 
27121   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27122 
27123   # First separate the path from the arguments. This will split at the first
27124   # space.
27125   complete="$CC"
27126   path="${complete%% *}"
27127   tmp="$complete EOL"
27128   arguments="${tmp#* }"
27129 
27130   # Input might be given as Windows format, start by converting to
27131   # unix format.
27132   new_path="$path"
27133 
27134   windows_path="$new_path"
27135   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27136     unix_path=`$CYGPATH -u "$windows_path"`
27137     new_path="$unix_path"
27138   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27139     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27140     new_path="$unix_path"
27141   fi
27142 
27143 
27144   # Now try to locate executable using which
27145   new_path=`$WHICH "$new_path" 2> /dev/null`
27146 
27147   if test "x$new_path" = x; then
27148     # Oops. Which didn't find the executable.
27149     # The splitting of arguments from the executable at a space might have been incorrect,
27150     # since paths with space are more likely in Windows. Give it another try with the whole
27151     # argument.
27152     path="$complete"
27153     arguments="EOL"
27154     new_path="$path"
27155 
27156   windows_path="$new_path"
27157   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27158     unix_path=`$CYGPATH -u "$windows_path"`
27159     new_path="$unix_path"
27160   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27161     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27162     new_path="$unix_path"
27163   fi
27164 
27165 
27166     new_path=`$WHICH "$new_path" 2> /dev/null`
27167     # bat and cmd files are not always considered executable in MSYS causing which
27168     # to not find them
27169     if test "x$new_path" = x \
27170         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27171         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27172       new_path="$path"
27173 
27174   windows_path="$new_path"
27175   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27176     unix_path=`$CYGPATH -u "$windows_path"`
27177     new_path="$unix_path"
27178   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27179     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27180     new_path="$unix_path"
27181   fi
27182 
27183     fi
27184 
27185     if test "x$new_path" = x; then
27186       # It's still not found. Now this is an unrecoverable error.
27187       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27188 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27189       has_space=`$ECHO "$complete" | $GREP " "`
27190       if test "x$has_space" != x; then
27191         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27192 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27193       fi
27194       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27195     fi
27196   fi
27197 
27198   # Now new_path has a complete unix path to the binary
27199   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27200     # Keep paths in /bin as-is, but remove trailing .exe if any
27201     new_path="${new_path/%.exe/}"
27202     # Do not save /bin paths to all_fixpath_prefixes!
27203   else
27204     # Not in mixed or Windows style, start by that.
27205     new_path=`cmd //c echo $new_path`
27206 
27207   input_path="$new_path"
27208   # Check if we need to convert this using DOS-style short mode. If the path
27209   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27210   # take no chances and rewrite it.
27211   # Note: m4 eats our [], so we need to use [ and ] instead.
27212   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27213   if test "x$has_forbidden_chars" != x; then
27214     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27215     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27216   fi
27217 
27218     # Output is in $new_path
27219 
27220   windows_path="$new_path"
27221   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27222     unix_path=`$CYGPATH -u "$windows_path"`
27223     new_path="$unix_path"
27224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27225     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27226     new_path="$unix_path"
27227   fi
27228 
27229     # remove trailing .exe if any
27230     new_path="${new_path/%.exe/}"
27231 
27232     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27233     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27234   fi
27235 
27236   else
27237     # We're on a posix platform. Hooray! :)
27238     # First separate the path from the arguments. This will split at the first
27239     # space.
27240     complete="$CC"
27241     path="${complete%% *}"
27242     tmp="$complete EOL"
27243     arguments="${tmp#* }"
27244 
27245     # Cannot rely on the command "which" here since it doesn't always work.
27246     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27247     if test -z "$is_absolute_path"; then
27248       # Path to executable is not absolute. Find it.
27249       IFS_save="$IFS"
27250       IFS=:
27251       for p in $PATH; do
27252         if test -f "$p/$path" && test -x "$p/$path"; then
27253           new_path="$p/$path"
27254           break
27255         fi
27256       done
27257       IFS="$IFS_save"
27258     else
27259       # This is an absolute path, we can use it without further modifications.
27260       new_path="$path"
27261     fi
27262 
27263     if test "x$new_path" = x; then
27264       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27265 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27266       has_space=`$ECHO "$complete" | $GREP " "`
27267       if test "x$has_space" != x; then
27268         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27269 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27270       fi
27271       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27272     fi
27273   fi
27274 
27275   # Now join together the path and the arguments once again
27276   if test "x$arguments" != xEOL; then
27277     new_complete="$new_path ${arguments% *}"
27278   else
27279     new_complete="$new_path"
27280   fi
27281 
27282   if test "x$complete" != "x$new_complete"; then
27283     CC="$new_complete"
27284     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
27285 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
27286   fi
27287 
27288   TEST_COMPILER="$CC"
27289 
27290   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
27291 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
27292   SYMLINK_ORIGINAL="$TEST_COMPILER"
27293 
27294   if test "x$OPENJDK_BUILD_OS" != xwindows; then
27295     # Follow a chain of symbolic links. Use readlink
27296     # where it exists, else fall back to horribly
27297     # complicated shell code.
27298     if test "x$READLINK_TESTED" != yes; then
27299       # On MacOSX there is a readlink tool with a different
27300       # purpose than the GNU readlink tool. Check the found readlink.
27301       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27302       if test "x$ISGNU" = x; then
27303         # A readlink that we do not know how to use.
27304         # Are there other non-GNU readlinks out there?
27305         READLINK_TESTED=yes
27306         READLINK=
27307       fi
27308     fi
27309 
27310     if test "x$READLINK" != x; then
27311       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
27312     else
27313       # Save the current directory for restoring afterwards
27314       STARTDIR=$PWD
27315       COUNTER=0
27316       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
27317       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
27318       cd $sym_link_dir
27319       # Use -P flag to resolve symlinks in directories.
27320       cd `$THEPWDCMD -P`
27321       sym_link_dir=`$THEPWDCMD -P`
27322       # Resolve file symlinks
27323       while test $COUNTER -lt 20; do
27324         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27325         if test "x$ISLINK" == x; then
27326           # This is not a symbolic link! We are done!
27327           break
27328         fi
27329         # Again resolve directory symlinks since the target of the just found
27330         # link could be in a different directory
27331         cd `$DIRNAME $ISLINK`
27332         sym_link_dir=`$THEPWDCMD -P`
27333         sym_link_file=`$BASENAME $ISLINK`
27334         let COUNTER=COUNTER+1
27335       done
27336       cd $STARTDIR
27337       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
27338     fi
27339   fi
27340 
27341   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
27342     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
27343 $as_echo "no symlink" >&6; }
27344   else
27345     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
27346 $as_echo "$SYMLINK_ORIGINAL" >&6; }
27347     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
27348 $as_echo_n "checking if CC is disguised ccache... " >&6; }
27349     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
27350     if test "x$COMPILER_BASENAME" = "xccache"; then
27351       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
27352 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
27353       # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
27354       # We want to control ccache invocation ourselves, so ignore this cc and try
27355       # searching again.
27356 
27357       # Remove the path to the fake ccache cc from the PATH
27358       RETRY_COMPILER_SAVED_PATH="$PATH"
27359       COMPILER_DIRNAME=`$DIRNAME $CC`
27360       PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
27361       # Try again looking for our compiler
27362       if test -n "$ac_tool_prefix"; then
27363   for ac_prog in $TOOLCHAIN_CC_BINARY
27364   do
27365     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27366 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27368 $as_echo_n "checking for $ac_word... " >&6; }
27369 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
27370   $as_echo_n "(cached) " >&6
27371 else
27372   if test -n "$PROPER_COMPILER_CC"; then
27373   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
27374 else
27375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27376 for as_dir in $PATH
27377 do
27378   IFS=$as_save_IFS
27379   test -z "$as_dir" && as_dir=.
27380     for ac_exec_ext in '' $ac_executable_extensions; do
27381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27382     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
27383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27384     break 2
27385   fi
27386 done
27387   done
27388 IFS=$as_save_IFS
27389 
27390 fi
27391 fi
27392 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
27393 if test -n "$PROPER_COMPILER_CC"; then
27394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
27395 $as_echo "$PROPER_COMPILER_CC" >&6; }
27396 else
27397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27398 $as_echo "no" >&6; }
27399 fi
27400 
27401 
27402     test -n "$PROPER_COMPILER_CC" && break
27403   done
27404 fi
27405 if test -z "$PROPER_COMPILER_CC"; then
27406   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
27407   for ac_prog in $TOOLCHAIN_CC_BINARY
27408 do
27409   # Extract the first word of "$ac_prog", so it can be a program name with args.
27410 set dummy $ac_prog; ac_word=$2
27411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27412 $as_echo_n "checking for $ac_word... " >&6; }
27413 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
27414   $as_echo_n "(cached) " >&6
27415 else
27416   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
27417   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
27418 else
27419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27420 for as_dir in $PATH
27421 do
27422   IFS=$as_save_IFS
27423   test -z "$as_dir" && as_dir=.
27424     for ac_exec_ext in '' $ac_executable_extensions; do
27425   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27426     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
27427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27428     break 2
27429   fi
27430 done
27431   done
27432 IFS=$as_save_IFS
27433 
27434 fi
27435 fi
27436 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
27437 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
27438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
27439 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
27440 else
27441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27442 $as_echo "no" >&6; }
27443 fi
27444 
27445 
27446   test -n "$ac_ct_PROPER_COMPILER_CC" && break
27447 done
27448 
27449   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
27450     PROPER_COMPILER_CC=""
27451   else
27452     case $cross_compiling:$ac_tool_warned in
27453 yes:)
27454 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27455 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27456 ac_tool_warned=yes ;;
27457 esac
27458     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
27459   fi
27460 fi
27461 
27462 
27463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27464 
27465   # First separate the path from the arguments. This will split at the first
27466   # space.
27467   complete="$PROPER_COMPILER_CC"
27468   path="${complete%% *}"
27469   tmp="$complete EOL"
27470   arguments="${tmp#* }"
27471 
27472   # Input might be given as Windows format, start by converting to
27473   # unix format.
27474   new_path=`$CYGPATH -u "$path"`
27475 
27476   # Now try to locate executable using which
27477   new_path=`$WHICH "$new_path" 2> /dev/null`
27478   # bat and cmd files are not always considered executable in cygwin causing which
27479   # to not find them
27480   if test "x$new_path" = x \
27481       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27482       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27483     new_path=`$CYGPATH -u "$path"`
27484   fi
27485   if test "x$new_path" = x; then
27486     # Oops. Which didn't find the executable.
27487     # The splitting of arguments from the executable at a space might have been incorrect,
27488     # since paths with space are more likely in Windows. Give it another try with the whole
27489     # argument.
27490     path="$complete"
27491     arguments="EOL"
27492     new_path=`$CYGPATH -u "$path"`
27493     new_path=`$WHICH "$new_path" 2> /dev/null`
27494     # bat and cmd files are not always considered executable in cygwin causing which
27495     # to not find them
27496     if test "x$new_path" = x \
27497         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27498         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27499       new_path=`$CYGPATH -u "$path"`
27500     fi
27501     if test "x$new_path" = x; then
27502       # It's still not found. Now this is an unrecoverable error.
27503       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
27504 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
27505       has_space=`$ECHO "$complete" | $GREP " "`
27506       if test "x$has_space" != x; then
27507         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27508 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27509       fi
27510       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27511     fi
27512   fi
27513 
27514   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27515   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27516   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27517   # "foo.exe" is OK but "foo" is an error.
27518   #
27519   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27520   # It is also a way to make sure we got the proper file name for the real test later on.
27521   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27522   if test "x$test_shortpath" = x; then
27523     # Short path failed, file does not exist as specified.
27524     # Try adding .exe or .cmd
27525     if test -f "${new_path}.exe"; then
27526       input_to_shortpath="${new_path}.exe"
27527     elif test -f "${new_path}.cmd"; then
27528       input_to_shortpath="${new_path}.cmd"
27529     else
27530       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
27531 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
27532       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27533 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27534       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27535     fi
27536   else
27537     input_to_shortpath="$new_path"
27538   fi
27539 
27540   # Call helper function which possibly converts this using DOS-style short mode.
27541   # If so, the updated path is stored in $new_path.
27542   new_path="$input_to_shortpath"
27543 
27544   input_path="$input_to_shortpath"
27545   # Check if we need to convert this using DOS-style short mode. If the path
27546   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27547   # take no chances and rewrite it.
27548   # Note: m4 eats our [], so we need to use [ and ] instead.
27549   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27550   if test "x$has_forbidden_chars" != x; then
27551     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27552     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27553     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27554     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27555       # Going to short mode and back again did indeed matter. Since short mode is
27556       # case insensitive, let's make it lowercase to improve readability.
27557       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27558       # Now convert it back to Unix-style (cygpath)
27559       input_path=`$CYGPATH -u "$shortmode_path"`
27560       new_path="$input_path"
27561     fi
27562   fi
27563 
27564   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27565   if test "x$test_cygdrive_prefix" = x; then
27566     # As a simple fix, exclude /usr/bin since it's not a real path.
27567     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27568       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27569       # a path prefixed by /cygdrive for fixpath to work.
27570       new_path="$CYGWIN_ROOT_PATH$input_path"
27571     fi
27572   fi
27573 
27574   # remove trailing .exe if any
27575   new_path="${new_path/%.exe/}"
27576 
27577   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27578 
27579   # First separate the path from the arguments. This will split at the first
27580   # space.
27581   complete="$PROPER_COMPILER_CC"
27582   path="${complete%% *}"
27583   tmp="$complete EOL"
27584   arguments="${tmp#* }"
27585 
27586   # Input might be given as Windows format, start by converting to
27587   # unix format.
27588   new_path="$path"
27589 
27590   windows_path="$new_path"
27591   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27592     unix_path=`$CYGPATH -u "$windows_path"`
27593     new_path="$unix_path"
27594   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27595     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27596     new_path="$unix_path"
27597   fi
27598 
27599 
27600   # Now try to locate executable using which
27601   new_path=`$WHICH "$new_path" 2> /dev/null`
27602 
27603   if test "x$new_path" = x; then
27604     # Oops. Which didn't find the executable.
27605     # The splitting of arguments from the executable at a space might have been incorrect,
27606     # since paths with space are more likely in Windows. Give it another try with the whole
27607     # argument.
27608     path="$complete"
27609     arguments="EOL"
27610     new_path="$path"
27611 
27612   windows_path="$new_path"
27613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27614     unix_path=`$CYGPATH -u "$windows_path"`
27615     new_path="$unix_path"
27616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27617     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27618     new_path="$unix_path"
27619   fi
27620 
27621 
27622     new_path=`$WHICH "$new_path" 2> /dev/null`
27623     # bat and cmd files are not always considered executable in MSYS causing which
27624     # to not find them
27625     if test "x$new_path" = x \
27626         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27627         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27628       new_path="$path"
27629 
27630   windows_path="$new_path"
27631   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27632     unix_path=`$CYGPATH -u "$windows_path"`
27633     new_path="$unix_path"
27634   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27635     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27636     new_path="$unix_path"
27637   fi
27638 
27639     fi
27640 
27641     if test "x$new_path" = x; then
27642       # It's still not found. Now this is an unrecoverable error.
27643       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
27644 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
27645       has_space=`$ECHO "$complete" | $GREP " "`
27646       if test "x$has_space" != x; then
27647         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27648 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27649       fi
27650       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27651     fi
27652   fi
27653 
27654   # Now new_path has a complete unix path to the binary
27655   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27656     # Keep paths in /bin as-is, but remove trailing .exe if any
27657     new_path="${new_path/%.exe/}"
27658     # Do not save /bin paths to all_fixpath_prefixes!
27659   else
27660     # Not in mixed or Windows style, start by that.
27661     new_path=`cmd //c echo $new_path`
27662 
27663   input_path="$new_path"
27664   # Check if we need to convert this using DOS-style short mode. If the path
27665   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27666   # take no chances and rewrite it.
27667   # Note: m4 eats our [], so we need to use [ and ] instead.
27668   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27669   if test "x$has_forbidden_chars" != x; then
27670     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27671     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27672   fi
27673 
27674     # Output is in $new_path
27675 
27676   windows_path="$new_path"
27677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27678     unix_path=`$CYGPATH -u "$windows_path"`
27679     new_path="$unix_path"
27680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27681     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27682     new_path="$unix_path"
27683   fi
27684 
27685     # remove trailing .exe if any
27686     new_path="${new_path/%.exe/}"
27687 
27688     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27689     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27690   fi
27691 
27692   else
27693     # We're on a posix platform. Hooray! :)
27694     # First separate the path from the arguments. This will split at the first
27695     # space.
27696     complete="$PROPER_COMPILER_CC"
27697     path="${complete%% *}"
27698     tmp="$complete EOL"
27699     arguments="${tmp#* }"
27700 
27701     # Cannot rely on the command "which" here since it doesn't always work.
27702     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27703     if test -z "$is_absolute_path"; then
27704       # Path to executable is not absolute. Find it.
27705       IFS_save="$IFS"
27706       IFS=:
27707       for p in $PATH; do
27708         if test -f "$p/$path" && test -x "$p/$path"; then
27709           new_path="$p/$path"
27710           break
27711         fi
27712       done
27713       IFS="$IFS_save"
27714     else
27715       # This is an absolute path, we can use it without further modifications.
27716       new_path="$path"
27717     fi
27718 
27719     if test "x$new_path" = x; then
27720       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
27721 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
27722       has_space=`$ECHO "$complete" | $GREP " "`
27723       if test "x$has_space" != x; then
27724         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27725 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27726       fi
27727       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27728     fi
27729   fi
27730 
27731   # Now join together the path and the arguments once again
27732   if test "x$arguments" != xEOL; then
27733     new_complete="$new_path ${arguments% *}"
27734   else
27735     new_complete="$new_path"
27736   fi
27737 
27738   if test "x$complete" != "x$new_complete"; then
27739     PROPER_COMPILER_CC="$new_complete"
27740     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
27741 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
27742   fi
27743 
27744       PATH="$RETRY_COMPILER_SAVED_PATH"
27745 
27746       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
27747 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
27748 
27749   if test "x$OPENJDK_BUILD_OS" != xwindows; then
27750     # Follow a chain of symbolic links. Use readlink
27751     # where it exists, else fall back to horribly
27752     # complicated shell code.
27753     if test "x$READLINK_TESTED" != yes; then
27754       # On MacOSX there is a readlink tool with a different
27755       # purpose than the GNU readlink tool. Check the found readlink.
27756       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27757       if test "x$ISGNU" = x; then
27758         # A readlink that we do not know how to use.
27759         # Are there other non-GNU readlinks out there?
27760         READLINK_TESTED=yes
27761         READLINK=
27762       fi
27763     fi
27764 
27765     if test "x$READLINK" != x; then
27766       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
27767     else
27768       # Save the current directory for restoring afterwards
27769       STARTDIR=$PWD
27770       COUNTER=0
27771       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
27772       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
27773       cd $sym_link_dir
27774       # Use -P flag to resolve symlinks in directories.
27775       cd `$THEPWDCMD -P`
27776       sym_link_dir=`$THEPWDCMD -P`
27777       # Resolve file symlinks
27778       while test $COUNTER -lt 20; do
27779         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27780         if test "x$ISLINK" == x; then
27781           # This is not a symbolic link! We are done!
27782           break
27783         fi
27784         # Again resolve directory symlinks since the target of the just found
27785         # link could be in a different directory
27786         cd `$DIRNAME $ISLINK`
27787         sym_link_dir=`$THEPWDCMD -P`
27788         sym_link_file=`$BASENAME $ISLINK`
27789         let COUNTER=COUNTER+1
27790       done
27791       cd $STARTDIR
27792       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
27793     fi
27794   fi
27795 
27796       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
27797 $as_echo "$PROPER_COMPILER_CC" >&6; }
27798       CC="$PROPER_COMPILER_CC"
27799     else
27800       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
27801 $as_echo "no, keeping CC" >&6; }
27802     fi
27803   fi
27804 
27805 
27806   COMPILER=$CC
27807   COMPILER_NAME=$COMPILER_NAME
27808 
27809   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
27810     # cc -V output typically looks like
27811     #     cc: Sun C 5.12 Linux_i386 2011/11/16
27812     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
27813     # Check that this is likely to be the Solaris Studio cc.
27814     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
27815     if test $? -ne 0; then
27816       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
27817       { $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
27818 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27819       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
27820 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
27821       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
27822 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
27823       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27824     fi
27825     # Remove usage instructions (if present), and
27826     # collapse compiler output into a single line
27827     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
27828         $SED -e 's/ *[Uu]sage:.*//'`
27829     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27830         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
27831   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
27832     # xlc -qversion output typically looks like
27833     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
27834     #     Version: 11.01.0000.0015
27835     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
27836     # Check that this is likely to be the IBM XL C compiler.
27837     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
27838     if test $? -ne 0; then
27839       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
27840       { $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
27841 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27842       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
27843 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
27844       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
27845 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
27846       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27847     fi
27848     # Collapse compiler output into a single line
27849     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
27850     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27851         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
27852   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
27853     # There is no specific version flag, but all output starts with a version string.
27854     # First line typically looks something like:
27855     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
27856     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
27857     # Check that this is likely to be Microsoft CL.EXE.
27858     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
27859     if test $? -ne 0; then
27860       { $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
27861 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27862       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
27863 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
27864       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27865     fi
27866     # Collapse compiler output into a single line
27867     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
27868     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27869         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
27870   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
27871     # gcc --version output typically looks like
27872     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
27873     #     Copyright (C) 2013 Free Software Foundation, Inc.
27874     #     This is free software; see the source for copying conditions.  There is NO
27875     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27876     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
27877     # Check that this is likely to be GCC.
27878     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
27879     if test $? -ne 0; then
27880       { $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
27881 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27882       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
27883 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
27884       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27885     fi
27886     # Remove Copyright and legalese from version string, and
27887     # collapse into a single line
27888     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
27889         $SED -e 's/ *Copyright .*//'`
27890     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27891         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
27892   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
27893     # clang --version output typically looks like
27894     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
27895     #    clang version 3.3 (tags/RELEASE_33/final)
27896     # or
27897     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
27898     #    Target: x86_64-pc-linux-gnu
27899     #    Thread model: posix
27900     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
27901     # Check that this is likely to be clang
27902     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
27903     if test $? -ne 0; then
27904       { $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
27905 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27906       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
27907 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
27908       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27909     fi
27910     # Collapse compiler output into a single line
27911     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
27912     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27913         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
27914 
27915   else
27916       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
27917   fi
27918   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
27919   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
27920   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
27921   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
27922 
27923   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
27924 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
27925 
27926 
27927   # Now that we have resolved CC ourself, let autoconf have its go at it
27928   ac_ext=c
27929 ac_cpp='$CPP $CPPFLAGS'
27930 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27931 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27932 ac_compiler_gnu=$ac_cv_c_compiler_gnu
27933 if test -n "$ac_tool_prefix"; then
27934   for ac_prog in $CC
27935   do
27936     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27937 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27939 $as_echo_n "checking for $ac_word... " >&6; }
27940 if ${ac_cv_prog_CC+:} false; then :
27941   $as_echo_n "(cached) " >&6
27942 else
27943   if test -n "$CC"; then
27944   ac_cv_prog_CC="$CC" # Let the user override the test.
27945 else
27946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27947 for as_dir in $PATH
27948 do
27949   IFS=$as_save_IFS
27950   test -z "$as_dir" && as_dir=.
27951     for ac_exec_ext in '' $ac_executable_extensions; do
27952   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27953     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
27954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27955     break 2
27956   fi
27957 done
27958   done
27959 IFS=$as_save_IFS
27960 
27961 fi
27962 fi
27963 CC=$ac_cv_prog_CC
27964 if test -n "$CC"; then
27965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
27966 $as_echo "$CC" >&6; }
27967 else
27968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27969 $as_echo "no" >&6; }
27970 fi
27971 
27972 
27973     test -n "$CC" && break
27974   done
27975 fi
27976 if test -z "$CC"; then
27977   ac_ct_CC=$CC
27978   for ac_prog in $CC
27979 do
27980   # Extract the first word of "$ac_prog", so it can be a program name with args.
27981 set dummy $ac_prog; ac_word=$2
27982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27983 $as_echo_n "checking for $ac_word... " >&6; }
27984 if ${ac_cv_prog_ac_ct_CC+:} false; then :
27985   $as_echo_n "(cached) " >&6
27986 else
27987   if test -n "$ac_ct_CC"; then
27988   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
27989 else
27990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27991 for as_dir in $PATH
27992 do
27993   IFS=$as_save_IFS
27994   test -z "$as_dir" && as_dir=.
27995     for ac_exec_ext in '' $ac_executable_extensions; do
27996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27997     ac_cv_prog_ac_ct_CC="$ac_prog"
27998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27999     break 2
28000   fi
28001 done
28002   done
28003 IFS=$as_save_IFS
28004 
28005 fi
28006 fi
28007 ac_ct_CC=$ac_cv_prog_ac_ct_CC
28008 if test -n "$ac_ct_CC"; then
28009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28010 $as_echo "$ac_ct_CC" >&6; }
28011 else
28012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28013 $as_echo "no" >&6; }
28014 fi
28015 
28016 
28017   test -n "$ac_ct_CC" && break
28018 done
28019 
28020   if test "x$ac_ct_CC" = x; then
28021     CC=""
28022   else
28023     case $cross_compiling:$ac_tool_warned in
28024 yes:)
28025 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28026 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28027 ac_tool_warned=yes ;;
28028 esac
28029     CC=$ac_ct_CC
28030   fi
28031 fi
28032 
28033 
28034 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28035 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28036 as_fn_error $? "no acceptable C compiler found in \$PATH
28037 See \`config.log' for more details" "$LINENO" 5; }
28038 
28039 # Provide some information about the compiler.
28040 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28041 set X $ac_compile
28042 ac_compiler=$2
28043 for ac_option in --version -v -V -qversion; do
28044   { { ac_try="$ac_compiler $ac_option >&5"
28045 case "(($ac_try" in
28046   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28047   *) ac_try_echo=$ac_try;;
28048 esac
28049 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28050 $as_echo "$ac_try_echo"; } >&5
28051   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28052   ac_status=$?
28053   if test -s conftest.err; then
28054     sed '10a\
28055 ... rest of stderr output deleted ...
28056          10q' conftest.err >conftest.er1
28057     cat conftest.er1 >&5
28058   fi
28059   rm -f conftest.er1 conftest.err
28060   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28061   test $ac_status = 0; }
28062 done
28063 
28064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28065 /* end confdefs.h.  */
28066 
28067 int
28068 main ()
28069 {
28070 
28071   ;
28072   return 0;
28073 }
28074 _ACEOF
28075 ac_clean_files_save=$ac_clean_files
28076 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28077 # Try to create an executable without -o first, disregard a.out.
28078 # It will help us diagnose broken compilers, and finding out an intuition
28079 # of exeext.
28080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28081 $as_echo_n "checking whether the C compiler works... " >&6; }
28082 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28083 
28084 # The possible output files:
28085 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28086 
28087 ac_rmfiles=
28088 for ac_file in $ac_files
28089 do
28090   case $ac_file in
28091     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28092     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28093   esac
28094 done
28095 rm -f $ac_rmfiles
28096 
28097 if { { ac_try="$ac_link_default"
28098 case "(($ac_try" in
28099   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28100   *) ac_try_echo=$ac_try;;
28101 esac
28102 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28103 $as_echo "$ac_try_echo"; } >&5
28104   (eval "$ac_link_default") 2>&5
28105   ac_status=$?
28106   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28107   test $ac_status = 0; }; then :
28108   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28109 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28110 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
28111 # so that the user can short-circuit this test for compilers unknown to
28112 # Autoconf.
28113 for ac_file in $ac_files ''
28114 do
28115   test -f "$ac_file" || continue
28116   case $ac_file in
28117     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28118         ;;
28119     [ab].out )
28120         # We found the default executable, but exeext='' is most
28121         # certainly right.
28122         break;;
28123     *.* )
28124         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28125         then :; else
28126            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28127         fi
28128         # We set ac_cv_exeext here because the later test for it is not
28129         # safe: cross compilers may not add the suffix if given an `-o'
28130         # argument, so we may need to know it at that point already.
28131         # Even if this section looks crufty: it has the advantage of
28132         # actually working.
28133         break;;
28134     * )
28135         break;;
28136   esac
28137 done
28138 test "$ac_cv_exeext" = no && ac_cv_exeext=
28139 
28140 else
28141   ac_file=''
28142 fi
28143 if test -z "$ac_file"; then :
28144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28145 $as_echo "no" >&6; }
28146 $as_echo "$as_me: failed program was:" >&5
28147 sed 's/^/| /' conftest.$ac_ext >&5
28148 
28149 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28150 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28151 as_fn_error 77 "C compiler cannot create executables
28152 See \`config.log' for more details" "$LINENO" 5; }
28153 else
28154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28155 $as_echo "yes" >&6; }
28156 fi
28157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28158 $as_echo_n "checking for C compiler default output file name... " >&6; }
28159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28160 $as_echo "$ac_file" >&6; }
28161 ac_exeext=$ac_cv_exeext
28162 
28163 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28164 ac_clean_files=$ac_clean_files_save
28165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28166 $as_echo_n "checking for suffix of executables... " >&6; }
28167 if { { ac_try="$ac_link"
28168 case "(($ac_try" in
28169   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28170   *) ac_try_echo=$ac_try;;
28171 esac
28172 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28173 $as_echo "$ac_try_echo"; } >&5
28174   (eval "$ac_link") 2>&5
28175   ac_status=$?
28176   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28177   test $ac_status = 0; }; then :
28178   # If both `conftest.exe' and `conftest' are `present' (well, observable)
28179 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28180 # work properly (i.e., refer to `conftest.exe'), while it won't with
28181 # `rm'.
28182 for ac_file in conftest.exe conftest conftest.*; do
28183   test -f "$ac_file" || continue
28184   case $ac_file in
28185     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28186     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28187           break;;
28188     * ) break;;
28189   esac
28190 done
28191 else
28192   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28193 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28194 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28195 See \`config.log' for more details" "$LINENO" 5; }
28196 fi
28197 rm -f conftest conftest$ac_cv_exeext
28198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28199 $as_echo "$ac_cv_exeext" >&6; }
28200 
28201 rm -f conftest.$ac_ext
28202 EXEEXT=$ac_cv_exeext
28203 ac_exeext=$EXEEXT
28204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28205 /* end confdefs.h.  */
28206 #include <stdio.h>
28207 int
28208 main ()
28209 {
28210 FILE *f = fopen ("conftest.out", "w");
28211  return ferror (f) || fclose (f) != 0;
28212 
28213   ;
28214   return 0;
28215 }
28216 _ACEOF
28217 ac_clean_files="$ac_clean_files conftest.out"
28218 # Check that the compiler produces executables we can run.  If not, either
28219 # the compiler is broken, or we cross compile.
28220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28221 $as_echo_n "checking whether we are cross compiling... " >&6; }
28222 if test "$cross_compiling" != yes; then
28223   { { ac_try="$ac_link"
28224 case "(($ac_try" in
28225   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28226   *) ac_try_echo=$ac_try;;
28227 esac
28228 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28229 $as_echo "$ac_try_echo"; } >&5
28230   (eval "$ac_link") 2>&5
28231   ac_status=$?
28232   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28233   test $ac_status = 0; }
28234   if { ac_try='./conftest$ac_cv_exeext'
28235   { { case "(($ac_try" in
28236   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28237   *) ac_try_echo=$ac_try;;
28238 esac
28239 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28240 $as_echo "$ac_try_echo"; } >&5
28241   (eval "$ac_try") 2>&5
28242   ac_status=$?
28243   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28244   test $ac_status = 0; }; }; then
28245     cross_compiling=no
28246   else
28247     if test "$cross_compiling" = maybe; then
28248         cross_compiling=yes
28249     else
28250         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28251 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28252 as_fn_error $? "cannot run C compiled programs.
28253 If you meant to cross compile, use \`--host'.
28254 See \`config.log' for more details" "$LINENO" 5; }
28255     fi
28256   fi
28257 fi
28258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28259 $as_echo "$cross_compiling" >&6; }
28260 
28261 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28262 ac_clean_files=$ac_clean_files_save
28263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28264 $as_echo_n "checking for suffix of object files... " >&6; }
28265 if ${ac_cv_objext+:} false; then :
28266   $as_echo_n "(cached) " >&6
28267 else
28268   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28269 /* end confdefs.h.  */
28270 
28271 int
28272 main ()
28273 {
28274 
28275   ;
28276   return 0;
28277 }
28278 _ACEOF
28279 rm -f conftest.o conftest.obj
28280 if { { ac_try="$ac_compile"
28281 case "(($ac_try" in
28282   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28283   *) ac_try_echo=$ac_try;;
28284 esac
28285 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28286 $as_echo "$ac_try_echo"; } >&5
28287   (eval "$ac_compile") 2>&5
28288   ac_status=$?
28289   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28290   test $ac_status = 0; }; then :
28291   for ac_file in conftest.o conftest.obj conftest.*; do
28292   test -f "$ac_file" || continue;
28293   case $ac_file in
28294     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28295     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28296        break;;
28297   esac
28298 done
28299 else
28300   $as_echo "$as_me: failed program was:" >&5
28301 sed 's/^/| /' conftest.$ac_ext >&5
28302 
28303 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28304 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28305 as_fn_error $? "cannot compute suffix of object files: cannot compile
28306 See \`config.log' for more details" "$LINENO" 5; }
28307 fi
28308 rm -f conftest.$ac_cv_objext conftest.$ac_ext
28309 fi
28310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
28311 $as_echo "$ac_cv_objext" >&6; }
28312 OBJEXT=$ac_cv_objext
28313 ac_objext=$OBJEXT
28314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
28315 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
28316 if ${ac_cv_c_compiler_gnu+:} false; then :
28317   $as_echo_n "(cached) " >&6
28318 else
28319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28320 /* end confdefs.h.  */
28321 
28322 int
28323 main ()
28324 {
28325 #ifndef __GNUC__
28326        choke me
28327 #endif
28328 
28329   ;
28330   return 0;
28331 }
28332 _ACEOF
28333 if ac_fn_c_try_compile "$LINENO"; then :
28334   ac_compiler_gnu=yes
28335 else
28336   ac_compiler_gnu=no
28337 fi
28338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28339 ac_cv_c_compiler_gnu=$ac_compiler_gnu
28340 
28341 fi
28342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
28343 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
28344 if test $ac_compiler_gnu = yes; then
28345   GCC=yes
28346 else
28347   GCC=
28348 fi
28349 ac_test_CFLAGS=${CFLAGS+set}
28350 ac_save_CFLAGS=$CFLAGS
28351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
28352 $as_echo_n "checking whether $CC accepts -g... " >&6; }
28353 if ${ac_cv_prog_cc_g+:} false; then :
28354   $as_echo_n "(cached) " >&6
28355 else
28356   ac_save_c_werror_flag=$ac_c_werror_flag
28357    ac_c_werror_flag=yes
28358    ac_cv_prog_cc_g=no
28359    CFLAGS="-g"
28360    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28361 /* end confdefs.h.  */
28362 
28363 int
28364 main ()
28365 {
28366 
28367   ;
28368   return 0;
28369 }
28370 _ACEOF
28371 if ac_fn_c_try_compile "$LINENO"; then :
28372   ac_cv_prog_cc_g=yes
28373 else
28374   CFLAGS=""
28375       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28376 /* end confdefs.h.  */
28377 
28378 int
28379 main ()
28380 {
28381 
28382   ;
28383   return 0;
28384 }
28385 _ACEOF
28386 if ac_fn_c_try_compile "$LINENO"; then :
28387 
28388 else
28389   ac_c_werror_flag=$ac_save_c_werror_flag
28390          CFLAGS="-g"
28391          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28392 /* end confdefs.h.  */
28393 
28394 int
28395 main ()
28396 {
28397 
28398   ;
28399   return 0;
28400 }
28401 _ACEOF
28402 if ac_fn_c_try_compile "$LINENO"; then :
28403   ac_cv_prog_cc_g=yes
28404 fi
28405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28406 fi
28407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28408 fi
28409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28410    ac_c_werror_flag=$ac_save_c_werror_flag
28411 fi
28412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
28413 $as_echo "$ac_cv_prog_cc_g" >&6; }
28414 if test "$ac_test_CFLAGS" = set; then
28415   CFLAGS=$ac_save_CFLAGS
28416 elif test $ac_cv_prog_cc_g = yes; then
28417   if test "$GCC" = yes; then
28418     CFLAGS="-g -O2"
28419   else
28420     CFLAGS="-g"
28421   fi
28422 else
28423   if test "$GCC" = yes; then
28424     CFLAGS="-O2"
28425   else
28426     CFLAGS=
28427   fi
28428 fi
28429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
28430 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
28431 if ${ac_cv_prog_cc_c89+:} false; then :
28432   $as_echo_n "(cached) " >&6
28433 else
28434   ac_cv_prog_cc_c89=no
28435 ac_save_CC=$CC
28436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28437 /* end confdefs.h.  */
28438 #include <stdarg.h>
28439 #include <stdio.h>
28440 struct stat;
28441 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
28442 struct buf { int x; };
28443 FILE * (*rcsopen) (struct buf *, struct stat *, int);
28444 static char *e (p, i)
28445      char **p;
28446      int i;
28447 {
28448   return p[i];
28449 }
28450 static char *f (char * (*g) (char **, int), char **p, ...)
28451 {
28452   char *s;
28453   va_list v;
28454   va_start (v,p);
28455   s = g (p, va_arg (v,int));
28456   va_end (v);
28457   return s;
28458 }
28459 
28460 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
28461    function prototypes and stuff, but not '\xHH' hex character constants.
28462    These don't provoke an error unfortunately, instead are silently treated
28463    as 'x'.  The following induces an error, until -std is added to get
28464    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
28465    array size at least.  It's necessary to write '\x00'==0 to get something
28466    that's true only with -std.  */
28467 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
28468 
28469 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
28470    inside strings and character constants.  */
28471 #define FOO(x) 'x'
28472 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
28473 
28474 int test (int i, double x);
28475 struct s1 {int (*f) (int a);};
28476 struct s2 {int (*f) (double a);};
28477 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
28478 int argc;
28479 char **argv;
28480 int
28481 main ()
28482 {
28483 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
28484   ;
28485   return 0;
28486 }
28487 _ACEOF
28488 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
28489         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
28490 do
28491   CC="$ac_save_CC $ac_arg"
28492   if ac_fn_c_try_compile "$LINENO"; then :
28493   ac_cv_prog_cc_c89=$ac_arg
28494 fi
28495 rm -f core conftest.err conftest.$ac_objext
28496   test "x$ac_cv_prog_cc_c89" != "xno" && break
28497 done
28498 rm -f conftest.$ac_ext
28499 CC=$ac_save_CC
28500 
28501 fi
28502 # AC_CACHE_VAL
28503 case "x$ac_cv_prog_cc_c89" in
28504   x)
28505     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
28506 $as_echo "none needed" >&6; } ;;
28507   xno)
28508     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
28509 $as_echo "unsupported" >&6; } ;;
28510   *)
28511     CC="$CC $ac_cv_prog_cc_c89"
28512     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
28513 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
28514 esac
28515 if test "x$ac_cv_prog_cc_c89" != xno; then :
28516 
28517 fi
28518 
28519 ac_ext=cpp
28520 ac_cpp='$CXXCPP $CPPFLAGS'
28521 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28522 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28523 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28524 
28525 
28526 
28527   COMPILER_NAME=C++
28528   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
28529 
28530   if test "x$CXX" != x; then
28531     # User has supplied compiler name already, always let that override.
28532     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
28533 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
28534     if test "x`basename $CXX`" = "x$CXX"; then
28535       # A command without a complete path is provided, search $PATH.
28536 
28537       for ac_prog in $CXX
28538 do
28539   # Extract the first word of "$ac_prog", so it can be a program name with args.
28540 set dummy $ac_prog; ac_word=$2
28541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28542 $as_echo_n "checking for $ac_word... " >&6; }
28543 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
28544   $as_echo_n "(cached) " >&6
28545 else
28546   case $POTENTIAL_CXX in
28547   [\\/]* | ?:[\\/]*)
28548   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
28549   ;;
28550   *)
28551   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28552 for as_dir in $PATH
28553 do
28554   IFS=$as_save_IFS
28555   test -z "$as_dir" && as_dir=.
28556     for ac_exec_ext in '' $ac_executable_extensions; do
28557   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28558     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
28559     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28560     break 2
28561   fi
28562 done
28563   done
28564 IFS=$as_save_IFS
28565 
28566   ;;
28567 esac
28568 fi
28569 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
28570 if test -n "$POTENTIAL_CXX"; then
28571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
28572 $as_echo "$POTENTIAL_CXX" >&6; }
28573 else
28574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28575 $as_echo "no" >&6; }
28576 fi
28577 
28578 
28579   test -n "$POTENTIAL_CXX" && break
28580 done
28581 
28582       if test "x$POTENTIAL_CXX" != x; then
28583         CXX=$POTENTIAL_CXX
28584       else
28585         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
28586       fi
28587     else
28588       # Otherwise it might already be a complete path
28589       if test ! -x "$CXX"; then
28590         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
28591       fi
28592     fi
28593   else
28594     # No user supplied value. Locate compiler ourselves.
28595 
28596     # If we are cross compiling, assume cross compilation tools follows the
28597     # cross compilation standard where they are prefixed with the autoconf
28598     # standard name for the target. For example the binary
28599     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28600     # If we are not cross compiling, then the default compiler name will be
28601     # used.
28602 
28603     CXX=
28604     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28605     # before checking the rest of the PATH.
28606     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28607     # step, this should not be necessary.
28608     if test -n "$TOOLCHAIN_PATH"; then
28609       PATH_save="$PATH"
28610       PATH="$TOOLCHAIN_PATH"
28611       for ac_prog in $SEARCH_LIST
28612 do
28613   # Extract the first word of "$ac_prog", so it can be a program name with args.
28614 set dummy $ac_prog; ac_word=$2
28615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28616 $as_echo_n "checking for $ac_word... " >&6; }
28617 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
28618   $as_echo_n "(cached) " >&6
28619 else
28620   case $TOOLCHAIN_PATH_CXX in
28621   [\\/]* | ?:[\\/]*)
28622   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
28623   ;;
28624   *)
28625   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28626 for as_dir in $PATH
28627 do
28628   IFS=$as_save_IFS
28629   test -z "$as_dir" && as_dir=.
28630     for ac_exec_ext in '' $ac_executable_extensions; do
28631   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28632     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
28633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28634     break 2
28635   fi
28636 done
28637   done
28638 IFS=$as_save_IFS
28639 
28640   ;;
28641 esac
28642 fi
28643 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
28644 if test -n "$TOOLCHAIN_PATH_CXX"; then
28645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
28646 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
28647 else
28648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28649 $as_echo "no" >&6; }
28650 fi
28651 
28652 
28653   test -n "$TOOLCHAIN_PATH_CXX" && break
28654 done
28655 
28656       CXX=$TOOLCHAIN_PATH_CXX
28657       PATH="$PATH_save"
28658     fi
28659 
28660     # AC_PATH_PROGS can't be run multiple times with the same variable,
28661     # so create a new name for this run.
28662     if test "x$CXX" = x; then
28663       for ac_prog in $TOOLCHAIN_CXX_BINARY
28664 do
28665   # Extract the first word of "$ac_prog", so it can be a program name with args.
28666 set dummy $ac_prog; ac_word=$2
28667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28668 $as_echo_n "checking for $ac_word... " >&6; }
28669 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
28670   $as_echo_n "(cached) " >&6
28671 else
28672   case $POTENTIAL_CXX in
28673   [\\/]* | ?:[\\/]*)
28674   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
28675   ;;
28676   *)
28677   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28678 for as_dir in $PATH
28679 do
28680   IFS=$as_save_IFS
28681   test -z "$as_dir" && as_dir=.
28682     for ac_exec_ext in '' $ac_executable_extensions; do
28683   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28684     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
28685     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28686     break 2
28687   fi
28688 done
28689   done
28690 IFS=$as_save_IFS
28691 
28692   ;;
28693 esac
28694 fi
28695 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
28696 if test -n "$POTENTIAL_CXX"; then
28697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
28698 $as_echo "$POTENTIAL_CXX" >&6; }
28699 else
28700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28701 $as_echo "no" >&6; }
28702 fi
28703 
28704 
28705   test -n "$POTENTIAL_CXX" && break
28706 done
28707 
28708       CXX=$POTENTIAL_CXX
28709     fi
28710 
28711     if test "x$CXX" = x; then
28712 
28713   # Print a helpful message on how to acquire the necessary build dependency.
28714   # devkit is the help tag: freetype, cups, pulse, alsa etc
28715   MISSING_DEPENDENCY=devkit
28716 
28717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28718     cygwin_help $MISSING_DEPENDENCY
28719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28720     msys_help $MISSING_DEPENDENCY
28721   else
28722     PKGHANDLER_COMMAND=
28723 
28724     case $PKGHANDLER in
28725       apt-get)
28726         apt_help     $MISSING_DEPENDENCY ;;
28727       yum)
28728         yum_help     $MISSING_DEPENDENCY ;;
28729       port)
28730         port_help    $MISSING_DEPENDENCY ;;
28731       pkgutil)
28732         pkgutil_help $MISSING_DEPENDENCY ;;
28733       pkgadd)
28734         pkgadd_help  $MISSING_DEPENDENCY ;;
28735     esac
28736 
28737     if test "x$PKGHANDLER_COMMAND" != x; then
28738       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28739     fi
28740   fi
28741 
28742       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28743     fi
28744   fi
28745 
28746   # Now we have a compiler binary in CXX. Make sure it's okay.
28747 
28748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28749 
28750   # First separate the path from the arguments. This will split at the first
28751   # space.
28752   complete="$CXX"
28753   path="${complete%% *}"
28754   tmp="$complete EOL"
28755   arguments="${tmp#* }"
28756 
28757   # Input might be given as Windows format, start by converting to
28758   # unix format.
28759   new_path=`$CYGPATH -u "$path"`
28760 
28761   # Now try to locate executable using which
28762   new_path=`$WHICH "$new_path" 2> /dev/null`
28763   # bat and cmd files are not always considered executable in cygwin causing which
28764   # to not find them
28765   if test "x$new_path" = x \
28766       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28767       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28768     new_path=`$CYGPATH -u "$path"`
28769   fi
28770   if test "x$new_path" = x; then
28771     # Oops. Which didn't find the executable.
28772     # The splitting of arguments from the executable at a space might have been incorrect,
28773     # since paths with space are more likely in Windows. Give it another try with the whole
28774     # argument.
28775     path="$complete"
28776     arguments="EOL"
28777     new_path=`$CYGPATH -u "$path"`
28778     new_path=`$WHICH "$new_path" 2> /dev/null`
28779     # bat and cmd files are not always considered executable in cygwin causing which
28780     # to not find them
28781     if test "x$new_path" = x \
28782         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28783         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28784       new_path=`$CYGPATH -u "$path"`
28785     fi
28786     if test "x$new_path" = x; then
28787       # It's still not found. Now this is an unrecoverable error.
28788       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
28789 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
28790       has_space=`$ECHO "$complete" | $GREP " "`
28791       if test "x$has_space" != x; then
28792         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28793 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28794       fi
28795       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
28796     fi
28797   fi
28798 
28799   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28800   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28801   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28802   # "foo.exe" is OK but "foo" is an error.
28803   #
28804   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28805   # It is also a way to make sure we got the proper file name for the real test later on.
28806   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28807   if test "x$test_shortpath" = x; then
28808     # Short path failed, file does not exist as specified.
28809     # Try adding .exe or .cmd
28810     if test -f "${new_path}.exe"; then
28811       input_to_shortpath="${new_path}.exe"
28812     elif test -f "${new_path}.cmd"; then
28813       input_to_shortpath="${new_path}.cmd"
28814     else
28815       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
28816 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
28817       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28818 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28819       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
28820     fi
28821   else
28822     input_to_shortpath="$new_path"
28823   fi
28824 
28825   # Call helper function which possibly converts this using DOS-style short mode.
28826   # If so, the updated path is stored in $new_path.
28827   new_path="$input_to_shortpath"
28828 
28829   input_path="$input_to_shortpath"
28830   # Check if we need to convert this using DOS-style short mode. If the path
28831   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28832   # take no chances and rewrite it.
28833   # Note: m4 eats our [], so we need to use [ and ] instead.
28834   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28835   if test "x$has_forbidden_chars" != x; then
28836     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28837     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28838     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28839     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28840       # Going to short mode and back again did indeed matter. Since short mode is
28841       # case insensitive, let's make it lowercase to improve readability.
28842       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28843       # Now convert it back to Unix-style (cygpath)
28844       input_path=`$CYGPATH -u "$shortmode_path"`
28845       new_path="$input_path"
28846     fi
28847   fi
28848 
28849   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28850   if test "x$test_cygdrive_prefix" = x; then
28851     # As a simple fix, exclude /usr/bin since it's not a real path.
28852     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28853       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28854       # a path prefixed by /cygdrive for fixpath to work.
28855       new_path="$CYGWIN_ROOT_PATH$input_path"
28856     fi
28857   fi
28858 
28859   # remove trailing .exe if any
28860   new_path="${new_path/%.exe/}"
28861 
28862   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28863 
28864   # First separate the path from the arguments. This will split at the first
28865   # space.
28866   complete="$CXX"
28867   path="${complete%% *}"
28868   tmp="$complete EOL"
28869   arguments="${tmp#* }"
28870 
28871   # Input might be given as Windows format, start by converting to
28872   # unix format.
28873   new_path="$path"
28874 
28875   windows_path="$new_path"
28876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28877     unix_path=`$CYGPATH -u "$windows_path"`
28878     new_path="$unix_path"
28879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28880     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28881     new_path="$unix_path"
28882   fi
28883 
28884 
28885   # Now try to locate executable using which
28886   new_path=`$WHICH "$new_path" 2> /dev/null`
28887 
28888   if test "x$new_path" = x; then
28889     # Oops. Which didn't find the executable.
28890     # The splitting of arguments from the executable at a space might have been incorrect,
28891     # since paths with space are more likely in Windows. Give it another try with the whole
28892     # argument.
28893     path="$complete"
28894     arguments="EOL"
28895     new_path="$path"
28896 
28897   windows_path="$new_path"
28898   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28899     unix_path=`$CYGPATH -u "$windows_path"`
28900     new_path="$unix_path"
28901   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28902     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28903     new_path="$unix_path"
28904   fi
28905 
28906 
28907     new_path=`$WHICH "$new_path" 2> /dev/null`
28908     # bat and cmd files are not always considered executable in MSYS causing which
28909     # to not find them
28910     if test "x$new_path" = x \
28911         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28912         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28913       new_path="$path"
28914 
28915   windows_path="$new_path"
28916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28917     unix_path=`$CYGPATH -u "$windows_path"`
28918     new_path="$unix_path"
28919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28921     new_path="$unix_path"
28922   fi
28923 
28924     fi
28925 
28926     if test "x$new_path" = x; then
28927       # It's still not found. Now this is an unrecoverable error.
28928       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
28929 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
28930       has_space=`$ECHO "$complete" | $GREP " "`
28931       if test "x$has_space" != x; then
28932         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28933 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28934       fi
28935       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
28936     fi
28937   fi
28938 
28939   # Now new_path has a complete unix path to the binary
28940   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28941     # Keep paths in /bin as-is, but remove trailing .exe if any
28942     new_path="${new_path/%.exe/}"
28943     # Do not save /bin paths to all_fixpath_prefixes!
28944   else
28945     # Not in mixed or Windows style, start by that.
28946     new_path=`cmd //c echo $new_path`
28947 
28948   input_path="$new_path"
28949   # Check if we need to convert this using DOS-style short mode. If the path
28950   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28951   # take no chances and rewrite it.
28952   # Note: m4 eats our [], so we need to use [ and ] instead.
28953   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28954   if test "x$has_forbidden_chars" != x; then
28955     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28956     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28957   fi
28958 
28959     # Output is in $new_path
28960 
28961   windows_path="$new_path"
28962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28963     unix_path=`$CYGPATH -u "$windows_path"`
28964     new_path="$unix_path"
28965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28966     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28967     new_path="$unix_path"
28968   fi
28969 
28970     # remove trailing .exe if any
28971     new_path="${new_path/%.exe/}"
28972 
28973     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28974     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28975   fi
28976 
28977   else
28978     # We're on a posix platform. Hooray! :)
28979     # First separate the path from the arguments. This will split at the first
28980     # space.
28981     complete="$CXX"
28982     path="${complete%% *}"
28983     tmp="$complete EOL"
28984     arguments="${tmp#* }"
28985 
28986     # Cannot rely on the command "which" here since it doesn't always work.
28987     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28988     if test -z "$is_absolute_path"; then
28989       # Path to executable is not absolute. Find it.
28990       IFS_save="$IFS"
28991       IFS=:
28992       for p in $PATH; do
28993         if test -f "$p/$path" && test -x "$p/$path"; then
28994           new_path="$p/$path"
28995           break
28996         fi
28997       done
28998       IFS="$IFS_save"
28999     else
29000       # This is an absolute path, we can use it without further modifications.
29001       new_path="$path"
29002     fi
29003 
29004     if test "x$new_path" = x; then
29005       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29006 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29007       has_space=`$ECHO "$complete" | $GREP " "`
29008       if test "x$has_space" != x; then
29009         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29010 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29011       fi
29012       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29013     fi
29014   fi
29015 
29016   # Now join together the path and the arguments once again
29017   if test "x$arguments" != xEOL; then
29018     new_complete="$new_path ${arguments% *}"
29019   else
29020     new_complete="$new_path"
29021   fi
29022 
29023   if test "x$complete" != "x$new_complete"; then
29024     CXX="$new_complete"
29025     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29026 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29027   fi
29028 
29029   TEST_COMPILER="$CXX"
29030 
29031   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29032 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29033   SYMLINK_ORIGINAL="$TEST_COMPILER"
29034 
29035   if test "x$OPENJDK_BUILD_OS" != xwindows; then
29036     # Follow a chain of symbolic links. Use readlink
29037     # where it exists, else fall back to horribly
29038     # complicated shell code.
29039     if test "x$READLINK_TESTED" != yes; then
29040       # On MacOSX there is a readlink tool with a different
29041       # purpose than the GNU readlink tool. Check the found readlink.
29042       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29043       if test "x$ISGNU" = x; then
29044         # A readlink that we do not know how to use.
29045         # Are there other non-GNU readlinks out there?
29046         READLINK_TESTED=yes
29047         READLINK=
29048       fi
29049     fi
29050 
29051     if test "x$READLINK" != x; then
29052       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
29053     else
29054       # Save the current directory for restoring afterwards
29055       STARTDIR=$PWD
29056       COUNTER=0
29057       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
29058       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
29059       cd $sym_link_dir
29060       # Use -P flag to resolve symlinks in directories.
29061       cd `$THEPWDCMD -P`
29062       sym_link_dir=`$THEPWDCMD -P`
29063       # Resolve file symlinks
29064       while test $COUNTER -lt 20; do
29065         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29066         if test "x$ISLINK" == x; then
29067           # This is not a symbolic link! We are done!
29068           break
29069         fi
29070         # Again resolve directory symlinks since the target of the just found
29071         # link could be in a different directory
29072         cd `$DIRNAME $ISLINK`
29073         sym_link_dir=`$THEPWDCMD -P`
29074         sym_link_file=`$BASENAME $ISLINK`
29075         let COUNTER=COUNTER+1
29076       done
29077       cd $STARTDIR
29078       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
29079     fi
29080   fi
29081 
29082   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
29083     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
29084 $as_echo "no symlink" >&6; }
29085   else
29086     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
29087 $as_echo "$SYMLINK_ORIGINAL" >&6; }
29088     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29089 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
29090     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
29091     if test "x$COMPILER_BASENAME" = "xccache"; then
29092       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29093 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29094       # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29095       # We want to control ccache invocation ourselves, so ignore this cc and try
29096       # searching again.
29097 
29098       # Remove the path to the fake ccache cc from the PATH
29099       RETRY_COMPILER_SAVED_PATH="$PATH"
29100       COMPILER_DIRNAME=`$DIRNAME $CXX`
29101       PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29102       # Try again looking for our compiler
29103       if test -n "$ac_tool_prefix"; then
29104   for ac_prog in $TOOLCHAIN_CXX_BINARY
29105   do
29106     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29107 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29109 $as_echo_n "checking for $ac_word... " >&6; }
29110 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29111   $as_echo_n "(cached) " >&6
29112 else
29113   if test -n "$PROPER_COMPILER_CXX"; then
29114   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29115 else
29116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29117 for as_dir in $PATH
29118 do
29119   IFS=$as_save_IFS
29120   test -z "$as_dir" && as_dir=.
29121     for ac_exec_ext in '' $ac_executable_extensions; do
29122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29123     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29125     break 2
29126   fi
29127 done
29128   done
29129 IFS=$as_save_IFS
29130 
29131 fi
29132 fi
29133 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29134 if test -n "$PROPER_COMPILER_CXX"; then
29135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29136 $as_echo "$PROPER_COMPILER_CXX" >&6; }
29137 else
29138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29139 $as_echo "no" >&6; }
29140 fi
29141 
29142 
29143     test -n "$PROPER_COMPILER_CXX" && break
29144   done
29145 fi
29146 if test -z "$PROPER_COMPILER_CXX"; then
29147   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29148   for ac_prog in $TOOLCHAIN_CXX_BINARY
29149 do
29150   # Extract the first word of "$ac_prog", so it can be a program name with args.
29151 set dummy $ac_prog; ac_word=$2
29152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29153 $as_echo_n "checking for $ac_word... " >&6; }
29154 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29155   $as_echo_n "(cached) " >&6
29156 else
29157   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29158   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29159 else
29160 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29161 for as_dir in $PATH
29162 do
29163   IFS=$as_save_IFS
29164   test -z "$as_dir" && as_dir=.
29165     for ac_exec_ext in '' $ac_executable_extensions; do
29166   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29167     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29168     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29169     break 2
29170   fi
29171 done
29172   done
29173 IFS=$as_save_IFS
29174 
29175 fi
29176 fi
29177 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29178 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29180 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29181 else
29182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29183 $as_echo "no" >&6; }
29184 fi
29185 
29186 
29187   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29188 done
29189 
29190   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29191     PROPER_COMPILER_CXX=""
29192   else
29193     case $cross_compiling:$ac_tool_warned in
29194 yes:)
29195 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29196 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29197 ac_tool_warned=yes ;;
29198 esac
29199     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29200   fi
29201 fi
29202 
29203 
29204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29205 
29206   # First separate the path from the arguments. This will split at the first
29207   # space.
29208   complete="$PROPER_COMPILER_CXX"
29209   path="${complete%% *}"
29210   tmp="$complete EOL"
29211   arguments="${tmp#* }"
29212 
29213   # Input might be given as Windows format, start by converting to
29214   # unix format.
29215   new_path=`$CYGPATH -u "$path"`
29216 
29217   # Now try to locate executable using which
29218   new_path=`$WHICH "$new_path" 2> /dev/null`
29219   # bat and cmd files are not always considered executable in cygwin causing which
29220   # to not find them
29221   if test "x$new_path" = x \
29222       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29223       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29224     new_path=`$CYGPATH -u "$path"`
29225   fi
29226   if test "x$new_path" = x; then
29227     # Oops. Which didn't find the executable.
29228     # The splitting of arguments from the executable at a space might have been incorrect,
29229     # since paths with space are more likely in Windows. Give it another try with the whole
29230     # argument.
29231     path="$complete"
29232     arguments="EOL"
29233     new_path=`$CYGPATH -u "$path"`
29234     new_path=`$WHICH "$new_path" 2> /dev/null`
29235     # bat and cmd files are not always considered executable in cygwin causing which
29236     # to not find them
29237     if test "x$new_path" = x \
29238         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29239         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29240       new_path=`$CYGPATH -u "$path"`
29241     fi
29242     if test "x$new_path" = x; then
29243       # It's still not found. Now this is an unrecoverable error.
29244       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29245 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29246       has_space=`$ECHO "$complete" | $GREP " "`
29247       if test "x$has_space" != x; then
29248         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29249 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29250       fi
29251       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29252     fi
29253   fi
29254 
29255   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29256   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29257   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29258   # "foo.exe" is OK but "foo" is an error.
29259   #
29260   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29261   # It is also a way to make sure we got the proper file name for the real test later on.
29262   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29263   if test "x$test_shortpath" = x; then
29264     # Short path failed, file does not exist as specified.
29265     # Try adding .exe or .cmd
29266     if test -f "${new_path}.exe"; then
29267       input_to_shortpath="${new_path}.exe"
29268     elif test -f "${new_path}.cmd"; then
29269       input_to_shortpath="${new_path}.cmd"
29270     else
29271       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29272 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29273       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29274 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29275       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29276     fi
29277   else
29278     input_to_shortpath="$new_path"
29279   fi
29280 
29281   # Call helper function which possibly converts this using DOS-style short mode.
29282   # If so, the updated path is stored in $new_path.
29283   new_path="$input_to_shortpath"
29284 
29285   input_path="$input_to_shortpath"
29286   # Check if we need to convert this using DOS-style short mode. If the path
29287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29288   # take no chances and rewrite it.
29289   # Note: m4 eats our [], so we need to use [ and ] instead.
29290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29291   if test "x$has_forbidden_chars" != x; then
29292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29293     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29294     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29295     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29296       # Going to short mode and back again did indeed matter. Since short mode is
29297       # case insensitive, let's make it lowercase to improve readability.
29298       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29299       # Now convert it back to Unix-style (cygpath)
29300       input_path=`$CYGPATH -u "$shortmode_path"`
29301       new_path="$input_path"
29302     fi
29303   fi
29304 
29305   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29306   if test "x$test_cygdrive_prefix" = x; then
29307     # As a simple fix, exclude /usr/bin since it's not a real path.
29308     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29309       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29310       # a path prefixed by /cygdrive for fixpath to work.
29311       new_path="$CYGWIN_ROOT_PATH$input_path"
29312     fi
29313   fi
29314 
29315   # remove trailing .exe if any
29316   new_path="${new_path/%.exe/}"
29317 
29318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29319 
29320   # First separate the path from the arguments. This will split at the first
29321   # space.
29322   complete="$PROPER_COMPILER_CXX"
29323   path="${complete%% *}"
29324   tmp="$complete EOL"
29325   arguments="${tmp#* }"
29326 
29327   # Input might be given as Windows format, start by converting to
29328   # unix format.
29329   new_path="$path"
29330 
29331   windows_path="$new_path"
29332   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29333     unix_path=`$CYGPATH -u "$windows_path"`
29334     new_path="$unix_path"
29335   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29336     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29337     new_path="$unix_path"
29338   fi
29339 
29340 
29341   # Now try to locate executable using which
29342   new_path=`$WHICH "$new_path" 2> /dev/null`
29343 
29344   if test "x$new_path" = x; then
29345     # Oops. Which didn't find the executable.
29346     # The splitting of arguments from the executable at a space might have been incorrect,
29347     # since paths with space are more likely in Windows. Give it another try with the whole
29348     # argument.
29349     path="$complete"
29350     arguments="EOL"
29351     new_path="$path"
29352 
29353   windows_path="$new_path"
29354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29355     unix_path=`$CYGPATH -u "$windows_path"`
29356     new_path="$unix_path"
29357   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29358     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29359     new_path="$unix_path"
29360   fi
29361 
29362 
29363     new_path=`$WHICH "$new_path" 2> /dev/null`
29364     # bat and cmd files are not always considered executable in MSYS causing which
29365     # to not find them
29366     if test "x$new_path" = x \
29367         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29368         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29369       new_path="$path"
29370 
29371   windows_path="$new_path"
29372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29373     unix_path=`$CYGPATH -u "$windows_path"`
29374     new_path="$unix_path"
29375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29377     new_path="$unix_path"
29378   fi
29379 
29380     fi
29381 
29382     if test "x$new_path" = x; then
29383       # It's still not found. Now this is an unrecoverable error.
29384       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29385 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29386       has_space=`$ECHO "$complete" | $GREP " "`
29387       if test "x$has_space" != x; then
29388         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29389 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29390       fi
29391       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29392     fi
29393   fi
29394 
29395   # Now new_path has a complete unix path to the binary
29396   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29397     # Keep paths in /bin as-is, but remove trailing .exe if any
29398     new_path="${new_path/%.exe/}"
29399     # Do not save /bin paths to all_fixpath_prefixes!
29400   else
29401     # Not in mixed or Windows style, start by that.
29402     new_path=`cmd //c echo $new_path`
29403 
29404   input_path="$new_path"
29405   # Check if we need to convert this using DOS-style short mode. If the path
29406   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29407   # take no chances and rewrite it.
29408   # Note: m4 eats our [], so we need to use [ and ] instead.
29409   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29410   if test "x$has_forbidden_chars" != x; then
29411     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29412     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29413   fi
29414 
29415     # Output is in $new_path
29416 
29417   windows_path="$new_path"
29418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29419     unix_path=`$CYGPATH -u "$windows_path"`
29420     new_path="$unix_path"
29421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29422     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29423     new_path="$unix_path"
29424   fi
29425 
29426     # remove trailing .exe if any
29427     new_path="${new_path/%.exe/}"
29428 
29429     # Save the first 10 bytes of this path to the storage, so fixpath can work.
29430     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29431   fi
29432 
29433   else
29434     # We're on a posix platform. Hooray! :)
29435     # First separate the path from the arguments. This will split at the first
29436     # space.
29437     complete="$PROPER_COMPILER_CXX"
29438     path="${complete%% *}"
29439     tmp="$complete EOL"
29440     arguments="${tmp#* }"
29441 
29442     # Cannot rely on the command "which" here since it doesn't always work.
29443     is_absolute_path=`$ECHO "$path" | $GREP ^/`
29444     if test -z "$is_absolute_path"; then
29445       # Path to executable is not absolute. Find it.
29446       IFS_save="$IFS"
29447       IFS=:
29448       for p in $PATH; do
29449         if test -f "$p/$path" && test -x "$p/$path"; then
29450           new_path="$p/$path"
29451           break
29452         fi
29453       done
29454       IFS="$IFS_save"
29455     else
29456       # This is an absolute path, we can use it without further modifications.
29457       new_path="$path"
29458     fi
29459 
29460     if test "x$new_path" = x; then
29461       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29462 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29463       has_space=`$ECHO "$complete" | $GREP " "`
29464       if test "x$has_space" != x; then
29465         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29466 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29467       fi
29468       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29469     fi
29470   fi
29471 
29472   # Now join together the path and the arguments once again
29473   if test "x$arguments" != xEOL; then
29474     new_complete="$new_path ${arguments% *}"
29475   else
29476     new_complete="$new_path"
29477   fi
29478 
29479   if test "x$complete" != "x$new_complete"; then
29480     PROPER_COMPILER_CXX="$new_complete"
29481     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
29482 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
29483   fi
29484 
29485       PATH="$RETRY_COMPILER_SAVED_PATH"
29486 
29487       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
29488 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
29489 
29490   if test "x$OPENJDK_BUILD_OS" != xwindows; then
29491     # Follow a chain of symbolic links. Use readlink
29492     # where it exists, else fall back to horribly
29493     # complicated shell code.
29494     if test "x$READLINK_TESTED" != yes; then
29495       # On MacOSX there is a readlink tool with a different
29496       # purpose than the GNU readlink tool. Check the found readlink.
29497       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29498       if test "x$ISGNU" = x; then
29499         # A readlink that we do not know how to use.
29500         # Are there other non-GNU readlinks out there?
29501         READLINK_TESTED=yes
29502         READLINK=
29503       fi
29504     fi
29505 
29506     if test "x$READLINK" != x; then
29507       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
29508     else
29509       # Save the current directory for restoring afterwards
29510       STARTDIR=$PWD
29511       COUNTER=0
29512       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
29513       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
29514       cd $sym_link_dir
29515       # Use -P flag to resolve symlinks in directories.
29516       cd `$THEPWDCMD -P`
29517       sym_link_dir=`$THEPWDCMD -P`
29518       # Resolve file symlinks
29519       while test $COUNTER -lt 20; do
29520         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29521         if test "x$ISLINK" == x; then
29522           # This is not a symbolic link! We are done!
29523           break
29524         fi
29525         # Again resolve directory symlinks since the target of the just found
29526         # link could be in a different directory
29527         cd `$DIRNAME $ISLINK`
29528         sym_link_dir=`$THEPWDCMD -P`
29529         sym_link_file=`$BASENAME $ISLINK`
29530         let COUNTER=COUNTER+1
29531       done
29532       cd $STARTDIR
29533       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
29534     fi
29535   fi
29536 
29537       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29538 $as_echo "$PROPER_COMPILER_CXX" >&6; }
29539       CXX="$PROPER_COMPILER_CXX"
29540     else
29541       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
29542 $as_echo "no, keeping CXX" >&6; }
29543     fi
29544   fi
29545 
29546 
29547   COMPILER=$CXX
29548   COMPILER_NAME=$COMPILER_NAME
29549 
29550   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29551     # cc -V output typically looks like
29552     #     cc: Sun C 5.12 Linux_i386 2011/11/16
29553     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29554     # Check that this is likely to be the Solaris Studio cc.
29555     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29556     if test $? -ne 0; then
29557       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29558       { $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
29559 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29560       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29561 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29562       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29563 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29564       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29565     fi
29566     # Remove usage instructions (if present), and
29567     # collapse compiler output into a single line
29568     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29569         $SED -e 's/ *[Uu]sage:.*//'`
29570     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29571         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29572   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29573     # xlc -qversion output typically looks like
29574     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29575     #     Version: 11.01.0000.0015
29576     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29577     # Check that this is likely to be the IBM XL C compiler.
29578     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29579     if test $? -ne 0; then
29580       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29581       { $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
29582 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29583       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29584 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29585       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29586 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29587       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29588     fi
29589     # Collapse compiler output into a single line
29590     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29591     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29592         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29593   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29594     # There is no specific version flag, but all output starts with a version string.
29595     # First line typically looks something like:
29596     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29597     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29598     # Check that this is likely to be Microsoft CL.EXE.
29599     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29600     if test $? -ne 0; then
29601       { $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
29602 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29603       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29604 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29605       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29606     fi
29607     # Collapse compiler output into a single line
29608     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29609     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29610         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29611   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29612     # gcc --version output typically looks like
29613     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29614     #     Copyright (C) 2013 Free Software Foundation, Inc.
29615     #     This is free software; see the source for copying conditions.  There is NO
29616     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29617     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29618     # Check that this is likely to be GCC.
29619     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29620     if test $? -ne 0; then
29621       { $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
29622 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29623       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29624 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29625       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29626     fi
29627     # Remove Copyright and legalese from version string, and
29628     # collapse into a single line
29629     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29630         $SED -e 's/ *Copyright .*//'`
29631     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29632         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29633   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29634     # clang --version output typically looks like
29635     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29636     #    clang version 3.3 (tags/RELEASE_33/final)
29637     # or
29638     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29639     #    Target: x86_64-pc-linux-gnu
29640     #    Thread model: posix
29641     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29642     # Check that this is likely to be clang
29643     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29644     if test $? -ne 0; then
29645       { $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
29646 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29647       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29648 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29649       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29650     fi
29651     # Collapse compiler output into a single line
29652     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29653     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29654         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29655 
29656   else
29657       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29658   fi
29659   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29660   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29661   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29662   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
29663 
29664   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29665 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29666 
29667 
29668   # Now that we have resolved CXX ourself, let autoconf have its go at it
29669   ac_ext=cpp
29670 ac_cpp='$CXXCPP $CPPFLAGS'
29671 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29672 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29673 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29674 if test -z "$CXX"; then
29675   if test -n "$CCC"; then
29676     CXX=$CCC
29677   else
29678     if test -n "$ac_tool_prefix"; then
29679   for ac_prog in $CXX
29680   do
29681     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29682 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29684 $as_echo_n "checking for $ac_word... " >&6; }
29685 if ${ac_cv_prog_CXX+:} false; then :
29686   $as_echo_n "(cached) " >&6
29687 else
29688   if test -n "$CXX"; then
29689   ac_cv_prog_CXX="$CXX" # Let the user override the test.
29690 else
29691 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29692 for as_dir in $PATH
29693 do
29694   IFS=$as_save_IFS
29695   test -z "$as_dir" && as_dir=.
29696     for ac_exec_ext in '' $ac_executable_extensions; do
29697   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29698     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
29699     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29700     break 2
29701   fi
29702 done
29703   done
29704 IFS=$as_save_IFS
29705 
29706 fi
29707 fi
29708 CXX=$ac_cv_prog_CXX
29709 if test -n "$CXX"; then
29710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
29711 $as_echo "$CXX" >&6; }
29712 else
29713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29714 $as_echo "no" >&6; }
29715 fi
29716 
29717 
29718     test -n "$CXX" && break
29719   done
29720 fi
29721 if test -z "$CXX"; then
29722   ac_ct_CXX=$CXX
29723   for ac_prog in $CXX
29724 do
29725   # Extract the first word of "$ac_prog", so it can be a program name with args.
29726 set dummy $ac_prog; ac_word=$2
29727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29728 $as_echo_n "checking for $ac_word... " >&6; }
29729 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
29730   $as_echo_n "(cached) " >&6
29731 else
29732   if test -n "$ac_ct_CXX"; then
29733   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
29734 else
29735 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29736 for as_dir in $PATH
29737 do
29738   IFS=$as_save_IFS
29739   test -z "$as_dir" && as_dir=.
29740     for ac_exec_ext in '' $ac_executable_extensions; do
29741   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29742     ac_cv_prog_ac_ct_CXX="$ac_prog"
29743     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29744     break 2
29745   fi
29746 done
29747   done
29748 IFS=$as_save_IFS
29749 
29750 fi
29751 fi
29752 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
29753 if test -n "$ac_ct_CXX"; then
29754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
29755 $as_echo "$ac_ct_CXX" >&6; }
29756 else
29757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29758 $as_echo "no" >&6; }
29759 fi
29760 
29761 
29762   test -n "$ac_ct_CXX" && break
29763 done
29764 
29765   if test "x$ac_ct_CXX" = x; then
29766     CXX="g++"
29767   else
29768     case $cross_compiling:$ac_tool_warned in
29769 yes:)
29770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29771 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29772 ac_tool_warned=yes ;;
29773 esac
29774     CXX=$ac_ct_CXX
29775   fi
29776 fi
29777 
29778   fi
29779 fi
29780 # Provide some information about the compiler.
29781 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
29782 set X $ac_compile
29783 ac_compiler=$2
29784 for ac_option in --version -v -V -qversion; do
29785   { { ac_try="$ac_compiler $ac_option >&5"
29786 case "(($ac_try" in
29787   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29788   *) ac_try_echo=$ac_try;;
29789 esac
29790 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29791 $as_echo "$ac_try_echo"; } >&5
29792   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29793   ac_status=$?
29794   if test -s conftest.err; then
29795     sed '10a\
29796 ... rest of stderr output deleted ...
29797          10q' conftest.err >conftest.er1
29798     cat conftest.er1 >&5
29799   fi
29800   rm -f conftest.er1 conftest.err
29801   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29802   test $ac_status = 0; }
29803 done
29804 
29805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
29806 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
29807 if ${ac_cv_cxx_compiler_gnu+:} false; then :
29808   $as_echo_n "(cached) " >&6
29809 else
29810   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29811 /* end confdefs.h.  */
29812 
29813 int
29814 main ()
29815 {
29816 #ifndef __GNUC__
29817        choke me
29818 #endif
29819 
29820   ;
29821   return 0;
29822 }
29823 _ACEOF
29824 if ac_fn_cxx_try_compile "$LINENO"; then :
29825   ac_compiler_gnu=yes
29826 else
29827   ac_compiler_gnu=no
29828 fi
29829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29830 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
29831 
29832 fi
29833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
29834 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
29835 if test $ac_compiler_gnu = yes; then
29836   GXX=yes
29837 else
29838   GXX=
29839 fi
29840 ac_test_CXXFLAGS=${CXXFLAGS+set}
29841 ac_save_CXXFLAGS=$CXXFLAGS
29842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
29843 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
29844 if ${ac_cv_prog_cxx_g+:} false; then :
29845   $as_echo_n "(cached) " >&6
29846 else
29847   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
29848    ac_cxx_werror_flag=yes
29849    ac_cv_prog_cxx_g=no
29850    CXXFLAGS="-g"
29851    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29852 /* end confdefs.h.  */
29853 
29854 int
29855 main ()
29856 {
29857 
29858   ;
29859   return 0;
29860 }
29861 _ACEOF
29862 if ac_fn_cxx_try_compile "$LINENO"; then :
29863   ac_cv_prog_cxx_g=yes
29864 else
29865   CXXFLAGS=""
29866       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29867 /* end confdefs.h.  */
29868 
29869 int
29870 main ()
29871 {
29872 
29873   ;
29874   return 0;
29875 }
29876 _ACEOF
29877 if ac_fn_cxx_try_compile "$LINENO"; then :
29878 
29879 else
29880   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
29881          CXXFLAGS="-g"
29882          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29883 /* end confdefs.h.  */
29884 
29885 int
29886 main ()
29887 {
29888 
29889   ;
29890   return 0;
29891 }
29892 _ACEOF
29893 if ac_fn_cxx_try_compile "$LINENO"; then :
29894   ac_cv_prog_cxx_g=yes
29895 fi
29896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29897 fi
29898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29899 fi
29900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29901    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
29902 fi
29903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
29904 $as_echo "$ac_cv_prog_cxx_g" >&6; }
29905 if test "$ac_test_CXXFLAGS" = set; then
29906   CXXFLAGS=$ac_save_CXXFLAGS
29907 elif test $ac_cv_prog_cxx_g = yes; then
29908   if test "$GXX" = yes; then
29909     CXXFLAGS="-g -O2"
29910   else
29911     CXXFLAGS="-g"
29912   fi
29913 else
29914   if test "$GXX" = yes; then
29915     CXXFLAGS="-O2"
29916   else
29917     CXXFLAGS=
29918   fi
29919 fi
29920 ac_ext=cpp
29921 ac_cpp='$CXXCPP $CPPFLAGS'
29922 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29923 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29924 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29925 
29926 
29927   # This is the compiler version number on the form X.Y[.Z]
29928 
29929 
29930 
29931 
29932   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
29933     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
29934 $as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
29935     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
29936 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
29937   fi
29938 
29939   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
29940   if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
29941     { $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
29942 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&2;}
29943   fi
29944 
29945   if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
29946     { $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
29947 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&2;}
29948   fi
29949 
29950   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
29951 
29952 
29953   #
29954   # Setup the preprocessor (CPP and CXXCPP)
29955   #
29956   ac_ext=c
29957 ac_cpp='$CPP $CPPFLAGS'
29958 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29959 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29960 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
29962 $as_echo_n "checking how to run the C preprocessor... " >&6; }
29963 # On Suns, sometimes $CPP names a directory.
29964 if test -n "$CPP" && test -d "$CPP"; then
29965   CPP=
29966 fi
29967 if test -z "$CPP"; then
29968   if ${ac_cv_prog_CPP+:} false; then :
29969   $as_echo_n "(cached) " >&6
29970 else
29971       # Double quotes because CPP needs to be expanded
29972     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
29973     do
29974       ac_preproc_ok=false
29975 for ac_c_preproc_warn_flag in '' yes
29976 do
29977   # Use a header file that comes with gcc, so configuring glibc
29978   # with a fresh cross-compiler works.
29979   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
29980   # <limits.h> exists even on freestanding compilers.
29981   # On the NeXT, cc -E runs the code through the compiler's parser,
29982   # not just through cpp. "Syntax error" is here to catch this case.
29983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29984 /* end confdefs.h.  */
29985 #ifdef __STDC__
29986 # include <limits.h>
29987 #else
29988 # include <assert.h>
29989 #endif
29990                      Syntax error
29991 _ACEOF
29992 if ac_fn_c_try_cpp "$LINENO"; then :
29993 
29994 else
29995   # Broken: fails on valid input.
29996 continue
29997 fi
29998 rm -f conftest.err conftest.i conftest.$ac_ext
29999 
30000   # OK, works on sane cases.  Now check whether nonexistent headers
30001   # can be detected and how.
30002   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30003 /* end confdefs.h.  */
30004 #include <ac_nonexistent.h>
30005 _ACEOF
30006 if ac_fn_c_try_cpp "$LINENO"; then :
30007   # Broken: success on invalid input.
30008 continue
30009 else
30010   # Passes both tests.
30011 ac_preproc_ok=:
30012 break
30013 fi
30014 rm -f conftest.err conftest.i conftest.$ac_ext
30015 
30016 done
30017 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30018 rm -f conftest.i conftest.err conftest.$ac_ext
30019 if $ac_preproc_ok; then :
30020   break
30021 fi
30022 
30023     done
30024     ac_cv_prog_CPP=$CPP
30025 
30026 fi
30027   CPP=$ac_cv_prog_CPP
30028 else
30029   ac_cv_prog_CPP=$CPP
30030 fi
30031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30032 $as_echo "$CPP" >&6; }
30033 ac_preproc_ok=false
30034 for ac_c_preproc_warn_flag in '' yes
30035 do
30036   # Use a header file that comes with gcc, so configuring glibc
30037   # with a fresh cross-compiler works.
30038   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30039   # <limits.h> exists even on freestanding compilers.
30040   # On the NeXT, cc -E runs the code through the compiler's parser,
30041   # not just through cpp. "Syntax error" is here to catch this case.
30042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30043 /* end confdefs.h.  */
30044 #ifdef __STDC__
30045 # include <limits.h>
30046 #else
30047 # include <assert.h>
30048 #endif
30049                      Syntax error
30050 _ACEOF
30051 if ac_fn_c_try_cpp "$LINENO"; then :
30052 
30053 else
30054   # Broken: fails on valid input.
30055 continue
30056 fi
30057 rm -f conftest.err conftest.i conftest.$ac_ext
30058 
30059   # OK, works on sane cases.  Now check whether nonexistent headers
30060   # can be detected and how.
30061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30062 /* end confdefs.h.  */
30063 #include <ac_nonexistent.h>
30064 _ACEOF
30065 if ac_fn_c_try_cpp "$LINENO"; then :
30066   # Broken: success on invalid input.
30067 continue
30068 else
30069   # Passes both tests.
30070 ac_preproc_ok=:
30071 break
30072 fi
30073 rm -f conftest.err conftest.i conftest.$ac_ext
30074 
30075 done
30076 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30077 rm -f conftest.i conftest.err conftest.$ac_ext
30078 if $ac_preproc_ok; then :
30079 
30080 else
30081   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30082 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30083 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30084 See \`config.log' for more details" "$LINENO" 5; }
30085 fi
30086 
30087 ac_ext=cpp
30088 ac_cpp='$CXXCPP $CPPFLAGS'
30089 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30090 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30091 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30092 
30093 
30094   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30095 
30096   # First separate the path from the arguments. This will split at the first
30097   # space.
30098   complete="$CPP"
30099   path="${complete%% *}"
30100   tmp="$complete EOL"
30101   arguments="${tmp#* }"
30102 
30103   # Input might be given as Windows format, start by converting to
30104   # unix format.
30105   new_path=`$CYGPATH -u "$path"`
30106 
30107   # Now try to locate executable using which
30108   new_path=`$WHICH "$new_path" 2> /dev/null`
30109   # bat and cmd files are not always considered executable in cygwin causing which
30110   # to not find them
30111   if test "x$new_path" = x \
30112       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30113       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30114     new_path=`$CYGPATH -u "$path"`
30115   fi
30116   if test "x$new_path" = x; then
30117     # Oops. Which didn't find the executable.
30118     # The splitting of arguments from the executable at a space might have been incorrect,
30119     # since paths with space are more likely in Windows. Give it another try with the whole
30120     # argument.
30121     path="$complete"
30122     arguments="EOL"
30123     new_path=`$CYGPATH -u "$path"`
30124     new_path=`$WHICH "$new_path" 2> /dev/null`
30125     # bat and cmd files are not always considered executable in cygwin causing which
30126     # to not find them
30127     if test "x$new_path" = x \
30128         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30129         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30130       new_path=`$CYGPATH -u "$path"`
30131     fi
30132     if test "x$new_path" = x; then
30133       # It's still not found. Now this is an unrecoverable error.
30134       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30135 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30136       has_space=`$ECHO "$complete" | $GREP " "`
30137       if test "x$has_space" != x; then
30138         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30139 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30140       fi
30141       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30142     fi
30143   fi
30144 
30145   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30146   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30147   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30148   # "foo.exe" is OK but "foo" is an error.
30149   #
30150   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30151   # It is also a way to make sure we got the proper file name for the real test later on.
30152   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30153   if test "x$test_shortpath" = x; then
30154     # Short path failed, file does not exist as specified.
30155     # Try adding .exe or .cmd
30156     if test -f "${new_path}.exe"; then
30157       input_to_shortpath="${new_path}.exe"
30158     elif test -f "${new_path}.cmd"; then
30159       input_to_shortpath="${new_path}.cmd"
30160     else
30161       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30162 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30163       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30164 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30165       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30166     fi
30167   else
30168     input_to_shortpath="$new_path"
30169   fi
30170 
30171   # Call helper function which possibly converts this using DOS-style short mode.
30172   # If so, the updated path is stored in $new_path.
30173   new_path="$input_to_shortpath"
30174 
30175   input_path="$input_to_shortpath"
30176   # Check if we need to convert this using DOS-style short mode. If the path
30177   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30178   # take no chances and rewrite it.
30179   # Note: m4 eats our [], so we need to use [ and ] instead.
30180   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30181   if test "x$has_forbidden_chars" != x; then
30182     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30183     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30184     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30185     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30186       # Going to short mode and back again did indeed matter. Since short mode is
30187       # case insensitive, let's make it lowercase to improve readability.
30188       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30189       # Now convert it back to Unix-style (cygpath)
30190       input_path=`$CYGPATH -u "$shortmode_path"`
30191       new_path="$input_path"
30192     fi
30193   fi
30194 
30195   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30196   if test "x$test_cygdrive_prefix" = x; then
30197     # As a simple fix, exclude /usr/bin since it's not a real path.
30198     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30199       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30200       # a path prefixed by /cygdrive for fixpath to work.
30201       new_path="$CYGWIN_ROOT_PATH$input_path"
30202     fi
30203   fi
30204 
30205   # remove trailing .exe if any
30206   new_path="${new_path/%.exe/}"
30207 
30208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30209 
30210   # First separate the path from the arguments. This will split at the first
30211   # space.
30212   complete="$CPP"
30213   path="${complete%% *}"
30214   tmp="$complete EOL"
30215   arguments="${tmp#* }"
30216 
30217   # Input might be given as Windows format, start by converting to
30218   # unix format.
30219   new_path="$path"
30220 
30221   windows_path="$new_path"
30222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30223     unix_path=`$CYGPATH -u "$windows_path"`
30224     new_path="$unix_path"
30225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30226     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30227     new_path="$unix_path"
30228   fi
30229 
30230 
30231   # Now try to locate executable using which
30232   new_path=`$WHICH "$new_path" 2> /dev/null`
30233 
30234   if test "x$new_path" = x; then
30235     # Oops. Which didn't find the executable.
30236     # The splitting of arguments from the executable at a space might have been incorrect,
30237     # since paths with space are more likely in Windows. Give it another try with the whole
30238     # argument.
30239     path="$complete"
30240     arguments="EOL"
30241     new_path="$path"
30242 
30243   windows_path="$new_path"
30244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30245     unix_path=`$CYGPATH -u "$windows_path"`
30246     new_path="$unix_path"
30247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30248     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30249     new_path="$unix_path"
30250   fi
30251 
30252 
30253     new_path=`$WHICH "$new_path" 2> /dev/null`
30254     # bat and cmd files are not always considered executable in MSYS causing which
30255     # to not find them
30256     if test "x$new_path" = x \
30257         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30258         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30259       new_path="$path"
30260 
30261   windows_path="$new_path"
30262   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30263     unix_path=`$CYGPATH -u "$windows_path"`
30264     new_path="$unix_path"
30265   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30266     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30267     new_path="$unix_path"
30268   fi
30269 
30270     fi
30271 
30272     if test "x$new_path" = x; then
30273       # It's still not found. Now this is an unrecoverable error.
30274       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30275 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30276       has_space=`$ECHO "$complete" | $GREP " "`
30277       if test "x$has_space" != x; then
30278         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30279 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30280       fi
30281       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30282     fi
30283   fi
30284 
30285   # Now new_path has a complete unix path to the binary
30286   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30287     # Keep paths in /bin as-is, but remove trailing .exe if any
30288     new_path="${new_path/%.exe/}"
30289     # Do not save /bin paths to all_fixpath_prefixes!
30290   else
30291     # Not in mixed or Windows style, start by that.
30292     new_path=`cmd //c echo $new_path`
30293 
30294   input_path="$new_path"
30295   # Check if we need to convert this using DOS-style short mode. If the path
30296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30297   # take no chances and rewrite it.
30298   # Note: m4 eats our [], so we need to use [ and ] instead.
30299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30300   if test "x$has_forbidden_chars" != x; then
30301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30302     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30303   fi
30304 
30305     # Output is in $new_path
30306 
30307   windows_path="$new_path"
30308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30309     unix_path=`$CYGPATH -u "$windows_path"`
30310     new_path="$unix_path"
30311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30313     new_path="$unix_path"
30314   fi
30315 
30316     # remove trailing .exe if any
30317     new_path="${new_path/%.exe/}"
30318 
30319     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30320     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30321   fi
30322 
30323   else
30324     # We're on a posix platform. Hooray! :)
30325     # First separate the path from the arguments. This will split at the first
30326     # space.
30327     complete="$CPP"
30328     path="${complete%% *}"
30329     tmp="$complete EOL"
30330     arguments="${tmp#* }"
30331 
30332     # Cannot rely on the command "which" here since it doesn't always work.
30333     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30334     if test -z "$is_absolute_path"; then
30335       # Path to executable is not absolute. Find it.
30336       IFS_save="$IFS"
30337       IFS=:
30338       for p in $PATH; do
30339         if test -f "$p/$path" && test -x "$p/$path"; then
30340           new_path="$p/$path"
30341           break
30342         fi
30343       done
30344       IFS="$IFS_save"
30345     else
30346       # This is an absolute path, we can use it without further modifications.
30347       new_path="$path"
30348     fi
30349 
30350     if test "x$new_path" = x; then
30351       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30352 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30353       has_space=`$ECHO "$complete" | $GREP " "`
30354       if test "x$has_space" != x; then
30355         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30356 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30357       fi
30358       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30359     fi
30360   fi
30361 
30362   # Now join together the path and the arguments once again
30363   if test "x$arguments" != xEOL; then
30364     new_complete="$new_path ${arguments% *}"
30365   else
30366     new_complete="$new_path"
30367   fi
30368 
30369   if test "x$complete" != "x$new_complete"; then
30370     CPP="$new_complete"
30371     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30372 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30373   fi
30374 
30375   ac_ext=cpp
30376 ac_cpp='$CXXCPP $CPPFLAGS'
30377 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30378 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30379 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
30381 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
30382 if test -z "$CXXCPP"; then
30383   if ${ac_cv_prog_CXXCPP+:} false; then :
30384   $as_echo_n "(cached) " >&6
30385 else
30386       # Double quotes because CXXCPP needs to be expanded
30387     for CXXCPP in "$CXX -E" "/lib/cpp"
30388     do
30389       ac_preproc_ok=false
30390 for ac_cxx_preproc_warn_flag in '' yes
30391 do
30392   # Use a header file that comes with gcc, so configuring glibc
30393   # with a fresh cross-compiler works.
30394   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30395   # <limits.h> exists even on freestanding compilers.
30396   # On the NeXT, cc -E runs the code through the compiler's parser,
30397   # not just through cpp. "Syntax error" is here to catch this case.
30398   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30399 /* end confdefs.h.  */
30400 #ifdef __STDC__
30401 # include <limits.h>
30402 #else
30403 # include <assert.h>
30404 #endif
30405                      Syntax error
30406 _ACEOF
30407 if ac_fn_cxx_try_cpp "$LINENO"; then :
30408 
30409 else
30410   # Broken: fails on valid input.
30411 continue
30412 fi
30413 rm -f conftest.err conftest.i conftest.$ac_ext
30414 
30415   # OK, works on sane cases.  Now check whether nonexistent headers
30416   # can be detected and how.
30417   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30418 /* end confdefs.h.  */
30419 #include <ac_nonexistent.h>
30420 _ACEOF
30421 if ac_fn_cxx_try_cpp "$LINENO"; then :
30422   # Broken: success on invalid input.
30423 continue
30424 else
30425   # Passes both tests.
30426 ac_preproc_ok=:
30427 break
30428 fi
30429 rm -f conftest.err conftest.i conftest.$ac_ext
30430 
30431 done
30432 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30433 rm -f conftest.i conftest.err conftest.$ac_ext
30434 if $ac_preproc_ok; then :
30435   break
30436 fi
30437 
30438     done
30439     ac_cv_prog_CXXCPP=$CXXCPP
30440 
30441 fi
30442   CXXCPP=$ac_cv_prog_CXXCPP
30443 else
30444   ac_cv_prog_CXXCPP=$CXXCPP
30445 fi
30446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
30447 $as_echo "$CXXCPP" >&6; }
30448 ac_preproc_ok=false
30449 for ac_cxx_preproc_warn_flag in '' yes
30450 do
30451   # Use a header file that comes with gcc, so configuring glibc
30452   # with a fresh cross-compiler works.
30453   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30454   # <limits.h> exists even on freestanding compilers.
30455   # On the NeXT, cc -E runs the code through the compiler's parser,
30456   # not just through cpp. "Syntax error" is here to catch this case.
30457   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30458 /* end confdefs.h.  */
30459 #ifdef __STDC__
30460 # include <limits.h>
30461 #else
30462 # include <assert.h>
30463 #endif
30464                      Syntax error
30465 _ACEOF
30466 if ac_fn_cxx_try_cpp "$LINENO"; then :
30467 
30468 else
30469   # Broken: fails on valid input.
30470 continue
30471 fi
30472 rm -f conftest.err conftest.i conftest.$ac_ext
30473 
30474   # OK, works on sane cases.  Now check whether nonexistent headers
30475   # can be detected and how.
30476   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30477 /* end confdefs.h.  */
30478 #include <ac_nonexistent.h>
30479 _ACEOF
30480 if ac_fn_cxx_try_cpp "$LINENO"; then :
30481   # Broken: success on invalid input.
30482 continue
30483 else
30484   # Passes both tests.
30485 ac_preproc_ok=:
30486 break
30487 fi
30488 rm -f conftest.err conftest.i conftest.$ac_ext
30489 
30490 done
30491 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30492 rm -f conftest.i conftest.err conftest.$ac_ext
30493 if $ac_preproc_ok; then :
30494 
30495 else
30496   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30497 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30498 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
30499 See \`config.log' for more details" "$LINENO" 5; }
30500 fi
30501 
30502 ac_ext=cpp
30503 ac_cpp='$CXXCPP $CPPFLAGS'
30504 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30505 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30506 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30507 
30508 
30509   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30510 
30511   # First separate the path from the arguments. This will split at the first
30512   # space.
30513   complete="$CXXCPP"
30514   path="${complete%% *}"
30515   tmp="$complete EOL"
30516   arguments="${tmp#* }"
30517 
30518   # Input might be given as Windows format, start by converting to
30519   # unix format.
30520   new_path=`$CYGPATH -u "$path"`
30521 
30522   # Now try to locate executable using which
30523   new_path=`$WHICH "$new_path" 2> /dev/null`
30524   # bat and cmd files are not always considered executable in cygwin causing which
30525   # to not find them
30526   if test "x$new_path" = x \
30527       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30528       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30529     new_path=`$CYGPATH -u "$path"`
30530   fi
30531   if test "x$new_path" = x; then
30532     # Oops. Which didn't find the executable.
30533     # The splitting of arguments from the executable at a space might have been incorrect,
30534     # since paths with space are more likely in Windows. Give it another try with the whole
30535     # argument.
30536     path="$complete"
30537     arguments="EOL"
30538     new_path=`$CYGPATH -u "$path"`
30539     new_path=`$WHICH "$new_path" 2> /dev/null`
30540     # bat and cmd files are not always considered executable in cygwin causing which
30541     # to not find them
30542     if test "x$new_path" = x \
30543         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30544         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30545       new_path=`$CYGPATH -u "$path"`
30546     fi
30547     if test "x$new_path" = x; then
30548       # It's still not found. Now this is an unrecoverable error.
30549       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
30550 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
30551       has_space=`$ECHO "$complete" | $GREP " "`
30552       if test "x$has_space" != x; then
30553         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30554 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30555       fi
30556       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30557     fi
30558   fi
30559 
30560   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30561   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30562   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30563   # "foo.exe" is OK but "foo" is an error.
30564   #
30565   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30566   # It is also a way to make sure we got the proper file name for the real test later on.
30567   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30568   if test "x$test_shortpath" = x; then
30569     # Short path failed, file does not exist as specified.
30570     # Try adding .exe or .cmd
30571     if test -f "${new_path}.exe"; then
30572       input_to_shortpath="${new_path}.exe"
30573     elif test -f "${new_path}.cmd"; then
30574       input_to_shortpath="${new_path}.cmd"
30575     else
30576       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
30577 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
30578       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30579 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30580       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30581     fi
30582   else
30583     input_to_shortpath="$new_path"
30584   fi
30585 
30586   # Call helper function which possibly converts this using DOS-style short mode.
30587   # If so, the updated path is stored in $new_path.
30588   new_path="$input_to_shortpath"
30589 
30590   input_path="$input_to_shortpath"
30591   # Check if we need to convert this using DOS-style short mode. If the path
30592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30593   # take no chances and rewrite it.
30594   # Note: m4 eats our [], so we need to use [ and ] instead.
30595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30596   if test "x$has_forbidden_chars" != x; then
30597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30598     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30599     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30600     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30601       # Going to short mode and back again did indeed matter. Since short mode is
30602       # case insensitive, let's make it lowercase to improve readability.
30603       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30604       # Now convert it back to Unix-style (cygpath)
30605       input_path=`$CYGPATH -u "$shortmode_path"`
30606       new_path="$input_path"
30607     fi
30608   fi
30609 
30610   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30611   if test "x$test_cygdrive_prefix" = x; then
30612     # As a simple fix, exclude /usr/bin since it's not a real path.
30613     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30614       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30615       # a path prefixed by /cygdrive for fixpath to work.
30616       new_path="$CYGWIN_ROOT_PATH$input_path"
30617     fi
30618   fi
30619 
30620   # remove trailing .exe if any
30621   new_path="${new_path/%.exe/}"
30622 
30623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30624 
30625   # First separate the path from the arguments. This will split at the first
30626   # space.
30627   complete="$CXXCPP"
30628   path="${complete%% *}"
30629   tmp="$complete EOL"
30630   arguments="${tmp#* }"
30631 
30632   # Input might be given as Windows format, start by converting to
30633   # unix format.
30634   new_path="$path"
30635 
30636   windows_path="$new_path"
30637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30638     unix_path=`$CYGPATH -u "$windows_path"`
30639     new_path="$unix_path"
30640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30642     new_path="$unix_path"
30643   fi
30644 
30645 
30646   # Now try to locate executable using which
30647   new_path=`$WHICH "$new_path" 2> /dev/null`
30648 
30649   if test "x$new_path" = x; then
30650     # Oops. Which didn't find the executable.
30651     # The splitting of arguments from the executable at a space might have been incorrect,
30652     # since paths with space are more likely in Windows. Give it another try with the whole
30653     # argument.
30654     path="$complete"
30655     arguments="EOL"
30656     new_path="$path"
30657 
30658   windows_path="$new_path"
30659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30660     unix_path=`$CYGPATH -u "$windows_path"`
30661     new_path="$unix_path"
30662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30663     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30664     new_path="$unix_path"
30665   fi
30666 
30667 
30668     new_path=`$WHICH "$new_path" 2> /dev/null`
30669     # bat and cmd files are not always considered executable in MSYS causing which
30670     # to not find them
30671     if test "x$new_path" = x \
30672         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30673         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30674       new_path="$path"
30675 
30676   windows_path="$new_path"
30677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30678     unix_path=`$CYGPATH -u "$windows_path"`
30679     new_path="$unix_path"
30680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30681     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30682     new_path="$unix_path"
30683   fi
30684 
30685     fi
30686 
30687     if test "x$new_path" = x; then
30688       # It's still not found. Now this is an unrecoverable error.
30689       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
30690 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
30691       has_space=`$ECHO "$complete" | $GREP " "`
30692       if test "x$has_space" != x; then
30693         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30694 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30695       fi
30696       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30697     fi
30698   fi
30699 
30700   # Now new_path has a complete unix path to the binary
30701   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30702     # Keep paths in /bin as-is, but remove trailing .exe if any
30703     new_path="${new_path/%.exe/}"
30704     # Do not save /bin paths to all_fixpath_prefixes!
30705   else
30706     # Not in mixed or Windows style, start by that.
30707     new_path=`cmd //c echo $new_path`
30708 
30709   input_path="$new_path"
30710   # Check if we need to convert this using DOS-style short mode. If the path
30711   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30712   # take no chances and rewrite it.
30713   # Note: m4 eats our [], so we need to use [ and ] instead.
30714   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30715   if test "x$has_forbidden_chars" != x; then
30716     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30717     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30718   fi
30719 
30720     # Output is in $new_path
30721 
30722   windows_path="$new_path"
30723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30724     unix_path=`$CYGPATH -u "$windows_path"`
30725     new_path="$unix_path"
30726   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30727     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30728     new_path="$unix_path"
30729   fi
30730 
30731     # remove trailing .exe if any
30732     new_path="${new_path/%.exe/}"
30733 
30734     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30735     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30736   fi
30737 
30738   else
30739     # We're on a posix platform. Hooray! :)
30740     # First separate the path from the arguments. This will split at the first
30741     # space.
30742     complete="$CXXCPP"
30743     path="${complete%% *}"
30744     tmp="$complete EOL"
30745     arguments="${tmp#* }"
30746 
30747     # Cannot rely on the command "which" here since it doesn't always work.
30748     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30749     if test -z "$is_absolute_path"; then
30750       # Path to executable is not absolute. Find it.
30751       IFS_save="$IFS"
30752       IFS=:
30753       for p in $PATH; do
30754         if test -f "$p/$path" && test -x "$p/$path"; then
30755           new_path="$p/$path"
30756           break
30757         fi
30758       done
30759       IFS="$IFS_save"
30760     else
30761       # This is an absolute path, we can use it without further modifications.
30762       new_path="$path"
30763     fi
30764 
30765     if test "x$new_path" = x; then
30766       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
30767 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
30768       has_space=`$ECHO "$complete" | $GREP " "`
30769       if test "x$has_space" != x; then
30770         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30771 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30772       fi
30773       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30774     fi
30775   fi
30776 
30777   # Now join together the path and the arguments once again
30778   if test "x$arguments" != xEOL; then
30779     new_complete="$new_path ${arguments% *}"
30780   else
30781     new_complete="$new_path"
30782   fi
30783 
30784   if test "x$complete" != "x$new_complete"; then
30785     CXXCPP="$new_complete"
30786     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
30787 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
30788   fi
30789 
30790 
30791   #
30792   # Setup the linker (LD)
30793   #
30794   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30795     # In the Microsoft toolchain we have a separate LD command "link".
30796     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
30797     # a cygwin program for something completely different.
30798     # Extract the first word of "link", so it can be a program name with args.
30799 set dummy link; ac_word=$2
30800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30801 $as_echo_n "checking for $ac_word... " >&6; }
30802 if ${ac_cv_prog_LD+:} false; then :
30803   $as_echo_n "(cached) " >&6
30804 else
30805   if test -n "$LD"; then
30806   ac_cv_prog_LD="$LD" # Let the user override the test.
30807 else
30808   ac_prog_rejected=no
30809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30810 for as_dir in $PATH
30811 do
30812   IFS=$as_save_IFS
30813   test -z "$as_dir" && as_dir=.
30814     for ac_exec_ext in '' $ac_executable_extensions; do
30815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30816     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
30817        ac_prog_rejected=yes
30818        continue
30819      fi
30820     ac_cv_prog_LD="link"
30821     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30822     break 2
30823   fi
30824 done
30825   done
30826 IFS=$as_save_IFS
30827 
30828 if test $ac_prog_rejected = yes; then
30829   # We found a bogon in the path, so make sure we never use it.
30830   set dummy $ac_cv_prog_LD
30831   shift
30832   if test $# != 0; then
30833     # We chose a different compiler from the bogus one.
30834     # However, it has the same basename, so the bogon will be chosen
30835     # first if we set LD to just the basename; use the full file name.
30836     shift
30837     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
30838   fi
30839 fi
30840 fi
30841 fi
30842 LD=$ac_cv_prog_LD
30843 if test -n "$LD"; then
30844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
30845 $as_echo "$LD" >&6; }
30846 else
30847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30848 $as_echo "no" >&6; }
30849 fi
30850 
30851 
30852 
30853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30854 
30855   # First separate the path from the arguments. This will split at the first
30856   # space.
30857   complete="$LD"
30858   path="${complete%% *}"
30859   tmp="$complete EOL"
30860   arguments="${tmp#* }"
30861 
30862   # Input might be given as Windows format, start by converting to
30863   # unix format.
30864   new_path=`$CYGPATH -u "$path"`
30865 
30866   # Now try to locate executable using which
30867   new_path=`$WHICH "$new_path" 2> /dev/null`
30868   # bat and cmd files are not always considered executable in cygwin causing which
30869   # to not find them
30870   if test "x$new_path" = x \
30871       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30872       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30873     new_path=`$CYGPATH -u "$path"`
30874   fi
30875   if test "x$new_path" = x; then
30876     # Oops. Which didn't find the executable.
30877     # The splitting of arguments from the executable at a space might have been incorrect,
30878     # since paths with space are more likely in Windows. Give it another try with the whole
30879     # argument.
30880     path="$complete"
30881     arguments="EOL"
30882     new_path=`$CYGPATH -u "$path"`
30883     new_path=`$WHICH "$new_path" 2> /dev/null`
30884     # bat and cmd files are not always considered executable in cygwin causing which
30885     # to not find them
30886     if test "x$new_path" = x \
30887         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30888         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30889       new_path=`$CYGPATH -u "$path"`
30890     fi
30891     if test "x$new_path" = x; then
30892       # It's still not found. Now this is an unrecoverable error.
30893       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
30894 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
30895       has_space=`$ECHO "$complete" | $GREP " "`
30896       if test "x$has_space" != x; then
30897         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30898 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30899       fi
30900       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
30901     fi
30902   fi
30903 
30904   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30905   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30906   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30907   # "foo.exe" is OK but "foo" is an error.
30908   #
30909   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30910   # It is also a way to make sure we got the proper file name for the real test later on.
30911   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30912   if test "x$test_shortpath" = x; then
30913     # Short path failed, file does not exist as specified.
30914     # Try adding .exe or .cmd
30915     if test -f "${new_path}.exe"; then
30916       input_to_shortpath="${new_path}.exe"
30917     elif test -f "${new_path}.cmd"; then
30918       input_to_shortpath="${new_path}.cmd"
30919     else
30920       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
30921 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
30922       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30923 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30924       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
30925     fi
30926   else
30927     input_to_shortpath="$new_path"
30928   fi
30929 
30930   # Call helper function which possibly converts this using DOS-style short mode.
30931   # If so, the updated path is stored in $new_path.
30932   new_path="$input_to_shortpath"
30933 
30934   input_path="$input_to_shortpath"
30935   # Check if we need to convert this using DOS-style short mode. If the path
30936   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30937   # take no chances and rewrite it.
30938   # Note: m4 eats our [], so we need to use [ and ] instead.
30939   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30940   if test "x$has_forbidden_chars" != x; then
30941     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30942     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30943     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30944     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30945       # Going to short mode and back again did indeed matter. Since short mode is
30946       # case insensitive, let's make it lowercase to improve readability.
30947       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30948       # Now convert it back to Unix-style (cygpath)
30949       input_path=`$CYGPATH -u "$shortmode_path"`
30950       new_path="$input_path"
30951     fi
30952   fi
30953 
30954   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30955   if test "x$test_cygdrive_prefix" = x; then
30956     # As a simple fix, exclude /usr/bin since it's not a real path.
30957     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30958       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30959       # a path prefixed by /cygdrive for fixpath to work.
30960       new_path="$CYGWIN_ROOT_PATH$input_path"
30961     fi
30962   fi
30963 
30964   # remove trailing .exe if any
30965   new_path="${new_path/%.exe/}"
30966 
30967   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30968 
30969   # First separate the path from the arguments. This will split at the first
30970   # space.
30971   complete="$LD"
30972   path="${complete%% *}"
30973   tmp="$complete EOL"
30974   arguments="${tmp#* }"
30975 
30976   # Input might be given as Windows format, start by converting to
30977   # unix format.
30978   new_path="$path"
30979 
30980   windows_path="$new_path"
30981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30982     unix_path=`$CYGPATH -u "$windows_path"`
30983     new_path="$unix_path"
30984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30986     new_path="$unix_path"
30987   fi
30988 
30989 
30990   # Now try to locate executable using which
30991   new_path=`$WHICH "$new_path" 2> /dev/null`
30992 
30993   if test "x$new_path" = x; then
30994     # Oops. Which didn't find the executable.
30995     # The splitting of arguments from the executable at a space might have been incorrect,
30996     # since paths with space are more likely in Windows. Give it another try with the whole
30997     # argument.
30998     path="$complete"
30999     arguments="EOL"
31000     new_path="$path"
31001 
31002   windows_path="$new_path"
31003   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31004     unix_path=`$CYGPATH -u "$windows_path"`
31005     new_path="$unix_path"
31006   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31007     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31008     new_path="$unix_path"
31009   fi
31010 
31011 
31012     new_path=`$WHICH "$new_path" 2> /dev/null`
31013     # bat and cmd files are not always considered executable in MSYS causing which
31014     # to not find them
31015     if test "x$new_path" = x \
31016         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31017         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31018       new_path="$path"
31019 
31020   windows_path="$new_path"
31021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31022     unix_path=`$CYGPATH -u "$windows_path"`
31023     new_path="$unix_path"
31024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31025     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31026     new_path="$unix_path"
31027   fi
31028 
31029     fi
31030 
31031     if test "x$new_path" = x; then
31032       # It's still not found. Now this is an unrecoverable error.
31033       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31034 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31035       has_space=`$ECHO "$complete" | $GREP " "`
31036       if test "x$has_space" != x; then
31037         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31038 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31039       fi
31040       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31041     fi
31042   fi
31043 
31044   # Now new_path has a complete unix path to the binary
31045   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31046     # Keep paths in /bin as-is, but remove trailing .exe if any
31047     new_path="${new_path/%.exe/}"
31048     # Do not save /bin paths to all_fixpath_prefixes!
31049   else
31050     # Not in mixed or Windows style, start by that.
31051     new_path=`cmd //c echo $new_path`
31052 
31053   input_path="$new_path"
31054   # Check if we need to convert this using DOS-style short mode. If the path
31055   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31056   # take no chances and rewrite it.
31057   # Note: m4 eats our [], so we need to use [ and ] instead.
31058   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31059   if test "x$has_forbidden_chars" != x; then
31060     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31061     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31062   fi
31063 
31064     # Output is in $new_path
31065 
31066   windows_path="$new_path"
31067   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31068     unix_path=`$CYGPATH -u "$windows_path"`
31069     new_path="$unix_path"
31070   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31071     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31072     new_path="$unix_path"
31073   fi
31074 
31075     # remove trailing .exe if any
31076     new_path="${new_path/%.exe/}"
31077 
31078     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31079     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31080   fi
31081 
31082   else
31083     # We're on a posix platform. Hooray! :)
31084     # First separate the path from the arguments. This will split at the first
31085     # space.
31086     complete="$LD"
31087     path="${complete%% *}"
31088     tmp="$complete EOL"
31089     arguments="${tmp#* }"
31090 
31091     # Cannot rely on the command "which" here since it doesn't always work.
31092     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31093     if test -z "$is_absolute_path"; then
31094       # Path to executable is not absolute. Find it.
31095       IFS_save="$IFS"
31096       IFS=:
31097       for p in $PATH; do
31098         if test -f "$p/$path" && test -x "$p/$path"; then
31099           new_path="$p/$path"
31100           break
31101         fi
31102       done
31103       IFS="$IFS_save"
31104     else
31105       # This is an absolute path, we can use it without further modifications.
31106       new_path="$path"
31107     fi
31108 
31109     if test "x$new_path" = x; then
31110       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31111 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31112       has_space=`$ECHO "$complete" | $GREP " "`
31113       if test "x$has_space" != x; then
31114         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31115 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31116       fi
31117       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31118     fi
31119   fi
31120 
31121   # Now join together the path and the arguments once again
31122   if test "x$arguments" != xEOL; then
31123     new_complete="$new_path ${arguments% *}"
31124   else
31125     new_complete="$new_path"
31126   fi
31127 
31128   if test "x$complete" != "x$new_complete"; then
31129     LD="$new_complete"
31130     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31131 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31132   fi
31133 
31134     # Verify that we indeed succeeded with this trick.
31135     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31136 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31137     "$LD" --version > /dev/null
31138     if test $? -eq 0 ; then
31139       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31140 $as_echo "no" >&6; }
31141       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31142     else
31143       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31144 $as_echo "yes" >&6; }
31145     fi
31146     LDCXX="$LD"
31147   else
31148     # All other toolchains use the compiler to link.
31149     LD="$CC"
31150     LDCXX="$CXX"
31151   fi
31152 
31153   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31154 
31155 
31156   #
31157   # Setup the assembler (AS)
31158   #
31159   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31160     # FIXME: should this really be solaris, or solstudio?
31161 
31162 
31163   # Publish this variable in the help.
31164 
31165 
31166   if test "x$AS" = x; then
31167     # The variable is not set by user, try to locate tool using the code snippet
31168     for ac_prog in as
31169 do
31170   # Extract the first word of "$ac_prog", so it can be a program name with args.
31171 set dummy $ac_prog; ac_word=$2
31172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31173 $as_echo_n "checking for $ac_word... " >&6; }
31174 if ${ac_cv_path_AS+:} false; then :
31175   $as_echo_n "(cached) " >&6
31176 else
31177   case $AS in
31178   [\\/]* | ?:[\\/]*)
31179   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31180   ;;
31181   *)
31182   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31183 for as_dir in $PATH
31184 do
31185   IFS=$as_save_IFS
31186   test -z "$as_dir" && as_dir=.
31187     for ac_exec_ext in '' $ac_executable_extensions; do
31188   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31189     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31190     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31191     break 2
31192   fi
31193 done
31194   done
31195 IFS=$as_save_IFS
31196 
31197   ;;
31198 esac
31199 fi
31200 AS=$ac_cv_path_AS
31201 if test -n "$AS"; then
31202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31203 $as_echo "$AS" >&6; }
31204 else
31205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31206 $as_echo "no" >&6; }
31207 fi
31208 
31209 
31210   test -n "$AS" && break
31211 done
31212 
31213   else
31214     # The variable is set, but is it from the command line or the environment?
31215 
31216     # Try to remove the string !AS! from our list.
31217     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31218     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31219       # If it failed, the variable was not from the command line. Ignore it,
31220       # but warn the user (except for BASH, which is always set by the calling BASH).
31221       if test "xAS" != xBASH; then
31222         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31223 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31224       fi
31225       # Try to locate tool using the code snippet
31226       for ac_prog in as
31227 do
31228   # Extract the first word of "$ac_prog", so it can be a program name with args.
31229 set dummy $ac_prog; ac_word=$2
31230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31231 $as_echo_n "checking for $ac_word... " >&6; }
31232 if ${ac_cv_path_AS+:} false; then :
31233   $as_echo_n "(cached) " >&6
31234 else
31235   case $AS in
31236   [\\/]* | ?:[\\/]*)
31237   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31238   ;;
31239   *)
31240   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31241 for as_dir in $PATH
31242 do
31243   IFS=$as_save_IFS
31244   test -z "$as_dir" && as_dir=.
31245     for ac_exec_ext in '' $ac_executable_extensions; do
31246   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31247     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31249     break 2
31250   fi
31251 done
31252   done
31253 IFS=$as_save_IFS
31254 
31255   ;;
31256 esac
31257 fi
31258 AS=$ac_cv_path_AS
31259 if test -n "$AS"; then
31260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31261 $as_echo "$AS" >&6; }
31262 else
31263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31264 $as_echo "no" >&6; }
31265 fi
31266 
31267 
31268   test -n "$AS" && break
31269 done
31270 
31271     else
31272       # If it succeeded, then it was overridden by the user. We will use it
31273       # for the tool.
31274 
31275       # First remove it from the list of overridden variables, so we can test
31276       # for unknown variables in the end.
31277       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31278 
31279       # Check if the provided tool contains a complete path.
31280       tool_specified="$AS"
31281       tool_basename="${tool_specified##*/}"
31282       if test "x$tool_basename" = "x$tool_specified"; then
31283         # A command without a complete path is provided, search $PATH.
31284         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31285 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31286         # Extract the first word of "$tool_basename", so it can be a program name with args.
31287 set dummy $tool_basename; ac_word=$2
31288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31289 $as_echo_n "checking for $ac_word... " >&6; }
31290 if ${ac_cv_path_AS+:} false; then :
31291   $as_echo_n "(cached) " >&6
31292 else
31293   case $AS in
31294   [\\/]* | ?:[\\/]*)
31295   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31296   ;;
31297   *)
31298   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31299 for as_dir in $PATH
31300 do
31301   IFS=$as_save_IFS
31302   test -z "$as_dir" && as_dir=.
31303     for ac_exec_ext in '' $ac_executable_extensions; do
31304   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31305     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31306     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31307     break 2
31308   fi
31309 done
31310   done
31311 IFS=$as_save_IFS
31312 
31313   ;;
31314 esac
31315 fi
31316 AS=$ac_cv_path_AS
31317 if test -n "$AS"; then
31318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31319 $as_echo "$AS" >&6; }
31320 else
31321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31322 $as_echo "no" >&6; }
31323 fi
31324 
31325 
31326         if test "x$AS" = x; then
31327           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31328         fi
31329       else
31330         # Otherwise we believe it is a complete path. Use it as it is.
31331         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31332 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31333         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31334 $as_echo_n "checking for AS... " >&6; }
31335         if test ! -x "$tool_specified"; then
31336           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31337 $as_echo "not found" >&6; }
31338           as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31339         fi
31340         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31341 $as_echo "$tool_specified" >&6; }
31342       fi
31343     fi
31344   fi
31345 
31346 
31347 
31348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31349 
31350   # First separate the path from the arguments. This will split at the first
31351   # space.
31352   complete="$AS"
31353   path="${complete%% *}"
31354   tmp="$complete EOL"
31355   arguments="${tmp#* }"
31356 
31357   # Input might be given as Windows format, start by converting to
31358   # unix format.
31359   new_path=`$CYGPATH -u "$path"`
31360 
31361   # Now try to locate executable using which
31362   new_path=`$WHICH "$new_path" 2> /dev/null`
31363   # bat and cmd files are not always considered executable in cygwin causing which
31364   # to not find them
31365   if test "x$new_path" = x \
31366       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31367       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31368     new_path=`$CYGPATH -u "$path"`
31369   fi
31370   if test "x$new_path" = x; then
31371     # Oops. Which didn't find the executable.
31372     # The splitting of arguments from the executable at a space might have been incorrect,
31373     # since paths with space are more likely in Windows. Give it another try with the whole
31374     # argument.
31375     path="$complete"
31376     arguments="EOL"
31377     new_path=`$CYGPATH -u "$path"`
31378     new_path=`$WHICH "$new_path" 2> /dev/null`
31379     # bat and cmd files are not always considered executable in cygwin causing which
31380     # to not find them
31381     if test "x$new_path" = x \
31382         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31383         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31384       new_path=`$CYGPATH -u "$path"`
31385     fi
31386     if test "x$new_path" = x; then
31387       # It's still not found. Now this is an unrecoverable error.
31388       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31389 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31390       has_space=`$ECHO "$complete" | $GREP " "`
31391       if test "x$has_space" != x; then
31392         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31393 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31394       fi
31395       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31396     fi
31397   fi
31398 
31399   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31400   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31401   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31402   # "foo.exe" is OK but "foo" is an error.
31403   #
31404   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31405   # It is also a way to make sure we got the proper file name for the real test later on.
31406   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31407   if test "x$test_shortpath" = x; then
31408     # Short path failed, file does not exist as specified.
31409     # Try adding .exe or .cmd
31410     if test -f "${new_path}.exe"; then
31411       input_to_shortpath="${new_path}.exe"
31412     elif test -f "${new_path}.cmd"; then
31413       input_to_shortpath="${new_path}.cmd"
31414     else
31415       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
31416 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
31417       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31418 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31419       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31420     fi
31421   else
31422     input_to_shortpath="$new_path"
31423   fi
31424 
31425   # Call helper function which possibly converts this using DOS-style short mode.
31426   # If so, the updated path is stored in $new_path.
31427   new_path="$input_to_shortpath"
31428 
31429   input_path="$input_to_shortpath"
31430   # Check if we need to convert this using DOS-style short mode. If the path
31431   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31432   # take no chances and rewrite it.
31433   # Note: m4 eats our [], so we need to use [ and ] instead.
31434   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31435   if test "x$has_forbidden_chars" != x; then
31436     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31437     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31438     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31439     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31440       # Going to short mode and back again did indeed matter. Since short mode is
31441       # case insensitive, let's make it lowercase to improve readability.
31442       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31443       # Now convert it back to Unix-style (cygpath)
31444       input_path=`$CYGPATH -u "$shortmode_path"`
31445       new_path="$input_path"
31446     fi
31447   fi
31448 
31449   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31450   if test "x$test_cygdrive_prefix" = x; then
31451     # As a simple fix, exclude /usr/bin since it's not a real path.
31452     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31453       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31454       # a path prefixed by /cygdrive for fixpath to work.
31455       new_path="$CYGWIN_ROOT_PATH$input_path"
31456     fi
31457   fi
31458 
31459   # remove trailing .exe if any
31460   new_path="${new_path/%.exe/}"
31461 
31462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31463 
31464   # First separate the path from the arguments. This will split at the first
31465   # space.
31466   complete="$AS"
31467   path="${complete%% *}"
31468   tmp="$complete EOL"
31469   arguments="${tmp#* }"
31470 
31471   # Input might be given as Windows format, start by converting to
31472   # unix format.
31473   new_path="$path"
31474 
31475   windows_path="$new_path"
31476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31477     unix_path=`$CYGPATH -u "$windows_path"`
31478     new_path="$unix_path"
31479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31481     new_path="$unix_path"
31482   fi
31483 
31484 
31485   # Now try to locate executable using which
31486   new_path=`$WHICH "$new_path" 2> /dev/null`
31487 
31488   if test "x$new_path" = x; then
31489     # Oops. Which didn't find the executable.
31490     # The splitting of arguments from the executable at a space might have been incorrect,
31491     # since paths with space are more likely in Windows. Give it another try with the whole
31492     # argument.
31493     path="$complete"
31494     arguments="EOL"
31495     new_path="$path"
31496 
31497   windows_path="$new_path"
31498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31499     unix_path=`$CYGPATH -u "$windows_path"`
31500     new_path="$unix_path"
31501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31502     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31503     new_path="$unix_path"
31504   fi
31505 
31506 
31507     new_path=`$WHICH "$new_path" 2> /dev/null`
31508     # bat and cmd files are not always considered executable in MSYS causing which
31509     # to not find them
31510     if test "x$new_path" = x \
31511         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31512         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31513       new_path="$path"
31514 
31515   windows_path="$new_path"
31516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31517     unix_path=`$CYGPATH -u "$windows_path"`
31518     new_path="$unix_path"
31519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31520     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31521     new_path="$unix_path"
31522   fi
31523 
31524     fi
31525 
31526     if test "x$new_path" = x; then
31527       # It's still not found. Now this is an unrecoverable error.
31528       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31529 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31530       has_space=`$ECHO "$complete" | $GREP " "`
31531       if test "x$has_space" != x; then
31532         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31533 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31534       fi
31535       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31536     fi
31537   fi
31538 
31539   # Now new_path has a complete unix path to the binary
31540   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31541     # Keep paths in /bin as-is, but remove trailing .exe if any
31542     new_path="${new_path/%.exe/}"
31543     # Do not save /bin paths to all_fixpath_prefixes!
31544   else
31545     # Not in mixed or Windows style, start by that.
31546     new_path=`cmd //c echo $new_path`
31547 
31548   input_path="$new_path"
31549   # Check if we need to convert this using DOS-style short mode. If the path
31550   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31551   # take no chances and rewrite it.
31552   # Note: m4 eats our [], so we need to use [ and ] instead.
31553   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31554   if test "x$has_forbidden_chars" != x; then
31555     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31556     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31557   fi
31558 
31559     # Output is in $new_path
31560 
31561   windows_path="$new_path"
31562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31563     unix_path=`$CYGPATH -u "$windows_path"`
31564     new_path="$unix_path"
31565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31566     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31567     new_path="$unix_path"
31568   fi
31569 
31570     # remove trailing .exe if any
31571     new_path="${new_path/%.exe/}"
31572 
31573     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31574     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31575   fi
31576 
31577   else
31578     # We're on a posix platform. Hooray! :)
31579     # First separate the path from the arguments. This will split at the first
31580     # space.
31581     complete="$AS"
31582     path="${complete%% *}"
31583     tmp="$complete EOL"
31584     arguments="${tmp#* }"
31585 
31586     # Cannot rely on the command "which" here since it doesn't always work.
31587     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31588     if test -z "$is_absolute_path"; then
31589       # Path to executable is not absolute. Find it.
31590       IFS_save="$IFS"
31591       IFS=:
31592       for p in $PATH; do
31593         if test -f "$p/$path" && test -x "$p/$path"; then
31594           new_path="$p/$path"
31595           break
31596         fi
31597       done
31598       IFS="$IFS_save"
31599     else
31600       # This is an absolute path, we can use it without further modifications.
31601       new_path="$path"
31602     fi
31603 
31604     if test "x$new_path" = x; then
31605       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31606 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31607       has_space=`$ECHO "$complete" | $GREP " "`
31608       if test "x$has_space" != x; then
31609         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31610 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31611       fi
31612       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31613     fi
31614   fi
31615 
31616   # Now join together the path and the arguments once again
31617   if test "x$arguments" != xEOL; then
31618     new_complete="$new_path ${arguments% *}"
31619   else
31620     new_complete="$new_path"
31621   fi
31622 
31623   if test "x$complete" != "x$new_complete"; then
31624     AS="$new_complete"
31625     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
31626 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
31627   fi
31628 
31629   else
31630     # FIXME: is this correct for microsoft?
31631     AS="$CC -c"
31632   fi
31633 
31634 
31635   #
31636   # Setup the archiver (AR)
31637   #
31638   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31639     # The corresponding ar tool is lib.exe (used to create static libraries)
31640     # Extract the first word of "lib", so it can be a program name with args.
31641 set dummy lib; ac_word=$2
31642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31643 $as_echo_n "checking for $ac_word... " >&6; }
31644 if ${ac_cv_prog_AR+:} false; then :
31645   $as_echo_n "(cached) " >&6
31646 else
31647   if test -n "$AR"; then
31648   ac_cv_prog_AR="$AR" # Let the user override the test.
31649 else
31650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31651 for as_dir in $PATH
31652 do
31653   IFS=$as_save_IFS
31654   test -z "$as_dir" && as_dir=.
31655     for ac_exec_ext in '' $ac_executable_extensions; do
31656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31657     ac_cv_prog_AR="lib"
31658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31659     break 2
31660   fi
31661 done
31662   done
31663 IFS=$as_save_IFS
31664 
31665 fi
31666 fi
31667 AR=$ac_cv_prog_AR
31668 if test -n "$AR"; then
31669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31670 $as_echo "$AR" >&6; }
31671 else
31672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31673 $as_echo "no" >&6; }
31674 fi
31675 
31676 
31677   else
31678 
31679 
31680   # Publish this variable in the help.
31681 
31682 
31683   if test "x$AR" = x; then
31684     # The variable is not set by user, try to locate tool using the code snippet
31685     if test -n "$ac_tool_prefix"; then
31686   for ac_prog in ar
31687   do
31688     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31689 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31691 $as_echo_n "checking for $ac_word... " >&6; }
31692 if ${ac_cv_prog_AR+:} false; then :
31693   $as_echo_n "(cached) " >&6
31694 else
31695   if test -n "$AR"; then
31696   ac_cv_prog_AR="$AR" # Let the user override the test.
31697 else
31698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31699 for as_dir in $PATH
31700 do
31701   IFS=$as_save_IFS
31702   test -z "$as_dir" && as_dir=.
31703     for ac_exec_ext in '' $ac_executable_extensions; do
31704   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31705     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
31706     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31707     break 2
31708   fi
31709 done
31710   done
31711 IFS=$as_save_IFS
31712 
31713 fi
31714 fi
31715 AR=$ac_cv_prog_AR
31716 if test -n "$AR"; then
31717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31718 $as_echo "$AR" >&6; }
31719 else
31720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31721 $as_echo "no" >&6; }
31722 fi
31723 
31724 
31725     test -n "$AR" && break
31726   done
31727 fi
31728 if test -z "$AR"; then
31729   ac_ct_AR=$AR
31730   for ac_prog in ar
31731 do
31732   # Extract the first word of "$ac_prog", so it can be a program name with args.
31733 set dummy $ac_prog; ac_word=$2
31734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31735 $as_echo_n "checking for $ac_word... " >&6; }
31736 if ${ac_cv_prog_ac_ct_AR+:} false; then :
31737   $as_echo_n "(cached) " >&6
31738 else
31739   if test -n "$ac_ct_AR"; then
31740   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
31741 else
31742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31743 for as_dir in $PATH
31744 do
31745   IFS=$as_save_IFS
31746   test -z "$as_dir" && as_dir=.
31747     for ac_exec_ext in '' $ac_executable_extensions; do
31748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31749     ac_cv_prog_ac_ct_AR="$ac_prog"
31750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31751     break 2
31752   fi
31753 done
31754   done
31755 IFS=$as_save_IFS
31756 
31757 fi
31758 fi
31759 ac_ct_AR=$ac_cv_prog_ac_ct_AR
31760 if test -n "$ac_ct_AR"; then
31761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
31762 $as_echo "$ac_ct_AR" >&6; }
31763 else
31764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31765 $as_echo "no" >&6; }
31766 fi
31767 
31768 
31769   test -n "$ac_ct_AR" && break
31770 done
31771 
31772   if test "x$ac_ct_AR" = x; then
31773     AR=""
31774   else
31775     case $cross_compiling:$ac_tool_warned in
31776 yes:)
31777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31778 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31779 ac_tool_warned=yes ;;
31780 esac
31781     AR=$ac_ct_AR
31782   fi
31783 fi
31784 
31785   else
31786     # The variable is set, but is it from the command line or the environment?
31787 
31788     # Try to remove the string !AR! from our list.
31789     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
31790     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31791       # If it failed, the variable was not from the command line. Ignore it,
31792       # but warn the user (except for BASH, which is always set by the calling BASH).
31793       if test "xAR" != xBASH; then
31794         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
31795 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
31796       fi
31797       # Try to locate tool using the code snippet
31798       if test -n "$ac_tool_prefix"; then
31799   for ac_prog in ar
31800   do
31801     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31802 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31804 $as_echo_n "checking for $ac_word... " >&6; }
31805 if ${ac_cv_prog_AR+:} false; then :
31806   $as_echo_n "(cached) " >&6
31807 else
31808   if test -n "$AR"; then
31809   ac_cv_prog_AR="$AR" # Let the user override the test.
31810 else
31811 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31812 for as_dir in $PATH
31813 do
31814   IFS=$as_save_IFS
31815   test -z "$as_dir" && as_dir=.
31816     for ac_exec_ext in '' $ac_executable_extensions; do
31817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31818     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
31819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31820     break 2
31821   fi
31822 done
31823   done
31824 IFS=$as_save_IFS
31825 
31826 fi
31827 fi
31828 AR=$ac_cv_prog_AR
31829 if test -n "$AR"; then
31830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31831 $as_echo "$AR" >&6; }
31832 else
31833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31834 $as_echo "no" >&6; }
31835 fi
31836 
31837 
31838     test -n "$AR" && break
31839   done
31840 fi
31841 if test -z "$AR"; then
31842   ac_ct_AR=$AR
31843   for ac_prog in ar
31844 do
31845   # Extract the first word of "$ac_prog", so it can be a program name with args.
31846 set dummy $ac_prog; ac_word=$2
31847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31848 $as_echo_n "checking for $ac_word... " >&6; }
31849 if ${ac_cv_prog_ac_ct_AR+:} false; then :
31850   $as_echo_n "(cached) " >&6
31851 else
31852   if test -n "$ac_ct_AR"; then
31853   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
31854 else
31855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31856 for as_dir in $PATH
31857 do
31858   IFS=$as_save_IFS
31859   test -z "$as_dir" && as_dir=.
31860     for ac_exec_ext in '' $ac_executable_extensions; do
31861   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31862     ac_cv_prog_ac_ct_AR="$ac_prog"
31863     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31864     break 2
31865   fi
31866 done
31867   done
31868 IFS=$as_save_IFS
31869 
31870 fi
31871 fi
31872 ac_ct_AR=$ac_cv_prog_ac_ct_AR
31873 if test -n "$ac_ct_AR"; then
31874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
31875 $as_echo "$ac_ct_AR" >&6; }
31876 else
31877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31878 $as_echo "no" >&6; }
31879 fi
31880 
31881 
31882   test -n "$ac_ct_AR" && break
31883 done
31884 
31885   if test "x$ac_ct_AR" = x; then
31886     AR=""
31887   else
31888     case $cross_compiling:$ac_tool_warned in
31889 yes:)
31890 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31891 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31892 ac_tool_warned=yes ;;
31893 esac
31894     AR=$ac_ct_AR
31895   fi
31896 fi
31897 
31898     else
31899       # If it succeeded, then it was overridden by the user. We will use it
31900       # for the tool.
31901 
31902       # First remove it from the list of overridden variables, so we can test
31903       # for unknown variables in the end.
31904       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31905 
31906       # Check if the provided tool contains a complete path.
31907       tool_specified="$AR"
31908       tool_basename="${tool_specified##*/}"
31909       if test "x$tool_basename" = "x$tool_specified"; then
31910         # A command without a complete path is provided, search $PATH.
31911         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
31912 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
31913         # Extract the first word of "$tool_basename", so it can be a program name with args.
31914 set dummy $tool_basename; ac_word=$2
31915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31916 $as_echo_n "checking for $ac_word... " >&6; }
31917 if ${ac_cv_path_AR+:} false; then :
31918   $as_echo_n "(cached) " >&6
31919 else
31920   case $AR in
31921   [\\/]* | ?:[\\/]*)
31922   ac_cv_path_AR="$AR" # Let the user override the test with a path.
31923   ;;
31924   *)
31925   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31926 for as_dir in $PATH
31927 do
31928   IFS=$as_save_IFS
31929   test -z "$as_dir" && as_dir=.
31930     for ac_exec_ext in '' $ac_executable_extensions; do
31931   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31932     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
31933     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31934     break 2
31935   fi
31936 done
31937   done
31938 IFS=$as_save_IFS
31939 
31940   ;;
31941 esac
31942 fi
31943 AR=$ac_cv_path_AR
31944 if test -n "$AR"; then
31945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31946 $as_echo "$AR" >&6; }
31947 else
31948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31949 $as_echo "no" >&6; }
31950 fi
31951 
31952 
31953         if test "x$AR" = x; then
31954           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31955         fi
31956       else
31957         # Otherwise we believe it is a complete path. Use it as it is.
31958         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
31959 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
31960         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
31961 $as_echo_n "checking for AR... " >&6; }
31962         if test ! -x "$tool_specified"; then
31963           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31964 $as_echo "not found" >&6; }
31965           as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
31966         fi
31967         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31968 $as_echo "$tool_specified" >&6; }
31969       fi
31970     fi
31971   fi
31972 
31973 
31974   fi
31975 
31976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31977 
31978   # First separate the path from the arguments. This will split at the first
31979   # space.
31980   complete="$AR"
31981   path="${complete%% *}"
31982   tmp="$complete EOL"
31983   arguments="${tmp#* }"
31984 
31985   # Input might be given as Windows format, start by converting to
31986   # unix format.
31987   new_path=`$CYGPATH -u "$path"`
31988 
31989   # Now try to locate executable using which
31990   new_path=`$WHICH "$new_path" 2> /dev/null`
31991   # bat and cmd files are not always considered executable in cygwin causing which
31992   # to not find them
31993   if test "x$new_path" = x \
31994       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31995       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31996     new_path=`$CYGPATH -u "$path"`
31997   fi
31998   if test "x$new_path" = x; then
31999     # Oops. Which didn't find the executable.
32000     # The splitting of arguments from the executable at a space might have been incorrect,
32001     # since paths with space are more likely in Windows. Give it another try with the whole
32002     # argument.
32003     path="$complete"
32004     arguments="EOL"
32005     new_path=`$CYGPATH -u "$path"`
32006     new_path=`$WHICH "$new_path" 2> /dev/null`
32007     # bat and cmd files are not always considered executable in cygwin causing which
32008     # to not find them
32009     if test "x$new_path" = x \
32010         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32011         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32012       new_path=`$CYGPATH -u "$path"`
32013     fi
32014     if test "x$new_path" = x; then
32015       # It's still not found. Now this is an unrecoverable error.
32016       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32017 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32018       has_space=`$ECHO "$complete" | $GREP " "`
32019       if test "x$has_space" != x; then
32020         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32021 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32022       fi
32023       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32024     fi
32025   fi
32026 
32027   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32028   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32029   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32030   # "foo.exe" is OK but "foo" is an error.
32031   #
32032   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32033   # It is also a way to make sure we got the proper file name for the real test later on.
32034   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32035   if test "x$test_shortpath" = x; then
32036     # Short path failed, file does not exist as specified.
32037     # Try adding .exe or .cmd
32038     if test -f "${new_path}.exe"; then
32039       input_to_shortpath="${new_path}.exe"
32040     elif test -f "${new_path}.cmd"; then
32041       input_to_shortpath="${new_path}.cmd"
32042     else
32043       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32044 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32045       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32046 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32047       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32048     fi
32049   else
32050     input_to_shortpath="$new_path"
32051   fi
32052 
32053   # Call helper function which possibly converts this using DOS-style short mode.
32054   # If so, the updated path is stored in $new_path.
32055   new_path="$input_to_shortpath"
32056 
32057   input_path="$input_to_shortpath"
32058   # Check if we need to convert this using DOS-style short mode. If the path
32059   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32060   # take no chances and rewrite it.
32061   # Note: m4 eats our [], so we need to use [ and ] instead.
32062   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32063   if test "x$has_forbidden_chars" != x; then
32064     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32065     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32066     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32067     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32068       # Going to short mode and back again did indeed matter. Since short mode is
32069       # case insensitive, let's make it lowercase to improve readability.
32070       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32071       # Now convert it back to Unix-style (cygpath)
32072       input_path=`$CYGPATH -u "$shortmode_path"`
32073       new_path="$input_path"
32074     fi
32075   fi
32076 
32077   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32078   if test "x$test_cygdrive_prefix" = x; then
32079     # As a simple fix, exclude /usr/bin since it's not a real path.
32080     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32081       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32082       # a path prefixed by /cygdrive for fixpath to work.
32083       new_path="$CYGWIN_ROOT_PATH$input_path"
32084     fi
32085   fi
32086 
32087   # remove trailing .exe if any
32088   new_path="${new_path/%.exe/}"
32089 
32090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32091 
32092   # First separate the path from the arguments. This will split at the first
32093   # space.
32094   complete="$AR"
32095   path="${complete%% *}"
32096   tmp="$complete EOL"
32097   arguments="${tmp#* }"
32098 
32099   # Input might be given as Windows format, start by converting to
32100   # unix format.
32101   new_path="$path"
32102 
32103   windows_path="$new_path"
32104   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32105     unix_path=`$CYGPATH -u "$windows_path"`
32106     new_path="$unix_path"
32107   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32108     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32109     new_path="$unix_path"
32110   fi
32111 
32112 
32113   # Now try to locate executable using which
32114   new_path=`$WHICH "$new_path" 2> /dev/null`
32115 
32116   if test "x$new_path" = x; then
32117     # Oops. Which didn't find the executable.
32118     # The splitting of arguments from the executable at a space might have been incorrect,
32119     # since paths with space are more likely in Windows. Give it another try with the whole
32120     # argument.
32121     path="$complete"
32122     arguments="EOL"
32123     new_path="$path"
32124 
32125   windows_path="$new_path"
32126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32127     unix_path=`$CYGPATH -u "$windows_path"`
32128     new_path="$unix_path"
32129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32130     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32131     new_path="$unix_path"
32132   fi
32133 
32134 
32135     new_path=`$WHICH "$new_path" 2> /dev/null`
32136     # bat and cmd files are not always considered executable in MSYS causing which
32137     # to not find them
32138     if test "x$new_path" = x \
32139         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32140         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32141       new_path="$path"
32142 
32143   windows_path="$new_path"
32144   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32145     unix_path=`$CYGPATH -u "$windows_path"`
32146     new_path="$unix_path"
32147   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32148     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32149     new_path="$unix_path"
32150   fi
32151 
32152     fi
32153 
32154     if test "x$new_path" = x; then
32155       # It's still not found. Now this is an unrecoverable error.
32156       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32157 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32158       has_space=`$ECHO "$complete" | $GREP " "`
32159       if test "x$has_space" != x; then
32160         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32161 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32162       fi
32163       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32164     fi
32165   fi
32166 
32167   # Now new_path has a complete unix path to the binary
32168   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32169     # Keep paths in /bin as-is, but remove trailing .exe if any
32170     new_path="${new_path/%.exe/}"
32171     # Do not save /bin paths to all_fixpath_prefixes!
32172   else
32173     # Not in mixed or Windows style, start by that.
32174     new_path=`cmd //c echo $new_path`
32175 
32176   input_path="$new_path"
32177   # Check if we need to convert this using DOS-style short mode. If the path
32178   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32179   # take no chances and rewrite it.
32180   # Note: m4 eats our [], so we need to use [ and ] instead.
32181   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32182   if test "x$has_forbidden_chars" != x; then
32183     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32184     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32185   fi
32186 
32187     # Output is in $new_path
32188 
32189   windows_path="$new_path"
32190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32191     unix_path=`$CYGPATH -u "$windows_path"`
32192     new_path="$unix_path"
32193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32194     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32195     new_path="$unix_path"
32196   fi
32197 
32198     # remove trailing .exe if any
32199     new_path="${new_path/%.exe/}"
32200 
32201     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32202     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32203   fi
32204 
32205   else
32206     # We're on a posix platform. Hooray! :)
32207     # First separate the path from the arguments. This will split at the first
32208     # space.
32209     complete="$AR"
32210     path="${complete%% *}"
32211     tmp="$complete EOL"
32212     arguments="${tmp#* }"
32213 
32214     # Cannot rely on the command "which" here since it doesn't always work.
32215     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32216     if test -z "$is_absolute_path"; then
32217       # Path to executable is not absolute. Find it.
32218       IFS_save="$IFS"
32219       IFS=:
32220       for p in $PATH; do
32221         if test -f "$p/$path" && test -x "$p/$path"; then
32222           new_path="$p/$path"
32223           break
32224         fi
32225       done
32226       IFS="$IFS_save"
32227     else
32228       # This is an absolute path, we can use it without further modifications.
32229       new_path="$path"
32230     fi
32231 
32232     if test "x$new_path" = x; then
32233       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32234 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32235       has_space=`$ECHO "$complete" | $GREP " "`
32236       if test "x$has_space" != x; then
32237         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32238 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32239       fi
32240       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32241     fi
32242   fi
32243 
32244   # Now join together the path and the arguments once again
32245   if test "x$arguments" != xEOL; then
32246     new_complete="$new_path ${arguments% *}"
32247   else
32248     new_complete="$new_path"
32249   fi
32250 
32251   if test "x$complete" != "x$new_complete"; then
32252     AR="$new_complete"
32253     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32254 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32255   fi
32256 
32257 
32258 
32259   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32260     ac_ext=m
32261 ac_cpp='$OBJCPP $CPPFLAGS'
32262 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32263 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32264 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32265 if test -n "$ac_tool_prefix"; then
32266   for ac_prog in gcc objcc objc cc CC
32267   do
32268     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32269 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32271 $as_echo_n "checking for $ac_word... " >&6; }
32272 if ${ac_cv_prog_OBJC+:} false; then :
32273   $as_echo_n "(cached) " >&6
32274 else
32275   if test -n "$OBJC"; then
32276   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32277 else
32278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32279 for as_dir in $PATH
32280 do
32281   IFS=$as_save_IFS
32282   test -z "$as_dir" && as_dir=.
32283     for ac_exec_ext in '' $ac_executable_extensions; do
32284   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32285     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32287     break 2
32288   fi
32289 done
32290   done
32291 IFS=$as_save_IFS
32292 
32293 fi
32294 fi
32295 OBJC=$ac_cv_prog_OBJC
32296 if test -n "$OBJC"; then
32297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32298 $as_echo "$OBJC" >&6; }
32299 else
32300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32301 $as_echo "no" >&6; }
32302 fi
32303 
32304 
32305     test -n "$OBJC" && break
32306   done
32307 fi
32308 if test -z "$OBJC"; then
32309   ac_ct_OBJC=$OBJC
32310   for ac_prog in gcc objcc objc cc CC
32311 do
32312   # Extract the first word of "$ac_prog", so it can be a program name with args.
32313 set dummy $ac_prog; ac_word=$2
32314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32315 $as_echo_n "checking for $ac_word... " >&6; }
32316 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32317   $as_echo_n "(cached) " >&6
32318 else
32319   if test -n "$ac_ct_OBJC"; then
32320   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32321 else
32322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32323 for as_dir in $PATH
32324 do
32325   IFS=$as_save_IFS
32326   test -z "$as_dir" && as_dir=.
32327     for ac_exec_ext in '' $ac_executable_extensions; do
32328   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32329     ac_cv_prog_ac_ct_OBJC="$ac_prog"
32330     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32331     break 2
32332   fi
32333 done
32334   done
32335 IFS=$as_save_IFS
32336 
32337 fi
32338 fi
32339 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32340 if test -n "$ac_ct_OBJC"; then
32341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32342 $as_echo "$ac_ct_OBJC" >&6; }
32343 else
32344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32345 $as_echo "no" >&6; }
32346 fi
32347 
32348 
32349   test -n "$ac_ct_OBJC" && break
32350 done
32351 
32352   if test "x$ac_ct_OBJC" = x; then
32353     OBJC="gcc"
32354   else
32355     case $cross_compiling:$ac_tool_warned in
32356 yes:)
32357 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32358 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32359 ac_tool_warned=yes ;;
32360 esac
32361     OBJC=$ac_ct_OBJC
32362   fi
32363 fi
32364 
32365 # Provide some information about the compiler.
32366 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32367 set X $ac_compile
32368 ac_compiler=$2
32369 for ac_option in --version -v -V -qversion; do
32370   { { ac_try="$ac_compiler $ac_option >&5"
32371 case "(($ac_try" in
32372   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32373   *) ac_try_echo=$ac_try;;
32374 esac
32375 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32376 $as_echo "$ac_try_echo"; } >&5
32377   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32378   ac_status=$?
32379   if test -s conftest.err; then
32380     sed '10a\
32381 ... rest of stderr output deleted ...
32382          10q' conftest.err >conftest.er1
32383     cat conftest.er1 >&5
32384   fi
32385   rm -f conftest.er1 conftest.err
32386   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32387   test $ac_status = 0; }
32388 done
32389 
32390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32391 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32392 if ${ac_cv_objc_compiler_gnu+:} false; then :
32393   $as_echo_n "(cached) " >&6
32394 else
32395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32396 /* end confdefs.h.  */
32397 
32398 int
32399 main ()
32400 {
32401 #ifndef __GNUC__
32402        choke me
32403 #endif
32404 
32405   ;
32406   return 0;
32407 }
32408 _ACEOF
32409 if ac_fn_objc_try_compile "$LINENO"; then :
32410   ac_compiler_gnu=yes
32411 else
32412   ac_compiler_gnu=no
32413 fi
32414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32415 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32416 
32417 fi
32418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32419 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32420 if test $ac_compiler_gnu = yes; then
32421   GOBJC=yes
32422 else
32423   GOBJC=
32424 fi
32425 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32426 ac_save_OBJCFLAGS=$OBJCFLAGS
32427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32428 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32429 if ${ac_cv_prog_objc_g+:} false; then :
32430   $as_echo_n "(cached) " >&6
32431 else
32432   ac_save_objc_werror_flag=$ac_objc_werror_flag
32433    ac_objc_werror_flag=yes
32434    ac_cv_prog_objc_g=no
32435    OBJCFLAGS="-g"
32436    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32437 /* end confdefs.h.  */
32438 
32439 int
32440 main ()
32441 {
32442 
32443   ;
32444   return 0;
32445 }
32446 _ACEOF
32447 if ac_fn_objc_try_compile "$LINENO"; then :
32448   ac_cv_prog_objc_g=yes
32449 else
32450   OBJCFLAGS=""
32451       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32452 /* end confdefs.h.  */
32453 
32454 int
32455 main ()
32456 {
32457 
32458   ;
32459   return 0;
32460 }
32461 _ACEOF
32462 if ac_fn_objc_try_compile "$LINENO"; then :
32463 
32464 else
32465   ac_objc_werror_flag=$ac_save_objc_werror_flag
32466          OBJCFLAGS="-g"
32467          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32468 /* end confdefs.h.  */
32469 
32470 int
32471 main ()
32472 {
32473 
32474   ;
32475   return 0;
32476 }
32477 _ACEOF
32478 if ac_fn_objc_try_compile "$LINENO"; then :
32479   ac_cv_prog_objc_g=yes
32480 fi
32481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32482 fi
32483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32484 fi
32485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32486    ac_objc_werror_flag=$ac_save_objc_werror_flag
32487 fi
32488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
32489 $as_echo "$ac_cv_prog_objc_g" >&6; }
32490 if test "$ac_test_OBJCFLAGS" = set; then
32491   OBJCFLAGS=$ac_save_OBJCFLAGS
32492 elif test $ac_cv_prog_objc_g = yes; then
32493   if test "$GOBJC" = yes; then
32494     OBJCFLAGS="-g -O2"
32495   else
32496     OBJCFLAGS="-g"
32497   fi
32498 else
32499   if test "$GOBJC" = yes; then
32500     OBJCFLAGS="-O2"
32501   else
32502     OBJCFLAGS=
32503   fi
32504 fi
32505 ac_ext=cpp
32506 ac_cpp='$CXXCPP $CPPFLAGS'
32507 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32508 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32509 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32510 
32511 
32512   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32513 
32514   # First separate the path from the arguments. This will split at the first
32515   # space.
32516   complete="$OBJC"
32517   path="${complete%% *}"
32518   tmp="$complete EOL"
32519   arguments="${tmp#* }"
32520 
32521   # Input might be given as Windows format, start by converting to
32522   # unix format.
32523   new_path=`$CYGPATH -u "$path"`
32524 
32525   # Now try to locate executable using which
32526   new_path=`$WHICH "$new_path" 2> /dev/null`
32527   # bat and cmd files are not always considered executable in cygwin causing which
32528   # to not find them
32529   if test "x$new_path" = x \
32530       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32531       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32532     new_path=`$CYGPATH -u "$path"`
32533   fi
32534   if test "x$new_path" = x; then
32535     # Oops. Which didn't find the executable.
32536     # The splitting of arguments from the executable at a space might have been incorrect,
32537     # since paths with space are more likely in Windows. Give it another try with the whole
32538     # argument.
32539     path="$complete"
32540     arguments="EOL"
32541     new_path=`$CYGPATH -u "$path"`
32542     new_path=`$WHICH "$new_path" 2> /dev/null`
32543     # bat and cmd files are not always considered executable in cygwin causing which
32544     # to not find them
32545     if test "x$new_path" = x \
32546         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32547         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32548       new_path=`$CYGPATH -u "$path"`
32549     fi
32550     if test "x$new_path" = x; then
32551       # It's still not found. Now this is an unrecoverable error.
32552       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32553 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32554       has_space=`$ECHO "$complete" | $GREP " "`
32555       if test "x$has_space" != x; then
32556         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32557 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32558       fi
32559       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32560     fi
32561   fi
32562 
32563   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32564   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32565   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32566   # "foo.exe" is OK but "foo" is an error.
32567   #
32568   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32569   # It is also a way to make sure we got the proper file name for the real test later on.
32570   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32571   if test "x$test_shortpath" = x; then
32572     # Short path failed, file does not exist as specified.
32573     # Try adding .exe or .cmd
32574     if test -f "${new_path}.exe"; then
32575       input_to_shortpath="${new_path}.exe"
32576     elif test -f "${new_path}.cmd"; then
32577       input_to_shortpath="${new_path}.cmd"
32578     else
32579       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
32580 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
32581       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32582 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32583       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32584     fi
32585   else
32586     input_to_shortpath="$new_path"
32587   fi
32588 
32589   # Call helper function which possibly converts this using DOS-style short mode.
32590   # If so, the updated path is stored in $new_path.
32591   new_path="$input_to_shortpath"
32592 
32593   input_path="$input_to_shortpath"
32594   # Check if we need to convert this using DOS-style short mode. If the path
32595   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32596   # take no chances and rewrite it.
32597   # Note: m4 eats our [], so we need to use [ and ] instead.
32598   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32599   if test "x$has_forbidden_chars" != x; then
32600     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32601     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32602     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32603     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32604       # Going to short mode and back again did indeed matter. Since short mode is
32605       # case insensitive, let's make it lowercase to improve readability.
32606       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32607       # Now convert it back to Unix-style (cygpath)
32608       input_path=`$CYGPATH -u "$shortmode_path"`
32609       new_path="$input_path"
32610     fi
32611   fi
32612 
32613   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32614   if test "x$test_cygdrive_prefix" = x; then
32615     # As a simple fix, exclude /usr/bin since it's not a real path.
32616     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32617       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32618       # a path prefixed by /cygdrive for fixpath to work.
32619       new_path="$CYGWIN_ROOT_PATH$input_path"
32620     fi
32621   fi
32622 
32623   # remove trailing .exe if any
32624   new_path="${new_path/%.exe/}"
32625 
32626   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32627 
32628   # First separate the path from the arguments. This will split at the first
32629   # space.
32630   complete="$OBJC"
32631   path="${complete%% *}"
32632   tmp="$complete EOL"
32633   arguments="${tmp#* }"
32634 
32635   # Input might be given as Windows format, start by converting to
32636   # unix format.
32637   new_path="$path"
32638 
32639   windows_path="$new_path"
32640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32641     unix_path=`$CYGPATH -u "$windows_path"`
32642     new_path="$unix_path"
32643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32645     new_path="$unix_path"
32646   fi
32647 
32648 
32649   # Now try to locate executable using which
32650   new_path=`$WHICH "$new_path" 2> /dev/null`
32651 
32652   if test "x$new_path" = x; then
32653     # Oops. Which didn't find the executable.
32654     # The splitting of arguments from the executable at a space might have been incorrect,
32655     # since paths with space are more likely in Windows. Give it another try with the whole
32656     # argument.
32657     path="$complete"
32658     arguments="EOL"
32659     new_path="$path"
32660 
32661   windows_path="$new_path"
32662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32663     unix_path=`$CYGPATH -u "$windows_path"`
32664     new_path="$unix_path"
32665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32666     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32667     new_path="$unix_path"
32668   fi
32669 
32670 
32671     new_path=`$WHICH "$new_path" 2> /dev/null`
32672     # bat and cmd files are not always considered executable in MSYS causing which
32673     # to not find them
32674     if test "x$new_path" = x \
32675         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32676         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32677       new_path="$path"
32678 
32679   windows_path="$new_path"
32680   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32681     unix_path=`$CYGPATH -u "$windows_path"`
32682     new_path="$unix_path"
32683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32684     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32685     new_path="$unix_path"
32686   fi
32687 
32688     fi
32689 
32690     if test "x$new_path" = x; then
32691       # It's still not found. Now this is an unrecoverable error.
32692       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32693 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32694       has_space=`$ECHO "$complete" | $GREP " "`
32695       if test "x$has_space" != x; then
32696         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32697 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32698       fi
32699       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32700     fi
32701   fi
32702 
32703   # Now new_path has a complete unix path to the binary
32704   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32705     # Keep paths in /bin as-is, but remove trailing .exe if any
32706     new_path="${new_path/%.exe/}"
32707     # Do not save /bin paths to all_fixpath_prefixes!
32708   else
32709     # Not in mixed or Windows style, start by that.
32710     new_path=`cmd //c echo $new_path`
32711 
32712   input_path="$new_path"
32713   # Check if we need to convert this using DOS-style short mode. If the path
32714   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32715   # take no chances and rewrite it.
32716   # Note: m4 eats our [], so we need to use [ and ] instead.
32717   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32718   if test "x$has_forbidden_chars" != x; then
32719     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32720     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32721   fi
32722 
32723     # Output is in $new_path
32724 
32725   windows_path="$new_path"
32726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32727     unix_path=`$CYGPATH -u "$windows_path"`
32728     new_path="$unix_path"
32729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32731     new_path="$unix_path"
32732   fi
32733 
32734     # remove trailing .exe if any
32735     new_path="${new_path/%.exe/}"
32736 
32737     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32738     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32739   fi
32740 
32741   else
32742     # We're on a posix platform. Hooray! :)
32743     # First separate the path from the arguments. This will split at the first
32744     # space.
32745     complete="$OBJC"
32746     path="${complete%% *}"
32747     tmp="$complete EOL"
32748     arguments="${tmp#* }"
32749 
32750     # Cannot rely on the command "which" here since it doesn't always work.
32751     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32752     if test -z "$is_absolute_path"; then
32753       # Path to executable is not absolute. Find it.
32754       IFS_save="$IFS"
32755       IFS=:
32756       for p in $PATH; do
32757         if test -f "$p/$path" && test -x "$p/$path"; then
32758           new_path="$p/$path"
32759           break
32760         fi
32761       done
32762       IFS="$IFS_save"
32763     else
32764       # This is an absolute path, we can use it without further modifications.
32765       new_path="$path"
32766     fi
32767 
32768     if test "x$new_path" = x; then
32769       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32770 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32771       has_space=`$ECHO "$complete" | $GREP " "`
32772       if test "x$has_space" != x; then
32773         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32774 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32775       fi
32776       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32777     fi
32778   fi
32779 
32780   # Now join together the path and the arguments once again
32781   if test "x$arguments" != xEOL; then
32782     new_complete="$new_path ${arguments% *}"
32783   else
32784     new_complete="$new_path"
32785   fi
32786 
32787   if test "x$complete" != "x$new_complete"; then
32788     OBJC="$new_complete"
32789     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
32790 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
32791   fi
32792 
32793 
32794 
32795   # Publish this variable in the help.
32796 
32797 
32798   if test "x$LIPO" = x; then
32799     # The variable is not set by user, try to locate tool using the code snippet
32800     for ac_prog in lipo
32801 do
32802   # Extract the first word of "$ac_prog", so it can be a program name with args.
32803 set dummy $ac_prog; ac_word=$2
32804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32805 $as_echo_n "checking for $ac_word... " >&6; }
32806 if ${ac_cv_path_LIPO+:} false; then :
32807   $as_echo_n "(cached) " >&6
32808 else
32809   case $LIPO in
32810   [\\/]* | ?:[\\/]*)
32811   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
32812   ;;
32813   *)
32814   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32815 for as_dir in $PATH
32816 do
32817   IFS=$as_save_IFS
32818   test -z "$as_dir" && as_dir=.
32819     for ac_exec_ext in '' $ac_executable_extensions; do
32820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32821     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
32822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32823     break 2
32824   fi
32825 done
32826   done
32827 IFS=$as_save_IFS
32828 
32829   ;;
32830 esac
32831 fi
32832 LIPO=$ac_cv_path_LIPO
32833 if test -n "$LIPO"; then
32834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
32835 $as_echo "$LIPO" >&6; }
32836 else
32837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32838 $as_echo "no" >&6; }
32839 fi
32840 
32841 
32842   test -n "$LIPO" && break
32843 done
32844 
32845   else
32846     # The variable is set, but is it from the command line or the environment?
32847 
32848     # Try to remove the string !LIPO! from our list.
32849     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
32850     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32851       # If it failed, the variable was not from the command line. Ignore it,
32852       # but warn the user (except for BASH, which is always set by the calling BASH).
32853       if test "xLIPO" != xBASH; then
32854         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
32855 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
32856       fi
32857       # Try to locate tool using the code snippet
32858       for ac_prog in lipo
32859 do
32860   # Extract the first word of "$ac_prog", so it can be a program name with args.
32861 set dummy $ac_prog; ac_word=$2
32862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32863 $as_echo_n "checking for $ac_word... " >&6; }
32864 if ${ac_cv_path_LIPO+:} false; then :
32865   $as_echo_n "(cached) " >&6
32866 else
32867   case $LIPO in
32868   [\\/]* | ?:[\\/]*)
32869   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
32870   ;;
32871   *)
32872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32873 for as_dir in $PATH
32874 do
32875   IFS=$as_save_IFS
32876   test -z "$as_dir" && as_dir=.
32877     for ac_exec_ext in '' $ac_executable_extensions; do
32878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32879     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
32880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32881     break 2
32882   fi
32883 done
32884   done
32885 IFS=$as_save_IFS
32886 
32887   ;;
32888 esac
32889 fi
32890 LIPO=$ac_cv_path_LIPO
32891 if test -n "$LIPO"; then
32892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
32893 $as_echo "$LIPO" >&6; }
32894 else
32895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32896 $as_echo "no" >&6; }
32897 fi
32898 
32899 
32900   test -n "$LIPO" && break
32901 done
32902 
32903     else
32904       # If it succeeded, then it was overridden by the user. We will use it
32905       # for the tool.
32906 
32907       # First remove it from the list of overridden variables, so we can test
32908       # for unknown variables in the end.
32909       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32910 
32911       # Check if the provided tool contains a complete path.
32912       tool_specified="$LIPO"
32913       tool_basename="${tool_specified##*/}"
32914       if test "x$tool_basename" = "x$tool_specified"; then
32915         # A command without a complete path is provided, search $PATH.
32916         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
32917 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
32918         # Extract the first word of "$tool_basename", so it can be a program name with args.
32919 set dummy $tool_basename; ac_word=$2
32920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32921 $as_echo_n "checking for $ac_word... " >&6; }
32922 if ${ac_cv_path_LIPO+:} false; then :
32923   $as_echo_n "(cached) " >&6
32924 else
32925   case $LIPO in
32926   [\\/]* | ?:[\\/]*)
32927   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
32928   ;;
32929   *)
32930   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32931 for as_dir in $PATH
32932 do
32933   IFS=$as_save_IFS
32934   test -z "$as_dir" && as_dir=.
32935     for ac_exec_ext in '' $ac_executable_extensions; do
32936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32937     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
32938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32939     break 2
32940   fi
32941 done
32942   done
32943 IFS=$as_save_IFS
32944 
32945   ;;
32946 esac
32947 fi
32948 LIPO=$ac_cv_path_LIPO
32949 if test -n "$LIPO"; then
32950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
32951 $as_echo "$LIPO" >&6; }
32952 else
32953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32954 $as_echo "no" >&6; }
32955 fi
32956 
32957 
32958         if test "x$LIPO" = x; then
32959           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32960         fi
32961       else
32962         # Otherwise we believe it is a complete path. Use it as it is.
32963         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
32964 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
32965         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
32966 $as_echo_n "checking for LIPO... " >&6; }
32967         if test ! -x "$tool_specified"; then
32968           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32969 $as_echo "not found" >&6; }
32970           as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
32971         fi
32972         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32973 $as_echo "$tool_specified" >&6; }
32974       fi
32975     fi
32976   fi
32977 
32978 
32979 
32980   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32981 
32982   # First separate the path from the arguments. This will split at the first
32983   # space.
32984   complete="$LIPO"
32985   path="${complete%% *}"
32986   tmp="$complete EOL"
32987   arguments="${tmp#* }"
32988 
32989   # Input might be given as Windows format, start by converting to
32990   # unix format.
32991   new_path=`$CYGPATH -u "$path"`
32992 
32993   # Now try to locate executable using which
32994   new_path=`$WHICH "$new_path" 2> /dev/null`
32995   # bat and cmd files are not always considered executable in cygwin causing which
32996   # to not find them
32997   if test "x$new_path" = x \
32998       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32999       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33000     new_path=`$CYGPATH -u "$path"`
33001   fi
33002   if test "x$new_path" = x; then
33003     # Oops. Which didn't find the executable.
33004     # The splitting of arguments from the executable at a space might have been incorrect,
33005     # since paths with space are more likely in Windows. Give it another try with the whole
33006     # argument.
33007     path="$complete"
33008     arguments="EOL"
33009     new_path=`$CYGPATH -u "$path"`
33010     new_path=`$WHICH "$new_path" 2> /dev/null`
33011     # bat and cmd files are not always considered executable in cygwin causing which
33012     # to not find them
33013     if test "x$new_path" = x \
33014         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33015         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33016       new_path=`$CYGPATH -u "$path"`
33017     fi
33018     if test "x$new_path" = x; then
33019       # It's still not found. Now this is an unrecoverable error.
33020       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33021 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33022       has_space=`$ECHO "$complete" | $GREP " "`
33023       if test "x$has_space" != x; then
33024         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33025 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33026       fi
33027       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33028     fi
33029   fi
33030 
33031   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33032   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33033   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33034   # "foo.exe" is OK but "foo" is an error.
33035   #
33036   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33037   # It is also a way to make sure we got the proper file name for the real test later on.
33038   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33039   if test "x$test_shortpath" = x; then
33040     # Short path failed, file does not exist as specified.
33041     # Try adding .exe or .cmd
33042     if test -f "${new_path}.exe"; then
33043       input_to_shortpath="${new_path}.exe"
33044     elif test -f "${new_path}.cmd"; then
33045       input_to_shortpath="${new_path}.cmd"
33046     else
33047       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33048 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33049       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33050 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33051       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33052     fi
33053   else
33054     input_to_shortpath="$new_path"
33055   fi
33056 
33057   # Call helper function which possibly converts this using DOS-style short mode.
33058   # If so, the updated path is stored in $new_path.
33059   new_path="$input_to_shortpath"
33060 
33061   input_path="$input_to_shortpath"
33062   # Check if we need to convert this using DOS-style short mode. If the path
33063   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33064   # take no chances and rewrite it.
33065   # Note: m4 eats our [], so we need to use [ and ] instead.
33066   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33067   if test "x$has_forbidden_chars" != x; then
33068     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33069     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33070     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33071     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33072       # Going to short mode and back again did indeed matter. Since short mode is
33073       # case insensitive, let's make it lowercase to improve readability.
33074       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33075       # Now convert it back to Unix-style (cygpath)
33076       input_path=`$CYGPATH -u "$shortmode_path"`
33077       new_path="$input_path"
33078     fi
33079   fi
33080 
33081   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33082   if test "x$test_cygdrive_prefix" = x; then
33083     # As a simple fix, exclude /usr/bin since it's not a real path.
33084     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33085       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33086       # a path prefixed by /cygdrive for fixpath to work.
33087       new_path="$CYGWIN_ROOT_PATH$input_path"
33088     fi
33089   fi
33090 
33091   # remove trailing .exe if any
33092   new_path="${new_path/%.exe/}"
33093 
33094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33095 
33096   # First separate the path from the arguments. This will split at the first
33097   # space.
33098   complete="$LIPO"
33099   path="${complete%% *}"
33100   tmp="$complete EOL"
33101   arguments="${tmp#* }"
33102 
33103   # Input might be given as Windows format, start by converting to
33104   # unix format.
33105   new_path="$path"
33106 
33107   windows_path="$new_path"
33108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33109     unix_path=`$CYGPATH -u "$windows_path"`
33110     new_path="$unix_path"
33111   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33112     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33113     new_path="$unix_path"
33114   fi
33115 
33116 
33117   # Now try to locate executable using which
33118   new_path=`$WHICH "$new_path" 2> /dev/null`
33119 
33120   if test "x$new_path" = x; then
33121     # Oops. Which didn't find the executable.
33122     # The splitting of arguments from the executable at a space might have been incorrect,
33123     # since paths with space are more likely in Windows. Give it another try with the whole
33124     # argument.
33125     path="$complete"
33126     arguments="EOL"
33127     new_path="$path"
33128 
33129   windows_path="$new_path"
33130   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33131     unix_path=`$CYGPATH -u "$windows_path"`
33132     new_path="$unix_path"
33133   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33134     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33135     new_path="$unix_path"
33136   fi
33137 
33138 
33139     new_path=`$WHICH "$new_path" 2> /dev/null`
33140     # bat and cmd files are not always considered executable in MSYS causing which
33141     # to not find them
33142     if test "x$new_path" = x \
33143         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33144         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33145       new_path="$path"
33146 
33147   windows_path="$new_path"
33148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33149     unix_path=`$CYGPATH -u "$windows_path"`
33150     new_path="$unix_path"
33151   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33152     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33153     new_path="$unix_path"
33154   fi
33155 
33156     fi
33157 
33158     if test "x$new_path" = x; then
33159       # It's still not found. Now this is an unrecoverable error.
33160       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33161 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33162       has_space=`$ECHO "$complete" | $GREP " "`
33163       if test "x$has_space" != x; then
33164         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33165 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33166       fi
33167       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33168     fi
33169   fi
33170 
33171   # Now new_path has a complete unix path to the binary
33172   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33173     # Keep paths in /bin as-is, but remove trailing .exe if any
33174     new_path="${new_path/%.exe/}"
33175     # Do not save /bin paths to all_fixpath_prefixes!
33176   else
33177     # Not in mixed or Windows style, start by that.
33178     new_path=`cmd //c echo $new_path`
33179 
33180   input_path="$new_path"
33181   # Check if we need to convert this using DOS-style short mode. If the path
33182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33183   # take no chances and rewrite it.
33184   # Note: m4 eats our [], so we need to use [ and ] instead.
33185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33186   if test "x$has_forbidden_chars" != x; then
33187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33188     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33189   fi
33190 
33191     # Output is in $new_path
33192 
33193   windows_path="$new_path"
33194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33195     unix_path=`$CYGPATH -u "$windows_path"`
33196     new_path="$unix_path"
33197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33198     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33199     new_path="$unix_path"
33200   fi
33201 
33202     # remove trailing .exe if any
33203     new_path="${new_path/%.exe/}"
33204 
33205     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33206     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33207   fi
33208 
33209   else
33210     # We're on a posix platform. Hooray! :)
33211     # First separate the path from the arguments. This will split at the first
33212     # space.
33213     complete="$LIPO"
33214     path="${complete%% *}"
33215     tmp="$complete EOL"
33216     arguments="${tmp#* }"
33217 
33218     # Cannot rely on the command "which" here since it doesn't always work.
33219     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33220     if test -z "$is_absolute_path"; then
33221       # Path to executable is not absolute. Find it.
33222       IFS_save="$IFS"
33223       IFS=:
33224       for p in $PATH; do
33225         if test -f "$p/$path" && test -x "$p/$path"; then
33226           new_path="$p/$path"
33227           break
33228         fi
33229       done
33230       IFS="$IFS_save"
33231     else
33232       # This is an absolute path, we can use it without further modifications.
33233       new_path="$path"
33234     fi
33235 
33236     if test "x$new_path" = x; then
33237       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33238 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33239       has_space=`$ECHO "$complete" | $GREP " "`
33240       if test "x$has_space" != x; then
33241         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33242 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33243       fi
33244       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33245     fi
33246   fi
33247 
33248   # Now join together the path and the arguments once again
33249   if test "x$arguments" != xEOL; then
33250     new_complete="$new_path ${arguments% *}"
33251   else
33252     new_complete="$new_path"
33253   fi
33254 
33255   if test "x$complete" != "x$new_complete"; then
33256     LIPO="$new_complete"
33257     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33258 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33259   fi
33260 
33261   else
33262     OBJC=
33263   fi
33264 
33265   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33266     # Extract the first word of "mt", so it can be a program name with args.
33267 set dummy mt; ac_word=$2
33268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33269 $as_echo_n "checking for $ac_word... " >&6; }
33270 if ${ac_cv_prog_MT+:} false; then :
33271   $as_echo_n "(cached) " >&6
33272 else
33273   if test -n "$MT"; then
33274   ac_cv_prog_MT="$MT" # Let the user override the test.
33275 else
33276   ac_prog_rejected=no
33277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33278 for as_dir in $PATH
33279 do
33280   IFS=$as_save_IFS
33281   test -z "$as_dir" && as_dir=.
33282     for ac_exec_ext in '' $ac_executable_extensions; do
33283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33284     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33285        ac_prog_rejected=yes
33286        continue
33287      fi
33288     ac_cv_prog_MT="mt"
33289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33290     break 2
33291   fi
33292 done
33293   done
33294 IFS=$as_save_IFS
33295 
33296 if test $ac_prog_rejected = yes; then
33297   # We found a bogon in the path, so make sure we never use it.
33298   set dummy $ac_cv_prog_MT
33299   shift
33300   if test $# != 0; then
33301     # We chose a different compiler from the bogus one.
33302     # However, it has the same basename, so the bogon will be chosen
33303     # first if we set MT to just the basename; use the full file name.
33304     shift
33305     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33306   fi
33307 fi
33308 fi
33309 fi
33310 MT=$ac_cv_prog_MT
33311 if test -n "$MT"; then
33312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33313 $as_echo "$MT" >&6; }
33314 else
33315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33316 $as_echo "no" >&6; }
33317 fi
33318 
33319 
33320 
33321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33322 
33323   # First separate the path from the arguments. This will split at the first
33324   # space.
33325   complete="$MT"
33326   path="${complete%% *}"
33327   tmp="$complete EOL"
33328   arguments="${tmp#* }"
33329 
33330   # Input might be given as Windows format, start by converting to
33331   # unix format.
33332   new_path=`$CYGPATH -u "$path"`
33333 
33334   # Now try to locate executable using which
33335   new_path=`$WHICH "$new_path" 2> /dev/null`
33336   # bat and cmd files are not always considered executable in cygwin causing which
33337   # to not find them
33338   if test "x$new_path" = x \
33339       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33340       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33341     new_path=`$CYGPATH -u "$path"`
33342   fi
33343   if test "x$new_path" = x; then
33344     # Oops. Which didn't find the executable.
33345     # The splitting of arguments from the executable at a space might have been incorrect,
33346     # since paths with space are more likely in Windows. Give it another try with the whole
33347     # argument.
33348     path="$complete"
33349     arguments="EOL"
33350     new_path=`$CYGPATH -u "$path"`
33351     new_path=`$WHICH "$new_path" 2> /dev/null`
33352     # bat and cmd files are not always considered executable in cygwin causing which
33353     # to not find them
33354     if test "x$new_path" = x \
33355         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33356         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33357       new_path=`$CYGPATH -u "$path"`
33358     fi
33359     if test "x$new_path" = x; then
33360       # It's still not found. Now this is an unrecoverable error.
33361       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33362 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33363       has_space=`$ECHO "$complete" | $GREP " "`
33364       if test "x$has_space" != x; then
33365         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33366 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33367       fi
33368       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33369     fi
33370   fi
33371 
33372   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33373   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33374   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33375   # "foo.exe" is OK but "foo" is an error.
33376   #
33377   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33378   # It is also a way to make sure we got the proper file name for the real test later on.
33379   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33380   if test "x$test_shortpath" = x; then
33381     # Short path failed, file does not exist as specified.
33382     # Try adding .exe or .cmd
33383     if test -f "${new_path}.exe"; then
33384       input_to_shortpath="${new_path}.exe"
33385     elif test -f "${new_path}.cmd"; then
33386       input_to_shortpath="${new_path}.cmd"
33387     else
33388       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33389 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33390       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33391 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33392       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33393     fi
33394   else
33395     input_to_shortpath="$new_path"
33396   fi
33397 
33398   # Call helper function which possibly converts this using DOS-style short mode.
33399   # If so, the updated path is stored in $new_path.
33400   new_path="$input_to_shortpath"
33401 
33402   input_path="$input_to_shortpath"
33403   # Check if we need to convert this using DOS-style short mode. If the path
33404   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33405   # take no chances and rewrite it.
33406   # Note: m4 eats our [], so we need to use [ and ] instead.
33407   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33408   if test "x$has_forbidden_chars" != x; then
33409     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33410     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33411     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33412     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33413       # Going to short mode and back again did indeed matter. Since short mode is
33414       # case insensitive, let's make it lowercase to improve readability.
33415       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33416       # Now convert it back to Unix-style (cygpath)
33417       input_path=`$CYGPATH -u "$shortmode_path"`
33418       new_path="$input_path"
33419     fi
33420   fi
33421 
33422   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33423   if test "x$test_cygdrive_prefix" = x; then
33424     # As a simple fix, exclude /usr/bin since it's not a real path.
33425     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33426       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33427       # a path prefixed by /cygdrive for fixpath to work.
33428       new_path="$CYGWIN_ROOT_PATH$input_path"
33429     fi
33430   fi
33431 
33432   # remove trailing .exe if any
33433   new_path="${new_path/%.exe/}"
33434 
33435   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33436 
33437   # First separate the path from the arguments. This will split at the first
33438   # space.
33439   complete="$MT"
33440   path="${complete%% *}"
33441   tmp="$complete EOL"
33442   arguments="${tmp#* }"
33443 
33444   # Input might be given as Windows format, start by converting to
33445   # unix format.
33446   new_path="$path"
33447 
33448   windows_path="$new_path"
33449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33450     unix_path=`$CYGPATH -u "$windows_path"`
33451     new_path="$unix_path"
33452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33453     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33454     new_path="$unix_path"
33455   fi
33456 
33457 
33458   # Now try to locate executable using which
33459   new_path=`$WHICH "$new_path" 2> /dev/null`
33460 
33461   if test "x$new_path" = x; then
33462     # Oops. Which didn't find the executable.
33463     # The splitting of arguments from the executable at a space might have been incorrect,
33464     # since paths with space are more likely in Windows. Give it another try with the whole
33465     # argument.
33466     path="$complete"
33467     arguments="EOL"
33468     new_path="$path"
33469 
33470   windows_path="$new_path"
33471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33472     unix_path=`$CYGPATH -u "$windows_path"`
33473     new_path="$unix_path"
33474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33476     new_path="$unix_path"
33477   fi
33478 
33479 
33480     new_path=`$WHICH "$new_path" 2> /dev/null`
33481     # bat and cmd files are not always considered executable in MSYS causing which
33482     # to not find them
33483     if test "x$new_path" = x \
33484         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33485         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33486       new_path="$path"
33487 
33488   windows_path="$new_path"
33489   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33490     unix_path=`$CYGPATH -u "$windows_path"`
33491     new_path="$unix_path"
33492   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33493     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33494     new_path="$unix_path"
33495   fi
33496 
33497     fi
33498 
33499     if test "x$new_path" = x; then
33500       # It's still not found. Now this is an unrecoverable error.
33501       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33502 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33503       has_space=`$ECHO "$complete" | $GREP " "`
33504       if test "x$has_space" != x; then
33505         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33506 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33507       fi
33508       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33509     fi
33510   fi
33511 
33512   # Now new_path has a complete unix path to the binary
33513   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33514     # Keep paths in /bin as-is, but remove trailing .exe if any
33515     new_path="${new_path/%.exe/}"
33516     # Do not save /bin paths to all_fixpath_prefixes!
33517   else
33518     # Not in mixed or Windows style, start by that.
33519     new_path=`cmd //c echo $new_path`
33520 
33521   input_path="$new_path"
33522   # Check if we need to convert this using DOS-style short mode. If the path
33523   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33524   # take no chances and rewrite it.
33525   # Note: m4 eats our [], so we need to use [ and ] instead.
33526   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33527   if test "x$has_forbidden_chars" != x; then
33528     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33529     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33530   fi
33531 
33532     # Output is in $new_path
33533 
33534   windows_path="$new_path"
33535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33536     unix_path=`$CYGPATH -u "$windows_path"`
33537     new_path="$unix_path"
33538   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33539     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33540     new_path="$unix_path"
33541   fi
33542 
33543     # remove trailing .exe if any
33544     new_path="${new_path/%.exe/}"
33545 
33546     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33547     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33548   fi
33549 
33550   else
33551     # We're on a posix platform. Hooray! :)
33552     # First separate the path from the arguments. This will split at the first
33553     # space.
33554     complete="$MT"
33555     path="${complete%% *}"
33556     tmp="$complete EOL"
33557     arguments="${tmp#* }"
33558 
33559     # Cannot rely on the command "which" here since it doesn't always work.
33560     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33561     if test -z "$is_absolute_path"; then
33562       # Path to executable is not absolute. Find it.
33563       IFS_save="$IFS"
33564       IFS=:
33565       for p in $PATH; do
33566         if test -f "$p/$path" && test -x "$p/$path"; then
33567           new_path="$p/$path"
33568           break
33569         fi
33570       done
33571       IFS="$IFS_save"
33572     else
33573       # This is an absolute path, we can use it without further modifications.
33574       new_path="$path"
33575     fi
33576 
33577     if test "x$new_path" = x; then
33578       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33579 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33580       has_space=`$ECHO "$complete" | $GREP " "`
33581       if test "x$has_space" != x; then
33582         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33583 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33584       fi
33585       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33586     fi
33587   fi
33588 
33589   # Now join together the path and the arguments once again
33590   if test "x$arguments" != xEOL; then
33591     new_complete="$new_path ${arguments% *}"
33592   else
33593     new_complete="$new_path"
33594   fi
33595 
33596   if test "x$complete" != "x$new_complete"; then
33597     MT="$new_complete"
33598     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
33599 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
33600   fi
33601 
33602     # Setup the resource compiler (RC)
33603     # Extract the first word of "rc", so it can be a program name with args.
33604 set dummy rc; ac_word=$2
33605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33606 $as_echo_n "checking for $ac_word... " >&6; }
33607 if ${ac_cv_prog_RC+:} false; then :
33608   $as_echo_n "(cached) " >&6
33609 else
33610   if test -n "$RC"; then
33611   ac_cv_prog_RC="$RC" # Let the user override the test.
33612 else
33613   ac_prog_rejected=no
33614 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33615 for as_dir in $PATH
33616 do
33617   IFS=$as_save_IFS
33618   test -z "$as_dir" && as_dir=.
33619     for ac_exec_ext in '' $ac_executable_extensions; do
33620   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33621     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
33622        ac_prog_rejected=yes
33623        continue
33624      fi
33625     ac_cv_prog_RC="rc"
33626     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33627     break 2
33628   fi
33629 done
33630   done
33631 IFS=$as_save_IFS
33632 
33633 if test $ac_prog_rejected = yes; then
33634   # We found a bogon in the path, so make sure we never use it.
33635   set dummy $ac_cv_prog_RC
33636   shift
33637   if test $# != 0; then
33638     # We chose a different compiler from the bogus one.
33639     # However, it has the same basename, so the bogon will be chosen
33640     # first if we set RC to just the basename; use the full file name.
33641     shift
33642     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
33643   fi
33644 fi
33645 fi
33646 fi
33647 RC=$ac_cv_prog_RC
33648 if test -n "$RC"; then
33649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
33650 $as_echo "$RC" >&6; }
33651 else
33652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33653 $as_echo "no" >&6; }
33654 fi
33655 
33656 
33657 
33658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33659 
33660   # First separate the path from the arguments. This will split at the first
33661   # space.
33662   complete="$RC"
33663   path="${complete%% *}"
33664   tmp="$complete EOL"
33665   arguments="${tmp#* }"
33666 
33667   # Input might be given as Windows format, start by converting to
33668   # unix format.
33669   new_path=`$CYGPATH -u "$path"`
33670 
33671   # Now try to locate executable using which
33672   new_path=`$WHICH "$new_path" 2> /dev/null`
33673   # bat and cmd files are not always considered executable in cygwin causing which
33674   # to not find them
33675   if test "x$new_path" = x \
33676       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33677       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33678     new_path=`$CYGPATH -u "$path"`
33679   fi
33680   if test "x$new_path" = x; then
33681     # Oops. Which didn't find the executable.
33682     # The splitting of arguments from the executable at a space might have been incorrect,
33683     # since paths with space are more likely in Windows. Give it another try with the whole
33684     # argument.
33685     path="$complete"
33686     arguments="EOL"
33687     new_path=`$CYGPATH -u "$path"`
33688     new_path=`$WHICH "$new_path" 2> /dev/null`
33689     # bat and cmd files are not always considered executable in cygwin causing which
33690     # to not find them
33691     if test "x$new_path" = x \
33692         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33693         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33694       new_path=`$CYGPATH -u "$path"`
33695     fi
33696     if test "x$new_path" = x; then
33697       # It's still not found. Now this is an unrecoverable error.
33698       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
33699 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
33700       has_space=`$ECHO "$complete" | $GREP " "`
33701       if test "x$has_space" != x; then
33702         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33703 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33704       fi
33705       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33706     fi
33707   fi
33708 
33709   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33710   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33711   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33712   # "foo.exe" is OK but "foo" is an error.
33713   #
33714   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33715   # It is also a way to make sure we got the proper file name for the real test later on.
33716   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33717   if test "x$test_shortpath" = x; then
33718     # Short path failed, file does not exist as specified.
33719     # Try adding .exe or .cmd
33720     if test -f "${new_path}.exe"; then
33721       input_to_shortpath="${new_path}.exe"
33722     elif test -f "${new_path}.cmd"; then
33723       input_to_shortpath="${new_path}.cmd"
33724     else
33725       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
33726 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
33727       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33728 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33729       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33730     fi
33731   else
33732     input_to_shortpath="$new_path"
33733   fi
33734 
33735   # Call helper function which possibly converts this using DOS-style short mode.
33736   # If so, the updated path is stored in $new_path.
33737   new_path="$input_to_shortpath"
33738 
33739   input_path="$input_to_shortpath"
33740   # Check if we need to convert this using DOS-style short mode. If the path
33741   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33742   # take no chances and rewrite it.
33743   # Note: m4 eats our [], so we need to use [ and ] instead.
33744   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33745   if test "x$has_forbidden_chars" != x; then
33746     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33747     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33748     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33749     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33750       # Going to short mode and back again did indeed matter. Since short mode is
33751       # case insensitive, let's make it lowercase to improve readability.
33752       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33753       # Now convert it back to Unix-style (cygpath)
33754       input_path=`$CYGPATH -u "$shortmode_path"`
33755       new_path="$input_path"
33756     fi
33757   fi
33758 
33759   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33760   if test "x$test_cygdrive_prefix" = x; then
33761     # As a simple fix, exclude /usr/bin since it's not a real path.
33762     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33763       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33764       # a path prefixed by /cygdrive for fixpath to work.
33765       new_path="$CYGWIN_ROOT_PATH$input_path"
33766     fi
33767   fi
33768 
33769   # remove trailing .exe if any
33770   new_path="${new_path/%.exe/}"
33771 
33772   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33773 
33774   # First separate the path from the arguments. This will split at the first
33775   # space.
33776   complete="$RC"
33777   path="${complete%% *}"
33778   tmp="$complete EOL"
33779   arguments="${tmp#* }"
33780 
33781   # Input might be given as Windows format, start by converting to
33782   # unix format.
33783   new_path="$path"
33784 
33785   windows_path="$new_path"
33786   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33787     unix_path=`$CYGPATH -u "$windows_path"`
33788     new_path="$unix_path"
33789   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33790     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33791     new_path="$unix_path"
33792   fi
33793 
33794 
33795   # Now try to locate executable using which
33796   new_path=`$WHICH "$new_path" 2> /dev/null`
33797 
33798   if test "x$new_path" = x; then
33799     # Oops. Which didn't find the executable.
33800     # The splitting of arguments from the executable at a space might have been incorrect,
33801     # since paths with space are more likely in Windows. Give it another try with the whole
33802     # argument.
33803     path="$complete"
33804     arguments="EOL"
33805     new_path="$path"
33806 
33807   windows_path="$new_path"
33808   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33809     unix_path=`$CYGPATH -u "$windows_path"`
33810     new_path="$unix_path"
33811   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33812     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33813     new_path="$unix_path"
33814   fi
33815 
33816 
33817     new_path=`$WHICH "$new_path" 2> /dev/null`
33818     # bat and cmd files are not always considered executable in MSYS causing which
33819     # to not find them
33820     if test "x$new_path" = x \
33821         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33822         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33823       new_path="$path"
33824 
33825   windows_path="$new_path"
33826   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33827     unix_path=`$CYGPATH -u "$windows_path"`
33828     new_path="$unix_path"
33829   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33830     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33831     new_path="$unix_path"
33832   fi
33833 
33834     fi
33835 
33836     if test "x$new_path" = x; then
33837       # It's still not found. Now this is an unrecoverable error.
33838       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
33839 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
33840       has_space=`$ECHO "$complete" | $GREP " "`
33841       if test "x$has_space" != x; then
33842         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33843 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33844       fi
33845       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33846     fi
33847   fi
33848 
33849   # Now new_path has a complete unix path to the binary
33850   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33851     # Keep paths in /bin as-is, but remove trailing .exe if any
33852     new_path="${new_path/%.exe/}"
33853     # Do not save /bin paths to all_fixpath_prefixes!
33854   else
33855     # Not in mixed or Windows style, start by that.
33856     new_path=`cmd //c echo $new_path`
33857 
33858   input_path="$new_path"
33859   # Check if we need to convert this using DOS-style short mode. If the path
33860   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33861   # take no chances and rewrite it.
33862   # Note: m4 eats our [], so we need to use [ and ] instead.
33863   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33864   if test "x$has_forbidden_chars" != x; then
33865     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33866     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33867   fi
33868 
33869     # Output is in $new_path
33870 
33871   windows_path="$new_path"
33872   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33873     unix_path=`$CYGPATH -u "$windows_path"`
33874     new_path="$unix_path"
33875   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33876     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33877     new_path="$unix_path"
33878   fi
33879 
33880     # remove trailing .exe if any
33881     new_path="${new_path/%.exe/}"
33882 
33883     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33884     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33885   fi
33886 
33887   else
33888     # We're on a posix platform. Hooray! :)
33889     # First separate the path from the arguments. This will split at the first
33890     # space.
33891     complete="$RC"
33892     path="${complete%% *}"
33893     tmp="$complete EOL"
33894     arguments="${tmp#* }"
33895 
33896     # Cannot rely on the command "which" here since it doesn't always work.
33897     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33898     if test -z "$is_absolute_path"; then
33899       # Path to executable is not absolute. Find it.
33900       IFS_save="$IFS"
33901       IFS=:
33902       for p in $PATH; do
33903         if test -f "$p/$path" && test -x "$p/$path"; then
33904           new_path="$p/$path"
33905           break
33906         fi
33907       done
33908       IFS="$IFS_save"
33909     else
33910       # This is an absolute path, we can use it without further modifications.
33911       new_path="$path"
33912     fi
33913 
33914     if test "x$new_path" = x; then
33915       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
33916 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
33917       has_space=`$ECHO "$complete" | $GREP " "`
33918       if test "x$has_space" != x; then
33919         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33920 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33921       fi
33922       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33923     fi
33924   fi
33925 
33926   # Now join together the path and the arguments once again
33927   if test "x$arguments" != xEOL; then
33928     new_complete="$new_path ${arguments% *}"
33929   else
33930     new_complete="$new_path"
33931   fi
33932 
33933   if test "x$complete" != "x$new_complete"; then
33934     RC="$new_complete"
33935     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
33936 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
33937   fi
33938 
33939     # Extract the first word of "dumpbin", so it can be a program name with args.
33940 set dummy dumpbin; ac_word=$2
33941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33942 $as_echo_n "checking for $ac_word... " >&6; }
33943 if ${ac_cv_prog_DUMPBIN+:} false; then :
33944   $as_echo_n "(cached) " >&6
33945 else
33946   if test -n "$DUMPBIN"; then
33947   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
33948 else
33949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33950 for as_dir in $PATH
33951 do
33952   IFS=$as_save_IFS
33953   test -z "$as_dir" && as_dir=.
33954     for ac_exec_ext in '' $ac_executable_extensions; do
33955   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33956     ac_cv_prog_DUMPBIN="dumpbin"
33957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33958     break 2
33959   fi
33960 done
33961   done
33962 IFS=$as_save_IFS
33963 
33964 fi
33965 fi
33966 DUMPBIN=$ac_cv_prog_DUMPBIN
33967 if test -n "$DUMPBIN"; then
33968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
33969 $as_echo "$DUMPBIN" >&6; }
33970 else
33971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33972 $as_echo "no" >&6; }
33973 fi
33974 
33975 
33976 
33977   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33978 
33979   # First separate the path from the arguments. This will split at the first
33980   # space.
33981   complete="$DUMPBIN"
33982   path="${complete%% *}"
33983   tmp="$complete EOL"
33984   arguments="${tmp#* }"
33985 
33986   # Input might be given as Windows format, start by converting to
33987   # unix format.
33988   new_path=`$CYGPATH -u "$path"`
33989 
33990   # Now try to locate executable using which
33991   new_path=`$WHICH "$new_path" 2> /dev/null`
33992   # bat and cmd files are not always considered executable in cygwin causing which
33993   # to not find them
33994   if test "x$new_path" = x \
33995       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33996       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33997     new_path=`$CYGPATH -u "$path"`
33998   fi
33999   if test "x$new_path" = x; then
34000     # Oops. Which didn't find the executable.
34001     # The splitting of arguments from the executable at a space might have been incorrect,
34002     # since paths with space are more likely in Windows. Give it another try with the whole
34003     # argument.
34004     path="$complete"
34005     arguments="EOL"
34006     new_path=`$CYGPATH -u "$path"`
34007     new_path=`$WHICH "$new_path" 2> /dev/null`
34008     # bat and cmd files are not always considered executable in cygwin causing which
34009     # to not find them
34010     if test "x$new_path" = x \
34011         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34012         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34013       new_path=`$CYGPATH -u "$path"`
34014     fi
34015     if test "x$new_path" = x; then
34016       # It's still not found. Now this is an unrecoverable error.
34017       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34018 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34019       has_space=`$ECHO "$complete" | $GREP " "`
34020       if test "x$has_space" != x; then
34021         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34022 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34023       fi
34024       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34025     fi
34026   fi
34027 
34028   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34029   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34030   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34031   # "foo.exe" is OK but "foo" is an error.
34032   #
34033   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34034   # It is also a way to make sure we got the proper file name for the real test later on.
34035   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34036   if test "x$test_shortpath" = x; then
34037     # Short path failed, file does not exist as specified.
34038     # Try adding .exe or .cmd
34039     if test -f "${new_path}.exe"; then
34040       input_to_shortpath="${new_path}.exe"
34041     elif test -f "${new_path}.cmd"; then
34042       input_to_shortpath="${new_path}.cmd"
34043     else
34044       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34045 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34046       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34047 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34048       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34049     fi
34050   else
34051     input_to_shortpath="$new_path"
34052   fi
34053 
34054   # Call helper function which possibly converts this using DOS-style short mode.
34055   # If so, the updated path is stored in $new_path.
34056   new_path="$input_to_shortpath"
34057 
34058   input_path="$input_to_shortpath"
34059   # Check if we need to convert this using DOS-style short mode. If the path
34060   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34061   # take no chances and rewrite it.
34062   # Note: m4 eats our [], so we need to use [ and ] instead.
34063   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34064   if test "x$has_forbidden_chars" != x; then
34065     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34066     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34067     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34068     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34069       # Going to short mode and back again did indeed matter. Since short mode is
34070       # case insensitive, let's make it lowercase to improve readability.
34071       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34072       # Now convert it back to Unix-style (cygpath)
34073       input_path=`$CYGPATH -u "$shortmode_path"`
34074       new_path="$input_path"
34075     fi
34076   fi
34077 
34078   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34079   if test "x$test_cygdrive_prefix" = x; then
34080     # As a simple fix, exclude /usr/bin since it's not a real path.
34081     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34082       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34083       # a path prefixed by /cygdrive for fixpath to work.
34084       new_path="$CYGWIN_ROOT_PATH$input_path"
34085     fi
34086   fi
34087 
34088   # remove trailing .exe if any
34089   new_path="${new_path/%.exe/}"
34090 
34091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34092 
34093   # First separate the path from the arguments. This will split at the first
34094   # space.
34095   complete="$DUMPBIN"
34096   path="${complete%% *}"
34097   tmp="$complete EOL"
34098   arguments="${tmp#* }"
34099 
34100   # Input might be given as Windows format, start by converting to
34101   # unix format.
34102   new_path="$path"
34103 
34104   windows_path="$new_path"
34105   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34106     unix_path=`$CYGPATH -u "$windows_path"`
34107     new_path="$unix_path"
34108   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34109     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34110     new_path="$unix_path"
34111   fi
34112 
34113 
34114   # Now try to locate executable using which
34115   new_path=`$WHICH "$new_path" 2> /dev/null`
34116 
34117   if test "x$new_path" = x; then
34118     # Oops. Which didn't find the executable.
34119     # The splitting of arguments from the executable at a space might have been incorrect,
34120     # since paths with space are more likely in Windows. Give it another try with the whole
34121     # argument.
34122     path="$complete"
34123     arguments="EOL"
34124     new_path="$path"
34125 
34126   windows_path="$new_path"
34127   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34128     unix_path=`$CYGPATH -u "$windows_path"`
34129     new_path="$unix_path"
34130   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34131     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34132     new_path="$unix_path"
34133   fi
34134 
34135 
34136     new_path=`$WHICH "$new_path" 2> /dev/null`
34137     # bat and cmd files are not always considered executable in MSYS causing which
34138     # to not find them
34139     if test "x$new_path" = x \
34140         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34141         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34142       new_path="$path"
34143 
34144   windows_path="$new_path"
34145   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34146     unix_path=`$CYGPATH -u "$windows_path"`
34147     new_path="$unix_path"
34148   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34149     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34150     new_path="$unix_path"
34151   fi
34152 
34153     fi
34154 
34155     if test "x$new_path" = x; then
34156       # It's still not found. Now this is an unrecoverable error.
34157       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34158 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34159       has_space=`$ECHO "$complete" | $GREP " "`
34160       if test "x$has_space" != x; then
34161         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34162 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34163       fi
34164       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34165     fi
34166   fi
34167 
34168   # Now new_path has a complete unix path to the binary
34169   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34170     # Keep paths in /bin as-is, but remove trailing .exe if any
34171     new_path="${new_path/%.exe/}"
34172     # Do not save /bin paths to all_fixpath_prefixes!
34173   else
34174     # Not in mixed or Windows style, start by that.
34175     new_path=`cmd //c echo $new_path`
34176 
34177   input_path="$new_path"
34178   # Check if we need to convert this using DOS-style short mode. If the path
34179   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34180   # take no chances and rewrite it.
34181   # Note: m4 eats our [], so we need to use [ and ] instead.
34182   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34183   if test "x$has_forbidden_chars" != x; then
34184     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34185     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34186   fi
34187 
34188     # Output is in $new_path
34189 
34190   windows_path="$new_path"
34191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34192     unix_path=`$CYGPATH -u "$windows_path"`
34193     new_path="$unix_path"
34194   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34195     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34196     new_path="$unix_path"
34197   fi
34198 
34199     # remove trailing .exe if any
34200     new_path="${new_path/%.exe/}"
34201 
34202     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34203     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34204   fi
34205 
34206   else
34207     # We're on a posix platform. Hooray! :)
34208     # First separate the path from the arguments. This will split at the first
34209     # space.
34210     complete="$DUMPBIN"
34211     path="${complete%% *}"
34212     tmp="$complete EOL"
34213     arguments="${tmp#* }"
34214 
34215     # Cannot rely on the command "which" here since it doesn't always work.
34216     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34217     if test -z "$is_absolute_path"; then
34218       # Path to executable is not absolute. Find it.
34219       IFS_save="$IFS"
34220       IFS=:
34221       for p in $PATH; do
34222         if test -f "$p/$path" && test -x "$p/$path"; then
34223           new_path="$p/$path"
34224           break
34225         fi
34226       done
34227       IFS="$IFS_save"
34228     else
34229       # This is an absolute path, we can use it without further modifications.
34230       new_path="$path"
34231     fi
34232 
34233     if test "x$new_path" = x; then
34234       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34235 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34236       has_space=`$ECHO "$complete" | $GREP " "`
34237       if test "x$has_space" != x; then
34238         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34239 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34240       fi
34241       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34242     fi
34243   fi
34244 
34245   # Now join together the path and the arguments once again
34246   if test "x$arguments" != xEOL; then
34247     new_complete="$new_path ${arguments% *}"
34248   else
34249     new_complete="$new_path"
34250   fi
34251 
34252   if test "x$complete" != "x$new_complete"; then
34253     DUMPBIN="$new_complete"
34254     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34255 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34256   fi
34257 
34258     # We need to check for 'msbuild.exe' because at the place where we expect to
34259     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
34260     # won't find the 'msbuild.exe' executable in that case (and the
34261     # 'ac_executable_extensions' is unusable due to performance reasons).
34262     # Notice that we intentionally don't fix up the path to MSBUILD because we
34263     # will call it in a DOS shell during freetype detection on Windows (see
34264     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
34265     # Extract the first word of "msbuild.exe", so it can be a program name with args.
34266 set dummy msbuild.exe; 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_prog_MSBUILD+:} false; then :
34270   $as_echo_n "(cached) " >&6
34271 else
34272   if test -n "$MSBUILD"; then
34273   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
34274 else
34275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34276 for as_dir in $PATH
34277 do
34278   IFS=$as_save_IFS
34279   test -z "$as_dir" && as_dir=.
34280     for ac_exec_ext in '' $ac_executable_extensions; do
34281   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34282     ac_cv_prog_MSBUILD="msbuild.exe"
34283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34284     break 2
34285   fi
34286 done
34287   done
34288 IFS=$as_save_IFS
34289 
34290 fi
34291 fi
34292 MSBUILD=$ac_cv_prog_MSBUILD
34293 if test -n "$MSBUILD"; then
34294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
34295 $as_echo "$MSBUILD" >&6; }
34296 else
34297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34298 $as_echo "no" >&6; }
34299 fi
34300 
34301 
34302   fi
34303 
34304   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34305 
34306 
34307   # Publish this variable in the help.
34308 
34309 
34310   if test "x$STRIP" = x; then
34311     # The variable is not set by user, try to locate tool using the code snippet
34312     for ac_prog in strip
34313 do
34314   # Extract the first word of "$ac_prog", so it can be a program name with args.
34315 set dummy $ac_prog; ac_word=$2
34316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34317 $as_echo_n "checking for $ac_word... " >&6; }
34318 if ${ac_cv_path_STRIP+:} false; then :
34319   $as_echo_n "(cached) " >&6
34320 else
34321   case $STRIP in
34322   [\\/]* | ?:[\\/]*)
34323   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34324   ;;
34325   *)
34326   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34327 for as_dir in $PATH
34328 do
34329   IFS=$as_save_IFS
34330   test -z "$as_dir" && as_dir=.
34331     for ac_exec_ext in '' $ac_executable_extensions; do
34332   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34333     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34334     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34335     break 2
34336   fi
34337 done
34338   done
34339 IFS=$as_save_IFS
34340 
34341   ;;
34342 esac
34343 fi
34344 STRIP=$ac_cv_path_STRIP
34345 if test -n "$STRIP"; then
34346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34347 $as_echo "$STRIP" >&6; }
34348 else
34349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34350 $as_echo "no" >&6; }
34351 fi
34352 
34353 
34354   test -n "$STRIP" && break
34355 done
34356 
34357   else
34358     # The variable is set, but is it from the command line or the environment?
34359 
34360     # Try to remove the string !STRIP! from our list.
34361     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34362     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34363       # If it failed, the variable was not from the command line. Ignore it,
34364       # but warn the user (except for BASH, which is always set by the calling BASH).
34365       if test "xSTRIP" != xBASH; then
34366         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34367 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34368       fi
34369       # Try to locate tool using the code snippet
34370       for ac_prog in strip
34371 do
34372   # Extract the first word of "$ac_prog", so it can be a program name with args.
34373 set dummy $ac_prog; ac_word=$2
34374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34375 $as_echo_n "checking for $ac_word... " >&6; }
34376 if ${ac_cv_path_STRIP+:} false; then :
34377   $as_echo_n "(cached) " >&6
34378 else
34379   case $STRIP in
34380   [\\/]* | ?:[\\/]*)
34381   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34382   ;;
34383   *)
34384   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34385 for as_dir in $PATH
34386 do
34387   IFS=$as_save_IFS
34388   test -z "$as_dir" && as_dir=.
34389     for ac_exec_ext in '' $ac_executable_extensions; do
34390   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34391     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34392     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34393     break 2
34394   fi
34395 done
34396   done
34397 IFS=$as_save_IFS
34398 
34399   ;;
34400 esac
34401 fi
34402 STRIP=$ac_cv_path_STRIP
34403 if test -n "$STRIP"; then
34404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34405 $as_echo "$STRIP" >&6; }
34406 else
34407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34408 $as_echo "no" >&6; }
34409 fi
34410 
34411 
34412   test -n "$STRIP" && break
34413 done
34414 
34415     else
34416       # If it succeeded, then it was overridden by the user. We will use it
34417       # for the tool.
34418 
34419       # First remove it from the list of overridden variables, so we can test
34420       # for unknown variables in the end.
34421       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34422 
34423       # Check if the provided tool contains a complete path.
34424       tool_specified="$STRIP"
34425       tool_basename="${tool_specified##*/}"
34426       if test "x$tool_basename" = "x$tool_specified"; then
34427         # A command without a complete path is provided, search $PATH.
34428         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34429 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34430         # Extract the first word of "$tool_basename", so it can be a program name with args.
34431 set dummy $tool_basename; ac_word=$2
34432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34433 $as_echo_n "checking for $ac_word... " >&6; }
34434 if ${ac_cv_path_STRIP+:} false; then :
34435   $as_echo_n "(cached) " >&6
34436 else
34437   case $STRIP in
34438   [\\/]* | ?:[\\/]*)
34439   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34440   ;;
34441   *)
34442   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34443 for as_dir in $PATH
34444 do
34445   IFS=$as_save_IFS
34446   test -z "$as_dir" && as_dir=.
34447     for ac_exec_ext in '' $ac_executable_extensions; do
34448   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34449     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34450     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34451     break 2
34452   fi
34453 done
34454   done
34455 IFS=$as_save_IFS
34456 
34457   ;;
34458 esac
34459 fi
34460 STRIP=$ac_cv_path_STRIP
34461 if test -n "$STRIP"; then
34462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34463 $as_echo "$STRIP" >&6; }
34464 else
34465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34466 $as_echo "no" >&6; }
34467 fi
34468 
34469 
34470         if test "x$STRIP" = x; then
34471           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34472         fi
34473       else
34474         # Otherwise we believe it is a complete path. Use it as it is.
34475         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34476 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34477         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34478 $as_echo_n "checking for STRIP... " >&6; }
34479         if test ! -x "$tool_specified"; then
34480           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34481 $as_echo "not found" >&6; }
34482           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34483         fi
34484         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34485 $as_echo "$tool_specified" >&6; }
34486       fi
34487     fi
34488   fi
34489 
34490 
34491 
34492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34493 
34494   # First separate the path from the arguments. This will split at the first
34495   # space.
34496   complete="$STRIP"
34497   path="${complete%% *}"
34498   tmp="$complete EOL"
34499   arguments="${tmp#* }"
34500 
34501   # Input might be given as Windows format, start by converting to
34502   # unix format.
34503   new_path=`$CYGPATH -u "$path"`
34504 
34505   # Now try to locate executable using which
34506   new_path=`$WHICH "$new_path" 2> /dev/null`
34507   # bat and cmd files are not always considered executable in cygwin causing which
34508   # to not find them
34509   if test "x$new_path" = x \
34510       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34511       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34512     new_path=`$CYGPATH -u "$path"`
34513   fi
34514   if test "x$new_path" = x; then
34515     # Oops. Which didn't find the executable.
34516     # The splitting of arguments from the executable at a space might have been incorrect,
34517     # since paths with space are more likely in Windows. Give it another try with the whole
34518     # argument.
34519     path="$complete"
34520     arguments="EOL"
34521     new_path=`$CYGPATH -u "$path"`
34522     new_path=`$WHICH "$new_path" 2> /dev/null`
34523     # bat and cmd files are not always considered executable in cygwin causing which
34524     # to not find them
34525     if test "x$new_path" = x \
34526         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34527         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34528       new_path=`$CYGPATH -u "$path"`
34529     fi
34530     if test "x$new_path" = x; then
34531       # It's still not found. Now this is an unrecoverable error.
34532       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34533 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34534       has_space=`$ECHO "$complete" | $GREP " "`
34535       if test "x$has_space" != x; then
34536         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34537 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34538       fi
34539       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34540     fi
34541   fi
34542 
34543   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34544   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34545   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34546   # "foo.exe" is OK but "foo" is an error.
34547   #
34548   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34549   # It is also a way to make sure we got the proper file name for the real test later on.
34550   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34551   if test "x$test_shortpath" = x; then
34552     # Short path failed, file does not exist as specified.
34553     # Try adding .exe or .cmd
34554     if test -f "${new_path}.exe"; then
34555       input_to_shortpath="${new_path}.exe"
34556     elif test -f "${new_path}.cmd"; then
34557       input_to_shortpath="${new_path}.cmd"
34558     else
34559       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34560 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34561       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34562 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34563       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34564     fi
34565   else
34566     input_to_shortpath="$new_path"
34567   fi
34568 
34569   # Call helper function which possibly converts this using DOS-style short mode.
34570   # If so, the updated path is stored in $new_path.
34571   new_path="$input_to_shortpath"
34572 
34573   input_path="$input_to_shortpath"
34574   # Check if we need to convert this using DOS-style short mode. If the path
34575   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34576   # take no chances and rewrite it.
34577   # Note: m4 eats our [], so we need to use [ and ] instead.
34578   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34579   if test "x$has_forbidden_chars" != x; then
34580     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34581     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34582     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34583     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34584       # Going to short mode and back again did indeed matter. Since short mode is
34585       # case insensitive, let's make it lowercase to improve readability.
34586       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34587       # Now convert it back to Unix-style (cygpath)
34588       input_path=`$CYGPATH -u "$shortmode_path"`
34589       new_path="$input_path"
34590     fi
34591   fi
34592 
34593   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34594   if test "x$test_cygdrive_prefix" = x; then
34595     # As a simple fix, exclude /usr/bin since it's not a real path.
34596     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34597       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34598       # a path prefixed by /cygdrive for fixpath to work.
34599       new_path="$CYGWIN_ROOT_PATH$input_path"
34600     fi
34601   fi
34602 
34603   # remove trailing .exe if any
34604   new_path="${new_path/%.exe/}"
34605 
34606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34607 
34608   # First separate the path from the arguments. This will split at the first
34609   # space.
34610   complete="$STRIP"
34611   path="${complete%% *}"
34612   tmp="$complete EOL"
34613   arguments="${tmp#* }"
34614 
34615   # Input might be given as Windows format, start by converting to
34616   # unix format.
34617   new_path="$path"
34618 
34619   windows_path="$new_path"
34620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34621     unix_path=`$CYGPATH -u "$windows_path"`
34622     new_path="$unix_path"
34623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34624     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34625     new_path="$unix_path"
34626   fi
34627 
34628 
34629   # Now try to locate executable using which
34630   new_path=`$WHICH "$new_path" 2> /dev/null`
34631 
34632   if test "x$new_path" = x; then
34633     # Oops. Which didn't find the executable.
34634     # The splitting of arguments from the executable at a space might have been incorrect,
34635     # since paths with space are more likely in Windows. Give it another try with the whole
34636     # argument.
34637     path="$complete"
34638     arguments="EOL"
34639     new_path="$path"
34640 
34641   windows_path="$new_path"
34642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34643     unix_path=`$CYGPATH -u "$windows_path"`
34644     new_path="$unix_path"
34645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34646     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34647     new_path="$unix_path"
34648   fi
34649 
34650 
34651     new_path=`$WHICH "$new_path" 2> /dev/null`
34652     # bat and cmd files are not always considered executable in MSYS causing which
34653     # to not find them
34654     if test "x$new_path" = x \
34655         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34656         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34657       new_path="$path"
34658 
34659   windows_path="$new_path"
34660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34661     unix_path=`$CYGPATH -u "$windows_path"`
34662     new_path="$unix_path"
34663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34664     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34665     new_path="$unix_path"
34666   fi
34667 
34668     fi
34669 
34670     if test "x$new_path" = x; then
34671       # It's still not found. Now this is an unrecoverable error.
34672       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34673 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34674       has_space=`$ECHO "$complete" | $GREP " "`
34675       if test "x$has_space" != x; then
34676         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34677 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34678       fi
34679       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34680     fi
34681   fi
34682 
34683   # Now new_path has a complete unix path to the binary
34684   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34685     # Keep paths in /bin as-is, but remove trailing .exe if any
34686     new_path="${new_path/%.exe/}"
34687     # Do not save /bin paths to all_fixpath_prefixes!
34688   else
34689     # Not in mixed or Windows style, start by that.
34690     new_path=`cmd //c echo $new_path`
34691 
34692   input_path="$new_path"
34693   # Check if we need to convert this using DOS-style short mode. If the path
34694   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34695   # take no chances and rewrite it.
34696   # Note: m4 eats our [], so we need to use [ and ] instead.
34697   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34698   if test "x$has_forbidden_chars" != x; then
34699     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34700     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34701   fi
34702 
34703     # Output is in $new_path
34704 
34705   windows_path="$new_path"
34706   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34707     unix_path=`$CYGPATH -u "$windows_path"`
34708     new_path="$unix_path"
34709   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34710     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34711     new_path="$unix_path"
34712   fi
34713 
34714     # remove trailing .exe if any
34715     new_path="${new_path/%.exe/}"
34716 
34717     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34718     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34719   fi
34720 
34721   else
34722     # We're on a posix platform. Hooray! :)
34723     # First separate the path from the arguments. This will split at the first
34724     # space.
34725     complete="$STRIP"
34726     path="${complete%% *}"
34727     tmp="$complete EOL"
34728     arguments="${tmp#* }"
34729 
34730     # Cannot rely on the command "which" here since it doesn't always work.
34731     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34732     if test -z "$is_absolute_path"; then
34733       # Path to executable is not absolute. Find it.
34734       IFS_save="$IFS"
34735       IFS=:
34736       for p in $PATH; do
34737         if test -f "$p/$path" && test -x "$p/$path"; then
34738           new_path="$p/$path"
34739           break
34740         fi
34741       done
34742       IFS="$IFS_save"
34743     else
34744       # This is an absolute path, we can use it without further modifications.
34745       new_path="$path"
34746     fi
34747 
34748     if test "x$new_path" = x; then
34749       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34750 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34751       has_space=`$ECHO "$complete" | $GREP " "`
34752       if test "x$has_space" != x; then
34753         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34754 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34755       fi
34756       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34757     fi
34758   fi
34759 
34760   # Now join together the path and the arguments once again
34761   if test "x$arguments" != xEOL; then
34762     new_complete="$new_path ${arguments% *}"
34763   else
34764     new_complete="$new_path"
34765   fi
34766 
34767   if test "x$complete" != "x$new_complete"; then
34768     STRIP="$new_complete"
34769     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
34770 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
34771   fi
34772 
34773 
34774 
34775   # Publish this variable in the help.
34776 
34777 
34778   if test "x$NM" = x; then
34779     # The variable is not set by user, try to locate tool using the code snippet
34780     for ac_prog in nm
34781 do
34782   # Extract the first word of "$ac_prog", so it can be a program name with args.
34783 set dummy $ac_prog; ac_word=$2
34784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34785 $as_echo_n "checking for $ac_word... " >&6; }
34786 if ${ac_cv_path_NM+:} false; then :
34787   $as_echo_n "(cached) " >&6
34788 else
34789   case $NM in
34790   [\\/]* | ?:[\\/]*)
34791   ac_cv_path_NM="$NM" # Let the user override the test with a path.
34792   ;;
34793   *)
34794   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34795 for as_dir in $PATH
34796 do
34797   IFS=$as_save_IFS
34798   test -z "$as_dir" && as_dir=.
34799     for ac_exec_ext in '' $ac_executable_extensions; do
34800   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34801     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
34802     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34803     break 2
34804   fi
34805 done
34806   done
34807 IFS=$as_save_IFS
34808 
34809   ;;
34810 esac
34811 fi
34812 NM=$ac_cv_path_NM
34813 if test -n "$NM"; then
34814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
34815 $as_echo "$NM" >&6; }
34816 else
34817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34818 $as_echo "no" >&6; }
34819 fi
34820 
34821 
34822   test -n "$NM" && break
34823 done
34824 
34825   else
34826     # The variable is set, but is it from the command line or the environment?
34827 
34828     # Try to remove the string !NM! from our list.
34829     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
34830     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34831       # If it failed, the variable was not from the command line. Ignore it,
34832       # but warn the user (except for BASH, which is always set by the calling BASH).
34833       if test "xNM" != xBASH; then
34834         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
34835 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
34836       fi
34837       # Try to locate tool using the code snippet
34838       for ac_prog in nm
34839 do
34840   # Extract the first word of "$ac_prog", so it can be a program name with args.
34841 set dummy $ac_prog; ac_word=$2
34842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34843 $as_echo_n "checking for $ac_word... " >&6; }
34844 if ${ac_cv_path_NM+:} false; then :
34845   $as_echo_n "(cached) " >&6
34846 else
34847   case $NM in
34848   [\\/]* | ?:[\\/]*)
34849   ac_cv_path_NM="$NM" # Let the user override the test with a path.
34850   ;;
34851   *)
34852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34853 for as_dir in $PATH
34854 do
34855   IFS=$as_save_IFS
34856   test -z "$as_dir" && as_dir=.
34857     for ac_exec_ext in '' $ac_executable_extensions; do
34858   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34859     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
34860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34861     break 2
34862   fi
34863 done
34864   done
34865 IFS=$as_save_IFS
34866 
34867   ;;
34868 esac
34869 fi
34870 NM=$ac_cv_path_NM
34871 if test -n "$NM"; then
34872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
34873 $as_echo "$NM" >&6; }
34874 else
34875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34876 $as_echo "no" >&6; }
34877 fi
34878 
34879 
34880   test -n "$NM" && break
34881 done
34882 
34883     else
34884       # If it succeeded, then it was overridden by the user. We will use it
34885       # for the tool.
34886 
34887       # First remove it from the list of overridden variables, so we can test
34888       # for unknown variables in the end.
34889       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34890 
34891       # Check if the provided tool contains a complete path.
34892       tool_specified="$NM"
34893       tool_basename="${tool_specified##*/}"
34894       if test "x$tool_basename" = "x$tool_specified"; then
34895         # A command without a complete path is provided, search $PATH.
34896         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
34897 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
34898         # Extract the first word of "$tool_basename", so it can be a program name with args.
34899 set dummy $tool_basename; ac_word=$2
34900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34901 $as_echo_n "checking for $ac_word... " >&6; }
34902 if ${ac_cv_path_NM+:} false; then :
34903   $as_echo_n "(cached) " >&6
34904 else
34905   case $NM in
34906   [\\/]* | ?:[\\/]*)
34907   ac_cv_path_NM="$NM" # Let the user override the test with a path.
34908   ;;
34909   *)
34910   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34911 for as_dir in $PATH
34912 do
34913   IFS=$as_save_IFS
34914   test -z "$as_dir" && as_dir=.
34915     for ac_exec_ext in '' $ac_executable_extensions; do
34916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34917     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
34918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34919     break 2
34920   fi
34921 done
34922   done
34923 IFS=$as_save_IFS
34924 
34925   ;;
34926 esac
34927 fi
34928 NM=$ac_cv_path_NM
34929 if test -n "$NM"; then
34930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
34931 $as_echo "$NM" >&6; }
34932 else
34933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34934 $as_echo "no" >&6; }
34935 fi
34936 
34937 
34938         if test "x$NM" = x; then
34939           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34940         fi
34941       else
34942         # Otherwise we believe it is a complete path. Use it as it is.
34943         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
34944 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
34945         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
34946 $as_echo_n "checking for NM... " >&6; }
34947         if test ! -x "$tool_specified"; then
34948           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34949 $as_echo "not found" >&6; }
34950           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
34951         fi
34952         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34953 $as_echo "$tool_specified" >&6; }
34954       fi
34955     fi
34956   fi
34957 
34958 
34959 
34960   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34961 
34962   # First separate the path from the arguments. This will split at the first
34963   # space.
34964   complete="$NM"
34965   path="${complete%% *}"
34966   tmp="$complete EOL"
34967   arguments="${tmp#* }"
34968 
34969   # Input might be given as Windows format, start by converting to
34970   # unix format.
34971   new_path=`$CYGPATH -u "$path"`
34972 
34973   # Now try to locate executable using which
34974   new_path=`$WHICH "$new_path" 2> /dev/null`
34975   # bat and cmd files are not always considered executable in cygwin causing which
34976   # to not find them
34977   if test "x$new_path" = x \
34978       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34979       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34980     new_path=`$CYGPATH -u "$path"`
34981   fi
34982   if test "x$new_path" = x; then
34983     # Oops. Which didn't find the executable.
34984     # The splitting of arguments from the executable at a space might have been incorrect,
34985     # since paths with space are more likely in Windows. Give it another try with the whole
34986     # argument.
34987     path="$complete"
34988     arguments="EOL"
34989     new_path=`$CYGPATH -u "$path"`
34990     new_path=`$WHICH "$new_path" 2> /dev/null`
34991     # bat and cmd files are not always considered executable in cygwin causing which
34992     # to not find them
34993     if test "x$new_path" = x \
34994         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34995         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34996       new_path=`$CYGPATH -u "$path"`
34997     fi
34998     if test "x$new_path" = x; then
34999       # It's still not found. Now this is an unrecoverable error.
35000       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35001 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35002       has_space=`$ECHO "$complete" | $GREP " "`
35003       if test "x$has_space" != x; then
35004         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35005 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35006       fi
35007       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35008     fi
35009   fi
35010 
35011   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35012   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35013   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35014   # "foo.exe" is OK but "foo" is an error.
35015   #
35016   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35017   # It is also a way to make sure we got the proper file name for the real test later on.
35018   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35019   if test "x$test_shortpath" = x; then
35020     # Short path failed, file does not exist as specified.
35021     # Try adding .exe or .cmd
35022     if test -f "${new_path}.exe"; then
35023       input_to_shortpath="${new_path}.exe"
35024     elif test -f "${new_path}.cmd"; then
35025       input_to_shortpath="${new_path}.cmd"
35026     else
35027       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35028 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35029       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35030 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35031       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35032     fi
35033   else
35034     input_to_shortpath="$new_path"
35035   fi
35036 
35037   # Call helper function which possibly converts this using DOS-style short mode.
35038   # If so, the updated path is stored in $new_path.
35039   new_path="$input_to_shortpath"
35040 
35041   input_path="$input_to_shortpath"
35042   # Check if we need to convert this using DOS-style short mode. If the path
35043   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35044   # take no chances and rewrite it.
35045   # Note: m4 eats our [], so we need to use [ and ] instead.
35046   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35047   if test "x$has_forbidden_chars" != x; then
35048     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35049     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35050     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35051     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35052       # Going to short mode and back again did indeed matter. Since short mode is
35053       # case insensitive, let's make it lowercase to improve readability.
35054       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35055       # Now convert it back to Unix-style (cygpath)
35056       input_path=`$CYGPATH -u "$shortmode_path"`
35057       new_path="$input_path"
35058     fi
35059   fi
35060 
35061   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35062   if test "x$test_cygdrive_prefix" = x; then
35063     # As a simple fix, exclude /usr/bin since it's not a real path.
35064     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35065       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35066       # a path prefixed by /cygdrive for fixpath to work.
35067       new_path="$CYGWIN_ROOT_PATH$input_path"
35068     fi
35069   fi
35070 
35071   # remove trailing .exe if any
35072   new_path="${new_path/%.exe/}"
35073 
35074   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35075 
35076   # First separate the path from the arguments. This will split at the first
35077   # space.
35078   complete="$NM"
35079   path="${complete%% *}"
35080   tmp="$complete EOL"
35081   arguments="${tmp#* }"
35082 
35083   # Input might be given as Windows format, start by converting to
35084   # unix format.
35085   new_path="$path"
35086 
35087   windows_path="$new_path"
35088   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35089     unix_path=`$CYGPATH -u "$windows_path"`
35090     new_path="$unix_path"
35091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35092     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35093     new_path="$unix_path"
35094   fi
35095 
35096 
35097   # Now try to locate executable using which
35098   new_path=`$WHICH "$new_path" 2> /dev/null`
35099 
35100   if test "x$new_path" = x; then
35101     # Oops. Which didn't find the executable.
35102     # The splitting of arguments from the executable at a space might have been incorrect,
35103     # since paths with space are more likely in Windows. Give it another try with the whole
35104     # argument.
35105     path="$complete"
35106     arguments="EOL"
35107     new_path="$path"
35108 
35109   windows_path="$new_path"
35110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35111     unix_path=`$CYGPATH -u "$windows_path"`
35112     new_path="$unix_path"
35113   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35114     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35115     new_path="$unix_path"
35116   fi
35117 
35118 
35119     new_path=`$WHICH "$new_path" 2> /dev/null`
35120     # bat and cmd files are not always considered executable in MSYS causing which
35121     # to not find them
35122     if test "x$new_path" = x \
35123         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35124         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35125       new_path="$path"
35126 
35127   windows_path="$new_path"
35128   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35129     unix_path=`$CYGPATH -u "$windows_path"`
35130     new_path="$unix_path"
35131   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35132     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35133     new_path="$unix_path"
35134   fi
35135 
35136     fi
35137 
35138     if test "x$new_path" = x; then
35139       # It's still not found. Now this is an unrecoverable error.
35140       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35141 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35142       has_space=`$ECHO "$complete" | $GREP " "`
35143       if test "x$has_space" != x; then
35144         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35145 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35146       fi
35147       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35148     fi
35149   fi
35150 
35151   # Now new_path has a complete unix path to the binary
35152   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35153     # Keep paths in /bin as-is, but remove trailing .exe if any
35154     new_path="${new_path/%.exe/}"
35155     # Do not save /bin paths to all_fixpath_prefixes!
35156   else
35157     # Not in mixed or Windows style, start by that.
35158     new_path=`cmd //c echo $new_path`
35159 
35160   input_path="$new_path"
35161   # Check if we need to convert this using DOS-style short mode. If the path
35162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35163   # take no chances and rewrite it.
35164   # Note: m4 eats our [], so we need to use [ and ] instead.
35165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35166   if test "x$has_forbidden_chars" != x; then
35167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35168     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35169   fi
35170 
35171     # Output is in $new_path
35172 
35173   windows_path="$new_path"
35174   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35175     unix_path=`$CYGPATH -u "$windows_path"`
35176     new_path="$unix_path"
35177   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35178     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35179     new_path="$unix_path"
35180   fi
35181 
35182     # remove trailing .exe if any
35183     new_path="${new_path/%.exe/}"
35184 
35185     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35186     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35187   fi
35188 
35189   else
35190     # We're on a posix platform. Hooray! :)
35191     # First separate the path from the arguments. This will split at the first
35192     # space.
35193     complete="$NM"
35194     path="${complete%% *}"
35195     tmp="$complete EOL"
35196     arguments="${tmp#* }"
35197 
35198     # Cannot rely on the command "which" here since it doesn't always work.
35199     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35200     if test -z "$is_absolute_path"; then
35201       # Path to executable is not absolute. Find it.
35202       IFS_save="$IFS"
35203       IFS=:
35204       for p in $PATH; do
35205         if test -f "$p/$path" && test -x "$p/$path"; then
35206           new_path="$p/$path"
35207           break
35208         fi
35209       done
35210       IFS="$IFS_save"
35211     else
35212       # This is an absolute path, we can use it without further modifications.
35213       new_path="$path"
35214     fi
35215 
35216     if test "x$new_path" = x; then
35217       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35218 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35219       has_space=`$ECHO "$complete" | $GREP " "`
35220       if test "x$has_space" != x; then
35221         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35222 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35223       fi
35224       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35225     fi
35226   fi
35227 
35228   # Now join together the path and the arguments once again
35229   if test "x$arguments" != xEOL; then
35230     new_complete="$new_path ${arguments% *}"
35231   else
35232     new_complete="$new_path"
35233   fi
35234 
35235   if test "x$complete" != "x$new_complete"; then
35236     NM="$new_complete"
35237     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35238 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35239   fi
35240 
35241 
35242 
35243   # Publish this variable in the help.
35244 
35245 
35246   if test "x$GNM" = x; then
35247     # The variable is not set by user, try to locate tool using the code snippet
35248     for ac_prog in gnm
35249 do
35250   # Extract the first word of "$ac_prog", so it can be a program name with args.
35251 set dummy $ac_prog; ac_word=$2
35252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35253 $as_echo_n "checking for $ac_word... " >&6; }
35254 if ${ac_cv_path_GNM+:} false; then :
35255   $as_echo_n "(cached) " >&6
35256 else
35257   case $GNM in
35258   [\\/]* | ?:[\\/]*)
35259   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35260   ;;
35261   *)
35262   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35263 for as_dir in $PATH
35264 do
35265   IFS=$as_save_IFS
35266   test -z "$as_dir" && as_dir=.
35267     for ac_exec_ext in '' $ac_executable_extensions; do
35268   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35269     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35270     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35271     break 2
35272   fi
35273 done
35274   done
35275 IFS=$as_save_IFS
35276 
35277   ;;
35278 esac
35279 fi
35280 GNM=$ac_cv_path_GNM
35281 if test -n "$GNM"; then
35282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35283 $as_echo "$GNM" >&6; }
35284 else
35285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35286 $as_echo "no" >&6; }
35287 fi
35288 
35289 
35290   test -n "$GNM" && break
35291 done
35292 
35293   else
35294     # The variable is set, but is it from the command line or the environment?
35295 
35296     # Try to remove the string !GNM! from our list.
35297     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35298     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35299       # If it failed, the variable was not from the command line. Ignore it,
35300       # but warn the user (except for BASH, which is always set by the calling BASH).
35301       if test "xGNM" != xBASH; then
35302         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35303 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35304       fi
35305       # Try to locate tool using the code snippet
35306       for ac_prog in gnm
35307 do
35308   # Extract the first word of "$ac_prog", so it can be a program name with args.
35309 set dummy $ac_prog; ac_word=$2
35310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35311 $as_echo_n "checking for $ac_word... " >&6; }
35312 if ${ac_cv_path_GNM+:} false; then :
35313   $as_echo_n "(cached) " >&6
35314 else
35315   case $GNM in
35316   [\\/]* | ?:[\\/]*)
35317   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35318   ;;
35319   *)
35320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35321 for as_dir in $PATH
35322 do
35323   IFS=$as_save_IFS
35324   test -z "$as_dir" && as_dir=.
35325     for ac_exec_ext in '' $ac_executable_extensions; do
35326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35327     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35329     break 2
35330   fi
35331 done
35332   done
35333 IFS=$as_save_IFS
35334 
35335   ;;
35336 esac
35337 fi
35338 GNM=$ac_cv_path_GNM
35339 if test -n "$GNM"; then
35340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35341 $as_echo "$GNM" >&6; }
35342 else
35343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35344 $as_echo "no" >&6; }
35345 fi
35346 
35347 
35348   test -n "$GNM" && break
35349 done
35350 
35351     else
35352       # If it succeeded, then it was overridden by the user. We will use it
35353       # for the tool.
35354 
35355       # First remove it from the list of overridden variables, so we can test
35356       # for unknown variables in the end.
35357       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35358 
35359       # Check if the provided tool contains a complete path.
35360       tool_specified="$GNM"
35361       tool_basename="${tool_specified##*/}"
35362       if test "x$tool_basename" = "x$tool_specified"; then
35363         # A command without a complete path is provided, search $PATH.
35364         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35365 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35366         # Extract the first word of "$tool_basename", so it can be a program name with args.
35367 set dummy $tool_basename; ac_word=$2
35368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35369 $as_echo_n "checking for $ac_word... " >&6; }
35370 if ${ac_cv_path_GNM+:} false; then :
35371   $as_echo_n "(cached) " >&6
35372 else
35373   case $GNM in
35374   [\\/]* | ?:[\\/]*)
35375   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35376   ;;
35377   *)
35378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35379 for as_dir in $PATH
35380 do
35381   IFS=$as_save_IFS
35382   test -z "$as_dir" && as_dir=.
35383     for ac_exec_ext in '' $ac_executable_extensions; do
35384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35385     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35387     break 2
35388   fi
35389 done
35390   done
35391 IFS=$as_save_IFS
35392 
35393   ;;
35394 esac
35395 fi
35396 GNM=$ac_cv_path_GNM
35397 if test -n "$GNM"; then
35398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35399 $as_echo "$GNM" >&6; }
35400 else
35401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35402 $as_echo "no" >&6; }
35403 fi
35404 
35405 
35406         if test "x$GNM" = x; then
35407           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35408         fi
35409       else
35410         # Otherwise we believe it is a complete path. Use it as it is.
35411         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35412 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35413         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35414 $as_echo_n "checking for GNM... " >&6; }
35415         if test ! -x "$tool_specified"; then
35416           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35417 $as_echo "not found" >&6; }
35418           as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35419         fi
35420         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35421 $as_echo "$tool_specified" >&6; }
35422       fi
35423     fi
35424   fi
35425 
35426 
35427 
35428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35429 
35430   # First separate the path from the arguments. This will split at the first
35431   # space.
35432   complete="$GNM"
35433   path="${complete%% *}"
35434   tmp="$complete EOL"
35435   arguments="${tmp#* }"
35436 
35437   # Input might be given as Windows format, start by converting to
35438   # unix format.
35439   new_path=`$CYGPATH -u "$path"`
35440 
35441   # Now try to locate executable using which
35442   new_path=`$WHICH "$new_path" 2> /dev/null`
35443   # bat and cmd files are not always considered executable in cygwin causing which
35444   # to not find them
35445   if test "x$new_path" = x \
35446       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35447       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35448     new_path=`$CYGPATH -u "$path"`
35449   fi
35450   if test "x$new_path" = x; then
35451     # Oops. Which didn't find the executable.
35452     # The splitting of arguments from the executable at a space might have been incorrect,
35453     # since paths with space are more likely in Windows. Give it another try with the whole
35454     # argument.
35455     path="$complete"
35456     arguments="EOL"
35457     new_path=`$CYGPATH -u "$path"`
35458     new_path=`$WHICH "$new_path" 2> /dev/null`
35459     # bat and cmd files are not always considered executable in cygwin causing which
35460     # to not find them
35461     if test "x$new_path" = x \
35462         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35463         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35464       new_path=`$CYGPATH -u "$path"`
35465     fi
35466     if test "x$new_path" = x; then
35467       # It's still not found. Now this is an unrecoverable error.
35468       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35469 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35470       has_space=`$ECHO "$complete" | $GREP " "`
35471       if test "x$has_space" != x; then
35472         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35473 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35474       fi
35475       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35476     fi
35477   fi
35478 
35479   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35480   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35481   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35482   # "foo.exe" is OK but "foo" is an error.
35483   #
35484   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35485   # It is also a way to make sure we got the proper file name for the real test later on.
35486   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35487   if test "x$test_shortpath" = x; then
35488     # Short path failed, file does not exist as specified.
35489     # Try adding .exe or .cmd
35490     if test -f "${new_path}.exe"; then
35491       input_to_shortpath="${new_path}.exe"
35492     elif test -f "${new_path}.cmd"; then
35493       input_to_shortpath="${new_path}.cmd"
35494     else
35495       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35496 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35497       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35498 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35499       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35500     fi
35501   else
35502     input_to_shortpath="$new_path"
35503   fi
35504 
35505   # Call helper function which possibly converts this using DOS-style short mode.
35506   # If so, the updated path is stored in $new_path.
35507   new_path="$input_to_shortpath"
35508 
35509   input_path="$input_to_shortpath"
35510   # Check if we need to convert this using DOS-style short mode. If the path
35511   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35512   # take no chances and rewrite it.
35513   # Note: m4 eats our [], so we need to use [ and ] instead.
35514   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35515   if test "x$has_forbidden_chars" != x; then
35516     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35517     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35518     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35519     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35520       # Going to short mode and back again did indeed matter. Since short mode is
35521       # case insensitive, let's make it lowercase to improve readability.
35522       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35523       # Now convert it back to Unix-style (cygpath)
35524       input_path=`$CYGPATH -u "$shortmode_path"`
35525       new_path="$input_path"
35526     fi
35527   fi
35528 
35529   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35530   if test "x$test_cygdrive_prefix" = x; then
35531     # As a simple fix, exclude /usr/bin since it's not a real path.
35532     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35533       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35534       # a path prefixed by /cygdrive for fixpath to work.
35535       new_path="$CYGWIN_ROOT_PATH$input_path"
35536     fi
35537   fi
35538 
35539   # remove trailing .exe if any
35540   new_path="${new_path/%.exe/}"
35541 
35542   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35543 
35544   # First separate the path from the arguments. This will split at the first
35545   # space.
35546   complete="$GNM"
35547   path="${complete%% *}"
35548   tmp="$complete EOL"
35549   arguments="${tmp#* }"
35550 
35551   # Input might be given as Windows format, start by converting to
35552   # unix format.
35553   new_path="$path"
35554 
35555   windows_path="$new_path"
35556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35557     unix_path=`$CYGPATH -u "$windows_path"`
35558     new_path="$unix_path"
35559   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35560     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35561     new_path="$unix_path"
35562   fi
35563 
35564 
35565   # Now try to locate executable using which
35566   new_path=`$WHICH "$new_path" 2> /dev/null`
35567 
35568   if test "x$new_path" = x; then
35569     # Oops. Which didn't find the executable.
35570     # The splitting of arguments from the executable at a space might have been incorrect,
35571     # since paths with space are more likely in Windows. Give it another try with the whole
35572     # argument.
35573     path="$complete"
35574     arguments="EOL"
35575     new_path="$path"
35576 
35577   windows_path="$new_path"
35578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35579     unix_path=`$CYGPATH -u "$windows_path"`
35580     new_path="$unix_path"
35581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35583     new_path="$unix_path"
35584   fi
35585 
35586 
35587     new_path=`$WHICH "$new_path" 2> /dev/null`
35588     # bat and cmd files are not always considered executable in MSYS causing which
35589     # to not find them
35590     if test "x$new_path" = x \
35591         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35592         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35593       new_path="$path"
35594 
35595   windows_path="$new_path"
35596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35597     unix_path=`$CYGPATH -u "$windows_path"`
35598     new_path="$unix_path"
35599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35601     new_path="$unix_path"
35602   fi
35603 
35604     fi
35605 
35606     if test "x$new_path" = x; then
35607       # It's still not found. Now this is an unrecoverable error.
35608       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35609 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35610       has_space=`$ECHO "$complete" | $GREP " "`
35611       if test "x$has_space" != x; then
35612         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35613 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35614       fi
35615       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35616     fi
35617   fi
35618 
35619   # Now new_path has a complete unix path to the binary
35620   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35621     # Keep paths in /bin as-is, but remove trailing .exe if any
35622     new_path="${new_path/%.exe/}"
35623     # Do not save /bin paths to all_fixpath_prefixes!
35624   else
35625     # Not in mixed or Windows style, start by that.
35626     new_path=`cmd //c echo $new_path`
35627 
35628   input_path="$new_path"
35629   # Check if we need to convert this using DOS-style short mode. If the path
35630   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35631   # take no chances and rewrite it.
35632   # Note: m4 eats our [], so we need to use [ and ] instead.
35633   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35634   if test "x$has_forbidden_chars" != x; then
35635     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35636     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35637   fi
35638 
35639     # Output is in $new_path
35640 
35641   windows_path="$new_path"
35642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35643     unix_path=`$CYGPATH -u "$windows_path"`
35644     new_path="$unix_path"
35645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35646     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35647     new_path="$unix_path"
35648   fi
35649 
35650     # remove trailing .exe if any
35651     new_path="${new_path/%.exe/}"
35652 
35653     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35654     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35655   fi
35656 
35657   else
35658     # We're on a posix platform. Hooray! :)
35659     # First separate the path from the arguments. This will split at the first
35660     # space.
35661     complete="$GNM"
35662     path="${complete%% *}"
35663     tmp="$complete EOL"
35664     arguments="${tmp#* }"
35665 
35666     # Cannot rely on the command "which" here since it doesn't always work.
35667     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35668     if test -z "$is_absolute_path"; then
35669       # Path to executable is not absolute. Find it.
35670       IFS_save="$IFS"
35671       IFS=:
35672       for p in $PATH; do
35673         if test -f "$p/$path" && test -x "$p/$path"; then
35674           new_path="$p/$path"
35675           break
35676         fi
35677       done
35678       IFS="$IFS_save"
35679     else
35680       # This is an absolute path, we can use it without further modifications.
35681       new_path="$path"
35682     fi
35683 
35684     if test "x$new_path" = x; then
35685       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35686 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35687       has_space=`$ECHO "$complete" | $GREP " "`
35688       if test "x$has_space" != x; then
35689         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35690 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35691       fi
35692       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35693     fi
35694   fi
35695 
35696   # Now join together the path and the arguments once again
35697   if test "x$arguments" != xEOL; then
35698     new_complete="$new_path ${arguments% *}"
35699   else
35700     new_complete="$new_path"
35701   fi
35702 
35703   if test "x$complete" != "x$new_complete"; then
35704     GNM="$new_complete"
35705     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
35706 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
35707   fi
35708 
35709 
35710 
35711 
35712   # Publish this variable in the help.
35713 
35714 
35715   if test "x$MCS" = x; then
35716     # The variable is not set by user, try to locate tool using the code snippet
35717     for ac_prog in mcs
35718 do
35719   # Extract the first word of "$ac_prog", so it can be a program name with args.
35720 set dummy $ac_prog; ac_word=$2
35721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35722 $as_echo_n "checking for $ac_word... " >&6; }
35723 if ${ac_cv_path_MCS+:} false; then :
35724   $as_echo_n "(cached) " >&6
35725 else
35726   case $MCS in
35727   [\\/]* | ?:[\\/]*)
35728   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35729   ;;
35730   *)
35731   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35732 for as_dir in $PATH
35733 do
35734   IFS=$as_save_IFS
35735   test -z "$as_dir" && as_dir=.
35736     for ac_exec_ext in '' $ac_executable_extensions; do
35737   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35738     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35739     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35740     break 2
35741   fi
35742 done
35743   done
35744 IFS=$as_save_IFS
35745 
35746   ;;
35747 esac
35748 fi
35749 MCS=$ac_cv_path_MCS
35750 if test -n "$MCS"; then
35751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
35752 $as_echo "$MCS" >&6; }
35753 else
35754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35755 $as_echo "no" >&6; }
35756 fi
35757 
35758 
35759   test -n "$MCS" && break
35760 done
35761 
35762   else
35763     # The variable is set, but is it from the command line or the environment?
35764 
35765     # Try to remove the string !MCS! from our list.
35766     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
35767     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35768       # If it failed, the variable was not from the command line. Ignore it,
35769       # but warn the user (except for BASH, which is always set by the calling BASH).
35770       if test "xMCS" != xBASH; then
35771         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
35772 $as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
35773       fi
35774       # Try to locate tool using the code snippet
35775       for ac_prog in mcs
35776 do
35777   # Extract the first word of "$ac_prog", so it can be a program name with args.
35778 set dummy $ac_prog; ac_word=$2
35779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35780 $as_echo_n "checking for $ac_word... " >&6; }
35781 if ${ac_cv_path_MCS+:} false; then :
35782   $as_echo_n "(cached) " >&6
35783 else
35784   case $MCS in
35785   [\\/]* | ?:[\\/]*)
35786   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35787   ;;
35788   *)
35789   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35790 for as_dir in $PATH
35791 do
35792   IFS=$as_save_IFS
35793   test -z "$as_dir" && as_dir=.
35794     for ac_exec_ext in '' $ac_executable_extensions; do
35795   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35796     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35797     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35798     break 2
35799   fi
35800 done
35801   done
35802 IFS=$as_save_IFS
35803 
35804   ;;
35805 esac
35806 fi
35807 MCS=$ac_cv_path_MCS
35808 if test -n "$MCS"; then
35809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
35810 $as_echo "$MCS" >&6; }
35811 else
35812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35813 $as_echo "no" >&6; }
35814 fi
35815 
35816 
35817   test -n "$MCS" && break
35818 done
35819 
35820     else
35821       # If it succeeded, then it was overridden by the user. We will use it
35822       # for the tool.
35823 
35824       # First remove it from the list of overridden variables, so we can test
35825       # for unknown variables in the end.
35826       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35827 
35828       # Check if the provided tool contains a complete path.
35829       tool_specified="$MCS"
35830       tool_basename="${tool_specified##*/}"
35831       if test "x$tool_basename" = "x$tool_specified"; then
35832         # A command without a complete path is provided, search $PATH.
35833         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
35834 $as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
35835         # Extract the first word of "$tool_basename", so it can be a program name with args.
35836 set dummy $tool_basename; ac_word=$2
35837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35838 $as_echo_n "checking for $ac_word... " >&6; }
35839 if ${ac_cv_path_MCS+:} false; then :
35840   $as_echo_n "(cached) " >&6
35841 else
35842   case $MCS in
35843   [\\/]* | ?:[\\/]*)
35844   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35845   ;;
35846   *)
35847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35848 for as_dir in $PATH
35849 do
35850   IFS=$as_save_IFS
35851   test -z "$as_dir" && as_dir=.
35852     for ac_exec_ext in '' $ac_executable_extensions; do
35853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35854     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35856     break 2
35857   fi
35858 done
35859   done
35860 IFS=$as_save_IFS
35861 
35862   ;;
35863 esac
35864 fi
35865 MCS=$ac_cv_path_MCS
35866 if test -n "$MCS"; then
35867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
35868 $as_echo "$MCS" >&6; }
35869 else
35870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35871 $as_echo "no" >&6; }
35872 fi
35873 
35874 
35875         if test "x$MCS" = x; then
35876           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35877         fi
35878       else
35879         # Otherwise we believe it is a complete path. Use it as it is.
35880         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
35881 $as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
35882         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
35883 $as_echo_n "checking for MCS... " >&6; }
35884         if test ! -x "$tool_specified"; then
35885           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35886 $as_echo "not found" >&6; }
35887           as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
35888         fi
35889         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35890 $as_echo "$tool_specified" >&6; }
35891       fi
35892     fi
35893   fi
35894 
35895 
35896 
35897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35898 
35899   # First separate the path from the arguments. This will split at the first
35900   # space.
35901   complete="$MCS"
35902   path="${complete%% *}"
35903   tmp="$complete EOL"
35904   arguments="${tmp#* }"
35905 
35906   # Input might be given as Windows format, start by converting to
35907   # unix format.
35908   new_path=`$CYGPATH -u "$path"`
35909 
35910   # Now try to locate executable using which
35911   new_path=`$WHICH "$new_path" 2> /dev/null`
35912   # bat and cmd files are not always considered executable in cygwin causing which
35913   # to not find them
35914   if test "x$new_path" = x \
35915       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35916       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35917     new_path=`$CYGPATH -u "$path"`
35918   fi
35919   if test "x$new_path" = x; then
35920     # Oops. Which didn't find the executable.
35921     # The splitting of arguments from the executable at a space might have been incorrect,
35922     # since paths with space are more likely in Windows. Give it another try with the whole
35923     # argument.
35924     path="$complete"
35925     arguments="EOL"
35926     new_path=`$CYGPATH -u "$path"`
35927     new_path=`$WHICH "$new_path" 2> /dev/null`
35928     # bat and cmd files are not always considered executable in cygwin causing which
35929     # to not find them
35930     if test "x$new_path" = x \
35931         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35932         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35933       new_path=`$CYGPATH -u "$path"`
35934     fi
35935     if test "x$new_path" = x; then
35936       # It's still not found. Now this is an unrecoverable error.
35937       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
35938 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
35939       has_space=`$ECHO "$complete" | $GREP " "`
35940       if test "x$has_space" != x; then
35941         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35942 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35943       fi
35944       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
35945     fi
35946   fi
35947 
35948   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35949   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35950   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35951   # "foo.exe" is OK but "foo" is an error.
35952   #
35953   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35954   # It is also a way to make sure we got the proper file name for the real test later on.
35955   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35956   if test "x$test_shortpath" = x; then
35957     # Short path failed, file does not exist as specified.
35958     # Try adding .exe or .cmd
35959     if test -f "${new_path}.exe"; then
35960       input_to_shortpath="${new_path}.exe"
35961     elif test -f "${new_path}.cmd"; then
35962       input_to_shortpath="${new_path}.cmd"
35963     else
35964       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
35965 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
35966       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35967 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35968       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
35969     fi
35970   else
35971     input_to_shortpath="$new_path"
35972   fi
35973 
35974   # Call helper function which possibly converts this using DOS-style short mode.
35975   # If so, the updated path is stored in $new_path.
35976   new_path="$input_to_shortpath"
35977 
35978   input_path="$input_to_shortpath"
35979   # Check if we need to convert this using DOS-style short mode. If the path
35980   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35981   # take no chances and rewrite it.
35982   # Note: m4 eats our [], so we need to use [ and ] instead.
35983   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35984   if test "x$has_forbidden_chars" != x; then
35985     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35986     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35987     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35988     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35989       # Going to short mode and back again did indeed matter. Since short mode is
35990       # case insensitive, let's make it lowercase to improve readability.
35991       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35992       # Now convert it back to Unix-style (cygpath)
35993       input_path=`$CYGPATH -u "$shortmode_path"`
35994       new_path="$input_path"
35995     fi
35996   fi
35997 
35998   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35999   if test "x$test_cygdrive_prefix" = x; then
36000     # As a simple fix, exclude /usr/bin since it's not a real path.
36001     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36002       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36003       # a path prefixed by /cygdrive for fixpath to work.
36004       new_path="$CYGWIN_ROOT_PATH$input_path"
36005     fi
36006   fi
36007 
36008   # remove trailing .exe if any
36009   new_path="${new_path/%.exe/}"
36010 
36011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36012 
36013   # First separate the path from the arguments. This will split at the first
36014   # space.
36015   complete="$MCS"
36016   path="${complete%% *}"
36017   tmp="$complete EOL"
36018   arguments="${tmp#* }"
36019 
36020   # Input might be given as Windows format, start by converting to
36021   # unix format.
36022   new_path="$path"
36023 
36024   windows_path="$new_path"
36025   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36026     unix_path=`$CYGPATH -u "$windows_path"`
36027     new_path="$unix_path"
36028   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36029     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36030     new_path="$unix_path"
36031   fi
36032 
36033 
36034   # Now try to locate executable using which
36035   new_path=`$WHICH "$new_path" 2> /dev/null`
36036 
36037   if test "x$new_path" = x; then
36038     # Oops. Which didn't find the executable.
36039     # The splitting of arguments from the executable at a space might have been incorrect,
36040     # since paths with space are more likely in Windows. Give it another try with the whole
36041     # argument.
36042     path="$complete"
36043     arguments="EOL"
36044     new_path="$path"
36045 
36046   windows_path="$new_path"
36047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36048     unix_path=`$CYGPATH -u "$windows_path"`
36049     new_path="$unix_path"
36050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36051     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36052     new_path="$unix_path"
36053   fi
36054 
36055 
36056     new_path=`$WHICH "$new_path" 2> /dev/null`
36057     # bat and cmd files are not always considered executable in MSYS causing which
36058     # to not find them
36059     if test "x$new_path" = x \
36060         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36061         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36062       new_path="$path"
36063 
36064   windows_path="$new_path"
36065   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36066     unix_path=`$CYGPATH -u "$windows_path"`
36067     new_path="$unix_path"
36068   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36069     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36070     new_path="$unix_path"
36071   fi
36072 
36073     fi
36074 
36075     if test "x$new_path" = x; then
36076       # It's still not found. Now this is an unrecoverable error.
36077       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36078 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36079       has_space=`$ECHO "$complete" | $GREP " "`
36080       if test "x$has_space" != x; then
36081         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36082 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36083       fi
36084       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36085     fi
36086   fi
36087 
36088   # Now new_path has a complete unix path to the binary
36089   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36090     # Keep paths in /bin as-is, but remove trailing .exe if any
36091     new_path="${new_path/%.exe/}"
36092     # Do not save /bin paths to all_fixpath_prefixes!
36093   else
36094     # Not in mixed or Windows style, start by that.
36095     new_path=`cmd //c echo $new_path`
36096 
36097   input_path="$new_path"
36098   # Check if we need to convert this using DOS-style short mode. If the path
36099   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36100   # take no chances and rewrite it.
36101   # Note: m4 eats our [], so we need to use [ and ] instead.
36102   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36103   if test "x$has_forbidden_chars" != x; then
36104     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36105     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36106   fi
36107 
36108     # Output is in $new_path
36109 
36110   windows_path="$new_path"
36111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36112     unix_path=`$CYGPATH -u "$windows_path"`
36113     new_path="$unix_path"
36114   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36115     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36116     new_path="$unix_path"
36117   fi
36118 
36119     # remove trailing .exe if any
36120     new_path="${new_path/%.exe/}"
36121 
36122     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36123     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36124   fi
36125 
36126   else
36127     # We're on a posix platform. Hooray! :)
36128     # First separate the path from the arguments. This will split at the first
36129     # space.
36130     complete="$MCS"
36131     path="${complete%% *}"
36132     tmp="$complete EOL"
36133     arguments="${tmp#* }"
36134 
36135     # Cannot rely on the command "which" here since it doesn't always work.
36136     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36137     if test -z "$is_absolute_path"; then
36138       # Path to executable is not absolute. Find it.
36139       IFS_save="$IFS"
36140       IFS=:
36141       for p in $PATH; do
36142         if test -f "$p/$path" && test -x "$p/$path"; then
36143           new_path="$p/$path"
36144           break
36145         fi
36146       done
36147       IFS="$IFS_save"
36148     else
36149       # This is an absolute path, we can use it without further modifications.
36150       new_path="$path"
36151     fi
36152 
36153     if test "x$new_path" = x; then
36154       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36155 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36156       has_space=`$ECHO "$complete" | $GREP " "`
36157       if test "x$has_space" != x; then
36158         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36159 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36160       fi
36161       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36162     fi
36163   fi
36164 
36165   # Now join together the path and the arguments once again
36166   if test "x$arguments" != xEOL; then
36167     new_complete="$new_path ${arguments% *}"
36168   else
36169     new_complete="$new_path"
36170   fi
36171 
36172   if test "x$complete" != "x$new_complete"; then
36173     MCS="$new_complete"
36174     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36175 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36176   fi
36177 
36178   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36179     # FIXME: we should unify this with the solaris case above.
36180 
36181 
36182   # Publish this variable in the help.
36183 
36184 
36185   if test "x$STRIP" = x; then
36186     # The variable is not set by user, try to locate tool using the code snippet
36187     if test -n "$ac_tool_prefix"; then
36188   for ac_prog in strip
36189   do
36190     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36191 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36193 $as_echo_n "checking for $ac_word... " >&6; }
36194 if ${ac_cv_prog_STRIP+:} false; then :
36195   $as_echo_n "(cached) " >&6
36196 else
36197   if test -n "$STRIP"; then
36198   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36199 else
36200 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36201 for as_dir in $PATH
36202 do
36203   IFS=$as_save_IFS
36204   test -z "$as_dir" && as_dir=.
36205     for ac_exec_ext in '' $ac_executable_extensions; do
36206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36207     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36209     break 2
36210   fi
36211 done
36212   done
36213 IFS=$as_save_IFS
36214 
36215 fi
36216 fi
36217 STRIP=$ac_cv_prog_STRIP
36218 if test -n "$STRIP"; then
36219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36220 $as_echo "$STRIP" >&6; }
36221 else
36222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36223 $as_echo "no" >&6; }
36224 fi
36225 
36226 
36227     test -n "$STRIP" && break
36228   done
36229 fi
36230 if test -z "$STRIP"; then
36231   ac_ct_STRIP=$STRIP
36232   for ac_prog in strip
36233 do
36234   # Extract the first word of "$ac_prog", so it can be a program name with args.
36235 set dummy $ac_prog; ac_word=$2
36236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36237 $as_echo_n "checking for $ac_word... " >&6; }
36238 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36239   $as_echo_n "(cached) " >&6
36240 else
36241   if test -n "$ac_ct_STRIP"; then
36242   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36243 else
36244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36245 for as_dir in $PATH
36246 do
36247   IFS=$as_save_IFS
36248   test -z "$as_dir" && as_dir=.
36249     for ac_exec_ext in '' $ac_executable_extensions; do
36250   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36251     ac_cv_prog_ac_ct_STRIP="$ac_prog"
36252     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36253     break 2
36254   fi
36255 done
36256   done
36257 IFS=$as_save_IFS
36258 
36259 fi
36260 fi
36261 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36262 if test -n "$ac_ct_STRIP"; then
36263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36264 $as_echo "$ac_ct_STRIP" >&6; }
36265 else
36266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36267 $as_echo "no" >&6; }
36268 fi
36269 
36270 
36271   test -n "$ac_ct_STRIP" && break
36272 done
36273 
36274   if test "x$ac_ct_STRIP" = x; then
36275     STRIP=""
36276   else
36277     case $cross_compiling:$ac_tool_warned in
36278 yes:)
36279 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36280 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36281 ac_tool_warned=yes ;;
36282 esac
36283     STRIP=$ac_ct_STRIP
36284   fi
36285 fi
36286 
36287   else
36288     # The variable is set, but is it from the command line or the environment?
36289 
36290     # Try to remove the string !STRIP! from our list.
36291     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36292     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36293       # If it failed, the variable was not from the command line. Ignore it,
36294       # but warn the user (except for BASH, which is always set by the calling BASH).
36295       if test "xSTRIP" != xBASH; then
36296         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36297 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36298       fi
36299       # Try to locate tool using the code snippet
36300       if test -n "$ac_tool_prefix"; then
36301   for ac_prog in strip
36302   do
36303     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36304 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36306 $as_echo_n "checking for $ac_word... " >&6; }
36307 if ${ac_cv_prog_STRIP+:} false; then :
36308   $as_echo_n "(cached) " >&6
36309 else
36310   if test -n "$STRIP"; then
36311   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36312 else
36313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36314 for as_dir in $PATH
36315 do
36316   IFS=$as_save_IFS
36317   test -z "$as_dir" && as_dir=.
36318     for ac_exec_ext in '' $ac_executable_extensions; do
36319   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36320     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36321     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36322     break 2
36323   fi
36324 done
36325   done
36326 IFS=$as_save_IFS
36327 
36328 fi
36329 fi
36330 STRIP=$ac_cv_prog_STRIP
36331 if test -n "$STRIP"; then
36332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36333 $as_echo "$STRIP" >&6; }
36334 else
36335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36336 $as_echo "no" >&6; }
36337 fi
36338 
36339 
36340     test -n "$STRIP" && break
36341   done
36342 fi
36343 if test -z "$STRIP"; then
36344   ac_ct_STRIP=$STRIP
36345   for ac_prog in strip
36346 do
36347   # Extract the first word of "$ac_prog", so it can be a program name with args.
36348 set dummy $ac_prog; ac_word=$2
36349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36350 $as_echo_n "checking for $ac_word... " >&6; }
36351 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36352   $as_echo_n "(cached) " >&6
36353 else
36354   if test -n "$ac_ct_STRIP"; then
36355   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36356 else
36357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36358 for as_dir in $PATH
36359 do
36360   IFS=$as_save_IFS
36361   test -z "$as_dir" && as_dir=.
36362     for ac_exec_ext in '' $ac_executable_extensions; do
36363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36364     ac_cv_prog_ac_ct_STRIP="$ac_prog"
36365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36366     break 2
36367   fi
36368 done
36369   done
36370 IFS=$as_save_IFS
36371 
36372 fi
36373 fi
36374 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36375 if test -n "$ac_ct_STRIP"; then
36376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36377 $as_echo "$ac_ct_STRIP" >&6; }
36378 else
36379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36380 $as_echo "no" >&6; }
36381 fi
36382 
36383 
36384   test -n "$ac_ct_STRIP" && break
36385 done
36386 
36387   if test "x$ac_ct_STRIP" = x; then
36388     STRIP=""
36389   else
36390     case $cross_compiling:$ac_tool_warned in
36391 yes:)
36392 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36393 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36394 ac_tool_warned=yes ;;
36395 esac
36396     STRIP=$ac_ct_STRIP
36397   fi
36398 fi
36399 
36400     else
36401       # If it succeeded, then it was overridden by the user. We will use it
36402       # for the tool.
36403 
36404       # First remove it from the list of overridden variables, so we can test
36405       # for unknown variables in the end.
36406       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36407 
36408       # Check if the provided tool contains a complete path.
36409       tool_specified="$STRIP"
36410       tool_basename="${tool_specified##*/}"
36411       if test "x$tool_basename" = "x$tool_specified"; then
36412         # A command without a complete path is provided, search $PATH.
36413         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36414 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36415         # Extract the first word of "$tool_basename", so it can be a program name with args.
36416 set dummy $tool_basename; ac_word=$2
36417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36418 $as_echo_n "checking for $ac_word... " >&6; }
36419 if ${ac_cv_path_STRIP+:} false; then :
36420   $as_echo_n "(cached) " >&6
36421 else
36422   case $STRIP in
36423   [\\/]* | ?:[\\/]*)
36424   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36425   ;;
36426   *)
36427   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36428 for as_dir in $PATH
36429 do
36430   IFS=$as_save_IFS
36431   test -z "$as_dir" && as_dir=.
36432     for ac_exec_ext in '' $ac_executable_extensions; do
36433   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36434     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36435     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36436     break 2
36437   fi
36438 done
36439   done
36440 IFS=$as_save_IFS
36441 
36442   ;;
36443 esac
36444 fi
36445 STRIP=$ac_cv_path_STRIP
36446 if test -n "$STRIP"; then
36447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36448 $as_echo "$STRIP" >&6; }
36449 else
36450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36451 $as_echo "no" >&6; }
36452 fi
36453 
36454 
36455         if test "x$STRIP" = x; then
36456           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36457         fi
36458       else
36459         # Otherwise we believe it is a complete path. Use it as it is.
36460         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36461 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36462         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36463 $as_echo_n "checking for STRIP... " >&6; }
36464         if test ! -x "$tool_specified"; then
36465           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36466 $as_echo "not found" >&6; }
36467           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36468         fi
36469         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36470 $as_echo "$tool_specified" >&6; }
36471       fi
36472     fi
36473   fi
36474 
36475 
36476 
36477   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36478 
36479   # First separate the path from the arguments. This will split at the first
36480   # space.
36481   complete="$STRIP"
36482   path="${complete%% *}"
36483   tmp="$complete EOL"
36484   arguments="${tmp#* }"
36485 
36486   # Input might be given as Windows format, start by converting to
36487   # unix format.
36488   new_path=`$CYGPATH -u "$path"`
36489 
36490   # Now try to locate executable using which
36491   new_path=`$WHICH "$new_path" 2> /dev/null`
36492   # bat and cmd files are not always considered executable in cygwin causing which
36493   # to not find them
36494   if test "x$new_path" = x \
36495       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36496       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36497     new_path=`$CYGPATH -u "$path"`
36498   fi
36499   if test "x$new_path" = x; then
36500     # Oops. Which didn't find the executable.
36501     # The splitting of arguments from the executable at a space might have been incorrect,
36502     # since paths with space are more likely in Windows. Give it another try with the whole
36503     # argument.
36504     path="$complete"
36505     arguments="EOL"
36506     new_path=`$CYGPATH -u "$path"`
36507     new_path=`$WHICH "$new_path" 2> /dev/null`
36508     # bat and cmd files are not always considered executable in cygwin causing which
36509     # to not find them
36510     if test "x$new_path" = x \
36511         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36512         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36513       new_path=`$CYGPATH -u "$path"`
36514     fi
36515     if test "x$new_path" = x; then
36516       # It's still not found. Now this is an unrecoverable error.
36517       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36518 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36519       has_space=`$ECHO "$complete" | $GREP " "`
36520       if test "x$has_space" != x; then
36521         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36522 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36523       fi
36524       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36525     fi
36526   fi
36527 
36528   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36529   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36530   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36531   # "foo.exe" is OK but "foo" is an error.
36532   #
36533   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36534   # It is also a way to make sure we got the proper file name for the real test later on.
36535   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36536   if test "x$test_shortpath" = x; then
36537     # Short path failed, file does not exist as specified.
36538     # Try adding .exe or .cmd
36539     if test -f "${new_path}.exe"; then
36540       input_to_shortpath="${new_path}.exe"
36541     elif test -f "${new_path}.cmd"; then
36542       input_to_shortpath="${new_path}.cmd"
36543     else
36544       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36545 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36546       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36547 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36548       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36549     fi
36550   else
36551     input_to_shortpath="$new_path"
36552   fi
36553 
36554   # Call helper function which possibly converts this using DOS-style short mode.
36555   # If so, the updated path is stored in $new_path.
36556   new_path="$input_to_shortpath"
36557 
36558   input_path="$input_to_shortpath"
36559   # Check if we need to convert this using DOS-style short mode. If the path
36560   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36561   # take no chances and rewrite it.
36562   # Note: m4 eats our [], so we need to use [ and ] instead.
36563   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36564   if test "x$has_forbidden_chars" != x; then
36565     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36566     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36567     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36568     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36569       # Going to short mode and back again did indeed matter. Since short mode is
36570       # case insensitive, let's make it lowercase to improve readability.
36571       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36572       # Now convert it back to Unix-style (cygpath)
36573       input_path=`$CYGPATH -u "$shortmode_path"`
36574       new_path="$input_path"
36575     fi
36576   fi
36577 
36578   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36579   if test "x$test_cygdrive_prefix" = x; then
36580     # As a simple fix, exclude /usr/bin since it's not a real path.
36581     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36582       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36583       # a path prefixed by /cygdrive for fixpath to work.
36584       new_path="$CYGWIN_ROOT_PATH$input_path"
36585     fi
36586   fi
36587 
36588   # remove trailing .exe if any
36589   new_path="${new_path/%.exe/}"
36590 
36591   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36592 
36593   # First separate the path from the arguments. This will split at the first
36594   # space.
36595   complete="$STRIP"
36596   path="${complete%% *}"
36597   tmp="$complete EOL"
36598   arguments="${tmp#* }"
36599 
36600   # Input might be given as Windows format, start by converting to
36601   # unix format.
36602   new_path="$path"
36603 
36604   windows_path="$new_path"
36605   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36606     unix_path=`$CYGPATH -u "$windows_path"`
36607     new_path="$unix_path"
36608   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36609     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36610     new_path="$unix_path"
36611   fi
36612 
36613 
36614   # Now try to locate executable using which
36615   new_path=`$WHICH "$new_path" 2> /dev/null`
36616 
36617   if test "x$new_path" = x; then
36618     # Oops. Which didn't find the executable.
36619     # The splitting of arguments from the executable at a space might have been incorrect,
36620     # since paths with space are more likely in Windows. Give it another try with the whole
36621     # argument.
36622     path="$complete"
36623     arguments="EOL"
36624     new_path="$path"
36625 
36626   windows_path="$new_path"
36627   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36628     unix_path=`$CYGPATH -u "$windows_path"`
36629     new_path="$unix_path"
36630   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36631     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36632     new_path="$unix_path"
36633   fi
36634 
36635 
36636     new_path=`$WHICH "$new_path" 2> /dev/null`
36637     # bat and cmd files are not always considered executable in MSYS causing which
36638     # to not find them
36639     if test "x$new_path" = x \
36640         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36641         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36642       new_path="$path"
36643 
36644   windows_path="$new_path"
36645   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36646     unix_path=`$CYGPATH -u "$windows_path"`
36647     new_path="$unix_path"
36648   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36649     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36650     new_path="$unix_path"
36651   fi
36652 
36653     fi
36654 
36655     if test "x$new_path" = x; then
36656       # It's still not found. Now this is an unrecoverable error.
36657       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36658 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36659       has_space=`$ECHO "$complete" | $GREP " "`
36660       if test "x$has_space" != x; then
36661         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36662 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36663       fi
36664       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36665     fi
36666   fi
36667 
36668   # Now new_path has a complete unix path to the binary
36669   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36670     # Keep paths in /bin as-is, but remove trailing .exe if any
36671     new_path="${new_path/%.exe/}"
36672     # Do not save /bin paths to all_fixpath_prefixes!
36673   else
36674     # Not in mixed or Windows style, start by that.
36675     new_path=`cmd //c echo $new_path`
36676 
36677   input_path="$new_path"
36678   # Check if we need to convert this using DOS-style short mode. If the path
36679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36680   # take no chances and rewrite it.
36681   # Note: m4 eats our [], so we need to use [ and ] instead.
36682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36683   if test "x$has_forbidden_chars" != x; then
36684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36685     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36686   fi
36687 
36688     # Output is in $new_path
36689 
36690   windows_path="$new_path"
36691   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36692     unix_path=`$CYGPATH -u "$windows_path"`
36693     new_path="$unix_path"
36694   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36695     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36696     new_path="$unix_path"
36697   fi
36698 
36699     # remove trailing .exe if any
36700     new_path="${new_path/%.exe/}"
36701 
36702     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36703     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36704   fi
36705 
36706   else
36707     # We're on a posix platform. Hooray! :)
36708     # First separate the path from the arguments. This will split at the first
36709     # space.
36710     complete="$STRIP"
36711     path="${complete%% *}"
36712     tmp="$complete EOL"
36713     arguments="${tmp#* }"
36714 
36715     # Cannot rely on the command "which" here since it doesn't always work.
36716     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36717     if test -z "$is_absolute_path"; then
36718       # Path to executable is not absolute. Find it.
36719       IFS_save="$IFS"
36720       IFS=:
36721       for p in $PATH; do
36722         if test -f "$p/$path" && test -x "$p/$path"; then
36723           new_path="$p/$path"
36724           break
36725         fi
36726       done
36727       IFS="$IFS_save"
36728     else
36729       # This is an absolute path, we can use it without further modifications.
36730       new_path="$path"
36731     fi
36732 
36733     if test "x$new_path" = x; then
36734       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36735 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36736       has_space=`$ECHO "$complete" | $GREP " "`
36737       if test "x$has_space" != x; then
36738         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36739 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36740       fi
36741       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36742     fi
36743   fi
36744 
36745   # Now join together the path and the arguments once again
36746   if test "x$arguments" != xEOL; then
36747     new_complete="$new_path ${arguments% *}"
36748   else
36749     new_complete="$new_path"
36750   fi
36751 
36752   if test "x$complete" != "x$new_complete"; then
36753     STRIP="$new_complete"
36754     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36755 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36756   fi
36757 
36758     # Extract the first word of "otool", so it can be a program name with args.
36759 set dummy otool; ac_word=$2
36760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36761 $as_echo_n "checking for $ac_word... " >&6; }
36762 if ${ac_cv_path_OTOOL+:} false; then :
36763   $as_echo_n "(cached) " >&6
36764 else
36765   case $OTOOL in
36766   [\\/]* | ?:[\\/]*)
36767   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
36768   ;;
36769   *)
36770   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36771 for as_dir in $PATH
36772 do
36773   IFS=$as_save_IFS
36774   test -z "$as_dir" && as_dir=.
36775     for ac_exec_ext in '' $ac_executable_extensions; do
36776   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36777     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
36778     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36779     break 2
36780   fi
36781 done
36782   done
36783 IFS=$as_save_IFS
36784 
36785   ;;
36786 esac
36787 fi
36788 OTOOL=$ac_cv_path_OTOOL
36789 if test -n "$OTOOL"; then
36790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
36791 $as_echo "$OTOOL" >&6; }
36792 else
36793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36794 $as_echo "no" >&6; }
36795 fi
36796 
36797 
36798     if test "x$OTOOL" = "x"; then
36799       OTOOL="true"
36800     fi
36801 
36802 
36803   # Publish this variable in the help.
36804 
36805 
36806   if test "x$NM" = x; then
36807     # The variable is not set by user, try to locate tool using the code snippet
36808     if test -n "$ac_tool_prefix"; then
36809   for ac_prog in nm
36810   do
36811     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36812 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36814 $as_echo_n "checking for $ac_word... " >&6; }
36815 if ${ac_cv_prog_NM+:} false; then :
36816   $as_echo_n "(cached) " >&6
36817 else
36818   if test -n "$NM"; then
36819   ac_cv_prog_NM="$NM" # Let the user override the test.
36820 else
36821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36822 for as_dir in $PATH
36823 do
36824   IFS=$as_save_IFS
36825   test -z "$as_dir" && as_dir=.
36826     for ac_exec_ext in '' $ac_executable_extensions; do
36827   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36828     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
36829     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36830     break 2
36831   fi
36832 done
36833   done
36834 IFS=$as_save_IFS
36835 
36836 fi
36837 fi
36838 NM=$ac_cv_prog_NM
36839 if test -n "$NM"; then
36840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36841 $as_echo "$NM" >&6; }
36842 else
36843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36844 $as_echo "no" >&6; }
36845 fi
36846 
36847 
36848     test -n "$NM" && break
36849   done
36850 fi
36851 if test -z "$NM"; then
36852   ac_ct_NM=$NM
36853   for ac_prog in nm
36854 do
36855   # Extract the first word of "$ac_prog", so it can be a program name with args.
36856 set dummy $ac_prog; ac_word=$2
36857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36858 $as_echo_n "checking for $ac_word... " >&6; }
36859 if ${ac_cv_prog_ac_ct_NM+:} false; then :
36860   $as_echo_n "(cached) " >&6
36861 else
36862   if test -n "$ac_ct_NM"; then
36863   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
36864 else
36865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36866 for as_dir in $PATH
36867 do
36868   IFS=$as_save_IFS
36869   test -z "$as_dir" && as_dir=.
36870     for ac_exec_ext in '' $ac_executable_extensions; do
36871   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36872     ac_cv_prog_ac_ct_NM="$ac_prog"
36873     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36874     break 2
36875   fi
36876 done
36877   done
36878 IFS=$as_save_IFS
36879 
36880 fi
36881 fi
36882 ac_ct_NM=$ac_cv_prog_ac_ct_NM
36883 if test -n "$ac_ct_NM"; then
36884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
36885 $as_echo "$ac_ct_NM" >&6; }
36886 else
36887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36888 $as_echo "no" >&6; }
36889 fi
36890 
36891 
36892   test -n "$ac_ct_NM" && break
36893 done
36894 
36895   if test "x$ac_ct_NM" = x; then
36896     NM=""
36897   else
36898     case $cross_compiling:$ac_tool_warned in
36899 yes:)
36900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36901 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36902 ac_tool_warned=yes ;;
36903 esac
36904     NM=$ac_ct_NM
36905   fi
36906 fi
36907 
36908   else
36909     # The variable is set, but is it from the command line or the environment?
36910 
36911     # Try to remove the string !NM! from our list.
36912     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36913     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36914       # If it failed, the variable was not from the command line. Ignore it,
36915       # but warn the user (except for BASH, which is always set by the calling BASH).
36916       if test "xNM" != xBASH; then
36917         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36918 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36919       fi
36920       # Try to locate tool using the code snippet
36921       if test -n "$ac_tool_prefix"; then
36922   for ac_prog in nm
36923   do
36924     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36925 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36927 $as_echo_n "checking for $ac_word... " >&6; }
36928 if ${ac_cv_prog_NM+:} false; then :
36929   $as_echo_n "(cached) " >&6
36930 else
36931   if test -n "$NM"; then
36932   ac_cv_prog_NM="$NM" # Let the user override the test.
36933 else
36934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36935 for as_dir in $PATH
36936 do
36937   IFS=$as_save_IFS
36938   test -z "$as_dir" && as_dir=.
36939     for ac_exec_ext in '' $ac_executable_extensions; do
36940   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36941     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
36942     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36943     break 2
36944   fi
36945 done
36946   done
36947 IFS=$as_save_IFS
36948 
36949 fi
36950 fi
36951 NM=$ac_cv_prog_NM
36952 if test -n "$NM"; then
36953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36954 $as_echo "$NM" >&6; }
36955 else
36956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36957 $as_echo "no" >&6; }
36958 fi
36959 
36960 
36961     test -n "$NM" && break
36962   done
36963 fi
36964 if test -z "$NM"; then
36965   ac_ct_NM=$NM
36966   for ac_prog in nm
36967 do
36968   # Extract the first word of "$ac_prog", so it can be a program name with args.
36969 set dummy $ac_prog; ac_word=$2
36970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36971 $as_echo_n "checking for $ac_word... " >&6; }
36972 if ${ac_cv_prog_ac_ct_NM+:} false; then :
36973   $as_echo_n "(cached) " >&6
36974 else
36975   if test -n "$ac_ct_NM"; then
36976   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
36977 else
36978 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36979 for as_dir in $PATH
36980 do
36981   IFS=$as_save_IFS
36982   test -z "$as_dir" && as_dir=.
36983     for ac_exec_ext in '' $ac_executable_extensions; do
36984   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36985     ac_cv_prog_ac_ct_NM="$ac_prog"
36986     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36987     break 2
36988   fi
36989 done
36990   done
36991 IFS=$as_save_IFS
36992 
36993 fi
36994 fi
36995 ac_ct_NM=$ac_cv_prog_ac_ct_NM
36996 if test -n "$ac_ct_NM"; then
36997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
36998 $as_echo "$ac_ct_NM" >&6; }
36999 else
37000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37001 $as_echo "no" >&6; }
37002 fi
37003 
37004 
37005   test -n "$ac_ct_NM" && break
37006 done
37007 
37008   if test "x$ac_ct_NM" = x; then
37009     NM=""
37010   else
37011     case $cross_compiling:$ac_tool_warned in
37012 yes:)
37013 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37014 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37015 ac_tool_warned=yes ;;
37016 esac
37017     NM=$ac_ct_NM
37018   fi
37019 fi
37020 
37021     else
37022       # If it succeeded, then it was overridden by the user. We will use it
37023       # for the tool.
37024 
37025       # First remove it from the list of overridden variables, so we can test
37026       # for unknown variables in the end.
37027       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37028 
37029       # Check if the provided tool contains a complete path.
37030       tool_specified="$NM"
37031       tool_basename="${tool_specified##*/}"
37032       if test "x$tool_basename" = "x$tool_specified"; then
37033         # A command without a complete path is provided, search $PATH.
37034         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37035 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37036         # Extract the first word of "$tool_basename", so it can be a program name with args.
37037 set dummy $tool_basename; ac_word=$2
37038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37039 $as_echo_n "checking for $ac_word... " >&6; }
37040 if ${ac_cv_path_NM+:} false; then :
37041   $as_echo_n "(cached) " >&6
37042 else
37043   case $NM in
37044   [\\/]* | ?:[\\/]*)
37045   ac_cv_path_NM="$NM" # Let the user override the test with a path.
37046   ;;
37047   *)
37048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37049 for as_dir in $PATH
37050 do
37051   IFS=$as_save_IFS
37052   test -z "$as_dir" && as_dir=.
37053     for ac_exec_ext in '' $ac_executable_extensions; do
37054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37055     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37057     break 2
37058   fi
37059 done
37060   done
37061 IFS=$as_save_IFS
37062 
37063   ;;
37064 esac
37065 fi
37066 NM=$ac_cv_path_NM
37067 if test -n "$NM"; then
37068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37069 $as_echo "$NM" >&6; }
37070 else
37071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37072 $as_echo "no" >&6; }
37073 fi
37074 
37075 
37076         if test "x$NM" = x; then
37077           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37078         fi
37079       else
37080         # Otherwise we believe it is a complete path. Use it as it is.
37081         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37082 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37083         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37084 $as_echo_n "checking for NM... " >&6; }
37085         if test ! -x "$tool_specified"; then
37086           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37087 $as_echo "not found" >&6; }
37088           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37089         fi
37090         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37091 $as_echo "$tool_specified" >&6; }
37092       fi
37093     fi
37094   fi
37095 
37096 
37097 
37098   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37099 
37100   # First separate the path from the arguments. This will split at the first
37101   # space.
37102   complete="$NM"
37103   path="${complete%% *}"
37104   tmp="$complete EOL"
37105   arguments="${tmp#* }"
37106 
37107   # Input might be given as Windows format, start by converting to
37108   # unix format.
37109   new_path=`$CYGPATH -u "$path"`
37110 
37111   # Now try to locate executable using which
37112   new_path=`$WHICH "$new_path" 2> /dev/null`
37113   # bat and cmd files are not always considered executable in cygwin causing which
37114   # to not find them
37115   if test "x$new_path" = x \
37116       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37117       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37118     new_path=`$CYGPATH -u "$path"`
37119   fi
37120   if test "x$new_path" = x; then
37121     # Oops. Which didn't find the executable.
37122     # The splitting of arguments from the executable at a space might have been incorrect,
37123     # since paths with space are more likely in Windows. Give it another try with the whole
37124     # argument.
37125     path="$complete"
37126     arguments="EOL"
37127     new_path=`$CYGPATH -u "$path"`
37128     new_path=`$WHICH "$new_path" 2> /dev/null`
37129     # bat and cmd files are not always considered executable in cygwin causing which
37130     # to not find them
37131     if test "x$new_path" = x \
37132         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37133         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37134       new_path=`$CYGPATH -u "$path"`
37135     fi
37136     if test "x$new_path" = x; then
37137       # It's still not found. Now this is an unrecoverable error.
37138       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37139 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37140       has_space=`$ECHO "$complete" | $GREP " "`
37141       if test "x$has_space" != x; then
37142         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37143 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37144       fi
37145       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37146     fi
37147   fi
37148 
37149   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37150   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37151   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37152   # "foo.exe" is OK but "foo" is an error.
37153   #
37154   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37155   # It is also a way to make sure we got the proper file name for the real test later on.
37156   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37157   if test "x$test_shortpath" = x; then
37158     # Short path failed, file does not exist as specified.
37159     # Try adding .exe or .cmd
37160     if test -f "${new_path}.exe"; then
37161       input_to_shortpath="${new_path}.exe"
37162     elif test -f "${new_path}.cmd"; then
37163       input_to_shortpath="${new_path}.cmd"
37164     else
37165       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37166 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37167       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37168 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37169       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37170     fi
37171   else
37172     input_to_shortpath="$new_path"
37173   fi
37174 
37175   # Call helper function which possibly converts this using DOS-style short mode.
37176   # If so, the updated path is stored in $new_path.
37177   new_path="$input_to_shortpath"
37178 
37179   input_path="$input_to_shortpath"
37180   # Check if we need to convert this using DOS-style short mode. If the path
37181   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37182   # take no chances and rewrite it.
37183   # Note: m4 eats our [], so we need to use [ and ] instead.
37184   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37185   if test "x$has_forbidden_chars" != x; then
37186     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37187     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37188     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37189     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37190       # Going to short mode and back again did indeed matter. Since short mode is
37191       # case insensitive, let's make it lowercase to improve readability.
37192       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37193       # Now convert it back to Unix-style (cygpath)
37194       input_path=`$CYGPATH -u "$shortmode_path"`
37195       new_path="$input_path"
37196     fi
37197   fi
37198 
37199   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37200   if test "x$test_cygdrive_prefix" = x; then
37201     # As a simple fix, exclude /usr/bin since it's not a real path.
37202     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37203       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37204       # a path prefixed by /cygdrive for fixpath to work.
37205       new_path="$CYGWIN_ROOT_PATH$input_path"
37206     fi
37207   fi
37208 
37209   # remove trailing .exe if any
37210   new_path="${new_path/%.exe/}"
37211 
37212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37213 
37214   # First separate the path from the arguments. This will split at the first
37215   # space.
37216   complete="$NM"
37217   path="${complete%% *}"
37218   tmp="$complete EOL"
37219   arguments="${tmp#* }"
37220 
37221   # Input might be given as Windows format, start by converting to
37222   # unix format.
37223   new_path="$path"
37224 
37225   windows_path="$new_path"
37226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37227     unix_path=`$CYGPATH -u "$windows_path"`
37228     new_path="$unix_path"
37229   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37230     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37231     new_path="$unix_path"
37232   fi
37233 
37234 
37235   # Now try to locate executable using which
37236   new_path=`$WHICH "$new_path" 2> /dev/null`
37237 
37238   if test "x$new_path" = x; then
37239     # Oops. Which didn't find the executable.
37240     # The splitting of arguments from the executable at a space might have been incorrect,
37241     # since paths with space are more likely in Windows. Give it another try with the whole
37242     # argument.
37243     path="$complete"
37244     arguments="EOL"
37245     new_path="$path"
37246 
37247   windows_path="$new_path"
37248   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37249     unix_path=`$CYGPATH -u "$windows_path"`
37250     new_path="$unix_path"
37251   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37252     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37253     new_path="$unix_path"
37254   fi
37255 
37256 
37257     new_path=`$WHICH "$new_path" 2> /dev/null`
37258     # bat and cmd files are not always considered executable in MSYS causing which
37259     # to not find them
37260     if test "x$new_path" = x \
37261         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37262         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37263       new_path="$path"
37264 
37265   windows_path="$new_path"
37266   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37267     unix_path=`$CYGPATH -u "$windows_path"`
37268     new_path="$unix_path"
37269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37270     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37271     new_path="$unix_path"
37272   fi
37273 
37274     fi
37275 
37276     if test "x$new_path" = x; then
37277       # It's still not found. Now this is an unrecoverable error.
37278       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37279 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37280       has_space=`$ECHO "$complete" | $GREP " "`
37281       if test "x$has_space" != x; then
37282         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37283 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37284       fi
37285       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37286     fi
37287   fi
37288 
37289   # Now new_path has a complete unix path to the binary
37290   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37291     # Keep paths in /bin as-is, but remove trailing .exe if any
37292     new_path="${new_path/%.exe/}"
37293     # Do not save /bin paths to all_fixpath_prefixes!
37294   else
37295     # Not in mixed or Windows style, start by that.
37296     new_path=`cmd //c echo $new_path`
37297 
37298   input_path="$new_path"
37299   # Check if we need to convert this using DOS-style short mode. If the path
37300   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37301   # take no chances and rewrite it.
37302   # Note: m4 eats our [], so we need to use [ and ] instead.
37303   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37304   if test "x$has_forbidden_chars" != x; then
37305     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37306     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37307   fi
37308 
37309     # Output is in $new_path
37310 
37311   windows_path="$new_path"
37312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37313     unix_path=`$CYGPATH -u "$windows_path"`
37314     new_path="$unix_path"
37315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37316     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37317     new_path="$unix_path"
37318   fi
37319 
37320     # remove trailing .exe if any
37321     new_path="${new_path/%.exe/}"
37322 
37323     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37324     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37325   fi
37326 
37327   else
37328     # We're on a posix platform. Hooray! :)
37329     # First separate the path from the arguments. This will split at the first
37330     # space.
37331     complete="$NM"
37332     path="${complete%% *}"
37333     tmp="$complete EOL"
37334     arguments="${tmp#* }"
37335 
37336     # Cannot rely on the command "which" here since it doesn't always work.
37337     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37338     if test -z "$is_absolute_path"; then
37339       # Path to executable is not absolute. Find it.
37340       IFS_save="$IFS"
37341       IFS=:
37342       for p in $PATH; do
37343         if test -f "$p/$path" && test -x "$p/$path"; then
37344           new_path="$p/$path"
37345           break
37346         fi
37347       done
37348       IFS="$IFS_save"
37349     else
37350       # This is an absolute path, we can use it without further modifications.
37351       new_path="$path"
37352     fi
37353 
37354     if test "x$new_path" = x; then
37355       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37356 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37357       has_space=`$ECHO "$complete" | $GREP " "`
37358       if test "x$has_space" != x; then
37359         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37360 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37361       fi
37362       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37363     fi
37364   fi
37365 
37366   # Now join together the path and the arguments once again
37367   if test "x$arguments" != xEOL; then
37368     new_complete="$new_path ${arguments% *}"
37369   else
37370     new_complete="$new_path"
37371   fi
37372 
37373   if test "x$complete" != "x$new_complete"; then
37374     NM="$new_complete"
37375     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37376 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37377   fi
37378 
37379     GNM="$NM"
37380 
37381   fi
37382 
37383   # objcopy is used for moving debug symbols to separate files when
37384   # full debug symbols are enabled.
37385   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37386 
37387 
37388   # Publish this variable in the help.
37389 
37390 
37391   if test "x$OBJCOPY" = x; then
37392     # The variable is not set by user, try to locate tool using the code snippet
37393     if test -n "$ac_tool_prefix"; then
37394   for ac_prog in gobjcopy objcopy
37395   do
37396     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37397 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37399 $as_echo_n "checking for $ac_word... " >&6; }
37400 if ${ac_cv_prog_OBJCOPY+:} false; then :
37401   $as_echo_n "(cached) " >&6
37402 else
37403   if test -n "$OBJCOPY"; then
37404   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37405 else
37406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37407 for as_dir in $PATH
37408 do
37409   IFS=$as_save_IFS
37410   test -z "$as_dir" && as_dir=.
37411     for ac_exec_ext in '' $ac_executable_extensions; do
37412   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37413     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37414     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37415     break 2
37416   fi
37417 done
37418   done
37419 IFS=$as_save_IFS
37420 
37421 fi
37422 fi
37423 OBJCOPY=$ac_cv_prog_OBJCOPY
37424 if test -n "$OBJCOPY"; then
37425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37426 $as_echo "$OBJCOPY" >&6; }
37427 else
37428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37429 $as_echo "no" >&6; }
37430 fi
37431 
37432 
37433     test -n "$OBJCOPY" && break
37434   done
37435 fi
37436 if test -z "$OBJCOPY"; then
37437   ac_ct_OBJCOPY=$OBJCOPY
37438   for ac_prog in gobjcopy objcopy
37439 do
37440   # Extract the first word of "$ac_prog", so it can be a program name with args.
37441 set dummy $ac_prog; ac_word=$2
37442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37443 $as_echo_n "checking for $ac_word... " >&6; }
37444 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37445   $as_echo_n "(cached) " >&6
37446 else
37447   if test -n "$ac_ct_OBJCOPY"; then
37448   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37449 else
37450 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37451 for as_dir in $PATH
37452 do
37453   IFS=$as_save_IFS
37454   test -z "$as_dir" && as_dir=.
37455     for ac_exec_ext in '' $ac_executable_extensions; do
37456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37457     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37459     break 2
37460   fi
37461 done
37462   done
37463 IFS=$as_save_IFS
37464 
37465 fi
37466 fi
37467 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37468 if test -n "$ac_ct_OBJCOPY"; then
37469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37470 $as_echo "$ac_ct_OBJCOPY" >&6; }
37471 else
37472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37473 $as_echo "no" >&6; }
37474 fi
37475 
37476 
37477   test -n "$ac_ct_OBJCOPY" && break
37478 done
37479 
37480   if test "x$ac_ct_OBJCOPY" = x; then
37481     OBJCOPY=""
37482   else
37483     case $cross_compiling:$ac_tool_warned in
37484 yes:)
37485 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37486 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37487 ac_tool_warned=yes ;;
37488 esac
37489     OBJCOPY=$ac_ct_OBJCOPY
37490   fi
37491 fi
37492 
37493   else
37494     # The variable is set, but is it from the command line or the environment?
37495 
37496     # Try to remove the string !OBJCOPY! from our list.
37497     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37498     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37499       # If it failed, the variable was not from the command line. Ignore it,
37500       # but warn the user (except for BASH, which is always set by the calling BASH).
37501       if test "xOBJCOPY" != xBASH; then
37502         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37503 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37504       fi
37505       # Try to locate tool using the code snippet
37506       if test -n "$ac_tool_prefix"; then
37507   for ac_prog in gobjcopy objcopy
37508   do
37509     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37510 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37512 $as_echo_n "checking for $ac_word... " >&6; }
37513 if ${ac_cv_prog_OBJCOPY+:} false; then :
37514   $as_echo_n "(cached) " >&6
37515 else
37516   if test -n "$OBJCOPY"; then
37517   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37518 else
37519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37520 for as_dir in $PATH
37521 do
37522   IFS=$as_save_IFS
37523   test -z "$as_dir" && as_dir=.
37524     for ac_exec_ext in '' $ac_executable_extensions; do
37525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37526     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37528     break 2
37529   fi
37530 done
37531   done
37532 IFS=$as_save_IFS
37533 
37534 fi
37535 fi
37536 OBJCOPY=$ac_cv_prog_OBJCOPY
37537 if test -n "$OBJCOPY"; then
37538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37539 $as_echo "$OBJCOPY" >&6; }
37540 else
37541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37542 $as_echo "no" >&6; }
37543 fi
37544 
37545 
37546     test -n "$OBJCOPY" && break
37547   done
37548 fi
37549 if test -z "$OBJCOPY"; then
37550   ac_ct_OBJCOPY=$OBJCOPY
37551   for ac_prog in gobjcopy objcopy
37552 do
37553   # Extract the first word of "$ac_prog", so it can be a program name with args.
37554 set dummy $ac_prog; ac_word=$2
37555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37556 $as_echo_n "checking for $ac_word... " >&6; }
37557 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37558   $as_echo_n "(cached) " >&6
37559 else
37560   if test -n "$ac_ct_OBJCOPY"; then
37561   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37562 else
37563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37564 for as_dir in $PATH
37565 do
37566   IFS=$as_save_IFS
37567   test -z "$as_dir" && as_dir=.
37568     for ac_exec_ext in '' $ac_executable_extensions; do
37569   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37570     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37572     break 2
37573   fi
37574 done
37575   done
37576 IFS=$as_save_IFS
37577 
37578 fi
37579 fi
37580 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37581 if test -n "$ac_ct_OBJCOPY"; then
37582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37583 $as_echo "$ac_ct_OBJCOPY" >&6; }
37584 else
37585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37586 $as_echo "no" >&6; }
37587 fi
37588 
37589 
37590   test -n "$ac_ct_OBJCOPY" && break
37591 done
37592 
37593   if test "x$ac_ct_OBJCOPY" = x; then
37594     OBJCOPY=""
37595   else
37596     case $cross_compiling:$ac_tool_warned in
37597 yes:)
37598 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37599 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37600 ac_tool_warned=yes ;;
37601 esac
37602     OBJCOPY=$ac_ct_OBJCOPY
37603   fi
37604 fi
37605 
37606     else
37607       # If it succeeded, then it was overridden by the user. We will use it
37608       # for the tool.
37609 
37610       # First remove it from the list of overridden variables, so we can test
37611       # for unknown variables in the end.
37612       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37613 
37614       # Check if the provided tool contains a complete path.
37615       tool_specified="$OBJCOPY"
37616       tool_basename="${tool_specified##*/}"
37617       if test "x$tool_basename" = "x$tool_specified"; then
37618         # A command without a complete path is provided, search $PATH.
37619         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37620 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37621         # Extract the first word of "$tool_basename", so it can be a program name with args.
37622 set dummy $tool_basename; ac_word=$2
37623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37624 $as_echo_n "checking for $ac_word... " >&6; }
37625 if ${ac_cv_path_OBJCOPY+:} false; then :
37626   $as_echo_n "(cached) " >&6
37627 else
37628   case $OBJCOPY in
37629   [\\/]* | ?:[\\/]*)
37630   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37631   ;;
37632   *)
37633   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37634 for as_dir in $PATH
37635 do
37636   IFS=$as_save_IFS
37637   test -z "$as_dir" && as_dir=.
37638     for ac_exec_ext in '' $ac_executable_extensions; do
37639   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37640     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37641     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37642     break 2
37643   fi
37644 done
37645   done
37646 IFS=$as_save_IFS
37647 
37648   ;;
37649 esac
37650 fi
37651 OBJCOPY=$ac_cv_path_OBJCOPY
37652 if test -n "$OBJCOPY"; then
37653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37654 $as_echo "$OBJCOPY" >&6; }
37655 else
37656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37657 $as_echo "no" >&6; }
37658 fi
37659 
37660 
37661         if test "x$OBJCOPY" = x; then
37662           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37663         fi
37664       else
37665         # Otherwise we believe it is a complete path. Use it as it is.
37666         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37667 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37668         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37669 $as_echo_n "checking for OBJCOPY... " >&6; }
37670         if test ! -x "$tool_specified"; then
37671           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37672 $as_echo "not found" >&6; }
37673           as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37674         fi
37675         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37676 $as_echo "$tool_specified" >&6; }
37677       fi
37678     fi
37679   fi
37680 
37681 
37682     # Only call fixup if objcopy was found.
37683     if test -n "$OBJCOPY"; then
37684 
37685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37686 
37687   # First separate the path from the arguments. This will split at the first
37688   # space.
37689   complete="$OBJCOPY"
37690   path="${complete%% *}"
37691   tmp="$complete EOL"
37692   arguments="${tmp#* }"
37693 
37694   # Input might be given as Windows format, start by converting to
37695   # unix format.
37696   new_path=`$CYGPATH -u "$path"`
37697 
37698   # Now try to locate executable using which
37699   new_path=`$WHICH "$new_path" 2> /dev/null`
37700   # bat and cmd files are not always considered executable in cygwin causing which
37701   # to not find them
37702   if test "x$new_path" = x \
37703       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37704       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37705     new_path=`$CYGPATH -u "$path"`
37706   fi
37707   if test "x$new_path" = x; then
37708     # Oops. Which didn't find the executable.
37709     # The splitting of arguments from the executable at a space might have been incorrect,
37710     # since paths with space are more likely in Windows. Give it another try with the whole
37711     # argument.
37712     path="$complete"
37713     arguments="EOL"
37714     new_path=`$CYGPATH -u "$path"`
37715     new_path=`$WHICH "$new_path" 2> /dev/null`
37716     # bat and cmd files are not always considered executable in cygwin causing which
37717     # to not find them
37718     if test "x$new_path" = x \
37719         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37720         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37721       new_path=`$CYGPATH -u "$path"`
37722     fi
37723     if test "x$new_path" = x; then
37724       # It's still not found. Now this is an unrecoverable error.
37725       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37726 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37727       has_space=`$ECHO "$complete" | $GREP " "`
37728       if test "x$has_space" != x; then
37729         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37730 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37731       fi
37732       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37733     fi
37734   fi
37735 
37736   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37737   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37738   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37739   # "foo.exe" is OK but "foo" is an error.
37740   #
37741   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37742   # It is also a way to make sure we got the proper file name for the real test later on.
37743   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37744   if test "x$test_shortpath" = x; then
37745     # Short path failed, file does not exist as specified.
37746     # Try adding .exe or .cmd
37747     if test -f "${new_path}.exe"; then
37748       input_to_shortpath="${new_path}.exe"
37749     elif test -f "${new_path}.cmd"; then
37750       input_to_shortpath="${new_path}.cmd"
37751     else
37752       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
37753 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
37754       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37755 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37756       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37757     fi
37758   else
37759     input_to_shortpath="$new_path"
37760   fi
37761 
37762   # Call helper function which possibly converts this using DOS-style short mode.
37763   # If so, the updated path is stored in $new_path.
37764   new_path="$input_to_shortpath"
37765 
37766   input_path="$input_to_shortpath"
37767   # Check if we need to convert this using DOS-style short mode. If the path
37768   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37769   # take no chances and rewrite it.
37770   # Note: m4 eats our [], so we need to use [ and ] instead.
37771   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37772   if test "x$has_forbidden_chars" != x; then
37773     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37774     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37775     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37776     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37777       # Going to short mode and back again did indeed matter. Since short mode is
37778       # case insensitive, let's make it lowercase to improve readability.
37779       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37780       # Now convert it back to Unix-style (cygpath)
37781       input_path=`$CYGPATH -u "$shortmode_path"`
37782       new_path="$input_path"
37783     fi
37784   fi
37785 
37786   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37787   if test "x$test_cygdrive_prefix" = x; then
37788     # As a simple fix, exclude /usr/bin since it's not a real path.
37789     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37790       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37791       # a path prefixed by /cygdrive for fixpath to work.
37792       new_path="$CYGWIN_ROOT_PATH$input_path"
37793     fi
37794   fi
37795 
37796   # remove trailing .exe if any
37797   new_path="${new_path/%.exe/}"
37798 
37799   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37800 
37801   # First separate the path from the arguments. This will split at the first
37802   # space.
37803   complete="$OBJCOPY"
37804   path="${complete%% *}"
37805   tmp="$complete EOL"
37806   arguments="${tmp#* }"
37807 
37808   # Input might be given as Windows format, start by converting to
37809   # unix format.
37810   new_path="$path"
37811 
37812   windows_path="$new_path"
37813   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37814     unix_path=`$CYGPATH -u "$windows_path"`
37815     new_path="$unix_path"
37816   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37817     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37818     new_path="$unix_path"
37819   fi
37820 
37821 
37822   # Now try to locate executable using which
37823   new_path=`$WHICH "$new_path" 2> /dev/null`
37824 
37825   if test "x$new_path" = x; then
37826     # Oops. Which didn't find the executable.
37827     # The splitting of arguments from the executable at a space might have been incorrect,
37828     # since paths with space are more likely in Windows. Give it another try with the whole
37829     # argument.
37830     path="$complete"
37831     arguments="EOL"
37832     new_path="$path"
37833 
37834   windows_path="$new_path"
37835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37836     unix_path=`$CYGPATH -u "$windows_path"`
37837     new_path="$unix_path"
37838   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37839     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37840     new_path="$unix_path"
37841   fi
37842 
37843 
37844     new_path=`$WHICH "$new_path" 2> /dev/null`
37845     # bat and cmd files are not always considered executable in MSYS causing which
37846     # to not find them
37847     if test "x$new_path" = x \
37848         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37849         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37850       new_path="$path"
37851 
37852   windows_path="$new_path"
37853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37854     unix_path=`$CYGPATH -u "$windows_path"`
37855     new_path="$unix_path"
37856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37857     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37858     new_path="$unix_path"
37859   fi
37860 
37861     fi
37862 
37863     if test "x$new_path" = x; then
37864       # It's still not found. Now this is an unrecoverable error.
37865       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37866 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37867       has_space=`$ECHO "$complete" | $GREP " "`
37868       if test "x$has_space" != x; then
37869         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37870 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37871       fi
37872       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37873     fi
37874   fi
37875 
37876   # Now new_path has a complete unix path to the binary
37877   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37878     # Keep paths in /bin as-is, but remove trailing .exe if any
37879     new_path="${new_path/%.exe/}"
37880     # Do not save /bin paths to all_fixpath_prefixes!
37881   else
37882     # Not in mixed or Windows style, start by that.
37883     new_path=`cmd //c echo $new_path`
37884 
37885   input_path="$new_path"
37886   # Check if we need to convert this using DOS-style short mode. If the path
37887   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37888   # take no chances and rewrite it.
37889   # Note: m4 eats our [], so we need to use [ and ] instead.
37890   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37891   if test "x$has_forbidden_chars" != x; then
37892     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37893     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37894   fi
37895 
37896     # Output is in $new_path
37897 
37898   windows_path="$new_path"
37899   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37900     unix_path=`$CYGPATH -u "$windows_path"`
37901     new_path="$unix_path"
37902   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37903     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37904     new_path="$unix_path"
37905   fi
37906 
37907     # remove trailing .exe if any
37908     new_path="${new_path/%.exe/}"
37909 
37910     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37911     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37912   fi
37913 
37914   else
37915     # We're on a posix platform. Hooray! :)
37916     # First separate the path from the arguments. This will split at the first
37917     # space.
37918     complete="$OBJCOPY"
37919     path="${complete%% *}"
37920     tmp="$complete EOL"
37921     arguments="${tmp#* }"
37922 
37923     # Cannot rely on the command "which" here since it doesn't always work.
37924     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37925     if test -z "$is_absolute_path"; then
37926       # Path to executable is not absolute. Find it.
37927       IFS_save="$IFS"
37928       IFS=:
37929       for p in $PATH; do
37930         if test -f "$p/$path" && test -x "$p/$path"; then
37931           new_path="$p/$path"
37932           break
37933         fi
37934       done
37935       IFS="$IFS_save"
37936     else
37937       # This is an absolute path, we can use it without further modifications.
37938       new_path="$path"
37939     fi
37940 
37941     if test "x$new_path" = x; then
37942       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37943 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37944       has_space=`$ECHO "$complete" | $GREP " "`
37945       if test "x$has_space" != x; then
37946         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37947 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37948       fi
37949       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37950     fi
37951   fi
37952 
37953   # Now join together the path and the arguments once again
37954   if test "x$arguments" != xEOL; then
37955     new_complete="$new_path ${arguments% *}"
37956   else
37957     new_complete="$new_path"
37958   fi
37959 
37960   if test "x$complete" != "x$new_complete"; then
37961     OBJCOPY="$new_complete"
37962     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
37963 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
37964   fi
37965 
37966     fi
37967   fi
37968 
37969 
37970 
37971   # Publish this variable in the help.
37972 
37973 
37974   if test "x$OBJDUMP" = x; then
37975     # The variable is not set by user, try to locate tool using the code snippet
37976     if test -n "$ac_tool_prefix"; then
37977   for ac_prog in gobjdump objdump
37978   do
37979     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37980 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37982 $as_echo_n "checking for $ac_word... " >&6; }
37983 if ${ac_cv_prog_OBJDUMP+:} false; then :
37984   $as_echo_n "(cached) " >&6
37985 else
37986   if test -n "$OBJDUMP"; then
37987   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
37988 else
37989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37990 for as_dir in $PATH
37991 do
37992   IFS=$as_save_IFS
37993   test -z "$as_dir" && as_dir=.
37994     for ac_exec_ext in '' $ac_executable_extensions; do
37995   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37996     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
37997     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37998     break 2
37999   fi
38000 done
38001   done
38002 IFS=$as_save_IFS
38003 
38004 fi
38005 fi
38006 OBJDUMP=$ac_cv_prog_OBJDUMP
38007 if test -n "$OBJDUMP"; then
38008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38009 $as_echo "$OBJDUMP" >&6; }
38010 else
38011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38012 $as_echo "no" >&6; }
38013 fi
38014 
38015 
38016     test -n "$OBJDUMP" && break
38017   done
38018 fi
38019 if test -z "$OBJDUMP"; then
38020   ac_ct_OBJDUMP=$OBJDUMP
38021   for ac_prog in gobjdump objdump
38022 do
38023   # Extract the first word of "$ac_prog", so it can be a program name with args.
38024 set dummy $ac_prog; ac_word=$2
38025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38026 $as_echo_n "checking for $ac_word... " >&6; }
38027 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38028   $as_echo_n "(cached) " >&6
38029 else
38030   if test -n "$ac_ct_OBJDUMP"; then
38031   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38032 else
38033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38034 for as_dir in $PATH
38035 do
38036   IFS=$as_save_IFS
38037   test -z "$as_dir" && as_dir=.
38038     for ac_exec_ext in '' $ac_executable_extensions; do
38039   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38040     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38042     break 2
38043   fi
38044 done
38045   done
38046 IFS=$as_save_IFS
38047 
38048 fi
38049 fi
38050 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38051 if test -n "$ac_ct_OBJDUMP"; then
38052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38053 $as_echo "$ac_ct_OBJDUMP" >&6; }
38054 else
38055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38056 $as_echo "no" >&6; }
38057 fi
38058 
38059 
38060   test -n "$ac_ct_OBJDUMP" && break
38061 done
38062 
38063   if test "x$ac_ct_OBJDUMP" = x; then
38064     OBJDUMP=""
38065   else
38066     case $cross_compiling:$ac_tool_warned in
38067 yes:)
38068 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38069 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38070 ac_tool_warned=yes ;;
38071 esac
38072     OBJDUMP=$ac_ct_OBJDUMP
38073   fi
38074 fi
38075 
38076   else
38077     # The variable is set, but is it from the command line or the environment?
38078 
38079     # Try to remove the string !OBJDUMP! from our list.
38080     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38081     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38082       # If it failed, the variable was not from the command line. Ignore it,
38083       # but warn the user (except for BASH, which is always set by the calling BASH).
38084       if test "xOBJDUMP" != xBASH; then
38085         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38086 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38087       fi
38088       # Try to locate tool using the code snippet
38089       if test -n "$ac_tool_prefix"; then
38090   for ac_prog in gobjdump objdump
38091   do
38092     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38093 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38095 $as_echo_n "checking for $ac_word... " >&6; }
38096 if ${ac_cv_prog_OBJDUMP+:} false; then :
38097   $as_echo_n "(cached) " >&6
38098 else
38099   if test -n "$OBJDUMP"; then
38100   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38101 else
38102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38103 for as_dir in $PATH
38104 do
38105   IFS=$as_save_IFS
38106   test -z "$as_dir" && as_dir=.
38107     for ac_exec_ext in '' $ac_executable_extensions; do
38108   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38109     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38110     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38111     break 2
38112   fi
38113 done
38114   done
38115 IFS=$as_save_IFS
38116 
38117 fi
38118 fi
38119 OBJDUMP=$ac_cv_prog_OBJDUMP
38120 if test -n "$OBJDUMP"; then
38121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38122 $as_echo "$OBJDUMP" >&6; }
38123 else
38124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38125 $as_echo "no" >&6; }
38126 fi
38127 
38128 
38129     test -n "$OBJDUMP" && break
38130   done
38131 fi
38132 if test -z "$OBJDUMP"; then
38133   ac_ct_OBJDUMP=$OBJDUMP
38134   for ac_prog in gobjdump objdump
38135 do
38136   # Extract the first word of "$ac_prog", so it can be a program name with args.
38137 set dummy $ac_prog; ac_word=$2
38138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38139 $as_echo_n "checking for $ac_word... " >&6; }
38140 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38141   $as_echo_n "(cached) " >&6
38142 else
38143   if test -n "$ac_ct_OBJDUMP"; then
38144   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38145 else
38146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38147 for as_dir in $PATH
38148 do
38149   IFS=$as_save_IFS
38150   test -z "$as_dir" && as_dir=.
38151     for ac_exec_ext in '' $ac_executable_extensions; do
38152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38153     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38155     break 2
38156   fi
38157 done
38158   done
38159 IFS=$as_save_IFS
38160 
38161 fi
38162 fi
38163 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38164 if test -n "$ac_ct_OBJDUMP"; then
38165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38166 $as_echo "$ac_ct_OBJDUMP" >&6; }
38167 else
38168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38169 $as_echo "no" >&6; }
38170 fi
38171 
38172 
38173   test -n "$ac_ct_OBJDUMP" && break
38174 done
38175 
38176   if test "x$ac_ct_OBJDUMP" = x; then
38177     OBJDUMP=""
38178   else
38179     case $cross_compiling:$ac_tool_warned in
38180 yes:)
38181 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38182 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38183 ac_tool_warned=yes ;;
38184 esac
38185     OBJDUMP=$ac_ct_OBJDUMP
38186   fi
38187 fi
38188 
38189     else
38190       # If it succeeded, then it was overridden by the user. We will use it
38191       # for the tool.
38192 
38193       # First remove it from the list of overridden variables, so we can test
38194       # for unknown variables in the end.
38195       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38196 
38197       # Check if the provided tool contains a complete path.
38198       tool_specified="$OBJDUMP"
38199       tool_basename="${tool_specified##*/}"
38200       if test "x$tool_basename" = "x$tool_specified"; then
38201         # A command without a complete path is provided, search $PATH.
38202         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38203 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38204         # Extract the first word of "$tool_basename", so it can be a program name with args.
38205 set dummy $tool_basename; ac_word=$2
38206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38207 $as_echo_n "checking for $ac_word... " >&6; }
38208 if ${ac_cv_path_OBJDUMP+:} false; then :
38209   $as_echo_n "(cached) " >&6
38210 else
38211   case $OBJDUMP in
38212   [\\/]* | ?:[\\/]*)
38213   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38214   ;;
38215   *)
38216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38217 for as_dir in $PATH
38218 do
38219   IFS=$as_save_IFS
38220   test -z "$as_dir" && as_dir=.
38221     for ac_exec_ext in '' $ac_executable_extensions; do
38222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38223     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38225     break 2
38226   fi
38227 done
38228   done
38229 IFS=$as_save_IFS
38230 
38231   ;;
38232 esac
38233 fi
38234 OBJDUMP=$ac_cv_path_OBJDUMP
38235 if test -n "$OBJDUMP"; then
38236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38237 $as_echo "$OBJDUMP" >&6; }
38238 else
38239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38240 $as_echo "no" >&6; }
38241 fi
38242 
38243 
38244         if test "x$OBJDUMP" = x; then
38245           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38246         fi
38247       else
38248         # Otherwise we believe it is a complete path. Use it as it is.
38249         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38250 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38251         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38252 $as_echo_n "checking for OBJDUMP... " >&6; }
38253         if test ! -x "$tool_specified"; then
38254           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38255 $as_echo "not found" >&6; }
38256           as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38257         fi
38258         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38259 $as_echo "$tool_specified" >&6; }
38260       fi
38261     fi
38262   fi
38263 
38264 
38265   if test "x$OBJDUMP" != x; then
38266     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38267     # bails if argument is missing.
38268 
38269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38270 
38271   # First separate the path from the arguments. This will split at the first
38272   # space.
38273   complete="$OBJDUMP"
38274   path="${complete%% *}"
38275   tmp="$complete EOL"
38276   arguments="${tmp#* }"
38277 
38278   # Input might be given as Windows format, start by converting to
38279   # unix format.
38280   new_path=`$CYGPATH -u "$path"`
38281 
38282   # Now try to locate executable using which
38283   new_path=`$WHICH "$new_path" 2> /dev/null`
38284   # bat and cmd files are not always considered executable in cygwin causing which
38285   # to not find them
38286   if test "x$new_path" = x \
38287       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38288       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38289     new_path=`$CYGPATH -u "$path"`
38290   fi
38291   if test "x$new_path" = x; then
38292     # Oops. Which didn't find the executable.
38293     # The splitting of arguments from the executable at a space might have been incorrect,
38294     # since paths with space are more likely in Windows. Give it another try with the whole
38295     # argument.
38296     path="$complete"
38297     arguments="EOL"
38298     new_path=`$CYGPATH -u "$path"`
38299     new_path=`$WHICH "$new_path" 2> /dev/null`
38300     # bat and cmd files are not always considered executable in cygwin causing which
38301     # to not find them
38302     if test "x$new_path" = x \
38303         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38304         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38305       new_path=`$CYGPATH -u "$path"`
38306     fi
38307     if test "x$new_path" = x; then
38308       # It's still not found. Now this is an unrecoverable error.
38309       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38310 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38311       has_space=`$ECHO "$complete" | $GREP " "`
38312       if test "x$has_space" != x; then
38313         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38314 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38315       fi
38316       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38317     fi
38318   fi
38319 
38320   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38321   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38322   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38323   # "foo.exe" is OK but "foo" is an error.
38324   #
38325   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38326   # It is also a way to make sure we got the proper file name for the real test later on.
38327   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38328   if test "x$test_shortpath" = x; then
38329     # Short path failed, file does not exist as specified.
38330     # Try adding .exe or .cmd
38331     if test -f "${new_path}.exe"; then
38332       input_to_shortpath="${new_path}.exe"
38333     elif test -f "${new_path}.cmd"; then
38334       input_to_shortpath="${new_path}.cmd"
38335     else
38336       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38337 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38338       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38339 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38340       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38341     fi
38342   else
38343     input_to_shortpath="$new_path"
38344   fi
38345 
38346   # Call helper function which possibly converts this using DOS-style short mode.
38347   # If so, the updated path is stored in $new_path.
38348   new_path="$input_to_shortpath"
38349 
38350   input_path="$input_to_shortpath"
38351   # Check if we need to convert this using DOS-style short mode. If the path
38352   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38353   # take no chances and rewrite it.
38354   # Note: m4 eats our [], so we need to use [ and ] instead.
38355   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38356   if test "x$has_forbidden_chars" != x; then
38357     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38358     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38359     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38360     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38361       # Going to short mode and back again did indeed matter. Since short mode is
38362       # case insensitive, let's make it lowercase to improve readability.
38363       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38364       # Now convert it back to Unix-style (cygpath)
38365       input_path=`$CYGPATH -u "$shortmode_path"`
38366       new_path="$input_path"
38367     fi
38368   fi
38369 
38370   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38371   if test "x$test_cygdrive_prefix" = x; then
38372     # As a simple fix, exclude /usr/bin since it's not a real path.
38373     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38374       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38375       # a path prefixed by /cygdrive for fixpath to work.
38376       new_path="$CYGWIN_ROOT_PATH$input_path"
38377     fi
38378   fi
38379 
38380   # remove trailing .exe if any
38381   new_path="${new_path/%.exe/}"
38382 
38383   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38384 
38385   # First separate the path from the arguments. This will split at the first
38386   # space.
38387   complete="$OBJDUMP"
38388   path="${complete%% *}"
38389   tmp="$complete EOL"
38390   arguments="${tmp#* }"
38391 
38392   # Input might be given as Windows format, start by converting to
38393   # unix format.
38394   new_path="$path"
38395 
38396   windows_path="$new_path"
38397   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38398     unix_path=`$CYGPATH -u "$windows_path"`
38399     new_path="$unix_path"
38400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38401     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38402     new_path="$unix_path"
38403   fi
38404 
38405 
38406   # Now try to locate executable using which
38407   new_path=`$WHICH "$new_path" 2> /dev/null`
38408 
38409   if test "x$new_path" = x; then
38410     # Oops. Which didn't find the executable.
38411     # The splitting of arguments from the executable at a space might have been incorrect,
38412     # since paths with space are more likely in Windows. Give it another try with the whole
38413     # argument.
38414     path="$complete"
38415     arguments="EOL"
38416     new_path="$path"
38417 
38418   windows_path="$new_path"
38419   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38420     unix_path=`$CYGPATH -u "$windows_path"`
38421     new_path="$unix_path"
38422   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38423     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38424     new_path="$unix_path"
38425   fi
38426 
38427 
38428     new_path=`$WHICH "$new_path" 2> /dev/null`
38429     # bat and cmd files are not always considered executable in MSYS causing which
38430     # to not find them
38431     if test "x$new_path" = x \
38432         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38433         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38434       new_path="$path"
38435 
38436   windows_path="$new_path"
38437   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38438     unix_path=`$CYGPATH -u "$windows_path"`
38439     new_path="$unix_path"
38440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38441     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38442     new_path="$unix_path"
38443   fi
38444 
38445     fi
38446 
38447     if test "x$new_path" = x; then
38448       # It's still not found. Now this is an unrecoverable error.
38449       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38450 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38451       has_space=`$ECHO "$complete" | $GREP " "`
38452       if test "x$has_space" != x; then
38453         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38454 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38455       fi
38456       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38457     fi
38458   fi
38459 
38460   # Now new_path has a complete unix path to the binary
38461   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38462     # Keep paths in /bin as-is, but remove trailing .exe if any
38463     new_path="${new_path/%.exe/}"
38464     # Do not save /bin paths to all_fixpath_prefixes!
38465   else
38466     # Not in mixed or Windows style, start by that.
38467     new_path=`cmd //c echo $new_path`
38468 
38469   input_path="$new_path"
38470   # Check if we need to convert this using DOS-style short mode. If the path
38471   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38472   # take no chances and rewrite it.
38473   # Note: m4 eats our [], so we need to use [ and ] instead.
38474   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38475   if test "x$has_forbidden_chars" != x; then
38476     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38477     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38478   fi
38479 
38480     # Output is in $new_path
38481 
38482   windows_path="$new_path"
38483   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38484     unix_path=`$CYGPATH -u "$windows_path"`
38485     new_path="$unix_path"
38486   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38487     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38488     new_path="$unix_path"
38489   fi
38490 
38491     # remove trailing .exe if any
38492     new_path="${new_path/%.exe/}"
38493 
38494     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38495     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38496   fi
38497 
38498   else
38499     # We're on a posix platform. Hooray! :)
38500     # First separate the path from the arguments. This will split at the first
38501     # space.
38502     complete="$OBJDUMP"
38503     path="${complete%% *}"
38504     tmp="$complete EOL"
38505     arguments="${tmp#* }"
38506 
38507     # Cannot rely on the command "which" here since it doesn't always work.
38508     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38509     if test -z "$is_absolute_path"; then
38510       # Path to executable is not absolute. Find it.
38511       IFS_save="$IFS"
38512       IFS=:
38513       for p in $PATH; do
38514         if test -f "$p/$path" && test -x "$p/$path"; then
38515           new_path="$p/$path"
38516           break
38517         fi
38518       done
38519       IFS="$IFS_save"
38520     else
38521       # This is an absolute path, we can use it without further modifications.
38522       new_path="$path"
38523     fi
38524 
38525     if test "x$new_path" = x; then
38526       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38527 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38528       has_space=`$ECHO "$complete" | $GREP " "`
38529       if test "x$has_space" != x; then
38530         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38531 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38532       fi
38533       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38534     fi
38535   fi
38536 
38537   # Now join together the path and the arguments once again
38538   if test "x$arguments" != xEOL; then
38539     new_complete="$new_path ${arguments% *}"
38540   else
38541     new_complete="$new_path"
38542   fi
38543 
38544   if test "x$complete" != "x$new_complete"; then
38545     OBJDUMP="$new_complete"
38546     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38547 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38548   fi
38549 
38550   fi
38551 
38552 
38553   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
38554   # to remain in place. Otherwise the compiler will not work in some situations
38555   # in later configure checks.
38556   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
38557     PATH="$OLD_PATH"
38558   fi
38559 
38560   # Restore the flags to the user specified values.
38561   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38562   CFLAGS="$ORG_CFLAGS"
38563   CXXFLAGS="$ORG_CXXFLAGS"
38564   OBJCFLAGS="$ORG_OBJCFLAGS"
38565 
38566 
38567 # Finally do some processing after the detection phase
38568 
38569   if test "x$COMPILE_TYPE" = "xcross"; then
38570     # Now we need to find a C/C++ compiler that can build executables for the
38571     # build platform. We can't use the AC_PROG_CC macro, since it can only be
38572     # used once. Also, we need to do this without adding a tools dir to the
38573     # path, otherwise we might pick up cross-compilers which don't use standard
38574     # naming.
38575 
38576     # FIXME: we should list the discovered compilers as an exclude pattern!
38577     # If we do that, we can do this detection before POST_DETECTION, and still
38578     # find the build compilers in the tools dir, if needed.
38579 
38580 
38581   # Publish this variable in the help.
38582 
38583 
38584   if test "x$BUILD_CC" = x; then
38585     # The variable is not set by user, try to locate tool using the code snippet
38586     for ac_prog in cl cc gcc
38587 do
38588   # Extract the first word of "$ac_prog", so it can be a program name with args.
38589 set dummy $ac_prog; ac_word=$2
38590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38591 $as_echo_n "checking for $ac_word... " >&6; }
38592 if ${ac_cv_path_BUILD_CC+:} false; then :
38593   $as_echo_n "(cached) " >&6
38594 else
38595   case $BUILD_CC in
38596   [\\/]* | ?:[\\/]*)
38597   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38598   ;;
38599   *)
38600   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38601 for as_dir in $PATH
38602 do
38603   IFS=$as_save_IFS
38604   test -z "$as_dir" && as_dir=.
38605     for ac_exec_ext in '' $ac_executable_extensions; do
38606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38607     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38609     break 2
38610   fi
38611 done
38612   done
38613 IFS=$as_save_IFS
38614 
38615   ;;
38616 esac
38617 fi
38618 BUILD_CC=$ac_cv_path_BUILD_CC
38619 if test -n "$BUILD_CC"; then
38620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38621 $as_echo "$BUILD_CC" >&6; }
38622 else
38623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38624 $as_echo "no" >&6; }
38625 fi
38626 
38627 
38628   test -n "$BUILD_CC" && break
38629 done
38630 
38631   else
38632     # The variable is set, but is it from the command line or the environment?
38633 
38634     # Try to remove the string !BUILD_CC! from our list.
38635     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38636     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38637       # If it failed, the variable was not from the command line. Ignore it,
38638       # but warn the user (except for BASH, which is always set by the calling BASH).
38639       if test "xBUILD_CC" != xBASH; then
38640         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38641 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38642       fi
38643       # Try to locate tool using the code snippet
38644       for ac_prog in cl cc gcc
38645 do
38646   # Extract the first word of "$ac_prog", so it can be a program name with args.
38647 set dummy $ac_prog; ac_word=$2
38648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38649 $as_echo_n "checking for $ac_word... " >&6; }
38650 if ${ac_cv_path_BUILD_CC+:} false; then :
38651   $as_echo_n "(cached) " >&6
38652 else
38653   case $BUILD_CC in
38654   [\\/]* | ?:[\\/]*)
38655   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38656   ;;
38657   *)
38658   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38659 for as_dir in $PATH
38660 do
38661   IFS=$as_save_IFS
38662   test -z "$as_dir" && as_dir=.
38663     for ac_exec_ext in '' $ac_executable_extensions; do
38664   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38665     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38666     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38667     break 2
38668   fi
38669 done
38670   done
38671 IFS=$as_save_IFS
38672 
38673   ;;
38674 esac
38675 fi
38676 BUILD_CC=$ac_cv_path_BUILD_CC
38677 if test -n "$BUILD_CC"; then
38678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38679 $as_echo "$BUILD_CC" >&6; }
38680 else
38681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38682 $as_echo "no" >&6; }
38683 fi
38684 
38685 
38686   test -n "$BUILD_CC" && break
38687 done
38688 
38689     else
38690       # If it succeeded, then it was overridden by the user. We will use it
38691       # for the tool.
38692 
38693       # First remove it from the list of overridden variables, so we can test
38694       # for unknown variables in the end.
38695       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38696 
38697       # Check if the provided tool contains a complete path.
38698       tool_specified="$BUILD_CC"
38699       tool_basename="${tool_specified##*/}"
38700       if test "x$tool_basename" = "x$tool_specified"; then
38701         # A command without a complete path is provided, search $PATH.
38702         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38703 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38704         # Extract the first word of "$tool_basename", so it can be a program name with args.
38705 set dummy $tool_basename; ac_word=$2
38706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38707 $as_echo_n "checking for $ac_word... " >&6; }
38708 if ${ac_cv_path_BUILD_CC+:} false; then :
38709   $as_echo_n "(cached) " >&6
38710 else
38711   case $BUILD_CC in
38712   [\\/]* | ?:[\\/]*)
38713   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38714   ;;
38715   *)
38716   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38717 for as_dir in $PATH
38718 do
38719   IFS=$as_save_IFS
38720   test -z "$as_dir" && as_dir=.
38721     for ac_exec_ext in '' $ac_executable_extensions; do
38722   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38723     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38725     break 2
38726   fi
38727 done
38728   done
38729 IFS=$as_save_IFS
38730 
38731   ;;
38732 esac
38733 fi
38734 BUILD_CC=$ac_cv_path_BUILD_CC
38735 if test -n "$BUILD_CC"; then
38736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38737 $as_echo "$BUILD_CC" >&6; }
38738 else
38739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38740 $as_echo "no" >&6; }
38741 fi
38742 
38743 
38744         if test "x$BUILD_CC" = x; then
38745           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38746         fi
38747       else
38748         # Otherwise we believe it is a complete path. Use it as it is.
38749         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38750 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38751         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38752 $as_echo_n "checking for BUILD_CC... " >&6; }
38753         if test ! -x "$tool_specified"; then
38754           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38755 $as_echo "not found" >&6; }
38756           as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
38757         fi
38758         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38759 $as_echo "$tool_specified" >&6; }
38760       fi
38761     fi
38762   fi
38763 
38764 
38765 
38766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38767 
38768   # First separate the path from the arguments. This will split at the first
38769   # space.
38770   complete="$BUILD_CC"
38771   path="${complete%% *}"
38772   tmp="$complete EOL"
38773   arguments="${tmp#* }"
38774 
38775   # Input might be given as Windows format, start by converting to
38776   # unix format.
38777   new_path=`$CYGPATH -u "$path"`
38778 
38779   # Now try to locate executable using which
38780   new_path=`$WHICH "$new_path" 2> /dev/null`
38781   # bat and cmd files are not always considered executable in cygwin causing which
38782   # to not find them
38783   if test "x$new_path" = x \
38784       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38785       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38786     new_path=`$CYGPATH -u "$path"`
38787   fi
38788   if test "x$new_path" = x; then
38789     # Oops. Which didn't find the executable.
38790     # The splitting of arguments from the executable at a space might have been incorrect,
38791     # since paths with space are more likely in Windows. Give it another try with the whole
38792     # argument.
38793     path="$complete"
38794     arguments="EOL"
38795     new_path=`$CYGPATH -u "$path"`
38796     new_path=`$WHICH "$new_path" 2> /dev/null`
38797     # bat and cmd files are not always considered executable in cygwin causing which
38798     # to not find them
38799     if test "x$new_path" = x \
38800         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38801         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38802       new_path=`$CYGPATH -u "$path"`
38803     fi
38804     if test "x$new_path" = x; then
38805       # It's still not found. Now this is an unrecoverable error.
38806       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
38807 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
38808       has_space=`$ECHO "$complete" | $GREP " "`
38809       if test "x$has_space" != x; then
38810         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38811 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38812       fi
38813       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38814     fi
38815   fi
38816 
38817   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38818   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38819   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38820   # "foo.exe" is OK but "foo" is an error.
38821   #
38822   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38823   # It is also a way to make sure we got the proper file name for the real test later on.
38824   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38825   if test "x$test_shortpath" = x; then
38826     # Short path failed, file does not exist as specified.
38827     # Try adding .exe or .cmd
38828     if test -f "${new_path}.exe"; then
38829       input_to_shortpath="${new_path}.exe"
38830     elif test -f "${new_path}.cmd"; then
38831       input_to_shortpath="${new_path}.cmd"
38832     else
38833       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
38834 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
38835       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38836 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38837       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38838     fi
38839   else
38840     input_to_shortpath="$new_path"
38841   fi
38842 
38843   # Call helper function which possibly converts this using DOS-style short mode.
38844   # If so, the updated path is stored in $new_path.
38845   new_path="$input_to_shortpath"
38846 
38847   input_path="$input_to_shortpath"
38848   # Check if we need to convert this using DOS-style short mode. If the path
38849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38850   # take no chances and rewrite it.
38851   # Note: m4 eats our [], so we need to use [ and ] instead.
38852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38853   if test "x$has_forbidden_chars" != x; then
38854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38855     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38856     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38857     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38858       # Going to short mode and back again did indeed matter. Since short mode is
38859       # case insensitive, let's make it lowercase to improve readability.
38860       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38861       # Now convert it back to Unix-style (cygpath)
38862       input_path=`$CYGPATH -u "$shortmode_path"`
38863       new_path="$input_path"
38864     fi
38865   fi
38866 
38867   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38868   if test "x$test_cygdrive_prefix" = x; then
38869     # As a simple fix, exclude /usr/bin since it's not a real path.
38870     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38871       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38872       # a path prefixed by /cygdrive for fixpath to work.
38873       new_path="$CYGWIN_ROOT_PATH$input_path"
38874     fi
38875   fi
38876 
38877   # remove trailing .exe if any
38878   new_path="${new_path/%.exe/}"
38879 
38880   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38881 
38882   # First separate the path from the arguments. This will split at the first
38883   # space.
38884   complete="$BUILD_CC"
38885   path="${complete%% *}"
38886   tmp="$complete EOL"
38887   arguments="${tmp#* }"
38888 
38889   # Input might be given as Windows format, start by converting to
38890   # unix format.
38891   new_path="$path"
38892 
38893   windows_path="$new_path"
38894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38895     unix_path=`$CYGPATH -u "$windows_path"`
38896     new_path="$unix_path"
38897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38898     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38899     new_path="$unix_path"
38900   fi
38901 
38902 
38903   # Now try to locate executable using which
38904   new_path=`$WHICH "$new_path" 2> /dev/null`
38905 
38906   if test "x$new_path" = x; then
38907     # Oops. Which didn't find the executable.
38908     # The splitting of arguments from the executable at a space might have been incorrect,
38909     # since paths with space are more likely in Windows. Give it another try with the whole
38910     # argument.
38911     path="$complete"
38912     arguments="EOL"
38913     new_path="$path"
38914 
38915   windows_path="$new_path"
38916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38917     unix_path=`$CYGPATH -u "$windows_path"`
38918     new_path="$unix_path"
38919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38921     new_path="$unix_path"
38922   fi
38923 
38924 
38925     new_path=`$WHICH "$new_path" 2> /dev/null`
38926     # bat and cmd files are not always considered executable in MSYS causing which
38927     # to not find them
38928     if test "x$new_path" = x \
38929         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38930         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38931       new_path="$path"
38932 
38933   windows_path="$new_path"
38934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38935     unix_path=`$CYGPATH -u "$windows_path"`
38936     new_path="$unix_path"
38937   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38938     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38939     new_path="$unix_path"
38940   fi
38941 
38942     fi
38943 
38944     if test "x$new_path" = x; then
38945       # It's still not found. Now this is an unrecoverable error.
38946       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
38947 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
38948       has_space=`$ECHO "$complete" | $GREP " "`
38949       if test "x$has_space" != x; then
38950         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38951 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38952       fi
38953       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38954     fi
38955   fi
38956 
38957   # Now new_path has a complete unix path to the binary
38958   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38959     # Keep paths in /bin as-is, but remove trailing .exe if any
38960     new_path="${new_path/%.exe/}"
38961     # Do not save /bin paths to all_fixpath_prefixes!
38962   else
38963     # Not in mixed or Windows style, start by that.
38964     new_path=`cmd //c echo $new_path`
38965 
38966   input_path="$new_path"
38967   # Check if we need to convert this using DOS-style short mode. If the path
38968   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38969   # take no chances and rewrite it.
38970   # Note: m4 eats our [], so we need to use [ and ] instead.
38971   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38972   if test "x$has_forbidden_chars" != x; then
38973     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38974     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38975   fi
38976 
38977     # Output is in $new_path
38978 
38979   windows_path="$new_path"
38980   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38981     unix_path=`$CYGPATH -u "$windows_path"`
38982     new_path="$unix_path"
38983   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38984     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38985     new_path="$unix_path"
38986   fi
38987 
38988     # remove trailing .exe if any
38989     new_path="${new_path/%.exe/}"
38990 
38991     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38992     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38993   fi
38994 
38995   else
38996     # We're on a posix platform. Hooray! :)
38997     # First separate the path from the arguments. This will split at the first
38998     # space.
38999     complete="$BUILD_CC"
39000     path="${complete%% *}"
39001     tmp="$complete EOL"
39002     arguments="${tmp#* }"
39003 
39004     # Cannot rely on the command "which" here since it doesn't always work.
39005     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39006     if test -z "$is_absolute_path"; then
39007       # Path to executable is not absolute. Find it.
39008       IFS_save="$IFS"
39009       IFS=:
39010       for p in $PATH; do
39011         if test -f "$p/$path" && test -x "$p/$path"; then
39012           new_path="$p/$path"
39013           break
39014         fi
39015       done
39016       IFS="$IFS_save"
39017     else
39018       # This is an absolute path, we can use it without further modifications.
39019       new_path="$path"
39020     fi
39021 
39022     if test "x$new_path" = x; then
39023       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39024 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39025       has_space=`$ECHO "$complete" | $GREP " "`
39026       if test "x$has_space" != x; then
39027         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39028 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39029       fi
39030       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39031     fi
39032   fi
39033 
39034   # Now join together the path and the arguments once again
39035   if test "x$arguments" != xEOL; then
39036     new_complete="$new_path ${arguments% *}"
39037   else
39038     new_complete="$new_path"
39039   fi
39040 
39041   if test "x$complete" != "x$new_complete"; then
39042     BUILD_CC="$new_complete"
39043     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39044 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39045   fi
39046 
39047 
39048 
39049   # Publish this variable in the help.
39050 
39051 
39052   if test "x$BUILD_CXX" = x; then
39053     # The variable is not set by user, try to locate tool using the code snippet
39054     for ac_prog in cl CC g++
39055 do
39056   # Extract the first word of "$ac_prog", so it can be a program name with args.
39057 set dummy $ac_prog; ac_word=$2
39058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39059 $as_echo_n "checking for $ac_word... " >&6; }
39060 if ${ac_cv_path_BUILD_CXX+:} false; then :
39061   $as_echo_n "(cached) " >&6
39062 else
39063   case $BUILD_CXX in
39064   [\\/]* | ?:[\\/]*)
39065   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39066   ;;
39067   *)
39068   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39069 for as_dir in $PATH
39070 do
39071   IFS=$as_save_IFS
39072   test -z "$as_dir" && as_dir=.
39073     for ac_exec_ext in '' $ac_executable_extensions; do
39074   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39075     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39076     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39077     break 2
39078   fi
39079 done
39080   done
39081 IFS=$as_save_IFS
39082 
39083   ;;
39084 esac
39085 fi
39086 BUILD_CXX=$ac_cv_path_BUILD_CXX
39087 if test -n "$BUILD_CXX"; then
39088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39089 $as_echo "$BUILD_CXX" >&6; }
39090 else
39091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39092 $as_echo "no" >&6; }
39093 fi
39094 
39095 
39096   test -n "$BUILD_CXX" && break
39097 done
39098 
39099   else
39100     # The variable is set, but is it from the command line or the environment?
39101 
39102     # Try to remove the string !BUILD_CXX! from our list.
39103     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39104     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39105       # If it failed, the variable was not from the command line. Ignore it,
39106       # but warn the user (except for BASH, which is always set by the calling BASH).
39107       if test "xBUILD_CXX" != xBASH; then
39108         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39109 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39110       fi
39111       # Try to locate tool using the code snippet
39112       for ac_prog in cl CC g++
39113 do
39114   # Extract the first word of "$ac_prog", so it can be a program name with args.
39115 set dummy $ac_prog; ac_word=$2
39116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39117 $as_echo_n "checking for $ac_word... " >&6; }
39118 if ${ac_cv_path_BUILD_CXX+:} false; then :
39119   $as_echo_n "(cached) " >&6
39120 else
39121   case $BUILD_CXX in
39122   [\\/]* | ?:[\\/]*)
39123   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39124   ;;
39125   *)
39126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39127 for as_dir in $PATH
39128 do
39129   IFS=$as_save_IFS
39130   test -z "$as_dir" && as_dir=.
39131     for ac_exec_ext in '' $ac_executable_extensions; do
39132   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39133     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39135     break 2
39136   fi
39137 done
39138   done
39139 IFS=$as_save_IFS
39140 
39141   ;;
39142 esac
39143 fi
39144 BUILD_CXX=$ac_cv_path_BUILD_CXX
39145 if test -n "$BUILD_CXX"; then
39146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39147 $as_echo "$BUILD_CXX" >&6; }
39148 else
39149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39150 $as_echo "no" >&6; }
39151 fi
39152 
39153 
39154   test -n "$BUILD_CXX" && break
39155 done
39156 
39157     else
39158       # If it succeeded, then it was overridden by the user. We will use it
39159       # for the tool.
39160 
39161       # First remove it from the list of overridden variables, so we can test
39162       # for unknown variables in the end.
39163       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39164 
39165       # Check if the provided tool contains a complete path.
39166       tool_specified="$BUILD_CXX"
39167       tool_basename="${tool_specified##*/}"
39168       if test "x$tool_basename" = "x$tool_specified"; then
39169         # A command without a complete path is provided, search $PATH.
39170         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39171 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39172         # Extract the first word of "$tool_basename", so it can be a program name with args.
39173 set dummy $tool_basename; ac_word=$2
39174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39175 $as_echo_n "checking for $ac_word... " >&6; }
39176 if ${ac_cv_path_BUILD_CXX+:} false; then :
39177   $as_echo_n "(cached) " >&6
39178 else
39179   case $BUILD_CXX in
39180   [\\/]* | ?:[\\/]*)
39181   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39182   ;;
39183   *)
39184   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39185 for as_dir in $PATH
39186 do
39187   IFS=$as_save_IFS
39188   test -z "$as_dir" && as_dir=.
39189     for ac_exec_ext in '' $ac_executable_extensions; do
39190   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39191     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39192     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39193     break 2
39194   fi
39195 done
39196   done
39197 IFS=$as_save_IFS
39198 
39199   ;;
39200 esac
39201 fi
39202 BUILD_CXX=$ac_cv_path_BUILD_CXX
39203 if test -n "$BUILD_CXX"; then
39204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39205 $as_echo "$BUILD_CXX" >&6; }
39206 else
39207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39208 $as_echo "no" >&6; }
39209 fi
39210 
39211 
39212         if test "x$BUILD_CXX" = x; then
39213           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39214         fi
39215       else
39216         # Otherwise we believe it is a complete path. Use it as it is.
39217         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39218 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39219         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39220 $as_echo_n "checking for BUILD_CXX... " >&6; }
39221         if test ! -x "$tool_specified"; then
39222           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39223 $as_echo "not found" >&6; }
39224           as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39225         fi
39226         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39227 $as_echo "$tool_specified" >&6; }
39228       fi
39229     fi
39230   fi
39231 
39232 
39233 
39234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39235 
39236   # First separate the path from the arguments. This will split at the first
39237   # space.
39238   complete="$BUILD_CXX"
39239   path="${complete%% *}"
39240   tmp="$complete EOL"
39241   arguments="${tmp#* }"
39242 
39243   # Input might be given as Windows format, start by converting to
39244   # unix format.
39245   new_path=`$CYGPATH -u "$path"`
39246 
39247   # Now try to locate executable using which
39248   new_path=`$WHICH "$new_path" 2> /dev/null`
39249   # bat and cmd files are not always considered executable in cygwin causing which
39250   # to not find them
39251   if test "x$new_path" = x \
39252       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39253       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39254     new_path=`$CYGPATH -u "$path"`
39255   fi
39256   if test "x$new_path" = x; then
39257     # Oops. Which didn't find the executable.
39258     # The splitting of arguments from the executable at a space might have been incorrect,
39259     # since paths with space are more likely in Windows. Give it another try with the whole
39260     # argument.
39261     path="$complete"
39262     arguments="EOL"
39263     new_path=`$CYGPATH -u "$path"`
39264     new_path=`$WHICH "$new_path" 2> /dev/null`
39265     # bat and cmd files are not always considered executable in cygwin causing which
39266     # to not find them
39267     if test "x$new_path" = x \
39268         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39269         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39270       new_path=`$CYGPATH -u "$path"`
39271     fi
39272     if test "x$new_path" = x; then
39273       # It's still not found. Now this is an unrecoverable error.
39274       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39275 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39276       has_space=`$ECHO "$complete" | $GREP " "`
39277       if test "x$has_space" != x; then
39278         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39279 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39280       fi
39281       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39282     fi
39283   fi
39284 
39285   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39286   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39287   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39288   # "foo.exe" is OK but "foo" is an error.
39289   #
39290   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39291   # It is also a way to make sure we got the proper file name for the real test later on.
39292   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39293   if test "x$test_shortpath" = x; then
39294     # Short path failed, file does not exist as specified.
39295     # Try adding .exe or .cmd
39296     if test -f "${new_path}.exe"; then
39297       input_to_shortpath="${new_path}.exe"
39298     elif test -f "${new_path}.cmd"; then
39299       input_to_shortpath="${new_path}.cmd"
39300     else
39301       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39302 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39303       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39304 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39305       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39306     fi
39307   else
39308     input_to_shortpath="$new_path"
39309   fi
39310 
39311   # Call helper function which possibly converts this using DOS-style short mode.
39312   # If so, the updated path is stored in $new_path.
39313   new_path="$input_to_shortpath"
39314 
39315   input_path="$input_to_shortpath"
39316   # Check if we need to convert this using DOS-style short mode. If the path
39317   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39318   # take no chances and rewrite it.
39319   # Note: m4 eats our [], so we need to use [ and ] instead.
39320   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39321   if test "x$has_forbidden_chars" != x; then
39322     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39323     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39324     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39325     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39326       # Going to short mode and back again did indeed matter. Since short mode is
39327       # case insensitive, let's make it lowercase to improve readability.
39328       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39329       # Now convert it back to Unix-style (cygpath)
39330       input_path=`$CYGPATH -u "$shortmode_path"`
39331       new_path="$input_path"
39332     fi
39333   fi
39334 
39335   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39336   if test "x$test_cygdrive_prefix" = x; then
39337     # As a simple fix, exclude /usr/bin since it's not a real path.
39338     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39339       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39340       # a path prefixed by /cygdrive for fixpath to work.
39341       new_path="$CYGWIN_ROOT_PATH$input_path"
39342     fi
39343   fi
39344 
39345   # remove trailing .exe if any
39346   new_path="${new_path/%.exe/}"
39347 
39348   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39349 
39350   # First separate the path from the arguments. This will split at the first
39351   # space.
39352   complete="$BUILD_CXX"
39353   path="${complete%% *}"
39354   tmp="$complete EOL"
39355   arguments="${tmp#* }"
39356 
39357   # Input might be given as Windows format, start by converting to
39358   # unix format.
39359   new_path="$path"
39360 
39361   windows_path="$new_path"
39362   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39363     unix_path=`$CYGPATH -u "$windows_path"`
39364     new_path="$unix_path"
39365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39366     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39367     new_path="$unix_path"
39368   fi
39369 
39370 
39371   # Now try to locate executable using which
39372   new_path=`$WHICH "$new_path" 2> /dev/null`
39373 
39374   if test "x$new_path" = x; then
39375     # Oops. Which didn't find the executable.
39376     # The splitting of arguments from the executable at a space might have been incorrect,
39377     # since paths with space are more likely in Windows. Give it another try with the whole
39378     # argument.
39379     path="$complete"
39380     arguments="EOL"
39381     new_path="$path"
39382 
39383   windows_path="$new_path"
39384   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39385     unix_path=`$CYGPATH -u "$windows_path"`
39386     new_path="$unix_path"
39387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39388     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39389     new_path="$unix_path"
39390   fi
39391 
39392 
39393     new_path=`$WHICH "$new_path" 2> /dev/null`
39394     # bat and cmd files are not always considered executable in MSYS causing which
39395     # to not find them
39396     if test "x$new_path" = x \
39397         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39398         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39399       new_path="$path"
39400 
39401   windows_path="$new_path"
39402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39403     unix_path=`$CYGPATH -u "$windows_path"`
39404     new_path="$unix_path"
39405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39406     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39407     new_path="$unix_path"
39408   fi
39409 
39410     fi
39411 
39412     if test "x$new_path" = x; then
39413       # It's still not found. Now this is an unrecoverable error.
39414       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39415 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39416       has_space=`$ECHO "$complete" | $GREP " "`
39417       if test "x$has_space" != x; then
39418         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39419 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39420       fi
39421       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39422     fi
39423   fi
39424 
39425   # Now new_path has a complete unix path to the binary
39426   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39427     # Keep paths in /bin as-is, but remove trailing .exe if any
39428     new_path="${new_path/%.exe/}"
39429     # Do not save /bin paths to all_fixpath_prefixes!
39430   else
39431     # Not in mixed or Windows style, start by that.
39432     new_path=`cmd //c echo $new_path`
39433 
39434   input_path="$new_path"
39435   # Check if we need to convert this using DOS-style short mode. If the path
39436   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39437   # take no chances and rewrite it.
39438   # Note: m4 eats our [], so we need to use [ and ] instead.
39439   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39440   if test "x$has_forbidden_chars" != x; then
39441     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39442     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39443   fi
39444 
39445     # Output is in $new_path
39446 
39447   windows_path="$new_path"
39448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39449     unix_path=`$CYGPATH -u "$windows_path"`
39450     new_path="$unix_path"
39451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39453     new_path="$unix_path"
39454   fi
39455 
39456     # remove trailing .exe if any
39457     new_path="${new_path/%.exe/}"
39458 
39459     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39460     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39461   fi
39462 
39463   else
39464     # We're on a posix platform. Hooray! :)
39465     # First separate the path from the arguments. This will split at the first
39466     # space.
39467     complete="$BUILD_CXX"
39468     path="${complete%% *}"
39469     tmp="$complete EOL"
39470     arguments="${tmp#* }"
39471 
39472     # Cannot rely on the command "which" here since it doesn't always work.
39473     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39474     if test -z "$is_absolute_path"; then
39475       # Path to executable is not absolute. Find it.
39476       IFS_save="$IFS"
39477       IFS=:
39478       for p in $PATH; do
39479         if test -f "$p/$path" && test -x "$p/$path"; then
39480           new_path="$p/$path"
39481           break
39482         fi
39483       done
39484       IFS="$IFS_save"
39485     else
39486       # This is an absolute path, we can use it without further modifications.
39487       new_path="$path"
39488     fi
39489 
39490     if test "x$new_path" = x; then
39491       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39492 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39493       has_space=`$ECHO "$complete" | $GREP " "`
39494       if test "x$has_space" != x; then
39495         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39496 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39497       fi
39498       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39499     fi
39500   fi
39501 
39502   # Now join together the path and the arguments once again
39503   if test "x$arguments" != xEOL; then
39504     new_complete="$new_path ${arguments% *}"
39505   else
39506     new_complete="$new_path"
39507   fi
39508 
39509   if test "x$complete" != "x$new_complete"; then
39510     BUILD_CXX="$new_complete"
39511     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39512 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39513   fi
39514 
39515 
39516 
39517   # Publish this variable in the help.
39518 
39519 
39520   if test "x$BUILD_LD" = x; then
39521     # The variable is not set by user, try to locate tool using the code snippet
39522     for ac_prog in ld
39523 do
39524   # Extract the first word of "$ac_prog", so it can be a program name with args.
39525 set dummy $ac_prog; ac_word=$2
39526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39527 $as_echo_n "checking for $ac_word... " >&6; }
39528 if ${ac_cv_path_BUILD_LD+:} false; then :
39529   $as_echo_n "(cached) " >&6
39530 else
39531   case $BUILD_LD in
39532   [\\/]* | ?:[\\/]*)
39533   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39534   ;;
39535   *)
39536   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39537 for as_dir in $PATH
39538 do
39539   IFS=$as_save_IFS
39540   test -z "$as_dir" && as_dir=.
39541     for ac_exec_ext in '' $ac_executable_extensions; do
39542   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39543     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39544     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39545     break 2
39546   fi
39547 done
39548   done
39549 IFS=$as_save_IFS
39550 
39551   ;;
39552 esac
39553 fi
39554 BUILD_LD=$ac_cv_path_BUILD_LD
39555 if test -n "$BUILD_LD"; then
39556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39557 $as_echo "$BUILD_LD" >&6; }
39558 else
39559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39560 $as_echo "no" >&6; }
39561 fi
39562 
39563 
39564   test -n "$BUILD_LD" && break
39565 done
39566 
39567   else
39568     # The variable is set, but is it from the command line or the environment?
39569 
39570     # Try to remove the string !BUILD_LD! from our list.
39571     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39572     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39573       # If it failed, the variable was not from the command line. Ignore it,
39574       # but warn the user (except for BASH, which is always set by the calling BASH).
39575       if test "xBUILD_LD" != xBASH; then
39576         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39577 $as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39578       fi
39579       # Try to locate tool using the code snippet
39580       for ac_prog in ld
39581 do
39582   # Extract the first word of "$ac_prog", so it can be a program name with args.
39583 set dummy $ac_prog; ac_word=$2
39584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39585 $as_echo_n "checking for $ac_word... " >&6; }
39586 if ${ac_cv_path_BUILD_LD+:} false; then :
39587   $as_echo_n "(cached) " >&6
39588 else
39589   case $BUILD_LD in
39590   [\\/]* | ?:[\\/]*)
39591   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39592   ;;
39593   *)
39594   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39595 for as_dir in $PATH
39596 do
39597   IFS=$as_save_IFS
39598   test -z "$as_dir" && as_dir=.
39599     for ac_exec_ext in '' $ac_executable_extensions; do
39600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39601     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39603     break 2
39604   fi
39605 done
39606   done
39607 IFS=$as_save_IFS
39608 
39609   ;;
39610 esac
39611 fi
39612 BUILD_LD=$ac_cv_path_BUILD_LD
39613 if test -n "$BUILD_LD"; then
39614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39615 $as_echo "$BUILD_LD" >&6; }
39616 else
39617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39618 $as_echo "no" >&6; }
39619 fi
39620 
39621 
39622   test -n "$BUILD_LD" && break
39623 done
39624 
39625     else
39626       # If it succeeded, then it was overridden by the user. We will use it
39627       # for the tool.
39628 
39629       # First remove it from the list of overridden variables, so we can test
39630       # for unknown variables in the end.
39631       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39632 
39633       # Check if the provided tool contains a complete path.
39634       tool_specified="$BUILD_LD"
39635       tool_basename="${tool_specified##*/}"
39636       if test "x$tool_basename" = "x$tool_specified"; then
39637         # A command without a complete path is provided, search $PATH.
39638         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39639 $as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39640         # Extract the first word of "$tool_basename", so it can be a program name with args.
39641 set dummy $tool_basename; ac_word=$2
39642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39643 $as_echo_n "checking for $ac_word... " >&6; }
39644 if ${ac_cv_path_BUILD_LD+:} false; then :
39645   $as_echo_n "(cached) " >&6
39646 else
39647   case $BUILD_LD in
39648   [\\/]* | ?:[\\/]*)
39649   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39650   ;;
39651   *)
39652   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39653 for as_dir in $PATH
39654 do
39655   IFS=$as_save_IFS
39656   test -z "$as_dir" && as_dir=.
39657     for ac_exec_ext in '' $ac_executable_extensions; do
39658   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39659     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39660     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39661     break 2
39662   fi
39663 done
39664   done
39665 IFS=$as_save_IFS
39666 
39667   ;;
39668 esac
39669 fi
39670 BUILD_LD=$ac_cv_path_BUILD_LD
39671 if test -n "$BUILD_LD"; then
39672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39673 $as_echo "$BUILD_LD" >&6; }
39674 else
39675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39676 $as_echo "no" >&6; }
39677 fi
39678 
39679 
39680         if test "x$BUILD_LD" = x; then
39681           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39682         fi
39683       else
39684         # Otherwise we believe it is a complete path. Use it as it is.
39685         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39686 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39687         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39688 $as_echo_n "checking for BUILD_LD... " >&6; }
39689         if test ! -x "$tool_specified"; then
39690           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39691 $as_echo "not found" >&6; }
39692           as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39693         fi
39694         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39695 $as_echo "$tool_specified" >&6; }
39696       fi
39697     fi
39698   fi
39699 
39700 
39701 
39702   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39703 
39704   # First separate the path from the arguments. This will split at the first
39705   # space.
39706   complete="$BUILD_LD"
39707   path="${complete%% *}"
39708   tmp="$complete EOL"
39709   arguments="${tmp#* }"
39710 
39711   # Input might be given as Windows format, start by converting to
39712   # unix format.
39713   new_path=`$CYGPATH -u "$path"`
39714 
39715   # Now try to locate executable using which
39716   new_path=`$WHICH "$new_path" 2> /dev/null`
39717   # bat and cmd files are not always considered executable in cygwin causing which
39718   # to not find them
39719   if test "x$new_path" = x \
39720       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39721       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39722     new_path=`$CYGPATH -u "$path"`
39723   fi
39724   if test "x$new_path" = x; then
39725     # Oops. Which didn't find the executable.
39726     # The splitting of arguments from the executable at a space might have been incorrect,
39727     # since paths with space are more likely in Windows. Give it another try with the whole
39728     # argument.
39729     path="$complete"
39730     arguments="EOL"
39731     new_path=`$CYGPATH -u "$path"`
39732     new_path=`$WHICH "$new_path" 2> /dev/null`
39733     # bat and cmd files are not always considered executable in cygwin causing which
39734     # to not find them
39735     if test "x$new_path" = x \
39736         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39737         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39738       new_path=`$CYGPATH -u "$path"`
39739     fi
39740     if test "x$new_path" = x; then
39741       # It's still not found. Now this is an unrecoverable error.
39742       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39743 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39744       has_space=`$ECHO "$complete" | $GREP " "`
39745       if test "x$has_space" != x; then
39746         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39747 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39748       fi
39749       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39750     fi
39751   fi
39752 
39753   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39754   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39755   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39756   # "foo.exe" is OK but "foo" is an error.
39757   #
39758   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39759   # It is also a way to make sure we got the proper file name for the real test later on.
39760   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39761   if test "x$test_shortpath" = x; then
39762     # Short path failed, file does not exist as specified.
39763     # Try adding .exe or .cmd
39764     if test -f "${new_path}.exe"; then
39765       input_to_shortpath="${new_path}.exe"
39766     elif test -f "${new_path}.cmd"; then
39767       input_to_shortpath="${new_path}.cmd"
39768     else
39769       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39770 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39771       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39772 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39773       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39774     fi
39775   else
39776     input_to_shortpath="$new_path"
39777   fi
39778 
39779   # Call helper function which possibly converts this using DOS-style short mode.
39780   # If so, the updated path is stored in $new_path.
39781   new_path="$input_to_shortpath"
39782 
39783   input_path="$input_to_shortpath"
39784   # Check if we need to convert this using DOS-style short mode. If the path
39785   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39786   # take no chances and rewrite it.
39787   # Note: m4 eats our [], so we need to use [ and ] instead.
39788   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39789   if test "x$has_forbidden_chars" != x; then
39790     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39791     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39792     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39793     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39794       # Going to short mode and back again did indeed matter. Since short mode is
39795       # case insensitive, let's make it lowercase to improve readability.
39796       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39797       # Now convert it back to Unix-style (cygpath)
39798       input_path=`$CYGPATH -u "$shortmode_path"`
39799       new_path="$input_path"
39800     fi
39801   fi
39802 
39803   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39804   if test "x$test_cygdrive_prefix" = x; then
39805     # As a simple fix, exclude /usr/bin since it's not a real path.
39806     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39807       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39808       # a path prefixed by /cygdrive for fixpath to work.
39809       new_path="$CYGWIN_ROOT_PATH$input_path"
39810     fi
39811   fi
39812 
39813   # remove trailing .exe if any
39814   new_path="${new_path/%.exe/}"
39815 
39816   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39817 
39818   # First separate the path from the arguments. This will split at the first
39819   # space.
39820   complete="$BUILD_LD"
39821   path="${complete%% *}"
39822   tmp="$complete EOL"
39823   arguments="${tmp#* }"
39824 
39825   # Input might be given as Windows format, start by converting to
39826   # unix format.
39827   new_path="$path"
39828 
39829   windows_path="$new_path"
39830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39831     unix_path=`$CYGPATH -u "$windows_path"`
39832     new_path="$unix_path"
39833   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39834     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39835     new_path="$unix_path"
39836   fi
39837 
39838 
39839   # Now try to locate executable using which
39840   new_path=`$WHICH "$new_path" 2> /dev/null`
39841 
39842   if test "x$new_path" = x; then
39843     # Oops. Which didn't find the executable.
39844     # The splitting of arguments from the executable at a space might have been incorrect,
39845     # since paths with space are more likely in Windows. Give it another try with the whole
39846     # argument.
39847     path="$complete"
39848     arguments="EOL"
39849     new_path="$path"
39850 
39851   windows_path="$new_path"
39852   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39853     unix_path=`$CYGPATH -u "$windows_path"`
39854     new_path="$unix_path"
39855   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39856     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39857     new_path="$unix_path"
39858   fi
39859 
39860 
39861     new_path=`$WHICH "$new_path" 2> /dev/null`
39862     # bat and cmd files are not always considered executable in MSYS causing which
39863     # to not find them
39864     if test "x$new_path" = x \
39865         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39866         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39867       new_path="$path"
39868 
39869   windows_path="$new_path"
39870   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39871     unix_path=`$CYGPATH -u "$windows_path"`
39872     new_path="$unix_path"
39873   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39874     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39875     new_path="$unix_path"
39876   fi
39877 
39878     fi
39879 
39880     if test "x$new_path" = x; then
39881       # It's still not found. Now this is an unrecoverable error.
39882       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39883 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39884       has_space=`$ECHO "$complete" | $GREP " "`
39885       if test "x$has_space" != x; then
39886         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39887 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39888       fi
39889       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39890     fi
39891   fi
39892 
39893   # Now new_path has a complete unix path to the binary
39894   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39895     # Keep paths in /bin as-is, but remove trailing .exe if any
39896     new_path="${new_path/%.exe/}"
39897     # Do not save /bin paths to all_fixpath_prefixes!
39898   else
39899     # Not in mixed or Windows style, start by that.
39900     new_path=`cmd //c echo $new_path`
39901 
39902   input_path="$new_path"
39903   # Check if we need to convert this using DOS-style short mode. If the path
39904   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39905   # take no chances and rewrite it.
39906   # Note: m4 eats our [], so we need to use [ and ] instead.
39907   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39908   if test "x$has_forbidden_chars" != x; then
39909     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39910     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39911   fi
39912 
39913     # Output is in $new_path
39914 
39915   windows_path="$new_path"
39916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39917     unix_path=`$CYGPATH -u "$windows_path"`
39918     new_path="$unix_path"
39919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39921     new_path="$unix_path"
39922   fi
39923 
39924     # remove trailing .exe if any
39925     new_path="${new_path/%.exe/}"
39926 
39927     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39928     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39929   fi
39930 
39931   else
39932     # We're on a posix platform. Hooray! :)
39933     # First separate the path from the arguments. This will split at the first
39934     # space.
39935     complete="$BUILD_LD"
39936     path="${complete%% *}"
39937     tmp="$complete EOL"
39938     arguments="${tmp#* }"
39939 
39940     # Cannot rely on the command "which" here since it doesn't always work.
39941     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39942     if test -z "$is_absolute_path"; then
39943       # Path to executable is not absolute. Find it.
39944       IFS_save="$IFS"
39945       IFS=:
39946       for p in $PATH; do
39947         if test -f "$p/$path" && test -x "$p/$path"; then
39948           new_path="$p/$path"
39949           break
39950         fi
39951       done
39952       IFS="$IFS_save"
39953     else
39954       # This is an absolute path, we can use it without further modifications.
39955       new_path="$path"
39956     fi
39957 
39958     if test "x$new_path" = x; then
39959       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39960 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39961       has_space=`$ECHO "$complete" | $GREP " "`
39962       if test "x$has_space" != x; then
39963         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39964 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39965       fi
39966       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39967     fi
39968   fi
39969 
39970   # Now join together the path and the arguments once again
39971   if test "x$arguments" != xEOL; then
39972     new_complete="$new_path ${arguments% *}"
39973   else
39974     new_complete="$new_path"
39975   fi
39976 
39977   if test "x$complete" != "x$new_complete"; then
39978     BUILD_LD="$new_complete"
39979     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
39980 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
39981   fi
39982 
39983   else
39984     # If we are not cross compiling, use the normal target compilers for
39985     # building the build platform executables.
39986     BUILD_CC="$CC"
39987     BUILD_CXX="$CXX"
39988     BUILD_LD="$LD"
39989   fi
39990 
39991 
39992   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39993     # For hotspot, we need these in Windows mixed path,
39994     # so rewrite them all. Need added .exe suffix.
39995     HOTSPOT_CXX="$CXX.exe"
39996     HOTSPOT_LD="$LD.exe"
39997     HOTSPOT_MT="$MT.exe"
39998     HOTSPOT_RC="$RC.exe"
39999 
40000   unix_path="$HOTSPOT_CXX"
40001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40002     windows_path=`$CYGPATH -m "$unix_path"`
40003     HOTSPOT_CXX="$windows_path"
40004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40005     windows_path=`cmd //c echo $unix_path`
40006     HOTSPOT_CXX="$windows_path"
40007   fi
40008 
40009 
40010   unix_path="$HOTSPOT_LD"
40011   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40012     windows_path=`$CYGPATH -m "$unix_path"`
40013     HOTSPOT_LD="$windows_path"
40014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40015     windows_path=`cmd //c echo $unix_path`
40016     HOTSPOT_LD="$windows_path"
40017   fi
40018 
40019 
40020   unix_path="$HOTSPOT_MT"
40021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40022     windows_path=`$CYGPATH -m "$unix_path"`
40023     HOTSPOT_MT="$windows_path"
40024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40025     windows_path=`cmd //c echo $unix_path`
40026     HOTSPOT_MT="$windows_path"
40027   fi
40028 
40029 
40030   unix_path="$HOTSPOT_RC"
40031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40032     windows_path=`$CYGPATH -m "$unix_path"`
40033     HOTSPOT_RC="$windows_path"
40034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40035     windows_path=`cmd //c echo $unix_path`
40036     HOTSPOT_RC="$windows_path"
40037   fi
40038 
40039 
40040 
40041   else
40042     HOTSPOT_CXX="$CXX"
40043     HOTSPOT_LD="$LD"
40044   fi
40045 
40046 
40047 
40048   if test  "x$TOOLCHAIN_TYPE" = xclang; then
40049     USE_CLANG=true
40050   fi
40051 
40052 
40053   # LDEXE is the linker to use, when creating executables. Not really used.
40054   # FIXME: These should just be removed!
40055   LDEXE="$LD"
40056   LDEXECXX="$LDCXX"
40057 
40058 
40059 
40060 
40061   # The package path is used only on macosx?
40062   # FIXME: clean this up, and/or move it elsewhere.
40063   PACKAGE_PATH=/opt/local
40064 
40065 
40066   # Check for extra potential brokenness.
40067   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40068     # On Windows, double-check that we got the right compiler.
40069     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40070     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40071     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40072       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40073         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
40074       fi
40075     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40076       if test "x$COMPILER_CPU_TEST" != "xx64"; then
40077         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40078       fi
40079     fi
40080   fi
40081 
40082   if test "x$TOOLCHAIN_TYPE" = xgcc; then
40083     # If this is a --hash-style=gnu system, use --hash-style=both, why?
40084     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40085     # This is later checked when setting flags.
40086   fi
40087 
40088   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40089   # in executable.'
40090   USING_BROKEN_SUSE_LD=no
40091   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40092     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40093 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40094     echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40095     echo "int main() { }" > main.c
40096     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40097       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40098 $as_echo "no" >&6; }
40099       USING_BROKEN_SUSE_LD=no
40100     else
40101       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40102 $as_echo "yes" >&6; }
40103       USING_BROKEN_SUSE_LD=yes
40104     fi
40105     rm -rf version-script.map main.c
40106   fi
40107 
40108 
40109 
40110 # Setup the JTReg Regression Test Harness.
40111 
40112 
40113 # Check whether --with-jtreg was given.
40114 if test "${with_jtreg+set}" = set; then :
40115   withval=$with_jtreg;
40116 else
40117   with_jtreg=no
40118 fi
40119 
40120 
40121   if test "x$with_jtreg" = xno; then
40122     # jtreg disabled
40123     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40124 $as_echo_n "checking for jtreg... " >&6; }
40125     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40126 $as_echo "no" >&6; }
40127   else
40128     if test "x$with_jtreg" != xyes; then
40129       # with path specified.
40130       JT_HOME="$with_jtreg"
40131     fi
40132 
40133     if test "x$JT_HOME" != x; then
40134       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40135 $as_echo_n "checking for jtreg... " >&6; }
40136 
40137       # use JT_HOME enviroment var.
40138 
40139   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40140 
40141   # Input might be given as Windows format, start by converting to
40142   # unix format.
40143   path="$JT_HOME"
40144   new_path=`$CYGPATH -u "$path"`
40145 
40146   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40147   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40148   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40149   # "foo.exe" is OK but "foo" is an error.
40150   #
40151   # This test is therefore slightly more accurate than "test -f" to check for file precense.
40152   # It is also a way to make sure we got the proper file name for the real test later on.
40153   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40154   if test "x$test_shortpath" = x; then
40155     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40156 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40157     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40158   fi
40159 
40160   # Call helper function which possibly converts this using DOS-style short mode.
40161   # If so, the updated path is stored in $new_path.
40162 
40163   input_path="$new_path"
40164   # Check if we need to convert this using DOS-style short mode. If the path
40165   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40166   # take no chances and rewrite it.
40167   # Note: m4 eats our [], so we need to use [ and ] instead.
40168   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40169   if test "x$has_forbidden_chars" != x; then
40170     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40171     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40172     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40173     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40174       # Going to short mode and back again did indeed matter. Since short mode is
40175       # case insensitive, let's make it lowercase to improve readability.
40176       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40177       # Now convert it back to Unix-style (cygpath)
40178       input_path=`$CYGPATH -u "$shortmode_path"`
40179       new_path="$input_path"
40180     fi
40181   fi
40182 
40183   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40184   if test "x$test_cygdrive_prefix" = x; then
40185     # As a simple fix, exclude /usr/bin since it's not a real path.
40186     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40187       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40188       # a path prefixed by /cygdrive for fixpath to work.
40189       new_path="$CYGWIN_ROOT_PATH$input_path"
40190     fi
40191   fi
40192 
40193 
40194   if test "x$path" != "x$new_path"; then
40195     JT_HOME="$new_path"
40196     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40197 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40198   fi
40199 
40200   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40201 
40202   path="$JT_HOME"
40203   has_colon=`$ECHO $path | $GREP ^.:`
40204   new_path="$path"
40205   if test "x$has_colon" = x; then
40206     # Not in mixed or Windows style, start by that.
40207     new_path=`cmd //c echo $path`
40208   fi
40209 
40210 
40211   input_path="$new_path"
40212   # Check if we need to convert this using DOS-style short mode. If the path
40213   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40214   # take no chances and rewrite it.
40215   # Note: m4 eats our [], so we need to use [ and ] instead.
40216   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40217   if test "x$has_forbidden_chars" != x; then
40218     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40219     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40220   fi
40221 
40222 
40223   windows_path="$new_path"
40224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40225     unix_path=`$CYGPATH -u "$windows_path"`
40226     new_path="$unix_path"
40227   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40228     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40229     new_path="$unix_path"
40230   fi
40231 
40232   if test "x$path" != "x$new_path"; then
40233     JT_HOME="$new_path"
40234     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40235 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40236   fi
40237 
40238   # Save the first 10 bytes of this path to the storage, so fixpath can work.
40239   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40240 
40241   else
40242     # We're on a posix platform. Hooray! :)
40243     path="$JT_HOME"
40244     has_space=`$ECHO "$path" | $GREP " "`
40245     if test "x$has_space" != x; then
40246       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40247 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40248       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40249     fi
40250 
40251     # Use eval to expand a potential ~
40252     eval path="$path"
40253     if test ! -f "$path" && test ! -d "$path"; then
40254       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40255     fi
40256 
40257     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40258   fi
40259 
40260 
40261       # jtreg win32 script works for everybody
40262       JTREGEXE="$JT_HOME/bin/jtreg"
40263 
40264       if test ! -f "$JTREGEXE"; then
40265         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40266       fi
40267 
40268       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40269 $as_echo "$JTREGEXE" >&6; }
40270     else
40271       # try to find jtreg on path
40272 
40273 
40274 
40275   # Publish this variable in the help.
40276 
40277 
40278   if test "x$JTREGEXE" = x; then
40279     # The variable is not set by user, try to locate tool using the code snippet
40280     for ac_prog in jtreg
40281 do
40282   # Extract the first word of "$ac_prog", so it can be a program name with args.
40283 set dummy $ac_prog; ac_word=$2
40284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40285 $as_echo_n "checking for $ac_word... " >&6; }
40286 if ${ac_cv_path_JTREGEXE+:} false; then :
40287   $as_echo_n "(cached) " >&6
40288 else
40289   case $JTREGEXE in
40290   [\\/]* | ?:[\\/]*)
40291   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40292   ;;
40293   *)
40294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40295 for as_dir in $PATH
40296 do
40297   IFS=$as_save_IFS
40298   test -z "$as_dir" && as_dir=.
40299     for ac_exec_ext in '' $ac_executable_extensions; do
40300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40301     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40303     break 2
40304   fi
40305 done
40306   done
40307 IFS=$as_save_IFS
40308 
40309   ;;
40310 esac
40311 fi
40312 JTREGEXE=$ac_cv_path_JTREGEXE
40313 if test -n "$JTREGEXE"; then
40314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40315 $as_echo "$JTREGEXE" >&6; }
40316 else
40317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40318 $as_echo "no" >&6; }
40319 fi
40320 
40321 
40322   test -n "$JTREGEXE" && break
40323 done
40324 
40325   else
40326     # The variable is set, but is it from the command line or the environment?
40327 
40328     # Try to remove the string !JTREGEXE! from our list.
40329     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40330     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40331       # If it failed, the variable was not from the command line. Ignore it,
40332       # but warn the user (except for BASH, which is always set by the calling BASH).
40333       if test "xJTREGEXE" != xBASH; then
40334         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40335 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40336       fi
40337       # Try to locate tool using the code snippet
40338       for ac_prog in jtreg
40339 do
40340   # Extract the first word of "$ac_prog", so it can be a program name with args.
40341 set dummy $ac_prog; ac_word=$2
40342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40343 $as_echo_n "checking for $ac_word... " >&6; }
40344 if ${ac_cv_path_JTREGEXE+:} false; then :
40345   $as_echo_n "(cached) " >&6
40346 else
40347   case $JTREGEXE in
40348   [\\/]* | ?:[\\/]*)
40349   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40350   ;;
40351   *)
40352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40353 for as_dir in $PATH
40354 do
40355   IFS=$as_save_IFS
40356   test -z "$as_dir" && as_dir=.
40357     for ac_exec_ext in '' $ac_executable_extensions; do
40358   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40359     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40361     break 2
40362   fi
40363 done
40364   done
40365 IFS=$as_save_IFS
40366 
40367   ;;
40368 esac
40369 fi
40370 JTREGEXE=$ac_cv_path_JTREGEXE
40371 if test -n "$JTREGEXE"; then
40372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40373 $as_echo "$JTREGEXE" >&6; }
40374 else
40375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40376 $as_echo "no" >&6; }
40377 fi
40378 
40379 
40380   test -n "$JTREGEXE" && break
40381 done
40382 
40383     else
40384       # If it succeeded, then it was overridden by the user. We will use it
40385       # for the tool.
40386 
40387       # First remove it from the list of overridden variables, so we can test
40388       # for unknown variables in the end.
40389       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40390 
40391       # Check if the provided tool contains a complete path.
40392       tool_specified="$JTREGEXE"
40393       tool_basename="${tool_specified##*/}"
40394       if test "x$tool_basename" = "x$tool_specified"; then
40395         # A command without a complete path is provided, search $PATH.
40396         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40397 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40398         # Extract the first word of "$tool_basename", so it can be a program name with args.
40399 set dummy $tool_basename; ac_word=$2
40400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40401 $as_echo_n "checking for $ac_word... " >&6; }
40402 if ${ac_cv_path_JTREGEXE+:} false; then :
40403   $as_echo_n "(cached) " >&6
40404 else
40405   case $JTREGEXE in
40406   [\\/]* | ?:[\\/]*)
40407   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40408   ;;
40409   *)
40410   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40411 for as_dir in $PATH
40412 do
40413   IFS=$as_save_IFS
40414   test -z "$as_dir" && as_dir=.
40415     for ac_exec_ext in '' $ac_executable_extensions; do
40416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40417     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40419     break 2
40420   fi
40421 done
40422   done
40423 IFS=$as_save_IFS
40424 
40425   ;;
40426 esac
40427 fi
40428 JTREGEXE=$ac_cv_path_JTREGEXE
40429 if test -n "$JTREGEXE"; then
40430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40431 $as_echo "$JTREGEXE" >&6; }
40432 else
40433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40434 $as_echo "no" >&6; }
40435 fi
40436 
40437 
40438         if test "x$JTREGEXE" = x; then
40439           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40440         fi
40441       else
40442         # Otherwise we believe it is a complete path. Use it as it is.
40443         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40444 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40445         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40446 $as_echo_n "checking for JTREGEXE... " >&6; }
40447         if test ! -x "$tool_specified"; then
40448           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40449 $as_echo "not found" >&6; }
40450           as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40451         fi
40452         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40453 $as_echo "$tool_specified" >&6; }
40454       fi
40455     fi
40456   fi
40457 
40458 
40459 
40460   if test "x$JTREGEXE" = x; then
40461     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40462   fi
40463 
40464 
40465       JT_HOME="`$DIRNAME $JTREGEXE`"
40466     fi
40467   fi
40468 
40469 
40470 
40471 
40472 
40473 
40474   # Option used to tell the compiler whether to create 32- or 64-bit executables
40475   if test "x$TOOLCHAIN_TYPE" = xxlc; then
40476     COMPILER_TARGET_BITS_FLAG="-q"
40477   else
40478     COMPILER_TARGET_BITS_FLAG="-m"
40479   fi
40480 
40481 
40482   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40483   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40484     ARFLAGS="-r"
40485   elif test "x$OPENJDK_TARGET_OS" = xaix; then
40486     ARFLAGS="-X64"
40487   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40488     # lib.exe is used as AR to create static libraries.
40489     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40490   else
40491     ARFLAGS=""
40492   fi
40493 
40494 
40495   ## Setup strip.
40496   # FIXME: should this really be per platform, or should it be per toolchain type?
40497   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40498   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40499   if test "x$OPENJDK_TARGET_OS" = xlinux; then
40500     STRIPFLAGS="-g"
40501   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40502     STRIPFLAGS="-x"
40503   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40504     STRIPFLAGS="-S"
40505   elif test "x$OPENJDK_TARGET_OS" = xaix; then
40506     STRIPFLAGS="-X32_64"
40507   fi
40508 
40509   if test "x$OPENJDK_TARGET_OS" != xwindows; then
40510     POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40511   fi
40512 
40513 
40514   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40515     # FIXME: break out into MCSFLAGS
40516     POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40517   fi
40518 
40519 
40520   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40521     CC_OUT_OPTION=-Fo
40522     EXE_OUT_OPTION=-out:
40523     LD_OUT_OPTION=-out:
40524     AR_OUT_OPTION=-out:
40525   else
40526     # The option used to specify the target .o,.a or .so file.
40527     # When compiling, how to specify the to be created object file.
40528     CC_OUT_OPTION='-o$(SPACE)'
40529     # When linking, how to specify the to be created executable.
40530     EXE_OUT_OPTION='-o$(SPACE)'
40531     # When linking, how to specify the to be created dynamically linkable library.
40532     LD_OUT_OPTION='-o$(SPACE)'
40533     # When archiving, how to specify the to be create static archive for object files.
40534     AR_OUT_OPTION='rcs$(SPACE)'
40535   fi
40536 
40537 
40538 
40539 
40540 
40541   # On Windows, we need to set RC flags.
40542   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40543     RC_FLAGS="-nologo -l 0x409 -r"
40544     if test "x$VARIANT" = xOPT; then
40545       RC_FLAGS="$RC_FLAGS -d NDEBUG"
40546     fi
40547 
40548     # The version variables used to create RC_FLAGS may be overridden
40549     # in a custom configure script, or possibly the command line.
40550     # Let those variables be expanded at make time in spec.gmk.
40551     # The \$ are escaped to the shell, and the $(...) variables
40552     # are evaluated by make.
40553     RC_FLAGS="$RC_FLAGS \
40554         -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40555         -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40556         -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40557         -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(COOKED_JDK_UPDATE_VERSION).\$(COOKED_BUILD_NUMBER)\" \
40558         -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40559         -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40560         -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(COOKED_JDK_UPDATE_VERSION),\$(COOKED_JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40561   fi
40562 
40563 
40564   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40565     # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40566     CCXXFLAGS="$CCXXFLAGS -nologo"
40567   fi
40568 
40569   if test "x$SYSROOT" != "x"; then
40570     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
40571       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40572         # Solaris Studio does not have a concept of sysroot. Instead we must
40573         # make sure the default include and lib dirs are appended to each
40574         # compile and link command line.
40575         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
40576         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
40577             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
40578             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
40579       fi
40580     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
40581       SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
40582       SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
40583     elif test "x$TOOLCHAIN_TYPE" = xclang; then
40584       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
40585       SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
40586     fi
40587     # Propagate the sysroot args to hotspot
40588     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
40589     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
40590     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
40591   fi
40592 
40593 
40594 
40595 
40596 # FIXME: Currently we must test this after toolchain but before flags. Fix!
40597 
40598 # Now we can test some aspects on the target using configure macros.
40599 
40600 
40601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40602 $as_echo_n "checking for ANSI C header files... " >&6; }
40603 if ${ac_cv_header_stdc+:} false; then :
40604   $as_echo_n "(cached) " >&6
40605 else
40606   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40607 /* end confdefs.h.  */
40608 #include <stdlib.h>
40609 #include <stdarg.h>
40610 #include <string.h>
40611 #include <float.h>
40612 
40613 int
40614 main ()
40615 {
40616 
40617   ;
40618   return 0;
40619 }
40620 _ACEOF
40621 if ac_fn_cxx_try_compile "$LINENO"; then :
40622   ac_cv_header_stdc=yes
40623 else
40624   ac_cv_header_stdc=no
40625 fi
40626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40627 
40628 if test $ac_cv_header_stdc = yes; then
40629   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40630   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40631 /* end confdefs.h.  */
40632 #include <string.h>
40633 
40634 _ACEOF
40635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40636   $EGREP "memchr" >/dev/null 2>&1; then :
40637 
40638 else
40639   ac_cv_header_stdc=no
40640 fi
40641 rm -f conftest*
40642 
40643 fi
40644 
40645 if test $ac_cv_header_stdc = yes; then
40646   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40647   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40648 /* end confdefs.h.  */
40649 #include <stdlib.h>
40650 
40651 _ACEOF
40652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40653   $EGREP "free" >/dev/null 2>&1; then :
40654 
40655 else
40656   ac_cv_header_stdc=no
40657 fi
40658 rm -f conftest*
40659 
40660 fi
40661 
40662 if test $ac_cv_header_stdc = yes; then
40663   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40664   if test "$cross_compiling" = yes; then :
40665   :
40666 else
40667   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40668 /* end confdefs.h.  */
40669 #include <ctype.h>
40670 #include <stdlib.h>
40671 #if ((' ' & 0x0FF) == 0x020)
40672 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40673 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40674 #else
40675 # define ISLOWER(c) \
40676                    (('a' <= (c) && (c) <= 'i') \
40677                      || ('j' <= (c) && (c) <= 'r') \
40678                      || ('s' <= (c) && (c) <= 'z'))
40679 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40680 #endif
40681 
40682 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40683 int
40684 main ()
40685 {
40686   int i;
40687   for (i = 0; i < 256; i++)
40688     if (XOR (islower (i), ISLOWER (i))
40689         || toupper (i) != TOUPPER (i))
40690       return 2;
40691   return 0;
40692 }
40693 _ACEOF
40694 if ac_fn_cxx_try_run "$LINENO"; then :
40695 
40696 else
40697   ac_cv_header_stdc=no
40698 fi
40699 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40700   conftest.$ac_objext conftest.beam conftest.$ac_ext
40701 fi
40702 
40703 fi
40704 fi
40705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40706 $as_echo "$ac_cv_header_stdc" >&6; }
40707 if test $ac_cv_header_stdc = yes; then
40708 
40709 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
40710 
40711 fi
40712 
40713 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
40714 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40715                   inttypes.h stdint.h unistd.h
40716 do :
40717   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40718 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40719 "
40720 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40721   cat >>confdefs.h <<_ACEOF
40722 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40723 _ACEOF
40724 
40725 fi
40726 
40727 done
40728 
40729 
40730 
40731   ###############################################################################
40732   #
40733   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40734   # (The JVM can use 32 or 64 bit Java pointers but that decision
40735   # is made at runtime.)
40736   #
40737 
40738   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40739     # Always specify -m flag on Solaris
40740     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40741 
40742   # When we add flags to the "official" CFLAGS etc, we need to
40743   # keep track of these additions in ADDED_CFLAGS etc. These
40744   # will later be checked to make sure only controlled additions
40745   # have been made to CFLAGS etc.
40746   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40747   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40748   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40749 
40750   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40751   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40752   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40753 
40754   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40755   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40756   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40757 
40758   elif test "x$COMPILE_TYPE" = xreduced; then
40759     if test "x$OPENJDK_TARGET_OS" != xwindows; then
40760       # Specify -m if running reduced on other Posix platforms
40761 
40762   # When we add flags to the "official" CFLAGS etc, we need to
40763   # keep track of these additions in ADDED_CFLAGS etc. These
40764   # will later be checked to make sure only controlled additions
40765   # have been made to CFLAGS etc.
40766   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40767   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40768   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40769 
40770   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40771   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40772   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40773 
40774   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40775   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40776   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40777 
40778     fi
40779   fi
40780 
40781   # Make compilation sanity check
40782   for ac_header in stdio.h
40783 do :
40784   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40785 if test "x$ac_cv_header_stdio_h" = xyes; then :
40786   cat >>confdefs.h <<_ACEOF
40787 #define HAVE_STDIO_H 1
40788 _ACEOF
40789 
40790 else
40791 
40792     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40793 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
40794     if test "x$COMPILE_TYPE" = xreduced; then
40795       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
40796 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
40797     elif test "x$COMPILE_TYPE" = xcross; then
40798       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
40799 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
40800     fi
40801     as_fn_error $? "Cannot continue." "$LINENO" 5
40802 
40803 fi
40804 
40805 done
40806 
40807 
40808   # The cast to long int works around a bug in the HP C Compiler
40809 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40810 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40811 # This bug is HP SR number 8606223364.
40812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40813 $as_echo_n "checking size of int *... " >&6; }
40814 if ${ac_cv_sizeof_int_p+:} false; then :
40815   $as_echo_n "(cached) " >&6
40816 else
40817   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40818 
40819 else
40820   if test "$ac_cv_type_int_p" = yes; then
40821      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40822 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40823 as_fn_error 77 "cannot compute sizeof (int *)
40824 See \`config.log' for more details" "$LINENO" 5; }
40825    else
40826      ac_cv_sizeof_int_p=0
40827    fi
40828 fi
40829 
40830 fi
40831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40832 $as_echo "$ac_cv_sizeof_int_p" >&6; }
40833 
40834 
40835 
40836 cat >>confdefs.h <<_ACEOF
40837 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
40838 _ACEOF
40839 
40840 
40841 
40842   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
40843   if test "x$ac_cv_sizeof_int_p" = x; then
40844     # The test failed, lets stick to the assumed value.
40845     { $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
40846 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
40847   else
40848     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40849 
40850     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40851       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
40852       # Let's try to implicitely set the compilers target architecture and retry the test
40853       { $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
40854 $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;}
40855       { $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
40856 $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;}
40857 
40858   # When we add flags to the "official" CFLAGS etc, we need to
40859   # keep track of these additions in ADDED_CFLAGS etc. These
40860   # will later be checked to make sure only controlled additions
40861   # have been made to CFLAGS etc.
40862   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40863   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40864   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40865 
40866   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40867   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40868   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40869 
40870   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40871   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40872   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40873 
40874 
40875       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
40876       unset ac_cv_sizeof_int_p
40877       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
40878       cat >>confdefs.h <<_ACEOF
40879 #undef SIZEOF_INT_P
40880 _ACEOF
40881 
40882       # The cast to long int works around a bug in the HP C Compiler
40883 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40884 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40885 # This bug is HP SR number 8606223364.
40886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40887 $as_echo_n "checking size of int *... " >&6; }
40888 if ${ac_cv_sizeof_int_p+:} false; then :
40889   $as_echo_n "(cached) " >&6
40890 else
40891   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40892 
40893 else
40894   if test "$ac_cv_type_int_p" = yes; then
40895      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40896 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40897 as_fn_error 77 "cannot compute sizeof (int *)
40898 See \`config.log' for more details" "$LINENO" 5; }
40899    else
40900      ac_cv_sizeof_int_p=0
40901    fi
40902 fi
40903 
40904 fi
40905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40906 $as_echo "$ac_cv_sizeof_int_p" >&6; }
40907 
40908 
40909 
40910 cat >>confdefs.h <<_ACEOF
40911 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
40912 _ACEOF
40913 
40914 
40915 
40916       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40917 
40918       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40919         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
40920       fi
40921     fi
40922   fi
40923 
40924   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
40925 $as_echo_n "checking for target address size... " >&6; }
40926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
40927 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
40928 
40929 
40930   ###############################################################################
40931   #
40932   # Is the target little of big endian?
40933   #
40934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
40935 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
40936 if ${ac_cv_c_bigendian+:} false; then :
40937   $as_echo_n "(cached) " >&6
40938 else
40939   ac_cv_c_bigendian=unknown
40940     # See if we're dealing with a universal compiler.
40941     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40942 /* end confdefs.h.  */
40943 #ifndef __APPLE_CC__
40944                not a universal capable compiler
40945              #endif
40946              typedef int dummy;
40947 
40948 _ACEOF
40949 if ac_fn_cxx_try_compile "$LINENO"; then :
40950 
40951         # Check for potential -arch flags.  It is not universal unless
40952         # there are at least two -arch flags with different values.
40953         ac_arch=
40954         ac_prev=
40955         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
40956          if test -n "$ac_prev"; then
40957            case $ac_word in
40958              i?86 | x86_64 | ppc | ppc64)
40959                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
40960                  ac_arch=$ac_word
40961                else
40962                  ac_cv_c_bigendian=universal
40963                  break
40964                fi
40965                ;;
40966            esac
40967            ac_prev=
40968          elif test "x$ac_word" = "x-arch"; then
40969            ac_prev=arch
40970          fi
40971        done
40972 fi
40973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40974     if test $ac_cv_c_bigendian = unknown; then
40975       # See if sys/param.h defines the BYTE_ORDER macro.
40976       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40977 /* end confdefs.h.  */
40978 #include <sys/types.h>
40979              #include <sys/param.h>
40980 
40981 int
40982 main ()
40983 {
40984 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
40985                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
40986                      && LITTLE_ENDIAN)
40987               bogus endian macros
40988              #endif
40989 
40990   ;
40991   return 0;
40992 }
40993 _ACEOF
40994 if ac_fn_cxx_try_compile "$LINENO"; then :
40995   # It does; now see whether it defined to BIG_ENDIAN or not.
40996          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40997 /* end confdefs.h.  */
40998 #include <sys/types.h>
40999                 #include <sys/param.h>
41000 
41001 int
41002 main ()
41003 {
41004 #if BYTE_ORDER != BIG_ENDIAN
41005                  not big endian
41006                 #endif
41007 
41008   ;
41009   return 0;
41010 }
41011 _ACEOF
41012 if ac_fn_cxx_try_compile "$LINENO"; then :
41013   ac_cv_c_bigendian=yes
41014 else
41015   ac_cv_c_bigendian=no
41016 fi
41017 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41018 fi
41019 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41020     fi
41021     if test $ac_cv_c_bigendian = unknown; then
41022       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41023       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41024 /* end confdefs.h.  */
41025 #include <limits.h>
41026 
41027 int
41028 main ()
41029 {
41030 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41031               bogus endian macros
41032              #endif
41033 
41034   ;
41035   return 0;
41036 }
41037 _ACEOF
41038 if ac_fn_cxx_try_compile "$LINENO"; then :
41039   # It does; now see whether it defined to _BIG_ENDIAN or not.
41040          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41041 /* end confdefs.h.  */
41042 #include <limits.h>
41043 
41044 int
41045 main ()
41046 {
41047 #ifndef _BIG_ENDIAN
41048                  not big endian
41049                 #endif
41050 
41051   ;
41052   return 0;
41053 }
41054 _ACEOF
41055 if ac_fn_cxx_try_compile "$LINENO"; then :
41056   ac_cv_c_bigendian=yes
41057 else
41058   ac_cv_c_bigendian=no
41059 fi
41060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41061 fi
41062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41063     fi
41064     if test $ac_cv_c_bigendian = unknown; then
41065       # Compile a test program.
41066       if test "$cross_compiling" = yes; then :
41067   # Try to guess by grepping values from an object file.
41068          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41069 /* end confdefs.h.  */
41070 short int ascii_mm[] =
41071                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41072                 short int ascii_ii[] =
41073                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41074                 int use_ascii (int i) {
41075                   return ascii_mm[i] + ascii_ii[i];
41076                 }
41077                 short int ebcdic_ii[] =
41078                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41079                 short int ebcdic_mm[] =
41080                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41081                 int use_ebcdic (int i) {
41082                   return ebcdic_mm[i] + ebcdic_ii[i];
41083                 }
41084                 extern int foo;
41085 
41086 int
41087 main ()
41088 {
41089 return use_ascii (foo) == use_ebcdic (foo);
41090   ;
41091   return 0;
41092 }
41093 _ACEOF
41094 if ac_fn_cxx_try_compile "$LINENO"; then :
41095   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41096               ac_cv_c_bigendian=yes
41097             fi
41098             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41099               if test "$ac_cv_c_bigendian" = unknown; then
41100                 ac_cv_c_bigendian=no
41101               else
41102                 # finding both strings is unlikely to happen, but who knows?
41103                 ac_cv_c_bigendian=unknown
41104               fi
41105             fi
41106 fi
41107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41108 else
41109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41110 /* end confdefs.h.  */
41111 $ac_includes_default
41112 int
41113 main ()
41114 {
41115 
41116              /* Are we little or big endian?  From Harbison&Steele.  */
41117              union
41118              {
41119                long int l;
41120                char c[sizeof (long int)];
41121              } u;
41122              u.l = 1;
41123              return u.c[sizeof (long int) - 1] == 1;
41124 
41125   ;
41126   return 0;
41127 }
41128 _ACEOF
41129 if ac_fn_cxx_try_run "$LINENO"; then :
41130   ac_cv_c_bigendian=no
41131 else
41132   ac_cv_c_bigendian=yes
41133 fi
41134 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41135   conftest.$ac_objext conftest.beam conftest.$ac_ext
41136 fi
41137 
41138     fi
41139 fi
41140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41141 $as_echo "$ac_cv_c_bigendian" >&6; }
41142  case $ac_cv_c_bigendian in #(
41143    yes)
41144      ENDIAN="big";; #(
41145    no)
41146      ENDIAN="little" ;; #(
41147    universal)
41148      ENDIAN="universal_endianness"
41149      ;; #(
41150    *)
41151      ENDIAN="unknown" ;;
41152  esac
41153 
41154 
41155   if test "x$ENDIAN" = xuniversal_endianness; then
41156     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41157   fi
41158   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41159     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
41160   fi
41161 
41162 
41163 # Configure flags for the tools
41164 
41165   ###############################################################################
41166   #
41167   # How to compile shared libraries.
41168   #
41169 
41170   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41171     PICFLAG="-fPIC"
41172     C_FLAG_REORDER=''
41173     CXX_FLAG_REORDER=''
41174 
41175     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41176       # Linking is different on MacOSX
41177       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41178       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41179       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41180       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41181       SET_SHARED_LIBRARY_MAPFILE=''
41182     else
41183       # Default works for linux, might work on other platforms as well.
41184       SHARED_LIBRARY_FLAGS='-shared'
41185       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41186       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41187       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41188       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41189     fi
41190   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41191     PICFLAG="-KPIC"
41192     C_FLAG_REORDER='-xF'
41193     CXX_FLAG_REORDER='-xF'
41194     SHARED_LIBRARY_FLAGS="-G"
41195     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41196     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41197     SET_SHARED_LIBRARY_NAME=''
41198     SET_SHARED_LIBRARY_MAPFILE='-M$1'
41199   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41200     PICFLAG="-qpic=large"
41201     C_FLAG_REORDER=''
41202     CXX_FLAG_REORDER=''
41203     SHARED_LIBRARY_FLAGS="-qmkshrobj"
41204     SET_EXECUTABLE_ORIGIN=""
41205     SET_SHARED_LIBRARY_ORIGIN=''
41206     SET_SHARED_LIBRARY_NAME=''
41207     SET_SHARED_LIBRARY_MAPFILE=''
41208   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41209     PICFLAG=""
41210     C_FLAG_REORDER=''
41211     CXX_FLAG_REORDER=''
41212     SHARED_LIBRARY_FLAGS="-LD"
41213     SET_EXECUTABLE_ORIGIN=''
41214     SET_SHARED_LIBRARY_ORIGIN=''
41215     SET_SHARED_LIBRARY_NAME=''
41216     SET_SHARED_LIBRARY_MAPFILE=''
41217   fi
41218 
41219 
41220 
41221 
41222 
41223 
41224 
41225 
41226 
41227   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41228     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41229     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41230     CFLAGS_JDKLIB_EXTRA='-xstrconst'
41231   fi
41232   # The (cross) compiler is now configured, we can now test capabilities
41233   # of the target platform.
41234 
41235 
41236 
41237   ###############################################################################
41238   #
41239   # Setup the opt flags for different compilers
41240   # and different operating systems.
41241   #
41242 
41243   # FIXME: this was indirectly the old default, but just inherited.
41244   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41245   #   C_FLAG_DEPS="-MMD -MF"
41246   # fi
41247 
41248   # Generate make dependency files
41249   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41250     C_FLAG_DEPS="-MMD -MF"
41251   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41252     C_FLAG_DEPS="-xMMD -xMF"
41253   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41254     C_FLAG_DEPS="-qmakedep=gcc -MF"
41255   fi
41256   CXX_FLAG_DEPS="$C_FLAG_DEPS"
41257 
41258 
41259 
41260   # Debug symbols
41261   #
41262   # By default don't set any specific assembler debug
41263   # info flags for toolchains unless we know they work.
41264   # See JDK-8207057.
41265   ASFLAGS_DEBUG_SYMBOLS=""
41266   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41267     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41268       CFLAGS_DEBUG_SYMBOLS="-g1"
41269       CXXFLAGS_DEBUG_SYMBOLS="-g1"
41270     else
41271       CFLAGS_DEBUG_SYMBOLS="-g"
41272       CXXFLAGS_DEBUG_SYMBOLS="-g"
41273     fi
41274     ASFLAGS_DEBUG_SYMBOLS="-g"
41275   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41276     CFLAGS_DEBUG_SYMBOLS="-g -xs"
41277     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41278   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41279     CFLAGS_DEBUG_SYMBOLS="-g"
41280     CXXFLAGS_DEBUG_SYMBOLS="-g"
41281   fi
41282 
41283 
41284 
41285 
41286   # Optimization levels
41287   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41288     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xalias_level=basic -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41289 
41290     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41291       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41292       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
41293       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41294       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41295       C_O_FLAG_NONE="-xregs=no%frameptr"
41296       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41297       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41298       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41299       CXX_O_FLAG_NONE="-xregs=no%frameptr"
41300       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41301         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41302         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41303       fi
41304     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41305       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41306       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41307       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41308       C_O_FLAG_NONE=""
41309       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41310       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41311       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41312       CXX_O_FLAG_NONE=""
41313     fi
41314   else
41315     # The remaining toolchains share opt flags between CC and CXX;
41316     # setup for C and duplicate afterwards.
41317     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41318       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41319         # On MacOSX we optimize for size, something
41320         # we should do for all platforms?
41321         C_O_FLAG_HIGHEST="-Os"
41322         C_O_FLAG_HI="-Os"
41323         C_O_FLAG_NORM="-Os"
41324         C_O_FLAG_NONE=""
41325       else
41326         C_O_FLAG_HIGHEST="-O3"
41327         C_O_FLAG_HI="-O3"
41328         C_O_FLAG_NORM="-O2"
41329         C_O_FLAG_NONE="-O0"
41330       fi
41331     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41332       C_O_FLAG_HIGHEST="-O3"
41333       C_O_FLAG_HI="-O3 -qstrict"
41334       C_O_FLAG_NORM="-O2"
41335       C_O_FLAG_NONE=""
41336     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41337       C_O_FLAG_HIGHEST="-O2"
41338       C_O_FLAG_HI="-O1"
41339       C_O_FLAG_NORM="-O1"
41340       C_O_FLAG_NONE="-Od"
41341     fi
41342     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41343     CXX_O_FLAG_HI="$C_O_FLAG_HI"
41344     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41345     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41346   fi
41347 
41348 
41349 
41350 
41351 
41352 
41353 
41354 
41355 
41356 
41357 
41358   # Special extras...
41359   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41360     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41361       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41362       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41363     fi
41364   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41365     LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41366     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41367     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41368   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41369     case $OPENJDK_TARGET_CPU_ARCH in
41370     x86 )
41371       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS -fstack-protector"
41372       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS -fstack-protector"
41373       ;;
41374     x86_64 )
41375       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS -fstack-protector"
41376       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS -fstack-protector"
41377       ;;
41378     esac
41379     if test "x$OPENJDK_TARGET_OS" != xmacosx; then
41380       LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,relro"
41381       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS -Wl,-z,relro"
41382     fi
41383     CXXSTD_CXXFLAG="-std=gnu++98"
41384 
41385   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
41386 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
41387   supports=yes
41388 
41389   saved_cxxflags="$CXXFLAGS"
41390   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
41391   ac_ext=cpp
41392 ac_cpp='$CXXCPP $CPPFLAGS'
41393 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41394 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41395 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41396 
41397   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41398 /* end confdefs.h.  */
41399 int i;
41400 _ACEOF
41401 if ac_fn_cxx_try_compile "$LINENO"; then :
41402 
41403 else
41404   supports=no
41405 fi
41406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41407   ac_ext=cpp
41408 ac_cpp='$CXXCPP $CPPFLAGS'
41409 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41410 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41411 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41412 
41413   CXXFLAGS="$saved_cxxflags"
41414 
41415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41416 $as_echo "$supports" >&6; }
41417   if test "x$supports" = "xyes" ; then
41418     :
41419   else
41420     CXXSTD_CXXFLAG=""
41421   fi
41422 
41423     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
41424     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
41425 
41426   fi
41427 
41428   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41429     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41430 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41431   fi
41432 
41433   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41434     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41435 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41436   fi
41437 
41438   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41439     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41440 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41441   fi
41442 
41443 
41444 # Check whether --with-extra-cflags was given.
41445 if test "${with_extra_cflags+set}" = set; then :
41446   withval=$with_extra_cflags;
41447 fi
41448 
41449 
41450 
41451 # Check whether --with-extra-cxxflags was given.
41452 if test "${with_extra_cxxflags+set}" = set; then :
41453   withval=$with_extra_cxxflags;
41454 fi
41455 
41456 
41457 
41458 # Check whether --with-extra-ldflags was given.
41459 if test "${with_extra_ldflags+set}" = set; then :
41460   withval=$with_extra_ldflags;
41461 fi
41462 
41463 
41464   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41465   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41466   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41467 
41468   # Hotspot needs these set in their legacy form
41469   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
41470   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
41471   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
41472 
41473 
41474 
41475 
41476 
41477   ###############################################################################
41478   #
41479   # Now setup the CFLAGS and LDFLAGS for the JDK build.
41480   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41481   #
41482 
41483   # Setup compiler/platform specific flags to CFLAGS_JDK,
41484   # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41485   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41486     # these options are used for both C and C++ compiles
41487     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41488         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41489     case $OPENJDK_TARGET_CPU_ARCH in
41490       arm )
41491         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41492         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41493         ;;
41494       ppc )
41495         # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41496         ;;
41497       x86 )
41498         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer -fstack-protector"
41499         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing -fstack-protector"
41500         ;;
41501       * )
41502         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41503         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41504         ;;
41505     esac
41506 
41507   REFERENCE_VERSION=6
41508 
41509   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
41510     as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
41511   fi
41512 
41513   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
41514     as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only parts < 99999 is supported" "$LINENO" 5
41515   fi
41516 
41517   # Version comparison method inspired by http://stackoverflow.com/a/24067243
41518   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
41519 
41520   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
41521 
41522   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
41523   # runs afoul of the more aggressive versions of these optimisations.
41524   # Notably, value range propagation now assumes that the this pointer of C++
41525   # member functions is non-null.
41526   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
41527 
41528 
41529   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
41530 $as_echo_n "checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
41531   supports=yes
41532 
41533   saved_cflags="$CFLAGS"
41534   CFLAGS="$CFLAGS $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
41535   ac_ext=c
41536 ac_cpp='$CPP $CPPFLAGS'
41537 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41538 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41539 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41540 
41541 
41542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41543 /* end confdefs.h.  */
41544 int i;
41545 _ACEOF
41546 if ac_fn_c_try_compile "$LINENO"; then :
41547 
41548 else
41549   supports=no
41550 fi
41551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41552   ac_ext=cpp
41553 ac_cpp='$CXXCPP $CPPFLAGS'
41554 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41555 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41556 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41557 
41558   CFLAGS="$saved_cflags"
41559 
41560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41561 $as_echo "$supports" >&6; }
41562   if test "x$supports" = "xyes" ; then
41563     C_COMP_SUPPORTS="yes"
41564   else
41565     C_COMP_SUPPORTS="no"
41566   fi
41567 
41568 
41569   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
41570 $as_echo_n "checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
41571   supports=yes
41572 
41573   saved_cxxflags="$CXXFLAGS"
41574   CXXFLAGS="$CXXFLAG $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
41575   ac_ext=cpp
41576 ac_cpp='$CXXCPP $CPPFLAGS'
41577 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41578 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41579 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41580 
41581   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41582 /* end confdefs.h.  */
41583 int i;
41584 _ACEOF
41585 if ac_fn_cxx_try_compile "$LINENO"; then :
41586 
41587 else
41588   supports=no
41589 fi
41590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41591   ac_ext=cpp
41592 ac_cpp='$CXXCPP $CPPFLAGS'
41593 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41594 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41595 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41596 
41597   CXXFLAGS="$saved_cxxflags"
41598 
41599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41600 $as_echo "$supports" >&6; }
41601   if test "x$supports" = "xyes" ; then
41602     CXX_COMP_SUPPORTS="yes"
41603   else
41604     CXX_COMP_SUPPORTS="no"
41605   fi
41606 
41607 
41608   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
41609 $as_echo_n "checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
41610   supports=no
41611   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
41612 
41613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41614 $as_echo "$supports" >&6; }
41615   if test "x$supports" = "xyes" ; then
41616     :
41617   else
41618     NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""
41619   fi
41620 
41621 
41622   NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
41623 
41624 
41625   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
41626 $as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
41627   supports=yes
41628 
41629   saved_cflags="$CFLAGS"
41630   CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
41631   ac_ext=c
41632 ac_cpp='$CPP $CPPFLAGS'
41633 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41634 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41635 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41636 
41637   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41638 /* end confdefs.h.  */
41639 int i;
41640 _ACEOF
41641 if ac_fn_c_try_compile "$LINENO"; then :
41642 
41643 else
41644   supports=no
41645 fi
41646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41647   ac_ext=cpp
41648 ac_cpp='$CXXCPP $CPPFLAGS'
41649 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41650 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41651 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41652 
41653   CFLAGS="$saved_cflags"
41654 
41655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41656 $as_echo "$supports" >&6; }
41657   if test "x$supports" = "xyes" ; then
41658     C_COMP_SUPPORTS="yes"
41659   else
41660     C_COMP_SUPPORTS="no"
41661   fi
41662 
41663 
41664   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
41665 $as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
41666   supports=yes
41667 
41668   saved_cxxflags="$CXXFLAGS"
41669   CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
41670   ac_ext=cpp
41671 ac_cpp='$CXXCPP $CPPFLAGS'
41672 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41673 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41674 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41675 
41676   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41677 /* end confdefs.h.  */
41678 int i;
41679 _ACEOF
41680 if ac_fn_cxx_try_compile "$LINENO"; then :
41681 
41682 else
41683   supports=no
41684 fi
41685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41686   ac_ext=cpp
41687 ac_cpp='$CXXCPP $CPPFLAGS'
41688 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41689 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41690 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41691 
41692   CXXFLAGS="$saved_cxxflags"
41693 
41694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41695 $as_echo "$supports" >&6; }
41696   if test "x$supports" = "xyes" ; then
41697     CXX_COMP_SUPPORTS="yes"
41698   else
41699     CXX_COMP_SUPPORTS="no"
41700   fi
41701 
41702 
41703   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
41704 $as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
41705   supports=no
41706   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
41707 
41708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41709 $as_echo "$supports" >&6; }
41710   if test "x$supports" = "xyes" ; then
41711     :
41712   else
41713     NO_LIFETIME_DSE_CFLAG=""
41714   fi
41715 
41716   CFLAGS_JDK="${CFLAGS_JDK} ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
41717 
41718 
41719 
41720   else
41721     :
41722   fi
41723 
41724   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41725     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41726     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41727       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41728       CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41729     fi
41730 
41731     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41732     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41733   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41734     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41735     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41736   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41737     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK \
41738         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41739         -DWIN32_LEAN_AND_MEAN \
41740         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41741         -DWIN32 -DIAL"
41742     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41743       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41744     else
41745       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41746     fi
41747     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
41748     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
41749     # studio.
41750     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
41751       CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41752           -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
41753     fi
41754   fi
41755 
41756   ###############################################################################
41757 
41758   # Adjust flags according to debug level.
41759   case $DEBUG_LEVEL in
41760     fastdebug )
41761       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41762       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41763       C_O_FLAG_HI="$C_O_FLAG_NORM"
41764       C_O_FLAG_NORM="$C_O_FLAG_NORM"
41765       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41766       CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41767       JAVAC_FLAGS="$JAVAC_FLAGS -g"
41768       ;;
41769     slowdebug )
41770       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41771       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41772       C_O_FLAG_HI="$C_O_FLAG_NONE"
41773       C_O_FLAG_NORM="$C_O_FLAG_NONE"
41774       CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41775       CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41776       JAVAC_FLAGS="$JAVAC_FLAGS -g"
41777       ;;
41778   esac
41779 
41780   # Setup LP64
41781   CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41782 
41783   # Set some common defines. These works for all compilers, but assume
41784   # -D is universally accepted.
41785 
41786   # Setup endianness
41787   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41788     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41789     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41790     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41791     #   Note: -Dmacro         is the same as    #define macro 1
41792     #         -Dmacro=        is the same as    #define macro
41793     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41794       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41795     else
41796       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41797     fi
41798   else
41799     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
41800     # are defined in the system?
41801     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41802       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN="
41803     else
41804       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41805     fi
41806   fi
41807   if test "x$OPENJDK_TARGET_CPU" = xppc64le; then
41808     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DABI_ELFv2"
41809   fi
41810 
41811   # Setup target OS define. Use OS target name but in upper case.
41812   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41813   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41814 
41815   # Setup target CPU
41816   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41817 
41818   # Setup debug/release defines
41819   if test "x$DEBUG_LEVEL" = xrelease; then
41820     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41821     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41822       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41823     fi
41824   else
41825     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41826   fi
41827 
41828   # Setup release name
41829   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41830 
41831 
41832   # Set some additional per-OS defines.
41833   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41834     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41835   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41836     # FIXME: PPC64 should not be here.
41837     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41838   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41839     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41840   fi
41841 
41842   # Additional macosx handling
41843   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41844     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41845       # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41846       # FIXME: clean this up, and/or move it elsewhere.
41847 
41848       # Setting these parameters makes it an error to link to macosx APIs that are
41849       # newer than the given OS version and makes the linked binaries compatible
41850       # even if built on a newer version of the OS.
41851       # The expected format is X.Y.Z
41852       MACOSX_VERSION_MIN=10.7.0
41853 
41854 
41855       # The macro takes the version with no dots, ex: 1070
41856       # Let the flags variables get resolved in make for easier override on make
41857       # command line.
41858       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41859       LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41860     fi
41861   fi
41862 
41863   # Setup some hard coded includes
41864   CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41865       -I${JDK_OUTPUTDIR}/include \
41866       -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41867       -I${JDK_TOPDIR}/src/share/javavm/export \
41868       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41869       -I${JDK_TOPDIR}/src/share/native/common \
41870       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41871 
41872   # The shared libraries are compiled using the picflag.
41873   CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41874   CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41875 
41876   # Executable flags
41877   CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41878   CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41879 
41880 
41881 
41882 
41883 
41884 
41885   # Setup LDFLAGS et al.
41886   #
41887   # Now this is odd. The JDK native libraries have to link against libjvm.so
41888   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41889   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41890   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41891   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41892   # libraries will link to whatever is in memory. Yuck.
41893   #
41894   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41895   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41896     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41897     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41898       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41899     fi
41900     # TODO: make -debug optional "--disable-full-debug-symbols"
41901     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41902     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41903     LDFLAGS_JDKLIB_SUFFIX=""
41904     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41905       LDFLAGS_STACK_SIZE=1048576
41906     else
41907       LDFLAGS_STACK_SIZE=327680
41908     fi
41909     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41910   else
41911     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41912       # If this is a --hash-style=gnu system, use --hash-style=both, why?
41913       # We have previously set HAS_GNU_HASH if this is the case
41914       if test -n "$HAS_GNU_HASH"; then
41915         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41916       fi
41917       if test "x$OPENJDK_TARGET_OS" = xlinux; then
41918         # And since we now know that the linker is gnu, then add:
41919         #   -z defs, to forbid undefined symbols in object files
41920         #   -z noexecstack, to mark stack regions as non-executable
41921         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack"
41922         if test "x$DEBUG_LEVEL" = "xrelease"; then
41923           # When building release libraries, tell the linker optimize them.
41924           # Should this be supplied to the OSS linker as well?
41925           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41926         fi
41927       fi
41928     fi
41929 
41930     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41931       LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41932       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41933     fi
41934 
41935     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41936         -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41937 
41938     # On some platforms (mac) the linker warns about non existing -L dirs.
41939     # Add server first if available. Linking aginst client does not always produce the same results.
41940     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41941     # Default to server for other variants.
41942     if test "x$JVM_VARIANT_SERVER" = xtrue; then
41943       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41944     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41945       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41946     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41947       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41948     else
41949       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41950     fi
41951 
41952     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41953     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41954       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41955     fi
41956 
41957     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41958     if test "x$OPENJDK_TARGET_OS" = xlinux; then
41959       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41960     fi
41961   fi
41962 
41963 
41964 
41965 
41966 
41967 
41968 
41969   # Some Zero and Shark settings.
41970   # ZERO_ARCHFLAG tells the compiler which mode to build for
41971   case "${OPENJDK_TARGET_CPU}" in
41972     s390)
41973       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41974       ;;
41975     *)
41976       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41977   esac
41978 
41979 
41980   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
41981 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41982   supports=yes
41983 
41984   saved_cflags="$CFLAGS"
41985   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41986   ac_ext=c
41987 ac_cpp='$CPP $CPPFLAGS'
41988 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41989 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41990 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41991 
41992   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41993 /* end confdefs.h.  */
41994 int i;
41995 _ACEOF
41996 if ac_fn_c_try_compile "$LINENO"; then :
41997 
41998 else
41999   supports=no
42000 fi
42001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42002   ac_ext=cpp
42003 ac_cpp='$CXXCPP $CPPFLAGS'
42004 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42005 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42006 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42007 
42008   CFLAGS="$saved_cflags"
42009 
42010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42011 $as_echo "$supports" >&6; }
42012   if test "x$supports" = "xyes" ; then
42013     C_COMP_SUPPORTS="yes"
42014   else
42015     C_COMP_SUPPORTS="no"
42016   fi
42017 
42018 
42019   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
42020 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42021   supports=yes
42022 
42023   saved_cxxflags="$CXXFLAGS"
42024   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42025   ac_ext=cpp
42026 ac_cpp='$CXXCPP $CPPFLAGS'
42027 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42028 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42029 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42030 
42031   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42032 /* end confdefs.h.  */
42033 int i;
42034 _ACEOF
42035 if ac_fn_cxx_try_compile "$LINENO"; then :
42036 
42037 else
42038   supports=no
42039 fi
42040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42041   ac_ext=cpp
42042 ac_cpp='$CXXCPP $CPPFLAGS'
42043 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42044 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42045 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42046 
42047   CXXFLAGS="$saved_cxxflags"
42048 
42049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42050 $as_echo "$supports" >&6; }
42051   if test "x$supports" = "xyes" ; then
42052     CXX_COMP_SUPPORTS="yes"
42053   else
42054     CXX_COMP_SUPPORTS="no"
42055   fi
42056 
42057 
42058   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
42059 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
42060   supports=no
42061   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
42062 
42063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42064 $as_echo "$supports" >&6; }
42065   if test "x$supports" = "xyes" ; then
42066     :
42067   else
42068     ZERO_ARCHFLAG=""
42069   fi
42070 
42071 
42072 
42073   # Check that the compiler supports -mX (or -qX on AIX) flags
42074   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42075 
42076 
42077   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42078 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42079   supports=yes
42080 
42081   saved_cflags="$CFLAGS"
42082   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42083   ac_ext=c
42084 ac_cpp='$CPP $CPPFLAGS'
42085 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42086 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42087 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42088 
42089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42090 /* end confdefs.h.  */
42091 int i;
42092 _ACEOF
42093 if ac_fn_c_try_compile "$LINENO"; then :
42094 
42095 else
42096   supports=no
42097 fi
42098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42099   ac_ext=cpp
42100 ac_cpp='$CXXCPP $CPPFLAGS'
42101 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42102 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42103 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42104 
42105   CFLAGS="$saved_cflags"
42106 
42107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42108 $as_echo "$supports" >&6; }
42109   if test "x$supports" = "xyes" ; then
42110     C_COMP_SUPPORTS="yes"
42111   else
42112     C_COMP_SUPPORTS="no"
42113   fi
42114 
42115 
42116   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42117 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42118   supports=yes
42119 
42120   saved_cxxflags="$CXXFLAGS"
42121   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42122   ac_ext=cpp
42123 ac_cpp='$CXXCPP $CPPFLAGS'
42124 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42125 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42126 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42127 
42128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42129 /* end confdefs.h.  */
42130 int i;
42131 _ACEOF
42132 if ac_fn_cxx_try_compile "$LINENO"; then :
42133 
42134 else
42135   supports=no
42136 fi
42137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42138   ac_ext=cpp
42139 ac_cpp='$CXXCPP $CPPFLAGS'
42140 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42141 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42142 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42143 
42144   CXXFLAGS="$saved_cxxflags"
42145 
42146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42147 $as_echo "$supports" >&6; }
42148   if test "x$supports" = "xyes" ; then
42149     CXX_COMP_SUPPORTS="yes"
42150   else
42151     CXX_COMP_SUPPORTS="no"
42152   fi
42153 
42154 
42155   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42156 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42157   supports=no
42158   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
42159 
42160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42161 $as_echo "$supports" >&6; }
42162   if test "x$supports" = "xyes" ; then
42163     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42164   else
42165     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42166   fi
42167 
42168 
42169 
42170 
42171 # Setup debug symbols (need objcopy from the toolchain for that)
42172 
42173   # Backwards compatibility. --with-native-debug-symbols is preferred post JDK-8207234,
42174   # but if somebody does not specify it via configure, we still want to preserve old
42175   # behaviour of --disable-debug-symbols
42176   #
42177   # ENABLE_DEBUG_SYMBOLS
42178   # This must be done after the toolchain is setup, since we're looking at objcopy.
42179   #
42180   # Check whether --enable-debug-symbols was given.
42181 if test "${enable_debug_symbols+set}" = set; then :
42182   enableval=$enable_debug_symbols;
42183 fi
42184 
42185 
42186   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42187 $as_echo_n "checking if we should generate debug symbols... " >&6; }
42188 
42189   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42190     # explicit enabling of enable-debug-symbols and can't find objcopy
42191     #   this is an error
42192     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42193   fi
42194 
42195   if test "x$enable_debug_symbols" = "xyes"; then
42196     ENABLE_DEBUG_SYMBOLS=true
42197   elif test "x$enable_debug_symbols" = "xno"; then
42198     ENABLE_DEBUG_SYMBOLS=false
42199   else
42200     # Default is on if objcopy is found
42201     if test "x$OBJCOPY" != x; then
42202       ENABLE_DEBUG_SYMBOLS=true
42203     # MacOS X and Windows don't use objcopy but default is on for those OSes
42204     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42205       ENABLE_DEBUG_SYMBOLS=true
42206     else
42207       ENABLE_DEBUG_SYMBOLS=false
42208     fi
42209   fi
42210 
42211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42212 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42213 
42214   # Backwards compatibility. --with-native-debug-symbols is preferred post JDK-8207234,
42215   # but if somebody does not specify it via configure, we still want to preserve old
42216   # behaviour of --disable-zip-debug-info.
42217   #
42218   # ZIP_DEBUGINFO_FILES
42219   #
42220   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42221 $as_echo_n "checking if we should zip debug-info files... " >&6; }
42222   # Check whether --enable-zip-debug-info was given.
42223 if test "${enable_zip_debug_info+set}" = set; then :
42224   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42225 else
42226   enable_zip_debug_info="yes"
42227 fi
42228 
42229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42230 $as_echo "${enable_zip_debug_info}" >&6; }
42231 
42232   if test "x${enable_zip_debug_info}" = "xno"; then
42233     ZIP_DEBUGINFO_FILES=false
42234   elif test "x${enable_zip_debug_info}" = "xyes"; then
42235     ZIP_DEBUGINFO_FILES=true
42236   fi
42237 
42238   #
42239   # NATIVE_DEBUG_SYMBOLS
42240   # This must be done after the toolchain is setup, since we're looking at objcopy.
42241   # In addition, this must be done after ENABLE_DEBUG_SYMBOLS and ZIP_DEBUGINFO_FILES
42242   # checking in order to preserve backwards compatibility post JDK-8207234.
42243   #
42244   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use (this will override previous settings)" >&5
42245 $as_echo_n "checking what type of native debug symbols to use (this will override previous settings)... " >&6; }
42246 
42247 # Check whether --with-native-debug-symbols was given.
42248 if test "${with_native_debug_symbols+set}" = set; then :
42249   withval=$with_native_debug_symbols;
42250         if test "x$OPENJDK_TARGET_OS" = xaix; then
42251           if test "x$with_native_debug_symbols" = xexternal || test "x$with_native_debug_symbols" = xzipped; then
42252             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
42253           fi
42254         fi
42255 
42256 else
42257 
42258         # Default to unset for backwards compatibility
42259         with_native_debug_symbols=""
42260 
42261 fi
42262 
42263   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
42264   if test "x$NATIVE_DEBUG_SYMBOLS" = x; then
42265     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not specified" >&5
42266 $as_echo "not specified" >&6; }
42267   else
42268     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
42269 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
42270   fi
42271   # Default is empty
42272   DEBUG_BINARIES=
42273   # Default is min_strip. Possible values are min_strip, all_strip, no_strip
42274   STRIP_POLICY=min_strip
42275 
42276   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
42277 
42278     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42279       if test "x$OBJCOPY" = x; then
42280         # enabling of enable-debug-symbols and can't find objcopy
42281         # this is an error
42282         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
42283       fi
42284     fi
42285 
42286     ENABLE_DEBUG_SYMBOLS=true
42287     STRIP_POLICY=min_strip
42288     ZIP_DEBUGINFO_FILES=true
42289   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
42290     ENABLE_DEBUG_SYMBOLS=false
42291     STRIP_POLICY=min_strip
42292     ZIP_DEBUGINFO_FILES=false
42293   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
42294     ENABLE_DEBUG_SYMBOLS=true
42295     STRIP_POLICY=no_strip
42296     ZIP_DEBUGINFO_FILES=false
42297     POST_STRIP_CMD=
42298     DEBUG_BINARIES=true
42299   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
42300 
42301     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42302       if test "x$OBJCOPY" = x; then
42303         # enabling of enable-debug-symbols and can't find objcopy
42304         # this is an error
42305         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
42306       fi
42307     fi
42308 
42309     ENABLE_DEBUG_SYMBOLS=true
42310     STRIP_POLICY=min_strip
42311     ZIP_DEBUGINFO_FILES=false
42312   elif test "x$NATIVE_DEBUG_SYMBOLS" != x; then
42313     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
42314   else
42315     { $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
42316 $as_echo "$as_me: --with-native-debug-symbols not specified. Using values from --disable-debug-symbols and --disable-zip-debug-info" >&6;}
42317   fi
42318 
42319 
42320 
42321 
42322 
42323 
42324 
42325 
42326 ###############################################################################
42327 #
42328 # Check dependencies for external and internal libraries.
42329 #
42330 ###############################################################################
42331 
42332 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42333 
42334   # When using cygwin or msys, we need a wrapper binary that renames
42335   # /cygdrive/c/ arguments into c:/ arguments and peeks into
42336   # @files and rewrites these too! This wrapper binary is
42337   # called fixpath.
42338   FIXPATH=
42339   if test "x$OPENJDK_BUILD_OS" = xwindows; then
42340     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42341 $as_echo_n "checking if fixpath can be created... " >&6; }
42342     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42343     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42344     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42345       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42346       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42347       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42348       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42349     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42350       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42351       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42352 
42353       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42354       # @ was chosen as separator to minimize risk of other tools messing around with it
42355       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42356       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42357 
42358       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42359     fi
42360     rm -f $OUTPUT_ROOT/fixpath*
42361     cd $OUTPUT_ROOT
42362     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42363     cd $CURDIR
42364 
42365     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42366       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42367 $as_echo "no" >&6; }
42368       cat $OUTPUT_ROOT/fixpath1.log
42369       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42370     fi
42371     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42372 $as_echo "yes" >&6; }
42373     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42374 $as_echo_n "checking if fixpath.exe works... " >&6; }
42375     cd $OUTPUT_ROOT
42376     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42377     cd $CURDIR
42378     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42379       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42380 $as_echo "no" >&6; }
42381       cat $OUTPUT_ROOT/fixpath2.log
42382       as_fn_error $? "fixpath did not work!" "$LINENO" 5
42383     fi
42384     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42385 $as_echo "yes" >&6; }
42386     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42387   fi
42388 
42389 
42390 
42391 
42392 
42393 
42394   ###############################################################################
42395   #
42396   # OS specific settings that we never will need to probe.
42397   #
42398   if test "x$OPENJDK_TARGET_OS" = xlinux; then
42399     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42400 $as_echo_n "checking what is not needed on Linux?... " >&6; }
42401     PULSE_NOT_NEEDED=yes
42402     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42403 $as_echo "pulse" >&6; }
42404   fi
42405 
42406   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42407     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42408 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
42409     ALSA_NOT_NEEDED=yes
42410     PULSE_NOT_NEEDED=yes
42411     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42412 $as_echo "alsa pulse" >&6; }
42413   fi
42414 
42415   if test "x$OPENJDK_TARGET_OS" = xaix; then
42416     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42417 $as_echo_n "checking what is not needed on AIX?... " >&6; }
42418     ALSA_NOT_NEEDED=yes
42419     PULSE_NOT_NEEDED=yes
42420     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42421 $as_echo "alsa pulse" >&6; }
42422   fi
42423 
42424 
42425   if test "x$OPENJDK_TARGET_OS" = xwindows; then
42426     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42427 $as_echo_n "checking what is not needed on Windows?... " >&6; }
42428     CUPS_NOT_NEEDED=yes
42429     ALSA_NOT_NEEDED=yes
42430     PULSE_NOT_NEEDED=yes
42431     X11_NOT_NEEDED=yes
42432     FONTCONFIG_NOT_NEEDED=yes
42433     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42434 $as_echo "alsa cups pulse x11" >&6; }
42435   fi
42436 
42437   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42438     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42439 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42440     ALSA_NOT_NEEDED=yes
42441     PULSE_NOT_NEEDED=yes
42442     X11_NOT_NEEDED=yes
42443     FONTCONFIG_NOT_NEEDED=yes
42444     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42445 $as_echo "alsa pulse x11" >&6; }
42446   fi
42447 
42448   if test "x$OPENJDK_TARGET_OS" = xbsd; then
42449     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42450 $as_echo_n "checking what is not needed on bsd?... " >&6; }
42451     ALSA_NOT_NEEDED=yes
42452     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42453 $as_echo "alsa" >&6; }
42454   fi
42455 
42456   if test "x$OPENJDK" = "xfalse"; then
42457     FREETYPE_NOT_NEEDED=yes
42458   fi
42459 
42460   if test "x$SUPPORT_HEADFUL" = xno; then
42461     X11_NOT_NEEDED=yes
42462   fi
42463 
42464   # Deprecated and now ignored
42465 
42466   # Check whether --enable-macosx-runtime-support was given.
42467 if test "${enable_macosx_runtime_support+set}" = set; then :
42468   enableval=$enable_macosx_runtime_support;
42469 fi
42470 
42471   if test "x$enable_macosx_runtime_support" != x; then
42472     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42473 $as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42474   fi
42475 
42476 
42477 
42478 
42479   ###############################################################################
42480   #
42481   # Check for X Windows
42482   #
42483 
42484   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42485   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42486   # --x-libraries for the sysroot, if that seems to be correct.
42487   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42488     if test "x$SYSROOT" != "x"; then
42489       if test "x$x_includes" = xNONE; then
42490         if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42491           x_includes="$SYSROOT/usr/X11R6/include"
42492         elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42493           x_includes="$SYSROOT/usr/include"
42494         fi
42495       fi
42496       if test "x$x_libraries" = xNONE; then
42497         if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42498           x_libraries="$SYSROOT/usr/X11R6/lib"
42499         elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42500           x_libraries="$SYSROOT/usr/lib64"
42501         elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42502           x_libraries="$SYSROOT/usr/lib"
42503         fi
42504       fi
42505     fi
42506   fi
42507 
42508   # Now let autoconf do it's magic
42509   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42510 $as_echo_n "checking for X... " >&6; }
42511 
42512 
42513 # Check whether --with-x was given.
42514 if test "${with_x+set}" = set; then :
42515   withval=$with_x;
42516 fi
42517 
42518 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42519 if test "x$with_x" = xno; then
42520   # The user explicitly disabled X.
42521   have_x=disabled
42522 else
42523   case $x_includes,$x_libraries in #(
42524     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42525     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42526   $as_echo_n "(cached) " >&6
42527 else
42528   # One or both of the vars are not set, and there is no cached value.
42529 ac_x_includes=no ac_x_libraries=no
42530 rm -f -r conftest.dir
42531 if mkdir conftest.dir; then
42532   cd conftest.dir
42533   cat >Imakefile <<'_ACEOF'
42534 incroot:
42535         @echo incroot='${INCROOT}'
42536 usrlibdir:
42537         @echo usrlibdir='${USRLIBDIR}'
42538 libdir:
42539         @echo libdir='${LIBDIR}'
42540 _ACEOF
42541   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42542     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42543     for ac_var in incroot usrlibdir libdir; do
42544       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42545     done
42546     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42547     for ac_extension in a so sl dylib la dll; do
42548       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42549          test -f "$ac_im_libdir/libX11.$ac_extension"; then
42550         ac_im_usrlibdir=$ac_im_libdir; break
42551       fi
42552     done
42553     # Screen out bogus values from the imake configuration.  They are
42554     # bogus both because they are the default anyway, and because
42555     # using them would break gcc on systems where it needs fixed includes.
42556     case $ac_im_incroot in
42557         /usr/include) ac_x_includes= ;;
42558         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42559     esac
42560     case $ac_im_usrlibdir in
42561         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
42562         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42563     esac
42564   fi
42565   cd ..
42566   rm -f -r conftest.dir
42567 fi
42568 
42569 # Standard set of common directories for X headers.
42570 # Check X11 before X11Rn because it is often a symlink to the current release.
42571 ac_x_header_dirs='
42572 /usr/X11/include
42573 /usr/X11R7/include
42574 /usr/X11R6/include
42575 /usr/X11R5/include
42576 /usr/X11R4/include
42577 
42578 /usr/include/X11
42579 /usr/include/X11R7
42580 /usr/include/X11R6
42581 /usr/include/X11R5
42582 /usr/include/X11R4
42583 
42584 /usr/local/X11/include
42585 /usr/local/X11R7/include
42586 /usr/local/X11R6/include
42587 /usr/local/X11R5/include
42588 /usr/local/X11R4/include
42589 
42590 /usr/local/include/X11
42591 /usr/local/include/X11R7
42592 /usr/local/include/X11R6
42593 /usr/local/include/X11R5
42594 /usr/local/include/X11R4
42595 
42596 /usr/X386/include
42597 /usr/x386/include
42598 /usr/XFree86/include/X11
42599 
42600 /usr/include
42601 /usr/local/include
42602 /usr/unsupported/include
42603 /usr/athena/include
42604 /usr/local/x11r5/include
42605 /usr/lpp/Xamples/include
42606 
42607 /usr/openwin/include
42608 /usr/openwin/share/include'
42609 
42610 if test "$ac_x_includes" = no; then
42611   # Guess where to find include files, by looking for Xlib.h.
42612   # First, try using that file with no special directory specified.
42613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42614 /* end confdefs.h.  */
42615 #include <X11/Xlib.h>
42616 _ACEOF
42617 if ac_fn_cxx_try_cpp "$LINENO"; then :
42618   # We can compile using X headers with no special include directory.
42619 ac_x_includes=
42620 else
42621   for ac_dir in $ac_x_header_dirs; do
42622   if test -r "$ac_dir/X11/Xlib.h"; then
42623     ac_x_includes=$ac_dir
42624     break
42625   fi
42626 done
42627 fi
42628 rm -f conftest.err conftest.i conftest.$ac_ext
42629 fi # $ac_x_includes = no
42630 
42631 if test "$ac_x_libraries" = no; then
42632   # Check for the libraries.
42633   # See if we find them without any special options.
42634   # Don't add to $LIBS permanently.
42635   ac_save_LIBS=$LIBS
42636   LIBS="-lX11 $LIBS"
42637   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42638 /* end confdefs.h.  */
42639 #include <X11/Xlib.h>
42640 int
42641 main ()
42642 {
42643 XrmInitialize ()
42644   ;
42645   return 0;
42646 }
42647 _ACEOF
42648 if ac_fn_cxx_try_link "$LINENO"; then :
42649   LIBS=$ac_save_LIBS
42650 # We can link X programs with no special library path.
42651 ac_x_libraries=
42652 else
42653   LIBS=$ac_save_LIBS
42654 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42655 do
42656   # Don't even attempt the hair of trying to link an X program!
42657   for ac_extension in a so sl dylib la dll; do
42658     if test -r "$ac_dir/libX11.$ac_extension"; then
42659       ac_x_libraries=$ac_dir
42660       break 2
42661     fi
42662   done
42663 done
42664 fi
42665 rm -f core conftest.err conftest.$ac_objext \
42666     conftest$ac_exeext conftest.$ac_ext
42667 fi # $ac_x_libraries = no
42668 
42669 case $ac_x_includes,$ac_x_libraries in #(
42670   no,* | *,no | *\'*)
42671     # Didn't find X, or a directory has "'" in its name.
42672     ac_cv_have_x="have_x=no";; #(
42673   *)
42674     # Record where we found X for the cache.
42675     ac_cv_have_x="have_x=yes\
42676         ac_x_includes='$ac_x_includes'\
42677         ac_x_libraries='$ac_x_libraries'"
42678 esac
42679 fi
42680 ;; #(
42681     *) have_x=yes;;
42682   esac
42683   eval "$ac_cv_have_x"
42684 fi # $with_x != no
42685 
42686 if test "$have_x" != yes; then
42687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42688 $as_echo "$have_x" >&6; }
42689   no_x=yes
42690 else
42691   # If each of the values was on the command line, it overrides each guess.
42692   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42693   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42694   # Update the cache value to reflect the command line values.
42695   ac_cv_have_x="have_x=yes\
42696         ac_x_includes='$x_includes'\
42697         ac_x_libraries='$x_libraries'"
42698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42699 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42700 fi
42701 
42702   if test "$no_x" = yes; then
42703   # Not all programs may use this symbol, but it does not hurt to define it.
42704 
42705 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42706 
42707   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42708 else
42709   if test -n "$x_includes"; then
42710     X_CFLAGS="$X_CFLAGS -I$x_includes"
42711   fi
42712 
42713   # It would also be nice to do this for all -L options, not just this one.
42714   if test -n "$x_libraries"; then
42715     X_LIBS="$X_LIBS -L$x_libraries"
42716     # For Solaris; some versions of Sun CC require a space after -R and
42717     # others require no space.  Words are not sufficient . . . .
42718     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42719 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
42720     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42721     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42722     ac_cxx_werror_flag=yes
42723     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42724 /* end confdefs.h.  */
42725 
42726 int
42727 main ()
42728 {
42729 
42730   ;
42731   return 0;
42732 }
42733 _ACEOF
42734 if ac_fn_cxx_try_link "$LINENO"; then :
42735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42736 $as_echo "no" >&6; }
42737        X_LIBS="$X_LIBS -R$x_libraries"
42738 else
42739   LIBS="$ac_xsave_LIBS -R $x_libraries"
42740        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42741 /* end confdefs.h.  */
42742 
42743 int
42744 main ()
42745 {
42746 
42747   ;
42748   return 0;
42749 }
42750 _ACEOF
42751 if ac_fn_cxx_try_link "$LINENO"; then :
42752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42753 $as_echo "yes" >&6; }
42754           X_LIBS="$X_LIBS -R $x_libraries"
42755 else
42756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42757 $as_echo "neither works" >&6; }
42758 fi
42759 rm -f core conftest.err conftest.$ac_objext \
42760     conftest$ac_exeext conftest.$ac_ext
42761 fi
42762 rm -f core conftest.err conftest.$ac_objext \
42763     conftest$ac_exeext conftest.$ac_ext
42764     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42765     LIBS=$ac_xsave_LIBS
42766   fi
42767 
42768   # Check for system-dependent libraries X programs must link with.
42769   # Do this before checking for the system-independent R6 libraries
42770   # (-lICE), since we may need -lsocket or whatever for X linking.
42771 
42772   if test "$ISC" = yes; then
42773     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42774   else
42775     # Martyn Johnson says this is needed for Ultrix, if the X
42776     # libraries were built with DECnet support.  And Karl Berry says
42777     # the Alpha needs dnet_stub (dnet does not exist).
42778     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
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 XOpenDisplay ();
42789 int
42790 main ()
42791 {
42792 return XOpenDisplay ();
42793   ;
42794   return 0;
42795 }
42796 _ACEOF
42797 if ac_fn_cxx_try_link "$LINENO"; then :
42798 
42799 else
42800   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42801 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42802 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42803   $as_echo_n "(cached) " >&6
42804 else
42805   ac_check_lib_save_LIBS=$LIBS
42806 LIBS="-ldnet  $LIBS"
42807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42808 /* end confdefs.h.  */
42809 
42810 /* Override any GCC internal prototype to avoid an error.
42811    Use char because int might match the return type of a GCC
42812    builtin and then its argument prototype would still apply.  */
42813 #ifdef __cplusplus
42814 extern "C"
42815 #endif
42816 char dnet_ntoa ();
42817 int
42818 main ()
42819 {
42820 return dnet_ntoa ();
42821   ;
42822   return 0;
42823 }
42824 _ACEOF
42825 if ac_fn_cxx_try_link "$LINENO"; then :
42826   ac_cv_lib_dnet_dnet_ntoa=yes
42827 else
42828   ac_cv_lib_dnet_dnet_ntoa=no
42829 fi
42830 rm -f core conftest.err conftest.$ac_objext \
42831     conftest$ac_exeext conftest.$ac_ext
42832 LIBS=$ac_check_lib_save_LIBS
42833 fi
42834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42835 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42836 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42837   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42838 fi
42839 
42840     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42841       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42842 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42843 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42844   $as_echo_n "(cached) " >&6
42845 else
42846   ac_check_lib_save_LIBS=$LIBS
42847 LIBS="-ldnet_stub  $LIBS"
42848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42849 /* end confdefs.h.  */
42850 
42851 /* Override any GCC internal prototype to avoid an error.
42852    Use char because int might match the return type of a GCC
42853    builtin and then its argument prototype would still apply.  */
42854 #ifdef __cplusplus
42855 extern "C"
42856 #endif
42857 char dnet_ntoa ();
42858 int
42859 main ()
42860 {
42861 return dnet_ntoa ();
42862   ;
42863   return 0;
42864 }
42865 _ACEOF
42866 if ac_fn_cxx_try_link "$LINENO"; then :
42867   ac_cv_lib_dnet_stub_dnet_ntoa=yes
42868 else
42869   ac_cv_lib_dnet_stub_dnet_ntoa=no
42870 fi
42871 rm -f core conftest.err conftest.$ac_objext \
42872     conftest$ac_exeext conftest.$ac_ext
42873 LIBS=$ac_check_lib_save_LIBS
42874 fi
42875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42876 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42877 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42878   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42879 fi
42880 
42881     fi
42882 fi
42883 rm -f core conftest.err conftest.$ac_objext \
42884     conftest$ac_exeext conftest.$ac_ext
42885     LIBS="$ac_xsave_LIBS"
42886 
42887     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42888     # to get the SysV transport functions.
42889     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42890     # needs -lnsl.
42891     # The nsl library prevents programs from opening the X display
42892     # on Irix 5.2, according to T.E. Dickey.
42893     # The functions gethostbyname, getservbyname, and inet_addr are
42894     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42895     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42896 if test "x$ac_cv_func_gethostbyname" = xyes; then :
42897 
42898 fi
42899 
42900     if test $ac_cv_func_gethostbyname = no; then
42901       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42902 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42903 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42904   $as_echo_n "(cached) " >&6
42905 else
42906   ac_check_lib_save_LIBS=$LIBS
42907 LIBS="-lnsl  $LIBS"
42908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42909 /* end confdefs.h.  */
42910 
42911 /* Override any GCC internal prototype to avoid an error.
42912    Use char because int might match the return type of a GCC
42913    builtin and then its argument prototype would still apply.  */
42914 #ifdef __cplusplus
42915 extern "C"
42916 #endif
42917 char gethostbyname ();
42918 int
42919 main ()
42920 {
42921 return gethostbyname ();
42922   ;
42923   return 0;
42924 }
42925 _ACEOF
42926 if ac_fn_cxx_try_link "$LINENO"; then :
42927   ac_cv_lib_nsl_gethostbyname=yes
42928 else
42929   ac_cv_lib_nsl_gethostbyname=no
42930 fi
42931 rm -f core conftest.err conftest.$ac_objext \
42932     conftest$ac_exeext conftest.$ac_ext
42933 LIBS=$ac_check_lib_save_LIBS
42934 fi
42935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42936 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42937 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42938   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42939 fi
42940 
42941       if test $ac_cv_lib_nsl_gethostbyname = no; then
42942         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42943 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42944 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42945   $as_echo_n "(cached) " >&6
42946 else
42947   ac_check_lib_save_LIBS=$LIBS
42948 LIBS="-lbsd  $LIBS"
42949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42950 /* end confdefs.h.  */
42951 
42952 /* Override any GCC internal prototype to avoid an error.
42953    Use char because int might match the return type of a GCC
42954    builtin and then its argument prototype would still apply.  */
42955 #ifdef __cplusplus
42956 extern "C"
42957 #endif
42958 char gethostbyname ();
42959 int
42960 main ()
42961 {
42962 return gethostbyname ();
42963   ;
42964   return 0;
42965 }
42966 _ACEOF
42967 if ac_fn_cxx_try_link "$LINENO"; then :
42968   ac_cv_lib_bsd_gethostbyname=yes
42969 else
42970   ac_cv_lib_bsd_gethostbyname=no
42971 fi
42972 rm -f core conftest.err conftest.$ac_objext \
42973     conftest$ac_exeext conftest.$ac_ext
42974 LIBS=$ac_check_lib_save_LIBS
42975 fi
42976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42977 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42978 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42979   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42980 fi
42981 
42982       fi
42983     fi
42984 
42985     # lieder@skyler.mavd.honeywell.com says without -lsocket,
42986     # socket/setsockopt and other routines are undefined under SCO ODT
42987     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42988     # on later versions), says Simon Leinen: it contains gethostby*
42989     # variants that don't use the name server (or something).  -lsocket
42990     # must be given before -lnsl if both are needed.  We assume that
42991     # if connect needs -lnsl, so does gethostbyname.
42992     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42993 if test "x$ac_cv_func_connect" = xyes; then :
42994 
42995 fi
42996 
42997     if test $ac_cv_func_connect = no; then
42998       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42999 $as_echo_n "checking for connect in -lsocket... " >&6; }
43000 if ${ac_cv_lib_socket_connect+:} false; then :
43001   $as_echo_n "(cached) " >&6
43002 else
43003   ac_check_lib_save_LIBS=$LIBS
43004 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43006 /* end confdefs.h.  */
43007 
43008 /* Override any GCC internal prototype to avoid an error.
43009    Use char because int might match the return type of a GCC
43010    builtin and then its argument prototype would still apply.  */
43011 #ifdef __cplusplus
43012 extern "C"
43013 #endif
43014 char connect ();
43015 int
43016 main ()
43017 {
43018 return connect ();
43019   ;
43020   return 0;
43021 }
43022 _ACEOF
43023 if ac_fn_cxx_try_link "$LINENO"; then :
43024   ac_cv_lib_socket_connect=yes
43025 else
43026   ac_cv_lib_socket_connect=no
43027 fi
43028 rm -f core conftest.err conftest.$ac_objext \
43029     conftest$ac_exeext conftest.$ac_ext
43030 LIBS=$ac_check_lib_save_LIBS
43031 fi
43032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43033 $as_echo "$ac_cv_lib_socket_connect" >&6; }
43034 if test "x$ac_cv_lib_socket_connect" = xyes; then :
43035   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43036 fi
43037 
43038     fi
43039 
43040     # Guillermo Gomez says -lposix is necessary on A/UX.
43041     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43042 if test "x$ac_cv_func_remove" = xyes; then :
43043 
43044 fi
43045 
43046     if test $ac_cv_func_remove = no; then
43047       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43048 $as_echo_n "checking for remove in -lposix... " >&6; }
43049 if ${ac_cv_lib_posix_remove+:} false; then :
43050   $as_echo_n "(cached) " >&6
43051 else
43052   ac_check_lib_save_LIBS=$LIBS
43053 LIBS="-lposix  $LIBS"
43054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43055 /* end confdefs.h.  */
43056 
43057 /* Override any GCC internal prototype to avoid an error.
43058    Use char because int might match the return type of a GCC
43059    builtin and then its argument prototype would still apply.  */
43060 #ifdef __cplusplus
43061 extern "C"
43062 #endif
43063 char remove ();
43064 int
43065 main ()
43066 {
43067 return remove ();
43068   ;
43069   return 0;
43070 }
43071 _ACEOF
43072 if ac_fn_cxx_try_link "$LINENO"; then :
43073   ac_cv_lib_posix_remove=yes
43074 else
43075   ac_cv_lib_posix_remove=no
43076 fi
43077 rm -f core conftest.err conftest.$ac_objext \
43078     conftest$ac_exeext conftest.$ac_ext
43079 LIBS=$ac_check_lib_save_LIBS
43080 fi
43081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43082 $as_echo "$ac_cv_lib_posix_remove" >&6; }
43083 if test "x$ac_cv_lib_posix_remove" = xyes; then :
43084   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43085 fi
43086 
43087     fi
43088 
43089     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43090     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43091 if test "x$ac_cv_func_shmat" = xyes; then :
43092 
43093 fi
43094 
43095     if test $ac_cv_func_shmat = no; then
43096       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43097 $as_echo_n "checking for shmat in -lipc... " >&6; }
43098 if ${ac_cv_lib_ipc_shmat+:} false; then :
43099   $as_echo_n "(cached) " >&6
43100 else
43101   ac_check_lib_save_LIBS=$LIBS
43102 LIBS="-lipc  $LIBS"
43103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43104 /* end confdefs.h.  */
43105 
43106 /* Override any GCC internal prototype to avoid an error.
43107    Use char because int might match the return type of a GCC
43108    builtin and then its argument prototype would still apply.  */
43109 #ifdef __cplusplus
43110 extern "C"
43111 #endif
43112 char shmat ();
43113 int
43114 main ()
43115 {
43116 return shmat ();
43117   ;
43118   return 0;
43119 }
43120 _ACEOF
43121 if ac_fn_cxx_try_link "$LINENO"; then :
43122   ac_cv_lib_ipc_shmat=yes
43123 else
43124   ac_cv_lib_ipc_shmat=no
43125 fi
43126 rm -f core conftest.err conftest.$ac_objext \
43127     conftest$ac_exeext conftest.$ac_ext
43128 LIBS=$ac_check_lib_save_LIBS
43129 fi
43130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43131 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43132 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43133   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43134 fi
43135 
43136     fi
43137   fi
43138 
43139   # Check for libraries that X11R6 Xt/Xaw programs need.
43140   ac_save_LDFLAGS=$LDFLAGS
43141   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43142   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43143   # check for ICE first), but we must link in the order -lSM -lICE or
43144   # we get undefined symbols.  So assume we have SM if we have ICE.
43145   # These have to be linked with before -lX11, unlike the other
43146   # libraries we check for below, so use a different variable.
43147   # John Interrante, Karl Berry
43148   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43149 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43150 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43151   $as_echo_n "(cached) " >&6
43152 else
43153   ac_check_lib_save_LIBS=$LIBS
43154 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43156 /* end confdefs.h.  */
43157 
43158 /* Override any GCC internal prototype to avoid an error.
43159    Use char because int might match the return type of a GCC
43160    builtin and then its argument prototype would still apply.  */
43161 #ifdef __cplusplus
43162 extern "C"
43163 #endif
43164 char IceConnectionNumber ();
43165 int
43166 main ()
43167 {
43168 return IceConnectionNumber ();
43169   ;
43170   return 0;
43171 }
43172 _ACEOF
43173 if ac_fn_cxx_try_link "$LINENO"; then :
43174   ac_cv_lib_ICE_IceConnectionNumber=yes
43175 else
43176   ac_cv_lib_ICE_IceConnectionNumber=no
43177 fi
43178 rm -f core conftest.err conftest.$ac_objext \
43179     conftest$ac_exeext conftest.$ac_ext
43180 LIBS=$ac_check_lib_save_LIBS
43181 fi
43182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43183 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43184 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43185   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43186 fi
43187 
43188   LDFLAGS=$ac_save_LDFLAGS
43189 
43190 fi
43191 
43192 
43193   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43194   # this doesn't make sense so we remove it.
43195   if test "x$COMPILE_TYPE" = xcross; then
43196     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43197   fi
43198 
43199   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43200 
43201   # Print a helpful message on how to acquire the necessary build dependency.
43202   # x11 is the help tag: freetype, cups, pulse, alsa etc
43203   MISSING_DEPENDENCY=x11
43204 
43205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43206     cygwin_help $MISSING_DEPENDENCY
43207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43208     msys_help $MISSING_DEPENDENCY
43209   else
43210     PKGHANDLER_COMMAND=
43211 
43212     case $PKGHANDLER in
43213       apt-get)
43214         apt_help     $MISSING_DEPENDENCY ;;
43215       yum)
43216         yum_help     $MISSING_DEPENDENCY ;;
43217       port)
43218         port_help    $MISSING_DEPENDENCY ;;
43219       pkgutil)
43220         pkgutil_help $MISSING_DEPENDENCY ;;
43221       pkgadd)
43222         pkgadd_help  $MISSING_DEPENDENCY ;;
43223     esac
43224 
43225     if test "x$PKGHANDLER_COMMAND" != x; then
43226       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43227     fi
43228   fi
43229 
43230     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43231   fi
43232 
43233 
43234   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43235     OPENWIN_HOME="/usr/openwin"
43236     X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43237     X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43238         -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43239         -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43240         -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43241   fi
43242 
43243   #
43244   # Weird Sol10 something check...TODO change to try compile
43245   #
43246   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43247     if test "`uname -r`" = "5.10"; then
43248       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43249         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43250       fi
43251     fi
43252   fi
43253 
43254   ac_ext=c
43255 ac_cpp='$CPP $CPPFLAGS'
43256 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43257 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43258 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43259 
43260   OLD_CFLAGS="$CFLAGS"
43261   CFLAGS="$CFLAGS $X_CFLAGS"
43262 
43263   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43264   for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43265 do :
43266   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43267 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43268         # include <X11/Xlib.h>
43269         # include <X11/Xutil.h>
43270 
43271 
43272 "
43273 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43274   cat >>confdefs.h <<_ACEOF
43275 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43276 _ACEOF
43277  X11_A_OK=yes
43278 else
43279   X11_A_OK=no; break
43280 fi
43281 
43282 done
43283 
43284 
43285   CFLAGS="$OLD_CFLAGS"
43286   ac_ext=cpp
43287 ac_cpp='$CXXCPP $CPPFLAGS'
43288 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43289 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43290 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43291 
43292 
43293   if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43294 
43295   # Print a helpful message on how to acquire the necessary build dependency.
43296   # x11 is the help tag: freetype, cups, pulse, alsa etc
43297   MISSING_DEPENDENCY=x11
43298 
43299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43300     cygwin_help $MISSING_DEPENDENCY
43301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43302     msys_help $MISSING_DEPENDENCY
43303   else
43304     PKGHANDLER_COMMAND=
43305 
43306     case $PKGHANDLER in
43307       apt-get)
43308         apt_help     $MISSING_DEPENDENCY ;;
43309       yum)
43310         yum_help     $MISSING_DEPENDENCY ;;
43311       port)
43312         port_help    $MISSING_DEPENDENCY ;;
43313       pkgutil)
43314         pkgutil_help $MISSING_DEPENDENCY ;;
43315       pkgadd)
43316         pkgadd_help  $MISSING_DEPENDENCY ;;
43317     esac
43318 
43319     if test "x$PKGHANDLER_COMMAND" != x; then
43320       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43321     fi
43322   fi
43323 
43324     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43325   fi
43326 
43327 
43328 
43329 
43330 
43331 
43332   ###############################################################################
43333   #
43334   # The common unix printing system cups is used to print from java.
43335   #
43336 
43337 # Check whether --with-cups was given.
43338 if test "${with_cups+set}" = set; then :
43339   withval=$with_cups;
43340 fi
43341 
43342 
43343 # Check whether --with-cups-include was given.
43344 if test "${with_cups_include+set}" = set; then :
43345   withval=$with_cups_include;
43346 fi
43347 
43348 
43349   if test "x$CUPS_NOT_NEEDED" = xyes; then
43350     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43351       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43352 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43353     fi
43354     CUPS_CFLAGS=
43355   else
43356     CUPS_FOUND=no
43357 
43358     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43359       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43360     fi
43361 
43362     if test "x${with_cups}" != x; then
43363       CUPS_CFLAGS="-I${with_cups}/include"
43364       CUPS_FOUND=yes
43365     fi
43366     if test "x${with_cups_include}" != x; then
43367       CUPS_CFLAGS="-I${with_cups_include}"
43368       CUPS_FOUND=yes
43369     fi
43370     if test "x$CUPS_FOUND" = xno; then
43371 
43372 
43373   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43374     # Source the builddeps file again, to make sure it uses the latest variables!
43375     . $builddepsfile
43376     # Look for a target and build machine specific resource!
43377     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43378     if test "x$resource" = x; then
43379       # Ok, lets instead look for a target specific resource
43380       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43381     fi
43382     if test "x$resource" = x; then
43383       # Ok, lets instead look for a build specific resource
43384       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43385     fi
43386     if test "x$resource" = x; then
43387       # Ok, lets instead look for a generic resource
43388       # (The cups comes from M4 and not the shell, thus no need for eval here.)
43389       resource=${builddep_cups}
43390     fi
43391     if test "x$resource" != x; then
43392       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43393 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43394       # If the resource in the builddeps.conf file is an existing directory,
43395       # for example /java/linux/cups
43396       if test -d ${resource}; then
43397         depdir=${resource}
43398       else
43399 
43400   # cups is for example mymodule
43401   # $resource is for example libs/general/libmymod_1_2_3.zip
43402   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43403   # $with_builddeps_dir is for example /localhome/builddeps
43404   # depdir is the name of the variable into which we store the depdir, eg MYMOD
43405   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43406   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43407   filename=`basename $resource`
43408   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43409   filebase=${filename%%.*}
43410   extension=${filename#*.}
43411   installdir=$with_builddeps_dir/$filebase
43412   if test ! -f $installdir/$filename.unpacked; then
43413     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43414 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43415     if test ! -d $installdir; then
43416       mkdir -p $installdir
43417     fi
43418     if test ! -d $installdir; then
43419       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43420     fi
43421     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43422     touch $tmpfile
43423     if test ! -f $tmpfile; then
43424       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43425     fi
43426 
43427   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43428   # $tmpfile is the local file name for the downloaded file.
43429   VALID_TOOL=no
43430   if test "x$BDEPS_FTP" = xwget; then
43431     VALID_TOOL=yes
43432     wget -O $tmpfile $with_builddeps_server/$resource
43433   fi
43434   if test "x$BDEPS_FTP" = xlftp; then
43435     VALID_TOOL=yes
43436     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43437   fi
43438   if test "x$BDEPS_FTP" = xftp; then
43439     VALID_TOOL=yes
43440     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43441     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43442     FTPUSERPWD=${FTPSERVER%%@*}
43443     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43444       FTPUSER=${userpwd%%:*}
43445       FTPPWD=${userpwd#*@}
43446       FTPSERVER=${FTPSERVER#*@}
43447     else
43448       FTPUSER=ftp
43449       FTPPWD=ftp
43450     fi
43451     # the "pass" command does not work on some
43452     # ftp clients (read ftp.exe) but if it works,
43453     # passive mode is better!
43454     ( \
43455         echo "user $FTPUSER $FTPPWD"        ; \
43456         echo "pass"                         ; \
43457         echo "bin"                          ; \
43458         echo "get $FTPPATH $tmpfile"              ; \
43459     ) | ftp -in $FTPSERVER
43460   fi
43461   if test "x$VALID_TOOL" != xyes; then
43462     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43463   fi
43464 
43465     mv $tmpfile $installdir/$filename
43466     if test ! -s $installdir/$filename; then
43467       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43468     fi
43469     case "$extension" in
43470       zip)  echo "Unzipping $installdir/$filename..."
43471         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43472         ;;
43473       tar.gz) echo "Untaring $installdir/$filename..."
43474         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43475         ;;
43476       tgz) echo "Untaring $installdir/$filename..."
43477         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43478         ;;
43479       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43480         ;;
43481     esac
43482   fi
43483   if test -f $installdir/$filename.unpacked; then
43484     depdir=$installdir
43485   fi
43486 
43487       fi
43488       # Source the builddeps file again, because in the previous command, the depdir
43489       # was updated to point at the current build dependency install directory.
43490       . $builddepsfile
43491       # Now extract variables from the builddeps.conf files.
43492       theroot=${builddep_cups_ROOT}
43493       thecflags=${builddep_cups_CFLAGS}
43494       thelibs=${builddep_cups_LIBS}
43495       if test "x$depdir" = x; then
43496         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43497       fi
43498       CUPS=$depdir
43499       if test "x$theroot" != x; then
43500         CUPS="$theroot"
43501       fi
43502       if test "x$thecflags" != x; then
43503         CUPS_CFLAGS="$thecflags"
43504       fi
43505       if test "x$thelibs" != x; then
43506         CUPS_LIBS="$thelibs"
43507       fi
43508       CUPS_FOUND=yes
43509 
43510     fi
43511 
43512   fi
43513 
43514     fi
43515     if test "x$CUPS_FOUND" = xno; then
43516       # Are the cups headers installed in the default /usr/include location?
43517       for ac_header in cups/cups.h cups/ppd.h
43518 do :
43519   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43520 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43521 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43522   cat >>confdefs.h <<_ACEOF
43523 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43524 _ACEOF
43525 
43526             CUPS_FOUND=yes
43527             CUPS_CFLAGS=
43528             DEFAULT_CUPS=yes
43529 
43530 
43531 fi
43532 
43533 done
43534 
43535     fi
43536     if test "x$CUPS_FOUND" = xno; then
43537       # Getting nervous now? Lets poke around for standard Solaris third-party
43538       # package installation locations.
43539       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43540 $as_echo_n "checking for cups headers... " >&6; }
43541       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43542         # An SFW package seems to be installed!
43543         CUPS_FOUND=yes
43544         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43545       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43546         # A CSW package seems to be installed!
43547         CUPS_FOUND=yes
43548         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43549       fi
43550       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43551 $as_echo "$CUPS_FOUND" >&6; }
43552     fi
43553     if test "x$CUPS_FOUND" = xno; then
43554 
43555   # Print a helpful message on how to acquire the necessary build dependency.
43556   # cups is the help tag: freetype, cups, pulse, alsa etc
43557   MISSING_DEPENDENCY=cups
43558 
43559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43560     cygwin_help $MISSING_DEPENDENCY
43561   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43562     msys_help $MISSING_DEPENDENCY
43563   else
43564     PKGHANDLER_COMMAND=
43565 
43566     case $PKGHANDLER in
43567       apt-get)
43568         apt_help     $MISSING_DEPENDENCY ;;
43569       yum)
43570         yum_help     $MISSING_DEPENDENCY ;;
43571       port)
43572         port_help    $MISSING_DEPENDENCY ;;
43573       pkgutil)
43574         pkgutil_help $MISSING_DEPENDENCY ;;
43575       pkgadd)
43576         pkgadd_help  $MISSING_DEPENDENCY ;;
43577     esac
43578 
43579     if test "x$PKGHANDLER_COMMAND" != x; then
43580       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43581     fi
43582   fi
43583 
43584       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43585     fi
43586   fi
43587 
43588 
43589 
43590 
43591 
43592 
43593   ###############################################################################
43594   #
43595   # The ubiquitous freetype library is used to render fonts.
43596   #
43597 
43598 # Check whether --with-freetype was given.
43599 if test "${with_freetype+set}" = set; then :
43600   withval=$with_freetype;
43601 fi
43602 
43603 
43604 # Check whether --with-freetype-include was given.
43605 if test "${with_freetype_include+set}" = set; then :
43606   withval=$with_freetype_include;
43607 fi
43608 
43609 
43610 # Check whether --with-freetype-lib was given.
43611 if test "${with_freetype_lib+set}" = set; then :
43612   withval=$with_freetype_lib;
43613 fi
43614 
43615 
43616 # Check whether --with-freetype-src was given.
43617 if test "${with_freetype_src+set}" = set; then :
43618   withval=$with_freetype_src;
43619 fi
43620 
43621   # Check whether --enable-freetype-bundling was given.
43622 if test "${enable_freetype_bundling+set}" = set; then :
43623   enableval=$enable_freetype_bundling;
43624 fi
43625 
43626 
43627   FREETYPE_CFLAGS=
43628   FREETYPE_LIBS=
43629   FREETYPE_BUNDLE_LIB_PATH=
43630 
43631   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43632     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
43633       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43634 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43635     fi
43636     if test "x$enable_freetype_bundling" != x; then
43637       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43638 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43639     fi
43640   else
43641     # freetype is needed to build; go get it!
43642 
43643     BUNDLE_FREETYPE="$enable_freetype_bundling"
43644 
43645     if  test "x$with_freetype_src" != x; then
43646       if test "x$OPENJDK_TARGET_OS" = xwindows; then
43647         # Try to build freetype if --with-freetype-src was given on Windows
43648 
43649   FREETYPE_SRC_PATH="$with_freetype_src"
43650   BUILD_FREETYPE=yes
43651 
43652   # Check if the freetype sources are acessible..
43653   if ! test -d $FREETYPE_SRC_PATH; then
43654     { $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
43655 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
43656     BUILD_FREETYPE=no
43657   fi
43658   # ..and contain a vc2010 project file
43659   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
43660   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
43661     { $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
43662 $as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
43663     BUILD_FREETYPE=no
43664   fi
43665   # Now check if configure found a version of 'msbuild.exe'
43666   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
43667     { $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
43668 $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;}
43669     BUILD_FREETYPE=no
43670   fi
43671 
43672   # Ready to go..
43673   if test "x$BUILD_FREETYPE" = xyes; then
43674 
43675     # msbuild requires trailing slashes for output directories
43676     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
43677     freetype_lib_path_unix="$freetype_lib_path"
43678     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
43679 
43680   unix_path="$vcxproj_path"
43681   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43682     windows_path=`$CYGPATH -m "$unix_path"`
43683     vcxproj_path="$windows_path"
43684   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43685     windows_path=`cmd //c echo $unix_path`
43686     vcxproj_path="$windows_path"
43687   fi
43688 
43689 
43690   unix_path="$freetype_lib_path"
43691   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43692     windows_path=`$CYGPATH -m "$unix_path"`
43693     freetype_lib_path="$windows_path"
43694   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43695     windows_path=`cmd //c echo $unix_path`
43696     freetype_lib_path="$windows_path"
43697   fi
43698 
43699 
43700   unix_path="$freetype_obj_path"
43701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43702     windows_path=`$CYGPATH -m "$unix_path"`
43703     freetype_obj_path="$windows_path"
43704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43705     windows_path=`cmd //c echo $unix_path`
43706     freetype_obj_path="$windows_path"
43707   fi
43708 
43709     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43710       freetype_platform=x64
43711     else
43712       freetype_platform=win32
43713     fi
43714 
43715     # The original freetype project file is for VS 2010 (i.e. 'v100'),
43716     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
43717     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
43718     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
43719     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
43720 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
43721 
43722     # First we try to build the freetype.dll
43723     $ECHO -e "@echo off\n"\
43724              "$MSBUILD $vcxproj_path "\
43725                        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
43726                        "/p:Configuration=\"Release Multithreaded\" "\
43727                        "/p:Platform=$freetype_platform "\
43728                        "/p:ConfigurationType=DynamicLibrary "\
43729                        "/p:TargetName=freetype "\
43730                        "/p:OutDir=\"$freetype_lib_path\" "\
43731                        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
43732     cmd /c freetype.bat
43733 
43734     if test -s "$freetype_lib_path_unix/freetype.dll"; then
43735       # If that succeeds we also build freetype.lib
43736       $ECHO -e "@echo off\n"\
43737                "$MSBUILD $vcxproj_path "\
43738                          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
43739                          "/p:Configuration=\"Release Multithreaded\" "\
43740                          "/p:Platform=$freetype_platform "\
43741                          "/p:ConfigurationType=StaticLibrary "\
43742                          "/p:TargetName=freetype "\
43743                          "/p:OutDir=\"$freetype_lib_path\" "\
43744                          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
43745       cmd /c freetype.bat
43746 
43747       if test -s "$freetype_lib_path_unix/freetype.lib"; then
43748         # Once we build both, lib and dll, set freetype lib and include path appropriately
43749         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
43750         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
43751         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
43752 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
43753       else
43754         BUILD_FREETYPE=no
43755       fi
43756     else
43757       BUILD_FREETYPE=no
43758     fi
43759   fi
43760 
43761         if test "x$BUILD_FREETYPE" = xyes; then
43762           # Okay, we built it. Check that it works.
43763 
43764   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43765   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43766   METHOD="--with-freetype-src"
43767 
43768   # First check if the files exists.
43769   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43770     # We found an arbitrary include file. That's a good sign.
43771     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43772 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43773     FOUND_FREETYPE=yes
43774 
43775     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43776     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43777       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43778 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43779       FOUND_FREETYPE=no
43780     else
43781       if test "x$OPENJDK_TARGET_OS" = xwindows; then
43782         # On Windows, we will need both .lib and .dll file.
43783         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43784           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43785 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43786           FOUND_FREETYPE=no
43787         fi
43788       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
43789         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43790         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43791       fi
43792     fi
43793   fi
43794 
43795   if test "x$FOUND_FREETYPE" = xyes; then
43796 
43797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43798 
43799   # Input might be given as Windows format, start by converting to
43800   # unix format.
43801   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43802   new_path=`$CYGPATH -u "$path"`
43803 
43804   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43805   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43806   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43807   # "foo.exe" is OK but "foo" is an error.
43808   #
43809   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43810   # It is also a way to make sure we got the proper file name for the real test later on.
43811   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43812   if test "x$test_shortpath" = x; then
43813     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43814 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43815     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43816   fi
43817 
43818   # Call helper function which possibly converts this using DOS-style short mode.
43819   # If so, the updated path is stored in $new_path.
43820 
43821   input_path="$new_path"
43822   # Check if we need to convert this using DOS-style short mode. If the path
43823   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43824   # take no chances and rewrite it.
43825   # Note: m4 eats our [], so we need to use [ and ] instead.
43826   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43827   if test "x$has_forbidden_chars" != x; then
43828     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43829     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43830     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43831     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43832       # Going to short mode and back again did indeed matter. Since short mode is
43833       # case insensitive, let's make it lowercase to improve readability.
43834       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43835       # Now convert it back to Unix-style (cygpath)
43836       input_path=`$CYGPATH -u "$shortmode_path"`
43837       new_path="$input_path"
43838     fi
43839   fi
43840 
43841   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43842   if test "x$test_cygdrive_prefix" = x; then
43843     # As a simple fix, exclude /usr/bin since it's not a real path.
43844     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43845       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43846       # a path prefixed by /cygdrive for fixpath to work.
43847       new_path="$CYGWIN_ROOT_PATH$input_path"
43848     fi
43849   fi
43850 
43851 
43852   if test "x$path" != "x$new_path"; then
43853     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43854     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43855 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43856   fi
43857 
43858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43859 
43860   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43861   has_colon=`$ECHO $path | $GREP ^.:`
43862   new_path="$path"
43863   if test "x$has_colon" = x; then
43864     # Not in mixed or Windows style, start by that.
43865     new_path=`cmd //c echo $path`
43866   fi
43867 
43868 
43869   input_path="$new_path"
43870   # Check if we need to convert this using DOS-style short mode. If the path
43871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43872   # take no chances and rewrite it.
43873   # Note: m4 eats our [], so we need to use [ and ] instead.
43874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43875   if test "x$has_forbidden_chars" != x; then
43876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43877     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43878   fi
43879 
43880 
43881   windows_path="$new_path"
43882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43883     unix_path=`$CYGPATH -u "$windows_path"`
43884     new_path="$unix_path"
43885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43886     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43887     new_path="$unix_path"
43888   fi
43889 
43890   if test "x$path" != "x$new_path"; then
43891     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43892     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43893 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43894   fi
43895 
43896   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43897   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43898 
43899   else
43900     # We're on a posix platform. Hooray! :)
43901     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43902     has_space=`$ECHO "$path" | $GREP " "`
43903     if test "x$has_space" != x; then
43904       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43905 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43906       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43907     fi
43908 
43909     # Use eval to expand a potential ~
43910     eval path="$path"
43911     if test ! -f "$path" && test ! -d "$path"; then
43912       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43913     fi
43914 
43915     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43916   fi
43917 
43918 
43919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43920 
43921   # Input might be given as Windows format, start by converting to
43922   # unix format.
43923   path="$POTENTIAL_FREETYPE_LIB_PATH"
43924   new_path=`$CYGPATH -u "$path"`
43925 
43926   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43927   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43928   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43929   # "foo.exe" is OK but "foo" is an error.
43930   #
43931   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43932   # It is also a way to make sure we got the proper file name for the real test later on.
43933   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43934   if test "x$test_shortpath" = x; then
43935     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43936 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43937     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43938   fi
43939 
43940   # Call helper function which possibly converts this using DOS-style short mode.
43941   # If so, the updated path is stored in $new_path.
43942 
43943   input_path="$new_path"
43944   # Check if we need to convert this using DOS-style short mode. If the path
43945   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43946   # take no chances and rewrite it.
43947   # Note: m4 eats our [], so we need to use [ and ] instead.
43948   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43949   if test "x$has_forbidden_chars" != x; then
43950     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43951     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43952     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43953     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43954       # Going to short mode and back again did indeed matter. Since short mode is
43955       # case insensitive, let's make it lowercase to improve readability.
43956       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43957       # Now convert it back to Unix-style (cygpath)
43958       input_path=`$CYGPATH -u "$shortmode_path"`
43959       new_path="$input_path"
43960     fi
43961   fi
43962 
43963   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43964   if test "x$test_cygdrive_prefix" = x; then
43965     # As a simple fix, exclude /usr/bin since it's not a real path.
43966     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43967       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43968       # a path prefixed by /cygdrive for fixpath to work.
43969       new_path="$CYGWIN_ROOT_PATH$input_path"
43970     fi
43971   fi
43972 
43973 
43974   if test "x$path" != "x$new_path"; then
43975     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43976     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43977 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43978   fi
43979 
43980   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43981 
43982   path="$POTENTIAL_FREETYPE_LIB_PATH"
43983   has_colon=`$ECHO $path | $GREP ^.:`
43984   new_path="$path"
43985   if test "x$has_colon" = x; then
43986     # Not in mixed or Windows style, start by that.
43987     new_path=`cmd //c echo $path`
43988   fi
43989 
43990 
43991   input_path="$new_path"
43992   # Check if we need to convert this using DOS-style short mode. If the path
43993   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43994   # take no chances and rewrite it.
43995   # Note: m4 eats our [], so we need to use [ and ] instead.
43996   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43997   if test "x$has_forbidden_chars" != x; then
43998     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43999     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44000   fi
44001 
44002 
44003   windows_path="$new_path"
44004   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44005     unix_path=`$CYGPATH -u "$windows_path"`
44006     new_path="$unix_path"
44007   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44008     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44009     new_path="$unix_path"
44010   fi
44011 
44012   if test "x$path" != "x$new_path"; then
44013     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44014     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44015 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44016   fi
44017 
44018   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44019   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44020 
44021   else
44022     # We're on a posix platform. Hooray! :)
44023     path="$POTENTIAL_FREETYPE_LIB_PATH"
44024     has_space=`$ECHO "$path" | $GREP " "`
44025     if test "x$has_space" != x; then
44026       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44027 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44028       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44029     fi
44030 
44031     # Use eval to expand a potential ~
44032     eval path="$path"
44033     if test ! -f "$path" && test ! -d "$path"; then
44034       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44035     fi
44036 
44037     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44038   fi
44039 
44040 
44041     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44042     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44043 $as_echo_n "checking for freetype includes... " >&6; }
44044     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44045 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44046     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44047     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44048 $as_echo_n "checking for freetype libraries... " >&6; }
44049     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44050 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44051   fi
44052 
44053           if test "x$FOUND_FREETYPE" != xyes; then
44054             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44055           fi
44056         else
44057           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44058 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44059           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44060         fi
44061       else
44062         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44063 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44064       fi
44065     fi
44066 
44067     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44068       # User has specified settings
44069 
44070       if test "x$BUNDLE_FREETYPE" = x; then
44071         # If not specified, default is to bundle freetype
44072         BUNDLE_FREETYPE=yes
44073       fi
44074 
44075       if test "x$with_freetype" != x; then
44076         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44077         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44078       fi
44079 
44080       # Allow --with-freetype-lib and --with-freetype-include to override
44081       if test "x$with_freetype_include" != x; then
44082         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44083       fi
44084       if test "x$with_freetype_lib" != x; then
44085         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44086       fi
44087 
44088       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44089         # Okay, we got it. Check that it works.
44090 
44091   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44092   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44093   METHOD="--with-freetype"
44094 
44095   # First check if the files exists.
44096   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44097     # We found an arbitrary include file. That's a good sign.
44098     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44099 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44100     FOUND_FREETYPE=yes
44101 
44102     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44103     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44104       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44105 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44106       FOUND_FREETYPE=no
44107     else
44108       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44109         # On Windows, we will need both .lib and .dll file.
44110         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44111           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44112 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44113           FOUND_FREETYPE=no
44114         fi
44115       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
44116         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44117         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44118       fi
44119     fi
44120   fi
44121 
44122   if test "x$FOUND_FREETYPE" = xyes; then
44123 
44124   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44125 
44126   # Input might be given as Windows format, start by converting to
44127   # unix format.
44128   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44129   new_path=`$CYGPATH -u "$path"`
44130 
44131   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44132   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44133   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44134   # "foo.exe" is OK but "foo" is an error.
44135   #
44136   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44137   # It is also a way to make sure we got the proper file name for the real test later on.
44138   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44139   if test "x$test_shortpath" = x; then
44140     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44141 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44142     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44143   fi
44144 
44145   # Call helper function which possibly converts this using DOS-style short mode.
44146   # If so, the updated path is stored in $new_path.
44147 
44148   input_path="$new_path"
44149   # Check if we need to convert this using DOS-style short mode. If the path
44150   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44151   # take no chances and rewrite it.
44152   # Note: m4 eats our [], so we need to use [ and ] instead.
44153   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44154   if test "x$has_forbidden_chars" != x; then
44155     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44156     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44157     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44158     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44159       # Going to short mode and back again did indeed matter. Since short mode is
44160       # case insensitive, let's make it lowercase to improve readability.
44161       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44162       # Now convert it back to Unix-style (cygpath)
44163       input_path=`$CYGPATH -u "$shortmode_path"`
44164       new_path="$input_path"
44165     fi
44166   fi
44167 
44168   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44169   if test "x$test_cygdrive_prefix" = x; then
44170     # As a simple fix, exclude /usr/bin since it's not a real path.
44171     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44172       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44173       # a path prefixed by /cygdrive for fixpath to work.
44174       new_path="$CYGWIN_ROOT_PATH$input_path"
44175     fi
44176   fi
44177 
44178 
44179   if test "x$path" != "x$new_path"; then
44180     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44181     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44182 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44183   fi
44184 
44185   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44186 
44187   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44188   has_colon=`$ECHO $path | $GREP ^.:`
44189   new_path="$path"
44190   if test "x$has_colon" = x; then
44191     # Not in mixed or Windows style, start by that.
44192     new_path=`cmd //c echo $path`
44193   fi
44194 
44195 
44196   input_path="$new_path"
44197   # Check if we need to convert this using DOS-style short mode. If the path
44198   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44199   # take no chances and rewrite it.
44200   # Note: m4 eats our [], so we need to use [ and ] instead.
44201   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44202   if test "x$has_forbidden_chars" != x; then
44203     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44204     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44205   fi
44206 
44207 
44208   windows_path="$new_path"
44209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44210     unix_path=`$CYGPATH -u "$windows_path"`
44211     new_path="$unix_path"
44212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44213     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44214     new_path="$unix_path"
44215   fi
44216 
44217   if test "x$path" != "x$new_path"; then
44218     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44219     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44220 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44221   fi
44222 
44223   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44224   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44225 
44226   else
44227     # We're on a posix platform. Hooray! :)
44228     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44229     has_space=`$ECHO "$path" | $GREP " "`
44230     if test "x$has_space" != x; then
44231       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44232 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44233       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44234     fi
44235 
44236     # Use eval to expand a potential ~
44237     eval path="$path"
44238     if test ! -f "$path" && test ! -d "$path"; then
44239       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44240     fi
44241 
44242     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44243   fi
44244 
44245 
44246   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44247 
44248   # Input might be given as Windows format, start by converting to
44249   # unix format.
44250   path="$POTENTIAL_FREETYPE_LIB_PATH"
44251   new_path=`$CYGPATH -u "$path"`
44252 
44253   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44254   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44255   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44256   # "foo.exe" is OK but "foo" is an error.
44257   #
44258   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44259   # It is also a way to make sure we got the proper file name for the real test later on.
44260   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44261   if test "x$test_shortpath" = x; then
44262     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44263 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44264     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44265   fi
44266 
44267   # Call helper function which possibly converts this using DOS-style short mode.
44268   # If so, the updated path is stored in $new_path.
44269 
44270   input_path="$new_path"
44271   # Check if we need to convert this using DOS-style short mode. If the path
44272   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44273   # take no chances and rewrite it.
44274   # Note: m4 eats our [], so we need to use [ and ] instead.
44275   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44276   if test "x$has_forbidden_chars" != x; then
44277     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44278     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44279     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44280     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44281       # Going to short mode and back again did indeed matter. Since short mode is
44282       # case insensitive, let's make it lowercase to improve readability.
44283       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44284       # Now convert it back to Unix-style (cygpath)
44285       input_path=`$CYGPATH -u "$shortmode_path"`
44286       new_path="$input_path"
44287     fi
44288   fi
44289 
44290   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44291   if test "x$test_cygdrive_prefix" = x; then
44292     # As a simple fix, exclude /usr/bin since it's not a real path.
44293     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44294       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44295       # a path prefixed by /cygdrive for fixpath to work.
44296       new_path="$CYGWIN_ROOT_PATH$input_path"
44297     fi
44298   fi
44299 
44300 
44301   if test "x$path" != "x$new_path"; then
44302     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44304 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44305   fi
44306 
44307   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44308 
44309   path="$POTENTIAL_FREETYPE_LIB_PATH"
44310   has_colon=`$ECHO $path | $GREP ^.:`
44311   new_path="$path"
44312   if test "x$has_colon" = x; then
44313     # Not in mixed or Windows style, start by that.
44314     new_path=`cmd //c echo $path`
44315   fi
44316 
44317 
44318   input_path="$new_path"
44319   # Check if we need to convert this using DOS-style short mode. If the path
44320   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44321   # take no chances and rewrite it.
44322   # Note: m4 eats our [], so we need to use [ and ] instead.
44323   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44324   if test "x$has_forbidden_chars" != x; then
44325     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44326     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44327   fi
44328 
44329 
44330   windows_path="$new_path"
44331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44332     unix_path=`$CYGPATH -u "$windows_path"`
44333     new_path="$unix_path"
44334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44335     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44336     new_path="$unix_path"
44337   fi
44338 
44339   if test "x$path" != "x$new_path"; then
44340     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44341     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44342 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44343   fi
44344 
44345   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44346   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44347 
44348   else
44349     # We're on a posix platform. Hooray! :)
44350     path="$POTENTIAL_FREETYPE_LIB_PATH"
44351     has_space=`$ECHO "$path" | $GREP " "`
44352     if test "x$has_space" != x; then
44353       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44354 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44355       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44356     fi
44357 
44358     # Use eval to expand a potential ~
44359     eval path="$path"
44360     if test ! -f "$path" && test ! -d "$path"; then
44361       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44362     fi
44363 
44364     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44365   fi
44366 
44367 
44368     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44369     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44370 $as_echo_n "checking for freetype includes... " >&6; }
44371     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44372 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44373     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44374     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44375 $as_echo_n "checking for freetype libraries... " >&6; }
44376     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44377 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44378   fi
44379 
44380         if test "x$FOUND_FREETYPE" != xyes; then
44381           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44382         fi
44383       else
44384         # User specified only one of lib or include. This is an error.
44385         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44386           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44387 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44388           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44389         else
44390           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44391 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44392           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44393         fi
44394       fi
44395     else
44396       # User did not specify settings, but we need freetype. Try to locate it.
44397 
44398       if test "x$BUNDLE_FREETYPE" = x; then
44399         # If not specified, default is to bundle freetype only on windows
44400         if test "x$OPENJDK_TARGET_OS" = xwindows; then
44401           BUNDLE_FREETYPE=yes
44402         else
44403           BUNDLE_FREETYPE=no
44404         fi
44405       fi
44406 
44407       if test "x$FOUND_FREETYPE" != xyes; then
44408         # Check builddeps
44409 
44410 
44411   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44412     # Source the builddeps file again, to make sure it uses the latest variables!
44413     . $builddepsfile
44414     # Look for a target and build machine specific resource!
44415     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44416     if test "x$resource" = x; then
44417       # Ok, lets instead look for a target specific resource
44418       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44419     fi
44420     if test "x$resource" = x; then
44421       # Ok, lets instead look for a build specific resource
44422       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44423     fi
44424     if test "x$resource" = x; then
44425       # Ok, lets instead look for a generic resource
44426       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44427       resource=${builddep_freetype2}
44428     fi
44429     if test "x$resource" != x; then
44430       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44431 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44432       # If the resource in the builddeps.conf file is an existing directory,
44433       # for example /java/linux/cups
44434       if test -d ${resource}; then
44435         depdir=${resource}
44436       else
44437 
44438   # freetype2 is for example mymodule
44439   # $resource is for example libs/general/libmymod_1_2_3.zip
44440   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44441   # $with_builddeps_dir is for example /localhome/builddeps
44442   # depdir is the name of the variable into which we store the depdir, eg MYMOD
44443   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44444   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44445   filename=`basename $resource`
44446   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44447   filebase=${filename%%.*}
44448   extension=${filename#*.}
44449   installdir=$with_builddeps_dir/$filebase
44450   if test ! -f $installdir/$filename.unpacked; then
44451     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44452 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44453     if test ! -d $installdir; then
44454       mkdir -p $installdir
44455     fi
44456     if test ! -d $installdir; then
44457       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44458     fi
44459     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44460     touch $tmpfile
44461     if test ! -f $tmpfile; then
44462       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44463     fi
44464 
44465   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44466   # $tmpfile is the local file name for the downloaded file.
44467   VALID_TOOL=no
44468   if test "x$BDEPS_FTP" = xwget; then
44469     VALID_TOOL=yes
44470     wget -O $tmpfile $with_builddeps_server/$resource
44471   fi
44472   if test "x$BDEPS_FTP" = xlftp; then
44473     VALID_TOOL=yes
44474     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44475   fi
44476   if test "x$BDEPS_FTP" = xftp; then
44477     VALID_TOOL=yes
44478     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44479     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44480     FTPUSERPWD=${FTPSERVER%%@*}
44481     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44482       FTPUSER=${userpwd%%:*}
44483       FTPPWD=${userpwd#*@}
44484       FTPSERVER=${FTPSERVER#*@}
44485     else
44486       FTPUSER=ftp
44487       FTPPWD=ftp
44488     fi
44489     # the "pass" command does not work on some
44490     # ftp clients (read ftp.exe) but if it works,
44491     # passive mode is better!
44492     ( \
44493         echo "user $FTPUSER $FTPPWD"        ; \
44494         echo "pass"                         ; \
44495         echo "bin"                          ; \
44496         echo "get $FTPPATH $tmpfile"              ; \
44497     ) | ftp -in $FTPSERVER
44498   fi
44499   if test "x$VALID_TOOL" != xyes; then
44500     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44501   fi
44502 
44503     mv $tmpfile $installdir/$filename
44504     if test ! -s $installdir/$filename; then
44505       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44506     fi
44507     case "$extension" in
44508       zip)  echo "Unzipping $installdir/$filename..."
44509         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44510         ;;
44511       tar.gz) echo "Untaring $installdir/$filename..."
44512         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44513         ;;
44514       tgz) echo "Untaring $installdir/$filename..."
44515         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44516         ;;
44517       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44518         ;;
44519     esac
44520   fi
44521   if test -f $installdir/$filename.unpacked; then
44522     depdir=$installdir
44523   fi
44524 
44525       fi
44526       # Source the builddeps file again, because in the previous command, the depdir
44527       # was updated to point at the current build dependency install directory.
44528       . $builddepsfile
44529       # Now extract variables from the builddeps.conf files.
44530       theroot=${builddep_freetype2_ROOT}
44531       thecflags=${builddep_freetype2_CFLAGS}
44532       thelibs=${builddep_freetype2_LIBS}
44533       if test "x$depdir" = x; then
44534         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44535       fi
44536       FREETYPE=$depdir
44537       if test "x$theroot" != x; then
44538         FREETYPE="$theroot"
44539       fi
44540       if test "x$thecflags" != x; then
44541         FREETYPE_CFLAGS="$thecflags"
44542       fi
44543       if test "x$thelibs" != x; then
44544         FREETYPE_LIBS="$thelibs"
44545       fi
44546       FOUND_FREETYPE=yes
44547       else FOUND_FREETYPE=no
44548 
44549     fi
44550     else FOUND_FREETYPE=no
44551 
44552   fi
44553 
44554         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44555         if test "x$FOUND_FREETYPE" = xyes; then
44556           if test "x$BUNDLE_FREETYPE" = xyes; then
44557             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44558 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
44559             FOUND_FREETYPE=no
44560           else
44561             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44562 $as_echo_n "checking for freetype... " >&6; }
44563             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
44564 $as_echo "yes (using builddeps)" >&6; }
44565           fi
44566         fi
44567       fi
44568 
44569       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
44570       if test "x$SYSROOT" = x; then
44571         if test "x$FOUND_FREETYPE" != xyes; then
44572           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
44573           if test "x$PKG_CONFIG" != x; then
44574 
44575 pkg_failed=no
44576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
44577 $as_echo_n "checking for FREETYPE... " >&6; }
44578 
44579 if test -n "$FREETYPE_CFLAGS"; then
44580     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
44581  elif test -n "$PKG_CONFIG"; then
44582     if test -n "$PKG_CONFIG" && \
44583     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44584   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44585   ac_status=$?
44586   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44587   test $ac_status = 0; }; then
44588   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
44589 else
44590   pkg_failed=yes
44591 fi
44592  else
44593     pkg_failed=untried
44594 fi
44595 if test -n "$FREETYPE_LIBS"; then
44596     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
44597  elif test -n "$PKG_CONFIG"; then
44598     if test -n "$PKG_CONFIG" && \
44599     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44600   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44601   ac_status=$?
44602   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44603   test $ac_status = 0; }; then
44604   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44605 else
44606   pkg_failed=yes
44607 fi
44608  else
44609     pkg_failed=untried
44610 fi
44611 
44612 
44613 
44614 if test $pkg_failed = yes; then
44615 
44616 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44617         _pkg_short_errors_supported=yes
44618 else
44619         _pkg_short_errors_supported=no
44620 fi
44621         if test $_pkg_short_errors_supported = yes; then
44622                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44623         else
44624                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44625         fi
44626         # Put the nasty error message in config.log where it belongs
44627         echo "$FREETYPE_PKG_ERRORS" >&5
44628 
44629         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44630 $as_echo "no" >&6; }
44631                 FOUND_FREETYPE=no
44632 elif test $pkg_failed = untried; then
44633         FOUND_FREETYPE=no
44634 else
44635         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44636         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44637         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44638 $as_echo "yes" >&6; }
44639         FOUND_FREETYPE=yes
44640 fi
44641             if test "x$FOUND_FREETYPE" = xyes; then
44642               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44643               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44644               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44645               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44646                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44647               fi
44648               # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44649               if test "x$BUNDLE_FREETYPE" = xyes; then
44650                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44651 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44652                 FOUND_FREETYPE=no
44653               else
44654                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44655 $as_echo_n "checking for freetype... " >&6; }
44656                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44657 $as_echo "yes (using pkg-config)" >&6; }
44658               fi
44659             fi
44660           fi
44661         fi
44662       fi
44663 
44664       if test "x$FOUND_FREETYPE" != xyes; then
44665         # Check in well-known locations
44666         if test "x$OPENJDK_TARGET_OS" = xwindows; then
44667           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44668 
44669   windows_path="$FREETYPE_BASE_DIR"
44670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44671     unix_path=`$CYGPATH -u "$windows_path"`
44672     FREETYPE_BASE_DIR="$unix_path"
44673   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44674     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44675     FREETYPE_BASE_DIR="$unix_path"
44676   fi
44677 
44678 
44679   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44680   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44681   METHOD="well-known location"
44682 
44683   # First check if the files exists.
44684   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44685     # We found an arbitrary include file. That's a good sign.
44686     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44687 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44688     FOUND_FREETYPE=yes
44689 
44690     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44691     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44692       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44693 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44694       FOUND_FREETYPE=no
44695     else
44696       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44697         # On Windows, we will need both .lib and .dll file.
44698         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44699           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44700 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44701           FOUND_FREETYPE=no
44702         fi
44703       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
44704         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44705         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44706       fi
44707     fi
44708   fi
44709 
44710   if test "x$FOUND_FREETYPE" = xyes; then
44711 
44712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44713 
44714   # Input might be given as Windows format, start by converting to
44715   # unix format.
44716   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44717   new_path=`$CYGPATH -u "$path"`
44718 
44719   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44720   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44721   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44722   # "foo.exe" is OK but "foo" is an error.
44723   #
44724   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44725   # It is also a way to make sure we got the proper file name for the real test later on.
44726   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44727   if test "x$test_shortpath" = x; then
44728     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44729 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44730     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44731   fi
44732 
44733   # Call helper function which possibly converts this using DOS-style short mode.
44734   # If so, the updated path is stored in $new_path.
44735 
44736   input_path="$new_path"
44737   # Check if we need to convert this using DOS-style short mode. If the path
44738   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44739   # take no chances and rewrite it.
44740   # Note: m4 eats our [], so we need to use [ and ] instead.
44741   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44742   if test "x$has_forbidden_chars" != x; then
44743     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44744     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44745     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44746     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44747       # Going to short mode and back again did indeed matter. Since short mode is
44748       # case insensitive, let's make it lowercase to improve readability.
44749       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44750       # Now convert it back to Unix-style (cygpath)
44751       input_path=`$CYGPATH -u "$shortmode_path"`
44752       new_path="$input_path"
44753     fi
44754   fi
44755 
44756   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44757   if test "x$test_cygdrive_prefix" = x; then
44758     # As a simple fix, exclude /usr/bin since it's not a real path.
44759     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44760       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44761       # a path prefixed by /cygdrive for fixpath to work.
44762       new_path="$CYGWIN_ROOT_PATH$input_path"
44763     fi
44764   fi
44765 
44766 
44767   if test "x$path" != "x$new_path"; then
44768     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44769     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44770 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44771   fi
44772 
44773   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44774 
44775   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44776   has_colon=`$ECHO $path | $GREP ^.:`
44777   new_path="$path"
44778   if test "x$has_colon" = x; then
44779     # Not in mixed or Windows style, start by that.
44780     new_path=`cmd //c echo $path`
44781   fi
44782 
44783 
44784   input_path="$new_path"
44785   # Check if we need to convert this using DOS-style short mode. If the path
44786   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44787   # take no chances and rewrite it.
44788   # Note: m4 eats our [], so we need to use [ and ] instead.
44789   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44790   if test "x$has_forbidden_chars" != x; then
44791     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44792     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44793   fi
44794 
44795 
44796   windows_path="$new_path"
44797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44798     unix_path=`$CYGPATH -u "$windows_path"`
44799     new_path="$unix_path"
44800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44801     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44802     new_path="$unix_path"
44803   fi
44804 
44805   if test "x$path" != "x$new_path"; then
44806     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44807     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44808 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44809   fi
44810 
44811   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44812   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44813 
44814   else
44815     # We're on a posix platform. Hooray! :)
44816     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44817     has_space=`$ECHO "$path" | $GREP " "`
44818     if test "x$has_space" != x; then
44819       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44820 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44821       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44822     fi
44823 
44824     # Use eval to expand a potential ~
44825     eval path="$path"
44826     if test ! -f "$path" && test ! -d "$path"; then
44827       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44828     fi
44829 
44830     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44831   fi
44832 
44833 
44834   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44835 
44836   # Input might be given as Windows format, start by converting to
44837   # unix format.
44838   path="$POTENTIAL_FREETYPE_LIB_PATH"
44839   new_path=`$CYGPATH -u "$path"`
44840 
44841   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44842   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44843   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44844   # "foo.exe" is OK but "foo" is an error.
44845   #
44846   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44847   # It is also a way to make sure we got the proper file name for the real test later on.
44848   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44849   if test "x$test_shortpath" = x; then
44850     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44851 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44852     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44853   fi
44854 
44855   # Call helper function which possibly converts this using DOS-style short mode.
44856   # If so, the updated path is stored in $new_path.
44857 
44858   input_path="$new_path"
44859   # Check if we need to convert this using DOS-style short mode. If the path
44860   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44861   # take no chances and rewrite it.
44862   # Note: m4 eats our [], so we need to use [ and ] instead.
44863   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44864   if test "x$has_forbidden_chars" != x; then
44865     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44866     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44867     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44868     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44869       # Going to short mode and back again did indeed matter. Since short mode is
44870       # case insensitive, let's make it lowercase to improve readability.
44871       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44872       # Now convert it back to Unix-style (cygpath)
44873       input_path=`$CYGPATH -u "$shortmode_path"`
44874       new_path="$input_path"
44875     fi
44876   fi
44877 
44878   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44879   if test "x$test_cygdrive_prefix" = x; then
44880     # As a simple fix, exclude /usr/bin since it's not a real path.
44881     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44882       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44883       # a path prefixed by /cygdrive for fixpath to work.
44884       new_path="$CYGWIN_ROOT_PATH$input_path"
44885     fi
44886   fi
44887 
44888 
44889   if test "x$path" != "x$new_path"; then
44890     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44891     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44892 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44893   fi
44894 
44895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44896 
44897   path="$POTENTIAL_FREETYPE_LIB_PATH"
44898   has_colon=`$ECHO $path | $GREP ^.:`
44899   new_path="$path"
44900   if test "x$has_colon" = x; then
44901     # Not in mixed or Windows style, start by that.
44902     new_path=`cmd //c echo $path`
44903   fi
44904 
44905 
44906   input_path="$new_path"
44907   # Check if we need to convert this using DOS-style short mode. If the path
44908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44909   # take no chances and rewrite it.
44910   # Note: m4 eats our [], so we need to use [ and ] instead.
44911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44912   if test "x$has_forbidden_chars" != x; then
44913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44914     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44915   fi
44916 
44917 
44918   windows_path="$new_path"
44919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44920     unix_path=`$CYGPATH -u "$windows_path"`
44921     new_path="$unix_path"
44922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44924     new_path="$unix_path"
44925   fi
44926 
44927   if test "x$path" != "x$new_path"; then
44928     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44929     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44930 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44931   fi
44932 
44933   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44934   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44935 
44936   else
44937     # We're on a posix platform. Hooray! :)
44938     path="$POTENTIAL_FREETYPE_LIB_PATH"
44939     has_space=`$ECHO "$path" | $GREP " "`
44940     if test "x$has_space" != x; then
44941       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44942 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44943       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44944     fi
44945 
44946     # Use eval to expand a potential ~
44947     eval path="$path"
44948     if test ! -f "$path" && test ! -d "$path"; then
44949       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44950     fi
44951 
44952     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44953   fi
44954 
44955 
44956     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44957     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44958 $as_echo_n "checking for freetype includes... " >&6; }
44959     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44960 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44961     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44962     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44963 $as_echo_n "checking for freetype libraries... " >&6; }
44964     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44965 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44966   fi
44967 
44968           if test "x$FOUND_FREETYPE" != xyes; then
44969             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44970 
44971   windows_path="$FREETYPE_BASE_DIR"
44972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44973     unix_path=`$CYGPATH -u "$windows_path"`
44974     FREETYPE_BASE_DIR="$unix_path"
44975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44976     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44977     FREETYPE_BASE_DIR="$unix_path"
44978   fi
44979 
44980 
44981   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44982   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44983   METHOD="well-known location"
44984 
44985   # First check if the files exists.
44986   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44987     # We found an arbitrary include file. That's a good sign.
44988     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44989 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44990     FOUND_FREETYPE=yes
44991 
44992     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44993     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44994       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44995 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44996       FOUND_FREETYPE=no
44997     else
44998       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44999         # On Windows, we will need both .lib and .dll file.
45000         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45001           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45002 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45003           FOUND_FREETYPE=no
45004         fi
45005       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
45006         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45007         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45008       fi
45009     fi
45010   fi
45011 
45012   if test "x$FOUND_FREETYPE" = xyes; then
45013 
45014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45015 
45016   # Input might be given as Windows format, start by converting to
45017   # unix format.
45018   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45019   new_path=`$CYGPATH -u "$path"`
45020 
45021   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45022   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45023   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45024   # "foo.exe" is OK but "foo" is an error.
45025   #
45026   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45027   # It is also a way to make sure we got the proper file name for the real test later on.
45028   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45029   if test "x$test_shortpath" = x; then
45030     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45031 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45032     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45033   fi
45034 
45035   # Call helper function which possibly converts this using DOS-style short mode.
45036   # If so, the updated path is stored in $new_path.
45037 
45038   input_path="$new_path"
45039   # Check if we need to convert this using DOS-style short mode. If the path
45040   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45041   # take no chances and rewrite it.
45042   # Note: m4 eats our [], so we need to use [ and ] instead.
45043   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45044   if test "x$has_forbidden_chars" != x; then
45045     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45046     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45047     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45048     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45049       # Going to short mode and back again did indeed matter. Since short mode is
45050       # case insensitive, let's make it lowercase to improve readability.
45051       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45052       # Now convert it back to Unix-style (cygpath)
45053       input_path=`$CYGPATH -u "$shortmode_path"`
45054       new_path="$input_path"
45055     fi
45056   fi
45057 
45058   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45059   if test "x$test_cygdrive_prefix" = x; then
45060     # As a simple fix, exclude /usr/bin since it's not a real path.
45061     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45062       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45063       # a path prefixed by /cygdrive for fixpath to work.
45064       new_path="$CYGWIN_ROOT_PATH$input_path"
45065     fi
45066   fi
45067 
45068 
45069   if test "x$path" != "x$new_path"; then
45070     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45071     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45072 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45073   fi
45074 
45075   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45076 
45077   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45078   has_colon=`$ECHO $path | $GREP ^.:`
45079   new_path="$path"
45080   if test "x$has_colon" = x; then
45081     # Not in mixed or Windows style, start by that.
45082     new_path=`cmd //c echo $path`
45083   fi
45084 
45085 
45086   input_path="$new_path"
45087   # Check if we need to convert this using DOS-style short mode. If the path
45088   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45089   # take no chances and rewrite it.
45090   # Note: m4 eats our [], so we need to use [ and ] instead.
45091   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45092   if test "x$has_forbidden_chars" != x; then
45093     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45094     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45095   fi
45096 
45097 
45098   windows_path="$new_path"
45099   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45100     unix_path=`$CYGPATH -u "$windows_path"`
45101     new_path="$unix_path"
45102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45103     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45104     new_path="$unix_path"
45105   fi
45106 
45107   if test "x$path" != "x$new_path"; then
45108     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45109     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45110 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45111   fi
45112 
45113   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45114   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45115 
45116   else
45117     # We're on a posix platform. Hooray! :)
45118     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45119     has_space=`$ECHO "$path" | $GREP " "`
45120     if test "x$has_space" != x; then
45121       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45122 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45123       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45124     fi
45125 
45126     # Use eval to expand a potential ~
45127     eval path="$path"
45128     if test ! -f "$path" && test ! -d "$path"; then
45129       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45130     fi
45131 
45132     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45133   fi
45134 
45135 
45136   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45137 
45138   # Input might be given as Windows format, start by converting to
45139   # unix format.
45140   path="$POTENTIAL_FREETYPE_LIB_PATH"
45141   new_path=`$CYGPATH -u "$path"`
45142 
45143   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45144   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45145   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45146   # "foo.exe" is OK but "foo" is an error.
45147   #
45148   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45149   # It is also a way to make sure we got the proper file name for the real test later on.
45150   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45151   if test "x$test_shortpath" = x; then
45152     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45153 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45154     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45155   fi
45156 
45157   # Call helper function which possibly converts this using DOS-style short mode.
45158   # If so, the updated path is stored in $new_path.
45159 
45160   input_path="$new_path"
45161   # Check if we need to convert this using DOS-style short mode. If the path
45162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45163   # take no chances and rewrite it.
45164   # Note: m4 eats our [], so we need to use [ and ] instead.
45165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45166   if test "x$has_forbidden_chars" != x; then
45167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45168     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45169     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45170     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45171       # Going to short mode and back again did indeed matter. Since short mode is
45172       # case insensitive, let's make it lowercase to improve readability.
45173       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45174       # Now convert it back to Unix-style (cygpath)
45175       input_path=`$CYGPATH -u "$shortmode_path"`
45176       new_path="$input_path"
45177     fi
45178   fi
45179 
45180   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45181   if test "x$test_cygdrive_prefix" = x; then
45182     # As a simple fix, exclude /usr/bin since it's not a real path.
45183     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45184       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45185       # a path prefixed by /cygdrive for fixpath to work.
45186       new_path="$CYGWIN_ROOT_PATH$input_path"
45187     fi
45188   fi
45189 
45190 
45191   if test "x$path" != "x$new_path"; then
45192     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45193     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45194 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45195   fi
45196 
45197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45198 
45199   path="$POTENTIAL_FREETYPE_LIB_PATH"
45200   has_colon=`$ECHO $path | $GREP ^.:`
45201   new_path="$path"
45202   if test "x$has_colon" = x; then
45203     # Not in mixed or Windows style, start by that.
45204     new_path=`cmd //c echo $path`
45205   fi
45206 
45207 
45208   input_path="$new_path"
45209   # Check if we need to convert this using DOS-style short mode. If the path
45210   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45211   # take no chances and rewrite it.
45212   # Note: m4 eats our [], so we need to use [ and ] instead.
45213   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45214   if test "x$has_forbidden_chars" != x; then
45215     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45216     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45217   fi
45218 
45219 
45220   windows_path="$new_path"
45221   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45222     unix_path=`$CYGPATH -u "$windows_path"`
45223     new_path="$unix_path"
45224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45225     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45226     new_path="$unix_path"
45227   fi
45228 
45229   if test "x$path" != "x$new_path"; then
45230     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45231     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45232 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45233   fi
45234 
45235   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45236   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45237 
45238   else
45239     # We're on a posix platform. Hooray! :)
45240     path="$POTENTIAL_FREETYPE_LIB_PATH"
45241     has_space=`$ECHO "$path" | $GREP " "`
45242     if test "x$has_space" != x; then
45243       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45244 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45245       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45246     fi
45247 
45248     # Use eval to expand a potential ~
45249     eval path="$path"
45250     if test ! -f "$path" && test ! -d "$path"; then
45251       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45252     fi
45253 
45254     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45255   fi
45256 
45257 
45258     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45259     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45260 $as_echo_n "checking for freetype includes... " >&6; }
45261     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45262 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45263     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45264     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45265 $as_echo_n "checking for freetype libraries... " >&6; }
45266     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45267 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45268   fi
45269 
45270           fi
45271         else
45272           FREETYPE_BASE_DIR="$SYSROOT/usr"
45273 
45274   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45275   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45276   METHOD="well-known location"
45277 
45278   # First check if the files exists.
45279   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45280     # We found an arbitrary include file. That's a good sign.
45281     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45282 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45283     FOUND_FREETYPE=yes
45284 
45285     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45286     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45287       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45288 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45289       FOUND_FREETYPE=no
45290     else
45291       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45292         # On Windows, we will need both .lib and .dll file.
45293         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45294           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45295 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45296           FOUND_FREETYPE=no
45297         fi
45298       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
45299         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45300         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45301       fi
45302     fi
45303   fi
45304 
45305   if test "x$FOUND_FREETYPE" = xyes; then
45306 
45307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45308 
45309   # Input might be given as Windows format, start by converting to
45310   # unix format.
45311   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45312   new_path=`$CYGPATH -u "$path"`
45313 
45314   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45315   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45316   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45317   # "foo.exe" is OK but "foo" is an error.
45318   #
45319   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45320   # It is also a way to make sure we got the proper file name for the real test later on.
45321   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45322   if test "x$test_shortpath" = x; then
45323     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45324 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45325     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45326   fi
45327 
45328   # Call helper function which possibly converts this using DOS-style short mode.
45329   # If so, the updated path is stored in $new_path.
45330 
45331   input_path="$new_path"
45332   # Check if we need to convert this using DOS-style short mode. If the path
45333   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45334   # take no chances and rewrite it.
45335   # Note: m4 eats our [], so we need to use [ and ] instead.
45336   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45337   if test "x$has_forbidden_chars" != x; then
45338     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45339     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45340     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45341     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45342       # Going to short mode and back again did indeed matter. Since short mode is
45343       # case insensitive, let's make it lowercase to improve readability.
45344       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45345       # Now convert it back to Unix-style (cygpath)
45346       input_path=`$CYGPATH -u "$shortmode_path"`
45347       new_path="$input_path"
45348     fi
45349   fi
45350 
45351   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45352   if test "x$test_cygdrive_prefix" = x; then
45353     # As a simple fix, exclude /usr/bin since it's not a real path.
45354     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45355       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45356       # a path prefixed by /cygdrive for fixpath to work.
45357       new_path="$CYGWIN_ROOT_PATH$input_path"
45358     fi
45359   fi
45360 
45361 
45362   if test "x$path" != "x$new_path"; then
45363     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45364     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45365 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45366   fi
45367 
45368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45369 
45370   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45371   has_colon=`$ECHO $path | $GREP ^.:`
45372   new_path="$path"
45373   if test "x$has_colon" = x; then
45374     # Not in mixed or Windows style, start by that.
45375     new_path=`cmd //c echo $path`
45376   fi
45377 
45378 
45379   input_path="$new_path"
45380   # Check if we need to convert this using DOS-style short mode. If the path
45381   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45382   # take no chances and rewrite it.
45383   # Note: m4 eats our [], so we need to use [ and ] instead.
45384   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45385   if test "x$has_forbidden_chars" != x; then
45386     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45387     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45388   fi
45389 
45390 
45391   windows_path="$new_path"
45392   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45393     unix_path=`$CYGPATH -u "$windows_path"`
45394     new_path="$unix_path"
45395   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45396     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45397     new_path="$unix_path"
45398   fi
45399 
45400   if test "x$path" != "x$new_path"; then
45401     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45402     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45403 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45404   fi
45405 
45406   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45407   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45408 
45409   else
45410     # We're on a posix platform. Hooray! :)
45411     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45412     has_space=`$ECHO "$path" | $GREP " "`
45413     if test "x$has_space" != x; then
45414       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45415 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45416       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45417     fi
45418 
45419     # Use eval to expand a potential ~
45420     eval path="$path"
45421     if test ! -f "$path" && test ! -d "$path"; then
45422       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45423     fi
45424 
45425     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45426   fi
45427 
45428 
45429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45430 
45431   # Input might be given as Windows format, start by converting to
45432   # unix format.
45433   path="$POTENTIAL_FREETYPE_LIB_PATH"
45434   new_path=`$CYGPATH -u "$path"`
45435 
45436   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45437   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45438   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45439   # "foo.exe" is OK but "foo" is an error.
45440   #
45441   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45442   # It is also a way to make sure we got the proper file name for the real test later on.
45443   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45444   if test "x$test_shortpath" = x; then
45445     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45446 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45447     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45448   fi
45449 
45450   # Call helper function which possibly converts this using DOS-style short mode.
45451   # If so, the updated path is stored in $new_path.
45452 
45453   input_path="$new_path"
45454   # Check if we need to convert this using DOS-style short mode. If the path
45455   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45456   # take no chances and rewrite it.
45457   # Note: m4 eats our [], so we need to use [ and ] instead.
45458   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45459   if test "x$has_forbidden_chars" != x; then
45460     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45461     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45462     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45463     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45464       # Going to short mode and back again did indeed matter. Since short mode is
45465       # case insensitive, let's make it lowercase to improve readability.
45466       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45467       # Now convert it back to Unix-style (cygpath)
45468       input_path=`$CYGPATH -u "$shortmode_path"`
45469       new_path="$input_path"
45470     fi
45471   fi
45472 
45473   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45474   if test "x$test_cygdrive_prefix" = x; then
45475     # As a simple fix, exclude /usr/bin since it's not a real path.
45476     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45477       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45478       # a path prefixed by /cygdrive for fixpath to work.
45479       new_path="$CYGWIN_ROOT_PATH$input_path"
45480     fi
45481   fi
45482 
45483 
45484   if test "x$path" != "x$new_path"; then
45485     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45486     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45487 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45488   fi
45489 
45490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45491 
45492   path="$POTENTIAL_FREETYPE_LIB_PATH"
45493   has_colon=`$ECHO $path | $GREP ^.:`
45494   new_path="$path"
45495   if test "x$has_colon" = x; then
45496     # Not in mixed or Windows style, start by that.
45497     new_path=`cmd //c echo $path`
45498   fi
45499 
45500 
45501   input_path="$new_path"
45502   # Check if we need to convert this using DOS-style short mode. If the path
45503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45504   # take no chances and rewrite it.
45505   # Note: m4 eats our [], so we need to use [ and ] instead.
45506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45507   if test "x$has_forbidden_chars" != x; then
45508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45509     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45510   fi
45511 
45512 
45513   windows_path="$new_path"
45514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45515     unix_path=`$CYGPATH -u "$windows_path"`
45516     new_path="$unix_path"
45517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45519     new_path="$unix_path"
45520   fi
45521 
45522   if test "x$path" != "x$new_path"; then
45523     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45524     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45525 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45526   fi
45527 
45528   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45529   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45530 
45531   else
45532     # We're on a posix platform. Hooray! :)
45533     path="$POTENTIAL_FREETYPE_LIB_PATH"
45534     has_space=`$ECHO "$path" | $GREP " "`
45535     if test "x$has_space" != x; then
45536       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45537 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45538       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45539     fi
45540 
45541     # Use eval to expand a potential ~
45542     eval path="$path"
45543     if test ! -f "$path" && test ! -d "$path"; then
45544       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45545     fi
45546 
45547     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45548   fi
45549 
45550 
45551     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45552     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45553 $as_echo_n "checking for freetype includes... " >&6; }
45554     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45555 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45556     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45557     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45558 $as_echo_n "checking for freetype libraries... " >&6; }
45559     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45560 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45561   fi
45562 
45563 
45564           if test "x$FOUND_FREETYPE" != xyes; then
45565             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
45566 
45567   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45568   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45569   METHOD="well-known location"
45570 
45571   # First check if the files exists.
45572   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45573     # We found an arbitrary include file. That's a good sign.
45574     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45575 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45576     FOUND_FREETYPE=yes
45577 
45578     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45579     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45580       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45581 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45582       FOUND_FREETYPE=no
45583     else
45584       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45585         # On Windows, we will need both .lib and .dll file.
45586         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45587           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45588 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45589           FOUND_FREETYPE=no
45590         fi
45591       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
45592         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45593         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45594       fi
45595     fi
45596   fi
45597 
45598   if test "x$FOUND_FREETYPE" = xyes; then
45599 
45600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45601 
45602   # Input might be given as Windows format, start by converting to
45603   # unix format.
45604   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45605   new_path=`$CYGPATH -u "$path"`
45606 
45607   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45608   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45609   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45610   # "foo.exe" is OK but "foo" is an error.
45611   #
45612   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45613   # It is also a way to make sure we got the proper file name for the real test later on.
45614   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45615   if test "x$test_shortpath" = x; then
45616     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45617 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45618     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45619   fi
45620 
45621   # Call helper function which possibly converts this using DOS-style short mode.
45622   # If so, the updated path is stored in $new_path.
45623 
45624   input_path="$new_path"
45625   # Check if we need to convert this using DOS-style short mode. If the path
45626   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45627   # take no chances and rewrite it.
45628   # Note: m4 eats our [], so we need to use [ and ] instead.
45629   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45630   if test "x$has_forbidden_chars" != x; then
45631     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45632     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45633     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45634     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45635       # Going to short mode and back again did indeed matter. Since short mode is
45636       # case insensitive, let's make it lowercase to improve readability.
45637       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45638       # Now convert it back to Unix-style (cygpath)
45639       input_path=`$CYGPATH -u "$shortmode_path"`
45640       new_path="$input_path"
45641     fi
45642   fi
45643 
45644   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45645   if test "x$test_cygdrive_prefix" = x; then
45646     # As a simple fix, exclude /usr/bin since it's not a real path.
45647     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45648       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45649       # a path prefixed by /cygdrive for fixpath to work.
45650       new_path="$CYGWIN_ROOT_PATH$input_path"
45651     fi
45652   fi
45653 
45654 
45655   if test "x$path" != "x$new_path"; then
45656     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45657     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45658 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45659   fi
45660 
45661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45662 
45663   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45664   has_colon=`$ECHO $path | $GREP ^.:`
45665   new_path="$path"
45666   if test "x$has_colon" = x; then
45667     # Not in mixed or Windows style, start by that.
45668     new_path=`cmd //c echo $path`
45669   fi
45670 
45671 
45672   input_path="$new_path"
45673   # Check if we need to convert this using DOS-style short mode. If the path
45674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45675   # take no chances and rewrite it.
45676   # Note: m4 eats our [], so we need to use [ and ] instead.
45677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45678   if test "x$has_forbidden_chars" != x; then
45679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45680     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45681   fi
45682 
45683 
45684   windows_path="$new_path"
45685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45686     unix_path=`$CYGPATH -u "$windows_path"`
45687     new_path="$unix_path"
45688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45690     new_path="$unix_path"
45691   fi
45692 
45693   if test "x$path" != "x$new_path"; then
45694     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45695     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45696 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45697   fi
45698 
45699   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45700   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45701 
45702   else
45703     # We're on a posix platform. Hooray! :)
45704     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45705     has_space=`$ECHO "$path" | $GREP " "`
45706     if test "x$has_space" != x; then
45707       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45708 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45709       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45710     fi
45711 
45712     # Use eval to expand a potential ~
45713     eval path="$path"
45714     if test ! -f "$path" && test ! -d "$path"; then
45715       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45716     fi
45717 
45718     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45719   fi
45720 
45721 
45722   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45723 
45724   # Input might be given as Windows format, start by converting to
45725   # unix format.
45726   path="$POTENTIAL_FREETYPE_LIB_PATH"
45727   new_path=`$CYGPATH -u "$path"`
45728 
45729   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45730   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45731   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45732   # "foo.exe" is OK but "foo" is an error.
45733   #
45734   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45735   # It is also a way to make sure we got the proper file name for the real test later on.
45736   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45737   if test "x$test_shortpath" = x; then
45738     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45739 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45740     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45741   fi
45742 
45743   # Call helper function which possibly converts this using DOS-style short mode.
45744   # If so, the updated path is stored in $new_path.
45745 
45746   input_path="$new_path"
45747   # Check if we need to convert this using DOS-style short mode. If the path
45748   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45749   # take no chances and rewrite it.
45750   # Note: m4 eats our [], so we need to use [ and ] instead.
45751   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45752   if test "x$has_forbidden_chars" != x; then
45753     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45754     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45755     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45756     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45757       # Going to short mode and back again did indeed matter. Since short mode is
45758       # case insensitive, let's make it lowercase to improve readability.
45759       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45760       # Now convert it back to Unix-style (cygpath)
45761       input_path=`$CYGPATH -u "$shortmode_path"`
45762       new_path="$input_path"
45763     fi
45764   fi
45765 
45766   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45767   if test "x$test_cygdrive_prefix" = x; then
45768     # As a simple fix, exclude /usr/bin since it's not a real path.
45769     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45770       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45771       # a path prefixed by /cygdrive for fixpath to work.
45772       new_path="$CYGWIN_ROOT_PATH$input_path"
45773     fi
45774   fi
45775 
45776 
45777   if test "x$path" != "x$new_path"; then
45778     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45779     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45780 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45781   fi
45782 
45783   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45784 
45785   path="$POTENTIAL_FREETYPE_LIB_PATH"
45786   has_colon=`$ECHO $path | $GREP ^.:`
45787   new_path="$path"
45788   if test "x$has_colon" = x; then
45789     # Not in mixed or Windows style, start by that.
45790     new_path=`cmd //c echo $path`
45791   fi
45792 
45793 
45794   input_path="$new_path"
45795   # Check if we need to convert this using DOS-style short mode. If the path
45796   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45797   # take no chances and rewrite it.
45798   # Note: m4 eats our [], so we need to use [ and ] instead.
45799   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45800   if test "x$has_forbidden_chars" != x; then
45801     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45802     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45803   fi
45804 
45805 
45806   windows_path="$new_path"
45807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45808     unix_path=`$CYGPATH -u "$windows_path"`
45809     new_path="$unix_path"
45810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45812     new_path="$unix_path"
45813   fi
45814 
45815   if test "x$path" != "x$new_path"; then
45816     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45817     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45818 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45819   fi
45820 
45821   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45822   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45823 
45824   else
45825     # We're on a posix platform. Hooray! :)
45826     path="$POTENTIAL_FREETYPE_LIB_PATH"
45827     has_space=`$ECHO "$path" | $GREP " "`
45828     if test "x$has_space" != x; then
45829       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45830 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45831       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45832     fi
45833 
45834     # Use eval to expand a potential ~
45835     eval path="$path"
45836     if test ! -f "$path" && test ! -d "$path"; then
45837       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45838     fi
45839 
45840     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45841   fi
45842 
45843 
45844     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45845     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45846 $as_echo_n "checking for freetype includes... " >&6; }
45847     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45848 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45849     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45850     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45851 $as_echo_n "checking for freetype libraries... " >&6; }
45852     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45853 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45854   fi
45855 
45856           fi
45857 
45858           if test "x$FOUND_FREETYPE" != xyes; then
45859             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
45860 
45861   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45862   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45863   METHOD="well-known location"
45864 
45865   # First check if the files exists.
45866   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45867     # We found an arbitrary include file. That's a good sign.
45868     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45869 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45870     FOUND_FREETYPE=yes
45871 
45872     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45873     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45874       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45875 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45876       FOUND_FREETYPE=no
45877     else
45878       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45879         # On Windows, we will need both .lib and .dll file.
45880         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45881           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45882 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45883           FOUND_FREETYPE=no
45884         fi
45885       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
45886         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45887         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45888       fi
45889     fi
45890   fi
45891 
45892   if test "x$FOUND_FREETYPE" = xyes; then
45893 
45894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45895 
45896   # Input might be given as Windows format, start by converting to
45897   # unix format.
45898   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45899   new_path=`$CYGPATH -u "$path"`
45900 
45901   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45902   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45903   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45904   # "foo.exe" is OK but "foo" is an error.
45905   #
45906   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45907   # It is also a way to make sure we got the proper file name for the real test later on.
45908   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45909   if test "x$test_shortpath" = x; then
45910     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45911 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45912     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45913   fi
45914 
45915   # Call helper function which possibly converts this using DOS-style short mode.
45916   # If so, the updated path is stored in $new_path.
45917 
45918   input_path="$new_path"
45919   # Check if we need to convert this using DOS-style short mode. If the path
45920   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45921   # take no chances and rewrite it.
45922   # Note: m4 eats our [], so we need to use [ and ] instead.
45923   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45924   if test "x$has_forbidden_chars" != x; then
45925     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45926     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45927     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45928     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45929       # Going to short mode and back again did indeed matter. Since short mode is
45930       # case insensitive, let's make it lowercase to improve readability.
45931       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45932       # Now convert it back to Unix-style (cygpath)
45933       input_path=`$CYGPATH -u "$shortmode_path"`
45934       new_path="$input_path"
45935     fi
45936   fi
45937 
45938   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45939   if test "x$test_cygdrive_prefix" = x; then
45940     # As a simple fix, exclude /usr/bin since it's not a real path.
45941     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45942       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45943       # a path prefixed by /cygdrive for fixpath to work.
45944       new_path="$CYGWIN_ROOT_PATH$input_path"
45945     fi
45946   fi
45947 
45948 
45949   if test "x$path" != "x$new_path"; then
45950     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45951     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45952 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45953   fi
45954 
45955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45956 
45957   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45958   has_colon=`$ECHO $path | $GREP ^.:`
45959   new_path="$path"
45960   if test "x$has_colon" = x; then
45961     # Not in mixed or Windows style, start by that.
45962     new_path=`cmd //c echo $path`
45963   fi
45964 
45965 
45966   input_path="$new_path"
45967   # Check if we need to convert this using DOS-style short mode. If the path
45968   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45969   # take no chances and rewrite it.
45970   # Note: m4 eats our [], so we need to use [ and ] instead.
45971   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45972   if test "x$has_forbidden_chars" != x; then
45973     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45974     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45975   fi
45976 
45977 
45978   windows_path="$new_path"
45979   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45980     unix_path=`$CYGPATH -u "$windows_path"`
45981     new_path="$unix_path"
45982   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45983     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45984     new_path="$unix_path"
45985   fi
45986 
45987   if test "x$path" != "x$new_path"; then
45988     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45989     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45990 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45991   fi
45992 
45993   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45994   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45995 
45996   else
45997     # We're on a posix platform. Hooray! :)
45998     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45999     has_space=`$ECHO "$path" | $GREP " "`
46000     if test "x$has_space" != x; then
46001       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46002 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46003       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46004     fi
46005 
46006     # Use eval to expand a potential ~
46007     eval path="$path"
46008     if test ! -f "$path" && test ! -d "$path"; then
46009       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46010     fi
46011 
46012     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46013   fi
46014 
46015 
46016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46017 
46018   # Input might be given as Windows format, start by converting to
46019   # unix format.
46020   path="$POTENTIAL_FREETYPE_LIB_PATH"
46021   new_path=`$CYGPATH -u "$path"`
46022 
46023   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46024   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46025   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46026   # "foo.exe" is OK but "foo" is an error.
46027   #
46028   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46029   # It is also a way to make sure we got the proper file name for the real test later on.
46030   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46031   if test "x$test_shortpath" = x; then
46032     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46033 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46034     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46035   fi
46036 
46037   # Call helper function which possibly converts this using DOS-style short mode.
46038   # If so, the updated path is stored in $new_path.
46039 
46040   input_path="$new_path"
46041   # Check if we need to convert this using DOS-style short mode. If the path
46042   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46043   # take no chances and rewrite it.
46044   # Note: m4 eats our [], so we need to use [ and ] instead.
46045   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46046   if test "x$has_forbidden_chars" != x; then
46047     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46048     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46049     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46050     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46051       # Going to short mode and back again did indeed matter. Since short mode is
46052       # case insensitive, let's make it lowercase to improve readability.
46053       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46054       # Now convert it back to Unix-style (cygpath)
46055       input_path=`$CYGPATH -u "$shortmode_path"`
46056       new_path="$input_path"
46057     fi
46058   fi
46059 
46060   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46061   if test "x$test_cygdrive_prefix" = x; then
46062     # As a simple fix, exclude /usr/bin since it's not a real path.
46063     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46064       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46065       # a path prefixed by /cygdrive for fixpath to work.
46066       new_path="$CYGWIN_ROOT_PATH$input_path"
46067     fi
46068   fi
46069 
46070 
46071   if test "x$path" != "x$new_path"; then
46072     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46073     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46074 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46075   fi
46076 
46077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46078 
46079   path="$POTENTIAL_FREETYPE_LIB_PATH"
46080   has_colon=`$ECHO $path | $GREP ^.:`
46081   new_path="$path"
46082   if test "x$has_colon" = x; then
46083     # Not in mixed or Windows style, start by that.
46084     new_path=`cmd //c echo $path`
46085   fi
46086 
46087 
46088   input_path="$new_path"
46089   # Check if we need to convert this using DOS-style short mode. If the path
46090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46091   # take no chances and rewrite it.
46092   # Note: m4 eats our [], so we need to use [ and ] instead.
46093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46094   if test "x$has_forbidden_chars" != x; then
46095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46096     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46097   fi
46098 
46099 
46100   windows_path="$new_path"
46101   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46102     unix_path=`$CYGPATH -u "$windows_path"`
46103     new_path="$unix_path"
46104   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46105     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46106     new_path="$unix_path"
46107   fi
46108 
46109   if test "x$path" != "x$new_path"; then
46110     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46111     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46112 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46113   fi
46114 
46115   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46116   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46117 
46118   else
46119     # We're on a posix platform. Hooray! :)
46120     path="$POTENTIAL_FREETYPE_LIB_PATH"
46121     has_space=`$ECHO "$path" | $GREP " "`
46122     if test "x$has_space" != x; then
46123       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46124 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46125       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46126     fi
46127 
46128     # Use eval to expand a potential ~
46129     eval path="$path"
46130     if test ! -f "$path" && test ! -d "$path"; then
46131       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46132     fi
46133 
46134     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46135   fi
46136 
46137 
46138     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46139     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46140 $as_echo_n "checking for freetype includes... " >&6; }
46141     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46142 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46143     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46144     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46145 $as_echo_n "checking for freetype libraries... " >&6; }
46146     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46147 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46148   fi
46149 
46150           fi
46151 
46152           if test "x$FOUND_FREETYPE" != xyes; then
46153             FREETYPE_BASE_DIR="$SYSROOT/usr"
46154             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46155 
46156   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46157   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46158   METHOD="well-known location"
46159 
46160   # First check if the files exists.
46161   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46162     # We found an arbitrary include file. That's a good sign.
46163     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46164 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46165     FOUND_FREETYPE=yes
46166 
46167     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46168     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46169       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46170 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46171       FOUND_FREETYPE=no
46172     else
46173       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46174         # On Windows, we will need both .lib and .dll file.
46175         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46176           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46177 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46178           FOUND_FREETYPE=no
46179         fi
46180       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
46181         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46182         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46183       fi
46184     fi
46185   fi
46186 
46187   if test "x$FOUND_FREETYPE" = xyes; then
46188 
46189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46190 
46191   # Input might be given as Windows format, start by converting to
46192   # unix format.
46193   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46194   new_path=`$CYGPATH -u "$path"`
46195 
46196   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46197   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46198   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46199   # "foo.exe" is OK but "foo" is an error.
46200   #
46201   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46202   # It is also a way to make sure we got the proper file name for the real test later on.
46203   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46204   if test "x$test_shortpath" = x; then
46205     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46206 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46207     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46208   fi
46209 
46210   # Call helper function which possibly converts this using DOS-style short mode.
46211   # If so, the updated path is stored in $new_path.
46212 
46213   input_path="$new_path"
46214   # Check if we need to convert this using DOS-style short mode. If the path
46215   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46216   # take no chances and rewrite it.
46217   # Note: m4 eats our [], so we need to use [ and ] instead.
46218   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46219   if test "x$has_forbidden_chars" != x; then
46220     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46221     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46222     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46223     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46224       # Going to short mode and back again did indeed matter. Since short mode is
46225       # case insensitive, let's make it lowercase to improve readability.
46226       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46227       # Now convert it back to Unix-style (cygpath)
46228       input_path=`$CYGPATH -u "$shortmode_path"`
46229       new_path="$input_path"
46230     fi
46231   fi
46232 
46233   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46234   if test "x$test_cygdrive_prefix" = x; then
46235     # As a simple fix, exclude /usr/bin since it's not a real path.
46236     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46237       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46238       # a path prefixed by /cygdrive for fixpath to work.
46239       new_path="$CYGWIN_ROOT_PATH$input_path"
46240     fi
46241   fi
46242 
46243 
46244   if test "x$path" != "x$new_path"; then
46245     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46246     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46247 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46248   fi
46249 
46250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46251 
46252   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46253   has_colon=`$ECHO $path | $GREP ^.:`
46254   new_path="$path"
46255   if test "x$has_colon" = x; then
46256     # Not in mixed or Windows style, start by that.
46257     new_path=`cmd //c echo $path`
46258   fi
46259 
46260 
46261   input_path="$new_path"
46262   # Check if we need to convert this using DOS-style short mode. If the path
46263   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46264   # take no chances and rewrite it.
46265   # Note: m4 eats our [], so we need to use [ and ] instead.
46266   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46267   if test "x$has_forbidden_chars" != x; then
46268     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46269     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46270   fi
46271 
46272 
46273   windows_path="$new_path"
46274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46275     unix_path=`$CYGPATH -u "$windows_path"`
46276     new_path="$unix_path"
46277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46278     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46279     new_path="$unix_path"
46280   fi
46281 
46282   if test "x$path" != "x$new_path"; then
46283     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46284     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46285 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46286   fi
46287 
46288   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46289   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46290 
46291   else
46292     # We're on a posix platform. Hooray! :)
46293     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46294     has_space=`$ECHO "$path" | $GREP " "`
46295     if test "x$has_space" != x; then
46296       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46297 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46298       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46299     fi
46300 
46301     # Use eval to expand a potential ~
46302     eval path="$path"
46303     if test ! -f "$path" && test ! -d "$path"; then
46304       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46305     fi
46306 
46307     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46308   fi
46309 
46310 
46311   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46312 
46313   # Input might be given as Windows format, start by converting to
46314   # unix format.
46315   path="$POTENTIAL_FREETYPE_LIB_PATH"
46316   new_path=`$CYGPATH -u "$path"`
46317 
46318   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46319   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46320   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46321   # "foo.exe" is OK but "foo" is an error.
46322   #
46323   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46324   # It is also a way to make sure we got the proper file name for the real test later on.
46325   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46326   if test "x$test_shortpath" = x; then
46327     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46328 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46329     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46330   fi
46331 
46332   # Call helper function which possibly converts this using DOS-style short mode.
46333   # If so, the updated path is stored in $new_path.
46334 
46335   input_path="$new_path"
46336   # Check if we need to convert this using DOS-style short mode. If the path
46337   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46338   # take no chances and rewrite it.
46339   # Note: m4 eats our [], so we need to use [ and ] instead.
46340   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46341   if test "x$has_forbidden_chars" != x; then
46342     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46343     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46344     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46345     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46346       # Going to short mode and back again did indeed matter. Since short mode is
46347       # case insensitive, let's make it lowercase to improve readability.
46348       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46349       # Now convert it back to Unix-style (cygpath)
46350       input_path=`$CYGPATH -u "$shortmode_path"`
46351       new_path="$input_path"
46352     fi
46353   fi
46354 
46355   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46356   if test "x$test_cygdrive_prefix" = x; then
46357     # As a simple fix, exclude /usr/bin since it's not a real path.
46358     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46359       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46360       # a path prefixed by /cygdrive for fixpath to work.
46361       new_path="$CYGWIN_ROOT_PATH$input_path"
46362     fi
46363   fi
46364 
46365 
46366   if test "x$path" != "x$new_path"; then
46367     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46368     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46369 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46370   fi
46371 
46372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46373 
46374   path="$POTENTIAL_FREETYPE_LIB_PATH"
46375   has_colon=`$ECHO $path | $GREP ^.:`
46376   new_path="$path"
46377   if test "x$has_colon" = x; then
46378     # Not in mixed or Windows style, start by that.
46379     new_path=`cmd //c echo $path`
46380   fi
46381 
46382 
46383   input_path="$new_path"
46384   # Check if we need to convert this using DOS-style short mode. If the path
46385   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46386   # take no chances and rewrite it.
46387   # Note: m4 eats our [], so we need to use [ and ] instead.
46388   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46389   if test "x$has_forbidden_chars" != x; then
46390     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46391     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46392   fi
46393 
46394 
46395   windows_path="$new_path"
46396   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46397     unix_path=`$CYGPATH -u "$windows_path"`
46398     new_path="$unix_path"
46399   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46400     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46401     new_path="$unix_path"
46402   fi
46403 
46404   if test "x$path" != "x$new_path"; then
46405     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46406     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46407 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46408   fi
46409 
46410   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46411   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46412 
46413   else
46414     # We're on a posix platform. Hooray! :)
46415     path="$POTENTIAL_FREETYPE_LIB_PATH"
46416     has_space=`$ECHO "$path" | $GREP " "`
46417     if test "x$has_space" != x; then
46418       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46419 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46420       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46421     fi
46422 
46423     # Use eval to expand a potential ~
46424     eval path="$path"
46425     if test ! -f "$path" && test ! -d "$path"; then
46426       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46427     fi
46428 
46429     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46430   fi
46431 
46432 
46433     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46434     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46435 $as_echo_n "checking for freetype includes... " >&6; }
46436     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46437 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46438     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46439     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46440 $as_echo_n "checking for freetype libraries... " >&6; }
46441     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46442 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46443   fi
46444 
46445             else
46446 
46447   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46448   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
46449   METHOD="well-known location"
46450 
46451   # First check if the files exists.
46452   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46453     # We found an arbitrary include file. That's a good sign.
46454     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46455 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46456     FOUND_FREETYPE=yes
46457 
46458     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46459     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46460       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46461 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46462       FOUND_FREETYPE=no
46463     else
46464       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46465         # On Windows, we will need both .lib and .dll file.
46466         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46467           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46468 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46469           FOUND_FREETYPE=no
46470         fi
46471       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
46472         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46473         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46474       fi
46475     fi
46476   fi
46477 
46478   if test "x$FOUND_FREETYPE" = xyes; then
46479 
46480   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46481 
46482   # Input might be given as Windows format, start by converting to
46483   # unix format.
46484   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46485   new_path=`$CYGPATH -u "$path"`
46486 
46487   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46488   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46489   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46490   # "foo.exe" is OK but "foo" is an error.
46491   #
46492   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46493   # It is also a way to make sure we got the proper file name for the real test later on.
46494   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46495   if test "x$test_shortpath" = x; then
46496     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46497 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46498     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46499   fi
46500 
46501   # Call helper function which possibly converts this using DOS-style short mode.
46502   # If so, the updated path is stored in $new_path.
46503 
46504   input_path="$new_path"
46505   # Check if we need to convert this using DOS-style short mode. If the path
46506   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46507   # take no chances and rewrite it.
46508   # Note: m4 eats our [], so we need to use [ and ] instead.
46509   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46510   if test "x$has_forbidden_chars" != x; then
46511     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46512     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46513     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46514     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46515       # Going to short mode and back again did indeed matter. Since short mode is
46516       # case insensitive, let's make it lowercase to improve readability.
46517       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46518       # Now convert it back to Unix-style (cygpath)
46519       input_path=`$CYGPATH -u "$shortmode_path"`
46520       new_path="$input_path"
46521     fi
46522   fi
46523 
46524   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46525   if test "x$test_cygdrive_prefix" = x; then
46526     # As a simple fix, exclude /usr/bin since it's not a real path.
46527     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46528       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46529       # a path prefixed by /cygdrive for fixpath to work.
46530       new_path="$CYGWIN_ROOT_PATH$input_path"
46531     fi
46532   fi
46533 
46534 
46535   if test "x$path" != "x$new_path"; then
46536     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46537     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46538 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46539   fi
46540 
46541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46542 
46543   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46544   has_colon=`$ECHO $path | $GREP ^.:`
46545   new_path="$path"
46546   if test "x$has_colon" = x; then
46547     # Not in mixed or Windows style, start by that.
46548     new_path=`cmd //c echo $path`
46549   fi
46550 
46551 
46552   input_path="$new_path"
46553   # Check if we need to convert this using DOS-style short mode. If the path
46554   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46555   # take no chances and rewrite it.
46556   # Note: m4 eats our [], so we need to use [ and ] instead.
46557   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46558   if test "x$has_forbidden_chars" != x; then
46559     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46560     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46561   fi
46562 
46563 
46564   windows_path="$new_path"
46565   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46566     unix_path=`$CYGPATH -u "$windows_path"`
46567     new_path="$unix_path"
46568   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46569     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46570     new_path="$unix_path"
46571   fi
46572 
46573   if test "x$path" != "x$new_path"; then
46574     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46575     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46576 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46577   fi
46578 
46579   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46580   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46581 
46582   else
46583     # We're on a posix platform. Hooray! :)
46584     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46585     has_space=`$ECHO "$path" | $GREP " "`
46586     if test "x$has_space" != x; then
46587       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46588 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46589       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46590     fi
46591 
46592     # Use eval to expand a potential ~
46593     eval path="$path"
46594     if test ! -f "$path" && test ! -d "$path"; then
46595       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46596     fi
46597 
46598     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46599   fi
46600 
46601 
46602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46603 
46604   # Input might be given as Windows format, start by converting to
46605   # unix format.
46606   path="$POTENTIAL_FREETYPE_LIB_PATH"
46607   new_path=`$CYGPATH -u "$path"`
46608 
46609   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46610   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46611   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46612   # "foo.exe" is OK but "foo" is an error.
46613   #
46614   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46615   # It is also a way to make sure we got the proper file name for the real test later on.
46616   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46617   if test "x$test_shortpath" = x; then
46618     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46619 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46620     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46621   fi
46622 
46623   # Call helper function which possibly converts this using DOS-style short mode.
46624   # If so, the updated path is stored in $new_path.
46625 
46626   input_path="$new_path"
46627   # Check if we need to convert this using DOS-style short mode. If the path
46628   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46629   # take no chances and rewrite it.
46630   # Note: m4 eats our [], so we need to use [ and ] instead.
46631   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46632   if test "x$has_forbidden_chars" != x; then
46633     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46634     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46635     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46636     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46637       # Going to short mode and back again did indeed matter. Since short mode is
46638       # case insensitive, let's make it lowercase to improve readability.
46639       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46640       # Now convert it back to Unix-style (cygpath)
46641       input_path=`$CYGPATH -u "$shortmode_path"`
46642       new_path="$input_path"
46643     fi
46644   fi
46645 
46646   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46647   if test "x$test_cygdrive_prefix" = x; then
46648     # As a simple fix, exclude /usr/bin since it's not a real path.
46649     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46650       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46651       # a path prefixed by /cygdrive for fixpath to work.
46652       new_path="$CYGWIN_ROOT_PATH$input_path"
46653     fi
46654   fi
46655 
46656 
46657   if test "x$path" != "x$new_path"; then
46658     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46659     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46660 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46661   fi
46662 
46663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46664 
46665   path="$POTENTIAL_FREETYPE_LIB_PATH"
46666   has_colon=`$ECHO $path | $GREP ^.:`
46667   new_path="$path"
46668   if test "x$has_colon" = x; then
46669     # Not in mixed or Windows style, start by that.
46670     new_path=`cmd //c echo $path`
46671   fi
46672 
46673 
46674   input_path="$new_path"
46675   # Check if we need to convert this using DOS-style short mode. If the path
46676   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46677   # take no chances and rewrite it.
46678   # Note: m4 eats our [], so we need to use [ and ] instead.
46679   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46680   if test "x$has_forbidden_chars" != x; then
46681     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46682     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46683   fi
46684 
46685 
46686   windows_path="$new_path"
46687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46688     unix_path=`$CYGPATH -u "$windows_path"`
46689     new_path="$unix_path"
46690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46691     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46692     new_path="$unix_path"
46693   fi
46694 
46695   if test "x$path" != "x$new_path"; then
46696     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46697     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46698 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46699   fi
46700 
46701   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46702   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46703 
46704   else
46705     # We're on a posix platform. Hooray! :)
46706     path="$POTENTIAL_FREETYPE_LIB_PATH"
46707     has_space=`$ECHO "$path" | $GREP " "`
46708     if test "x$has_space" != x; then
46709       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46710 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46711       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46712     fi
46713 
46714     # Use eval to expand a potential ~
46715     eval path="$path"
46716     if test ! -f "$path" && test ! -d "$path"; then
46717       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46718     fi
46719 
46720     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46721   fi
46722 
46723 
46724     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46725     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46726 $as_echo_n "checking for freetype includes... " >&6; }
46727     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46728 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46729     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46730     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46731 $as_echo_n "checking for freetype libraries... " >&6; }
46732     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46733 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46734   fi
46735 
46736               if test "x$FOUND_FREETYPE" != xyes; then
46737 
46738   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46739   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46740   METHOD="well-known location"
46741 
46742   # First check if the files exists.
46743   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46744     # We found an arbitrary include file. That's a good sign.
46745     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46746 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46747     FOUND_FREETYPE=yes
46748 
46749     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46750     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46751       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46752 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46753       FOUND_FREETYPE=no
46754     else
46755       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46756         # On Windows, we will need both .lib and .dll file.
46757         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46758           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46759 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46760           FOUND_FREETYPE=no
46761         fi
46762       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
46763         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46764         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46765       fi
46766     fi
46767   fi
46768 
46769   if test "x$FOUND_FREETYPE" = xyes; then
46770 
46771   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46772 
46773   # Input might be given as Windows format, start by converting to
46774   # unix format.
46775   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46776   new_path=`$CYGPATH -u "$path"`
46777 
46778   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46779   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46780   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46781   # "foo.exe" is OK but "foo" is an error.
46782   #
46783   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46784   # It is also a way to make sure we got the proper file name for the real test later on.
46785   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46786   if test "x$test_shortpath" = x; then
46787     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46788 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46789     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46790   fi
46791 
46792   # Call helper function which possibly converts this using DOS-style short mode.
46793   # If so, the updated path is stored in $new_path.
46794 
46795   input_path="$new_path"
46796   # Check if we need to convert this using DOS-style short mode. If the path
46797   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46798   # take no chances and rewrite it.
46799   # Note: m4 eats our [], so we need to use [ and ] instead.
46800   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46801   if test "x$has_forbidden_chars" != x; then
46802     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46803     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46804     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46805     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46806       # Going to short mode and back again did indeed matter. Since short mode is
46807       # case insensitive, let's make it lowercase to improve readability.
46808       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46809       # Now convert it back to Unix-style (cygpath)
46810       input_path=`$CYGPATH -u "$shortmode_path"`
46811       new_path="$input_path"
46812     fi
46813   fi
46814 
46815   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46816   if test "x$test_cygdrive_prefix" = x; then
46817     # As a simple fix, exclude /usr/bin since it's not a real path.
46818     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46819       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46820       # a path prefixed by /cygdrive for fixpath to work.
46821       new_path="$CYGWIN_ROOT_PATH$input_path"
46822     fi
46823   fi
46824 
46825 
46826   if test "x$path" != "x$new_path"; then
46827     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46828     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46829 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46830   fi
46831 
46832   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46833 
46834   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46835   has_colon=`$ECHO $path | $GREP ^.:`
46836   new_path="$path"
46837   if test "x$has_colon" = x; then
46838     # Not in mixed or Windows style, start by that.
46839     new_path=`cmd //c echo $path`
46840   fi
46841 
46842 
46843   input_path="$new_path"
46844   # Check if we need to convert this using DOS-style short mode. If the path
46845   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46846   # take no chances and rewrite it.
46847   # Note: m4 eats our [], so we need to use [ and ] instead.
46848   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46849   if test "x$has_forbidden_chars" != x; then
46850     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46851     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46852   fi
46853 
46854 
46855   windows_path="$new_path"
46856   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46857     unix_path=`$CYGPATH -u "$windows_path"`
46858     new_path="$unix_path"
46859   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46860     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46861     new_path="$unix_path"
46862   fi
46863 
46864   if test "x$path" != "x$new_path"; then
46865     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46866     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46867 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46868   fi
46869 
46870   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46871   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46872 
46873   else
46874     # We're on a posix platform. Hooray! :)
46875     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46876     has_space=`$ECHO "$path" | $GREP " "`
46877     if test "x$has_space" != x; then
46878       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46879 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46880       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46881     fi
46882 
46883     # Use eval to expand a potential ~
46884     eval path="$path"
46885     if test ! -f "$path" && test ! -d "$path"; then
46886       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46887     fi
46888 
46889     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46890   fi
46891 
46892 
46893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46894 
46895   # Input might be given as Windows format, start by converting to
46896   # unix format.
46897   path="$POTENTIAL_FREETYPE_LIB_PATH"
46898   new_path=`$CYGPATH -u "$path"`
46899 
46900   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46901   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46902   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46903   # "foo.exe" is OK but "foo" is an error.
46904   #
46905   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46906   # It is also a way to make sure we got the proper file name for the real test later on.
46907   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46908   if test "x$test_shortpath" = x; then
46909     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46910 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46911     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46912   fi
46913 
46914   # Call helper function which possibly converts this using DOS-style short mode.
46915   # If so, the updated path is stored in $new_path.
46916 
46917   input_path="$new_path"
46918   # Check if we need to convert this using DOS-style short mode. If the path
46919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46920   # take no chances and rewrite it.
46921   # Note: m4 eats our [], so we need to use [ and ] instead.
46922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46923   if test "x$has_forbidden_chars" != x; then
46924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46925     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46926     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46927     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46928       # Going to short mode and back again did indeed matter. Since short mode is
46929       # case insensitive, let's make it lowercase to improve readability.
46930       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46931       # Now convert it back to Unix-style (cygpath)
46932       input_path=`$CYGPATH -u "$shortmode_path"`
46933       new_path="$input_path"
46934     fi
46935   fi
46936 
46937   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46938   if test "x$test_cygdrive_prefix" = x; then
46939     # As a simple fix, exclude /usr/bin since it's not a real path.
46940     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46941       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46942       # a path prefixed by /cygdrive for fixpath to work.
46943       new_path="$CYGWIN_ROOT_PATH$input_path"
46944     fi
46945   fi
46946 
46947 
46948   if test "x$path" != "x$new_path"; then
46949     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46950     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46951 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46952   fi
46953 
46954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46955 
46956   path="$POTENTIAL_FREETYPE_LIB_PATH"
46957   has_colon=`$ECHO $path | $GREP ^.:`
46958   new_path="$path"
46959   if test "x$has_colon" = x; then
46960     # Not in mixed or Windows style, start by that.
46961     new_path=`cmd //c echo $path`
46962   fi
46963 
46964 
46965   input_path="$new_path"
46966   # Check if we need to convert this using DOS-style short mode. If the path
46967   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46968   # take no chances and rewrite it.
46969   # Note: m4 eats our [], so we need to use [ and ] instead.
46970   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46971   if test "x$has_forbidden_chars" != x; then
46972     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46973     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46974   fi
46975 
46976 
46977   windows_path="$new_path"
46978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46979     unix_path=`$CYGPATH -u "$windows_path"`
46980     new_path="$unix_path"
46981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46983     new_path="$unix_path"
46984   fi
46985 
46986   if test "x$path" != "x$new_path"; then
46987     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46988     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46989 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46990   fi
46991 
46992   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46993   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46994 
46995   else
46996     # We're on a posix platform. Hooray! :)
46997     path="$POTENTIAL_FREETYPE_LIB_PATH"
46998     has_space=`$ECHO "$path" | $GREP " "`
46999     if test "x$has_space" != x; then
47000       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47001 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47002       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47003     fi
47004 
47005     # Use eval to expand a potential ~
47006     eval path="$path"
47007     if test ! -f "$path" && test ! -d "$path"; then
47008       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47009     fi
47010 
47011     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47012   fi
47013 
47014 
47015     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47016     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47017 $as_echo_n "checking for freetype includes... " >&6; }
47018     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47019 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47020     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47021     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47022 $as_echo_n "checking for freetype libraries... " >&6; }
47023     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47024 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47025   fi
47026 
47027               fi
47028             fi
47029           fi
47030         fi
47031       fi # end check in well-known locations
47032 
47033       if test "x$FOUND_FREETYPE" != xyes; then
47034 
47035   # Print a helpful message on how to acquire the necessary build dependency.
47036   # freetype is the help tag: freetype, cups, pulse, alsa etc
47037   MISSING_DEPENDENCY=freetype
47038 
47039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47040     cygwin_help $MISSING_DEPENDENCY
47041   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47042     msys_help $MISSING_DEPENDENCY
47043   else
47044     PKGHANDLER_COMMAND=
47045 
47046     case $PKGHANDLER in
47047       apt-get)
47048         apt_help     $MISSING_DEPENDENCY ;;
47049       yum)
47050         yum_help     $MISSING_DEPENDENCY ;;
47051       port)
47052         port_help    $MISSING_DEPENDENCY ;;
47053       pkgutil)
47054         pkgutil_help $MISSING_DEPENDENCY ;;
47055       pkgadd)
47056         pkgadd_help  $MISSING_DEPENDENCY ;;
47057     esac
47058 
47059     if test "x$PKGHANDLER_COMMAND" != x; then
47060       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47061     fi
47062   fi
47063 
47064         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47065       fi
47066     fi # end user specified settings
47067 
47068     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47069     if test "x$FREETYPE_CFLAGS" = x; then
47070 
47071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47072 
47073   # Input might be given as Windows format, start by converting to
47074   # unix format.
47075   path="$FREETYPE_INCLUDE_PATH"
47076   new_path=`$CYGPATH -u "$path"`
47077 
47078   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47079   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47080   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47081   # "foo.exe" is OK but "foo" is an error.
47082   #
47083   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47084   # It is also a way to make sure we got the proper file name for the real test later on.
47085   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47086   if test "x$test_shortpath" = x; then
47087     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47088 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47089     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47090   fi
47091 
47092   # Call helper function which possibly converts this using DOS-style short mode.
47093   # If so, the updated path is stored in $new_path.
47094 
47095   input_path="$new_path"
47096   # Check if we need to convert this using DOS-style short mode. If the path
47097   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47098   # take no chances and rewrite it.
47099   # Note: m4 eats our [], so we need to use [ and ] instead.
47100   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47101   if test "x$has_forbidden_chars" != x; then
47102     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47103     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47104     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47105     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47106       # Going to short mode and back again did indeed matter. Since short mode is
47107       # case insensitive, let's make it lowercase to improve readability.
47108       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47109       # Now convert it back to Unix-style (cygpath)
47110       input_path=`$CYGPATH -u "$shortmode_path"`
47111       new_path="$input_path"
47112     fi
47113   fi
47114 
47115   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47116   if test "x$test_cygdrive_prefix" = x; then
47117     # As a simple fix, exclude /usr/bin since it's not a real path.
47118     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47119       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47120       # a path prefixed by /cygdrive for fixpath to work.
47121       new_path="$CYGWIN_ROOT_PATH$input_path"
47122     fi
47123   fi
47124 
47125 
47126   if test "x$path" != "x$new_path"; then
47127     FREETYPE_INCLUDE_PATH="$new_path"
47128     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47129 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47130   fi
47131 
47132   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47133 
47134   path="$FREETYPE_INCLUDE_PATH"
47135   has_colon=`$ECHO $path | $GREP ^.:`
47136   new_path="$path"
47137   if test "x$has_colon" = x; then
47138     # Not in mixed or Windows style, start by that.
47139     new_path=`cmd //c echo $path`
47140   fi
47141 
47142 
47143   input_path="$new_path"
47144   # Check if we need to convert this using DOS-style short mode. If the path
47145   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47146   # take no chances and rewrite it.
47147   # Note: m4 eats our [], so we need to use [ and ] instead.
47148   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47149   if test "x$has_forbidden_chars" != x; then
47150     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47151     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47152   fi
47153 
47154 
47155   windows_path="$new_path"
47156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47157     unix_path=`$CYGPATH -u "$windows_path"`
47158     new_path="$unix_path"
47159   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47160     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47161     new_path="$unix_path"
47162   fi
47163 
47164   if test "x$path" != "x$new_path"; then
47165     FREETYPE_INCLUDE_PATH="$new_path"
47166     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47167 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47168   fi
47169 
47170   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47171   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47172 
47173   else
47174     # We're on a posix platform. Hooray! :)
47175     path="$FREETYPE_INCLUDE_PATH"
47176     has_space=`$ECHO "$path" | $GREP " "`
47177     if test "x$has_space" != x; then
47178       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47179 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47180       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47181     fi
47182 
47183     # Use eval to expand a potential ~
47184     eval path="$path"
47185     if test ! -f "$path" && test ! -d "$path"; then
47186       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47187     fi
47188 
47189     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47190   fi
47191 
47192       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47193         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47194       else
47195         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47196       fi
47197     fi
47198 
47199     if test "x$FREETYPE_LIBS" = x; then
47200 
47201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47202 
47203   # Input might be given as Windows format, start by converting to
47204   # unix format.
47205   path="$FREETYPE_LIB_PATH"
47206   new_path=`$CYGPATH -u "$path"`
47207 
47208   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47209   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47210   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47211   # "foo.exe" is OK but "foo" is an error.
47212   #
47213   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47214   # It is also a way to make sure we got the proper file name for the real test later on.
47215   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47216   if test "x$test_shortpath" = x; then
47217     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47218 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47219     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
47220   fi
47221 
47222   # Call helper function which possibly converts this using DOS-style short mode.
47223   # If so, the updated path is stored in $new_path.
47224 
47225   input_path="$new_path"
47226   # Check if we need to convert this using DOS-style short mode. If the path
47227   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47228   # take no chances and rewrite it.
47229   # Note: m4 eats our [], so we need to use [ and ] instead.
47230   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47231   if test "x$has_forbidden_chars" != x; then
47232     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47233     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47234     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47235     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47236       # Going to short mode and back again did indeed matter. Since short mode is
47237       # case insensitive, let's make it lowercase to improve readability.
47238       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47239       # Now convert it back to Unix-style (cygpath)
47240       input_path=`$CYGPATH -u "$shortmode_path"`
47241       new_path="$input_path"
47242     fi
47243   fi
47244 
47245   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47246   if test "x$test_cygdrive_prefix" = x; then
47247     # As a simple fix, exclude /usr/bin since it's not a real path.
47248     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47249       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47250       # a path prefixed by /cygdrive for fixpath to work.
47251       new_path="$CYGWIN_ROOT_PATH$input_path"
47252     fi
47253   fi
47254 
47255 
47256   if test "x$path" != "x$new_path"; then
47257     FREETYPE_LIB_PATH="$new_path"
47258     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47259 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47260   fi
47261 
47262   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47263 
47264   path="$FREETYPE_LIB_PATH"
47265   has_colon=`$ECHO $path | $GREP ^.:`
47266   new_path="$path"
47267   if test "x$has_colon" = x; then
47268     # Not in mixed or Windows style, start by that.
47269     new_path=`cmd //c echo $path`
47270   fi
47271 
47272 
47273   input_path="$new_path"
47274   # Check if we need to convert this using DOS-style short mode. If the path
47275   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47276   # take no chances and rewrite it.
47277   # Note: m4 eats our [], so we need to use [ and ] instead.
47278   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47279   if test "x$has_forbidden_chars" != x; then
47280     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47281     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47282   fi
47283 
47284 
47285   windows_path="$new_path"
47286   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47287     unix_path=`$CYGPATH -u "$windows_path"`
47288     new_path="$unix_path"
47289   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47290     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47291     new_path="$unix_path"
47292   fi
47293 
47294   if test "x$path" != "x$new_path"; then
47295     FREETYPE_LIB_PATH="$new_path"
47296     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47297 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47298   fi
47299 
47300   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47301   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47302 
47303   else
47304     # We're on a posix platform. Hooray! :)
47305     path="$FREETYPE_LIB_PATH"
47306     has_space=`$ECHO "$path" | $GREP " "`
47307     if test "x$has_space" != x; then
47308       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47309 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47310       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47311     fi
47312 
47313     # Use eval to expand a potential ~
47314     eval path="$path"
47315     if test ! -f "$path" && test ! -d "$path"; then
47316       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47317     fi
47318 
47319     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47320   fi
47321 
47322       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47323         FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
47324       else
47325         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
47326       fi
47327     fi
47328 
47329     # Try to compile it
47330     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
47331 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
47332     ac_ext=cpp
47333 ac_cpp='$CXXCPP $CPPFLAGS'
47334 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47335 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47336 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47337 
47338     PREV_CXXCFLAGS="$CXXFLAGS"
47339     PREV_LIBS="$LIBS"
47340     PREV_CXX="$CXX"
47341     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
47342     LIBS="$LIBS $FREETYPE_LIBS"
47343     CXX="$FIXPATH $CXX"
47344     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47345 /* end confdefs.h.  */
47346 
47347           #include<ft2build.h>
47348           #include FT_FREETYPE_H
47349           int main () {
47350             FT_Init_FreeType(NULL);
47351             return 0;
47352           }
47353 
47354 _ACEOF
47355 if ac_fn_cxx_try_link "$LINENO"; then :
47356 
47357           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47358 $as_echo "yes" >&6; }
47359 
47360 else
47361 
47362           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47363 $as_echo "no" >&6; }
47364           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
47365 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
47366           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
47367 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
47368 
47369 
47370   # Print a helpful message on how to acquire the necessary build dependency.
47371   # freetype is the help tag: freetype, cups, pulse, alsa etc
47372   MISSING_DEPENDENCY=freetype
47373 
47374   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47375     cygwin_help $MISSING_DEPENDENCY
47376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47377     msys_help $MISSING_DEPENDENCY
47378   else
47379     PKGHANDLER_COMMAND=
47380 
47381     case $PKGHANDLER in
47382       apt-get)
47383         apt_help     $MISSING_DEPENDENCY ;;
47384       yum)
47385         yum_help     $MISSING_DEPENDENCY ;;
47386       port)
47387         port_help    $MISSING_DEPENDENCY ;;
47388       pkgutil)
47389         pkgutil_help $MISSING_DEPENDENCY ;;
47390       pkgadd)
47391         pkgadd_help  $MISSING_DEPENDENCY ;;
47392     esac
47393 
47394     if test "x$PKGHANDLER_COMMAND" != x; then
47395       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47396     fi
47397   fi
47398 
47399 
47400           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
47401 
47402 
47403 fi
47404 rm -f core conftest.err conftest.$ac_objext \
47405     conftest$ac_exeext conftest.$ac_ext
47406     CXXCFLAGS="$PREV_CXXFLAGS"
47407     LIBS="$PREV_LIBS"
47408     CXX="$PREV_CXX"
47409     ac_ext=cpp
47410 ac_cpp='$CXXCPP $CPPFLAGS'
47411 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47412 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47413 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47414 
47415 
47416     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
47417 $as_echo_n "checking if we should bundle freetype... " >&6; }
47418     if test "x$BUNDLE_FREETYPE" = xyes; then
47419       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
47420     fi
47421     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
47422 $as_echo "$BUNDLE_FREETYPE" >&6; }
47423 
47424   fi # end freetype needed
47425 
47426 
47427 
47428 
47429 
47430 
47431 
47432   ###############################################################################
47433   #
47434   # Check for alsa headers and libraries. Used on Linux/GNU systems.
47435   #
47436 
47437 # Check whether --with-alsa was given.
47438 if test "${with_alsa+set}" = set; then :
47439   withval=$with_alsa;
47440 fi
47441 
47442 
47443 # Check whether --with-alsa-include was given.
47444 if test "${with_alsa_include+set}" = set; then :
47445   withval=$with_alsa_include;
47446 fi
47447 
47448 
47449 # Check whether --with-alsa-lib was given.
47450 if test "${with_alsa_lib+set}" = set; then :
47451   withval=$with_alsa_lib;
47452 fi
47453 
47454 
47455   if test "x$ALSA_NOT_NEEDED" = xyes; then
47456     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
47457       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
47458 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
47459     fi
47460     ALSA_CFLAGS=
47461     ALSA_LIBS=
47462   else
47463     ALSA_FOUND=no
47464 
47465     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
47466       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
47467     fi
47468 
47469     if test "x${with_alsa}" != x; then
47470       ALSA_LIBS="-L${with_alsa}/lib -lasound"
47471       ALSA_CFLAGS="-I${with_alsa}/include"
47472       ALSA_FOUND=yes
47473     fi
47474     if test "x${with_alsa_include}" != x; then
47475       ALSA_CFLAGS="-I${with_alsa_include}"
47476       ALSA_FOUND=yes
47477     fi
47478     if test "x${with_alsa_lib}" != x; then
47479       ALSA_LIBS="-L${with_alsa_lib} -lasound"
47480       ALSA_FOUND=yes
47481     fi
47482     if test "x$ALSA_FOUND" = xno; then
47483 
47484 
47485   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
47486     # Source the builddeps file again, to make sure it uses the latest variables!
47487     . $builddepsfile
47488     # Look for a target and build machine specific resource!
47489     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
47490     if test "x$resource" = x; then
47491       # Ok, lets instead look for a target specific resource
47492       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
47493     fi
47494     if test "x$resource" = x; then
47495       # Ok, lets instead look for a build specific resource
47496       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
47497     fi
47498     if test "x$resource" = x; then
47499       # Ok, lets instead look for a generic resource
47500       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
47501       resource=${builddep_alsa}
47502     fi
47503     if test "x$resource" != x; then
47504       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
47505 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
47506       # If the resource in the builddeps.conf file is an existing directory,
47507       # for example /java/linux/cups
47508       if test -d ${resource}; then
47509         depdir=${resource}
47510       else
47511 
47512   # alsa is for example mymodule
47513   # $resource is for example libs/general/libmymod_1_2_3.zip
47514   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
47515   # $with_builddeps_dir is for example /localhome/builddeps
47516   # depdir is the name of the variable into which we store the depdir, eg MYMOD
47517   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
47518   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
47519   filename=`basename $resource`
47520   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
47521   filebase=${filename%%.*}
47522   extension=${filename#*.}
47523   installdir=$with_builddeps_dir/$filebase
47524   if test ! -f $installdir/$filename.unpacked; then
47525     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
47526 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
47527     if test ! -d $installdir; then
47528       mkdir -p $installdir
47529     fi
47530     if test ! -d $installdir; then
47531       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
47532     fi
47533     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
47534     touch $tmpfile
47535     if test ! -f $tmpfile; then
47536       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
47537     fi
47538 
47539   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
47540   # $tmpfile is the local file name for the downloaded file.
47541   VALID_TOOL=no
47542   if test "x$BDEPS_FTP" = xwget; then
47543     VALID_TOOL=yes
47544     wget -O $tmpfile $with_builddeps_server/$resource
47545   fi
47546   if test "x$BDEPS_FTP" = xlftp; then
47547     VALID_TOOL=yes
47548     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
47549   fi
47550   if test "x$BDEPS_FTP" = xftp; then
47551     VALID_TOOL=yes
47552     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
47553     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
47554     FTPUSERPWD=${FTPSERVER%%@*}
47555     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
47556       FTPUSER=${userpwd%%:*}
47557       FTPPWD=${userpwd#*@}
47558       FTPSERVER=${FTPSERVER#*@}
47559     else
47560       FTPUSER=ftp
47561       FTPPWD=ftp
47562     fi
47563     # the "pass" command does not work on some
47564     # ftp clients (read ftp.exe) but if it works,
47565     # passive mode is better!
47566     ( \
47567         echo "user $FTPUSER $FTPPWD"        ; \
47568         echo "pass"                         ; \
47569         echo "bin"                          ; \
47570         echo "get $FTPPATH $tmpfile"              ; \
47571     ) | ftp -in $FTPSERVER
47572   fi
47573   if test "x$VALID_TOOL" != xyes; then
47574     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
47575   fi
47576 
47577     mv $tmpfile $installdir/$filename
47578     if test ! -s $installdir/$filename; then
47579       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
47580     fi
47581     case "$extension" in
47582       zip)  echo "Unzipping $installdir/$filename..."
47583         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
47584         ;;
47585       tar.gz) echo "Untaring $installdir/$filename..."
47586         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47587         ;;
47588       tgz) echo "Untaring $installdir/$filename..."
47589         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47590         ;;
47591       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
47592         ;;
47593     esac
47594   fi
47595   if test -f $installdir/$filename.unpacked; then
47596     depdir=$installdir
47597   fi
47598 
47599       fi
47600       # Source the builddeps file again, because in the previous command, the depdir
47601       # was updated to point at the current build dependency install directory.
47602       . $builddepsfile
47603       # Now extract variables from the builddeps.conf files.
47604       theroot=${builddep_alsa_ROOT}
47605       thecflags=${builddep_alsa_CFLAGS}
47606       thelibs=${builddep_alsa_LIBS}
47607       if test "x$depdir" = x; then
47608         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
47609       fi
47610       ALSA=$depdir
47611       if test "x$theroot" != x; then
47612         ALSA="$theroot"
47613       fi
47614       if test "x$thecflags" != x; then
47615         ALSA_CFLAGS="$thecflags"
47616       fi
47617       if test "x$thelibs" != x; then
47618         ALSA_LIBS="$thelibs"
47619       fi
47620       ALSA_FOUND=yes
47621       else ALSA_FOUND=no
47622 
47623     fi
47624     else ALSA_FOUND=no
47625 
47626   fi
47627 
47628     fi
47629     # Do not try pkg-config if we have a sysroot set.
47630     if test "x$SYSROOT" = x; then
47631       if test "x$ALSA_FOUND" = xno; then
47632 
47633 pkg_failed=no
47634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
47635 $as_echo_n "checking for ALSA... " >&6; }
47636 
47637 if test -n "$ALSA_CFLAGS"; then
47638     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
47639  elif test -n "$PKG_CONFIG"; then
47640     if test -n "$PKG_CONFIG" && \
47641     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47642   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47643   ac_status=$?
47644   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47645   test $ac_status = 0; }; then
47646   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
47647 else
47648   pkg_failed=yes
47649 fi
47650  else
47651     pkg_failed=untried
47652 fi
47653 if test -n "$ALSA_LIBS"; then
47654     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
47655  elif test -n "$PKG_CONFIG"; then
47656     if test -n "$PKG_CONFIG" && \
47657     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47658   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47659   ac_status=$?
47660   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47661   test $ac_status = 0; }; then
47662   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
47663 else
47664   pkg_failed=yes
47665 fi
47666  else
47667     pkg_failed=untried
47668 fi
47669 
47670 
47671 
47672 if test $pkg_failed = yes; then
47673 
47674 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47675         _pkg_short_errors_supported=yes
47676 else
47677         _pkg_short_errors_supported=no
47678 fi
47679         if test $_pkg_short_errors_supported = yes; then
47680                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
47681         else
47682                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47683         fi
47684         # Put the nasty error message in config.log where it belongs
47685         echo "$ALSA_PKG_ERRORS" >&5
47686 
47687         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47688 $as_echo "no" >&6; }
47689                 ALSA_FOUND=no
47690 elif test $pkg_failed = untried; then
47691         ALSA_FOUND=no
47692 else
47693         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47694         ALSA_LIBS=$pkg_cv_ALSA_LIBS
47695         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47696 $as_echo "yes" >&6; }
47697         ALSA_FOUND=yes
47698 fi
47699       fi
47700     fi
47701     if test "x$ALSA_FOUND" = xno; then
47702       for ac_header in alsa/asoundlib.h
47703 do :
47704   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47705 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47706   cat >>confdefs.h <<_ACEOF
47707 #define HAVE_ALSA_ASOUNDLIB_H 1
47708 _ACEOF
47709 
47710             ALSA_FOUND=yes
47711             ALSA_CFLAGS=-Iignoreme
47712             ALSA_LIBS=-lasound
47713             DEFAULT_ALSA=yes
47714 
47715 else
47716   ALSA_FOUND=no
47717 fi
47718 
47719 done
47720 
47721     fi
47722     if test "x$ALSA_FOUND" = xno; then
47723 
47724   # Print a helpful message on how to acquire the necessary build dependency.
47725   # alsa is the help tag: freetype, cups, pulse, alsa etc
47726   MISSING_DEPENDENCY=alsa
47727 
47728   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47729     cygwin_help $MISSING_DEPENDENCY
47730   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47731     msys_help $MISSING_DEPENDENCY
47732   else
47733     PKGHANDLER_COMMAND=
47734 
47735     case $PKGHANDLER in
47736       apt-get)
47737         apt_help     $MISSING_DEPENDENCY ;;
47738       yum)
47739         yum_help     $MISSING_DEPENDENCY ;;
47740       port)
47741         port_help    $MISSING_DEPENDENCY ;;
47742       pkgutil)
47743         pkgutil_help $MISSING_DEPENDENCY ;;
47744       pkgadd)
47745         pkgadd_help  $MISSING_DEPENDENCY ;;
47746     esac
47747 
47748     if test "x$PKGHANDLER_COMMAND" != x; then
47749       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47750     fi
47751   fi
47752 
47753       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47754     fi
47755   fi
47756 
47757 
47758 
47759 
47760 
47761 
47762 # Check whether --with-fontconfig was given.
47763 if test "${with_fontconfig+set}" = set; then :
47764   withval=$with_fontconfig;
47765 fi
47766 
47767 
47768 # Check whether --with-fontconfig-include was given.
47769 if test "${with_fontconfig_include+set}" = set; then :
47770   withval=$with_fontconfig_include;
47771 fi
47772 
47773 
47774   if test "x$FONTCONFIG_NOT_NEEDED" = xyes; then
47775     if (test "x${with_fontconfig}" != x && test "x${with_fontconfig}" != xno) || \
47776         (test "x${with_fontconfig_include}" != x && test "x${with_fontconfig_include}" != xno); then
47777       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fontconfig not used, so --with-fontconfig[-*] is ignored" >&5
47778 $as_echo "$as_me: WARNING: fontconfig not used, so --with-fontconfig[-*] is ignored" >&2;}
47779     fi
47780     FONTCONFIG_CFLAGS=
47781   else
47782     FONTCONFIG_FOUND=no
47783 
47784     if test "x${with_fontconfig}" = xno || test "x${with_fontconfig_include}" = xno; then
47785       as_fn_error $? "It is not possible to disable the use of fontconfig. Remove the --without-fontconfig option." "$LINENO" 5
47786     fi
47787 
47788     if test "x${with_fontconfig}" != x; then
47789       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig headers" >&5
47790 $as_echo_n "checking for fontconfig headers... " >&6; }
47791       if test -s "${with_fontconfig}/include/fontconfig/fontconfig.h"; then
47792         FONTCONFIG_CFLAGS="-I${with_fontconfig}/include"
47793         FONTCONFIG_FOUND=yes
47794         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_FOUND" >&5
47795 $as_echo "$FONTCONFIG_FOUND" >&6; }
47796       else
47797         as_fn_error $? "Can't find 'include/fontconfig/fontconfig.h' under ${with_fontconfig} given with the --with-fontconfig option." "$LINENO" 5
47798       fi
47799     fi
47800     if test "x${with_fontconfig_include}" != x; then
47801       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig headers" >&5
47802 $as_echo_n "checking for fontconfig headers... " >&6; }
47803       if test -s "${with_fontconfig_include}/fontconfig/fontconfig.h"; then
47804         FONTCONFIG_CFLAGS="-I${with_fontconfig_include}"
47805         FONTCONFIG_FOUND=yes
47806         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_FOUND" >&5
47807 $as_echo "$FONTCONFIG_FOUND" >&6; }
47808       else
47809         as_fn_error $? "Can't find 'fontconfig/fontconfig.h' under ${with_fontconfig_include} given with the --with-fontconfig-include option." "$LINENO" 5
47810       fi
47811     fi
47812     if test "x$FONTCONFIG_FOUND" = xno; then
47813       # Are the fontconfig headers installed in the default /usr/include location?
47814       for ac_header in fontconfig/fontconfig.h
47815 do :
47816   ac_fn_cxx_check_header_mongrel "$LINENO" "fontconfig/fontconfig.h" "ac_cv_header_fontconfig_fontconfig_h" "$ac_includes_default"
47817 if test "x$ac_cv_header_fontconfig_fontconfig_h" = xyes; then :
47818   cat >>confdefs.h <<_ACEOF
47819 #define HAVE_FONTCONFIG_FONTCONFIG_H 1
47820 _ACEOF
47821 
47822           FONTCONFIG_FOUND=yes
47823           FONTCONFIG_CFLAGS=
47824           DEFAULT_FONTCONFIG=yes
47825 
47826 fi
47827 
47828 done
47829 
47830     fi
47831     if test "x$FONTCONFIG_FOUND" = xno; then
47832 
47833   # Print a helpful message on how to acquire the necessary build dependency.
47834   # fontconfig is the help tag: freetype, cups, pulse, alsa etc
47835   MISSING_DEPENDENCY=fontconfig
47836 
47837   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47838     cygwin_help $MISSING_DEPENDENCY
47839   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47840     msys_help $MISSING_DEPENDENCY
47841   else
47842     PKGHANDLER_COMMAND=
47843 
47844     case $PKGHANDLER in
47845       apt-get)
47846         apt_help     $MISSING_DEPENDENCY ;;
47847       yum)
47848         yum_help     $MISSING_DEPENDENCY ;;
47849       port)
47850         port_help    $MISSING_DEPENDENCY ;;
47851       pkgutil)
47852         pkgutil_help $MISSING_DEPENDENCY ;;
47853       pkgadd)
47854         pkgadd_help  $MISSING_DEPENDENCY ;;
47855     esac
47856 
47857     if test "x$PKGHANDLER_COMMAND" != x; then
47858       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47859     fi
47860   fi
47861 
47862       as_fn_error $? "Could not find fontconfig! $HELP_MSG " "$LINENO" 5
47863     fi
47864   fi
47865 
47866 
47867 
47868 
47869 
47870   ###############################################################################
47871   #
47872   # Check for the jpeg library
47873   #
47874 
47875   USE_EXTERNAL_LIBJPEG=true
47876   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
47877 $as_echo_n "checking for main in -ljpeg... " >&6; }
47878 if ${ac_cv_lib_jpeg_main+:} false; then :
47879   $as_echo_n "(cached) " >&6
47880 else
47881   ac_check_lib_save_LIBS=$LIBS
47882 LIBS="-ljpeg  $LIBS"
47883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47884 /* end confdefs.h.  */
47885 
47886 
47887 int
47888 main ()
47889 {
47890 return main ();
47891   ;
47892   return 0;
47893 }
47894 _ACEOF
47895 if ac_fn_cxx_try_link "$LINENO"; then :
47896   ac_cv_lib_jpeg_main=yes
47897 else
47898   ac_cv_lib_jpeg_main=no
47899 fi
47900 rm -f core conftest.err conftest.$ac_objext \
47901     conftest$ac_exeext conftest.$ac_ext
47902 LIBS=$ac_check_lib_save_LIBS
47903 fi
47904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
47905 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
47906 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
47907   cat >>confdefs.h <<_ACEOF
47908 #define HAVE_LIBJPEG 1
47909 _ACEOF
47910 
47911   LIBS="-ljpeg $LIBS"
47912 
47913 else
47914    USE_EXTERNAL_LIBJPEG=false
47915       { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
47916 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
47917 
47918 fi
47919 
47920 
47921 
47922   ###############################################################################
47923   #
47924   # Check for the gif library
47925   #
47926 
47927 
47928 # Check whether --with-giflib was given.
47929 if test "${with_giflib+set}" = set; then :
47930   withval=$with_giflib;
47931 fi
47932 
47933 
47934 
47935   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47936 $as_echo_n "checking for which giflib to use... " >&6; }
47937 
47938   # default is bundled
47939   DEFAULT_GIFLIB=bundled
47940 
47941   #
47942   # if user didn't specify, use DEFAULT_GIFLIB
47943   #
47944   if test "x${with_giflib}" = "x"; then
47945     with_giflib=${DEFAULT_GIFLIB}
47946   fi
47947 
47948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47949 $as_echo "${with_giflib}" >&6; }
47950 
47951   if test "x${with_giflib}" = "xbundled"; then
47952     USE_EXTERNAL_LIBGIF=false
47953   elif test "x${with_giflib}" = "xsystem"; then
47954     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47955 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47956 
47957 else
47958    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47959 fi
47960 
47961 
47962     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47963 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47964 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47965   $as_echo_n "(cached) " >&6
47966 else
47967   ac_check_lib_save_LIBS=$LIBS
47968 LIBS="-lgif  $LIBS"
47969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47970 /* end confdefs.h.  */
47971 
47972 /* Override any GCC internal prototype to avoid an error.
47973    Use char because int might match the return type of a GCC
47974    builtin and then its argument prototype would still apply.  */
47975 #ifdef __cplusplus
47976 extern "C"
47977 #endif
47978 char DGifGetCode ();
47979 int
47980 main ()
47981 {
47982 return DGifGetCode ();
47983   ;
47984   return 0;
47985 }
47986 _ACEOF
47987 if ac_fn_cxx_try_link "$LINENO"; then :
47988   ac_cv_lib_gif_DGifGetCode=yes
47989 else
47990   ac_cv_lib_gif_DGifGetCode=no
47991 fi
47992 rm -f core conftest.err conftest.$ac_objext \
47993     conftest$ac_exeext conftest.$ac_ext
47994 LIBS=$ac_check_lib_save_LIBS
47995 fi
47996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47997 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47998 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47999   cat >>confdefs.h <<_ACEOF
48000 #define HAVE_LIBGIF 1
48001 _ACEOF
48002 
48003   LIBS="-lgif $LIBS"
48004 
48005 else
48006    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48007 fi
48008 
48009 
48010     USE_EXTERNAL_LIBGIF=true
48011   else
48012     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48013   fi
48014 
48015 
48016   ###############################################################################
48017   #
48018   # Check for the zlib library
48019   #
48020 
48021 
48022 # Check whether --with-zlib was given.
48023 if test "${with_zlib+set}" = set; then :
48024   withval=$with_zlib;
48025 fi
48026 
48027 
48028   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48029 $as_echo_n "checking for compress in -lz... " >&6; }
48030 if ${ac_cv_lib_z_compress+:} false; then :
48031   $as_echo_n "(cached) " >&6
48032 else
48033   ac_check_lib_save_LIBS=$LIBS
48034 LIBS="-lz  $LIBS"
48035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48036 /* end confdefs.h.  */
48037 
48038 /* Override any GCC internal prototype to avoid an error.
48039    Use char because int might match the return type of a GCC
48040    builtin and then its argument prototype would still apply.  */
48041 #ifdef __cplusplus
48042 extern "C"
48043 #endif
48044 char compress ();
48045 int
48046 main ()
48047 {
48048 return compress ();
48049   ;
48050   return 0;
48051 }
48052 _ACEOF
48053 if ac_fn_cxx_try_link "$LINENO"; then :
48054   ac_cv_lib_z_compress=yes
48055 else
48056   ac_cv_lib_z_compress=no
48057 fi
48058 rm -f core conftest.err conftest.$ac_objext \
48059     conftest$ac_exeext conftest.$ac_ext
48060 LIBS=$ac_check_lib_save_LIBS
48061 fi
48062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
48063 $as_echo "$ac_cv_lib_z_compress" >&6; }
48064 if test "x$ac_cv_lib_z_compress" = xyes; then :
48065    ZLIB_FOUND=yes
48066 else
48067    ZLIB_FOUND=no
48068 fi
48069 
48070 
48071   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
48072 $as_echo_n "checking for which zlib to use... " >&6; }
48073 
48074   DEFAULT_ZLIB=bundled
48075   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48076     #
48077     # On macosx default is system...on others default is
48078     #
48079     DEFAULT_ZLIB=system
48080   fi
48081 
48082   if test "x${ZLIB_FOUND}" != "xyes"; then
48083     #
48084     # If we don't find any system...set default to bundled
48085     #
48086     DEFAULT_ZLIB=bundled
48087   fi
48088 
48089   #
48090   # If user didn't specify, use DEFAULT_ZLIB
48091   #
48092   if test "x${with_zlib}" = "x"; then
48093     with_zlib=${DEFAULT_ZLIB}
48094   fi
48095 
48096   if test "x${with_zlib}" = "xbundled"; then
48097     USE_EXTERNAL_LIBZ=false
48098     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48099 $as_echo "bundled" >&6; }
48100   elif test "x${with_zlib}" = "xsystem"; then
48101     if test "x${ZLIB_FOUND}" = "xyes"; then
48102       USE_EXTERNAL_LIBZ=true
48103       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48104 $as_echo "system" >&6; }
48105     else
48106       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48107 $as_echo "system not found" >&6; }
48108       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
48109     fi
48110   else
48111     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
48112   fi
48113 
48114 
48115 
48116   ###############################################################################
48117   LIBZIP_CAN_USE_MMAP=true
48118 
48119 
48120 
48121   ###############################################################################
48122   #
48123   # Check if altzone exists in time.h
48124   #
48125 
48126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48127 /* end confdefs.h.  */
48128 #include <time.h>
48129 int
48130 main ()
48131 {
48132 return (int)altzone;
48133   ;
48134   return 0;
48135 }
48136 _ACEOF
48137 if ac_fn_cxx_try_link "$LINENO"; then :
48138   has_altzone=yes
48139 else
48140   has_altzone=no
48141 fi
48142 rm -f core conftest.err conftest.$ac_objext \
48143     conftest$ac_exeext conftest.$ac_ext
48144   if test "x$has_altzone" = xyes; then
48145 
48146 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
48147 
48148   fi
48149 
48150   ###############################################################################
48151   #
48152   # Check the maths library
48153   #
48154 
48155   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
48156 $as_echo_n "checking for cos in -lm... " >&6; }
48157 if ${ac_cv_lib_m_cos+:} false; then :
48158   $as_echo_n "(cached) " >&6
48159 else
48160   ac_check_lib_save_LIBS=$LIBS
48161 LIBS="-lm  $LIBS"
48162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48163 /* end confdefs.h.  */
48164 
48165 /* Override any GCC internal prototype to avoid an error.
48166    Use char because int might match the return type of a GCC
48167    builtin and then its argument prototype would still apply.  */
48168 #ifdef __cplusplus
48169 extern "C"
48170 #endif
48171 char cos ();
48172 int
48173 main ()
48174 {
48175 return cos ();
48176   ;
48177   return 0;
48178 }
48179 _ACEOF
48180 if ac_fn_cxx_try_link "$LINENO"; then :
48181   ac_cv_lib_m_cos=yes
48182 else
48183   ac_cv_lib_m_cos=no
48184 fi
48185 rm -f core conftest.err conftest.$ac_objext \
48186     conftest$ac_exeext conftest.$ac_ext
48187 LIBS=$ac_check_lib_save_LIBS
48188 fi
48189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
48190 $as_echo "$ac_cv_lib_m_cos" >&6; }
48191 if test "x$ac_cv_lib_m_cos" = xyes; then :
48192   cat >>confdefs.h <<_ACEOF
48193 #define HAVE_LIBM 1
48194 _ACEOF
48195 
48196   LIBS="-lm $LIBS"
48197 
48198 else
48199 
48200         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
48201 $as_echo "$as_me: Maths library was not found" >&6;}
48202 
48203 
48204 fi
48205 
48206 
48207 
48208   ###############################################################################
48209   #
48210   # Check for libdl.so
48211 
48212   save_LIBS="$LIBS"
48213   LIBS=""
48214   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
48215 $as_echo_n "checking for dlopen in -ldl... " >&6; }
48216 if ${ac_cv_lib_dl_dlopen+:} false; then :
48217   $as_echo_n "(cached) " >&6
48218 else
48219   ac_check_lib_save_LIBS=$LIBS
48220 LIBS="-ldl  $LIBS"
48221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48222 /* end confdefs.h.  */
48223 
48224 /* Override any GCC internal prototype to avoid an error.
48225    Use char because int might match the return type of a GCC
48226    builtin and then its argument prototype would still apply.  */
48227 #ifdef __cplusplus
48228 extern "C"
48229 #endif
48230 char dlopen ();
48231 int
48232 main ()
48233 {
48234 return dlopen ();
48235   ;
48236   return 0;
48237 }
48238 _ACEOF
48239 if ac_fn_cxx_try_link "$LINENO"; then :
48240   ac_cv_lib_dl_dlopen=yes
48241 else
48242   ac_cv_lib_dl_dlopen=no
48243 fi
48244 rm -f core conftest.err conftest.$ac_objext \
48245     conftest$ac_exeext conftest.$ac_ext
48246 LIBS=$ac_check_lib_save_LIBS
48247 fi
48248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
48249 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
48250 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
48251   cat >>confdefs.h <<_ACEOF
48252 #define HAVE_LIBDL 1
48253 _ACEOF
48254 
48255   LIBS="-ldl $LIBS"
48256 
48257 fi
48258 
48259   LIBDL="$LIBS"
48260 
48261   LIBS="$save_LIBS"
48262 
48263 
48264   ###############################################################################
48265   #
48266   # statically link libstdc++ before C++ ABI is stablized on Linux unless
48267   # dynamic build is configured on command line.
48268   #
48269 
48270 # Check whether --with-stdc++lib was given.
48271 if test "${with_stdc__lib+set}" = set; then :
48272   withval=$with_stdc__lib;
48273         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
48274                 && test "x$with_stdc__lib" != xdefault; then
48275           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
48276         fi
48277 
48278 else
48279   with_stdc__lib=default
48280 
48281 fi
48282 
48283 
48284   if test "x$OPENJDK_TARGET_OS" = xlinux; then
48285     # Test if -lstdc++ works.
48286     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
48287 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
48288     ac_ext=cpp
48289 ac_cpp='$CXXCPP $CPPFLAGS'
48290 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48291 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48292 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48293 
48294     OLD_CXXFLAGS="$CXXFLAGS"
48295     CXXFLAGS="$CXXFLAGS -lstdc++"
48296     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48297 /* end confdefs.h.  */
48298 
48299 int
48300 main ()
48301 {
48302 return 0;
48303   ;
48304   return 0;
48305 }
48306 _ACEOF
48307 if ac_fn_cxx_try_link "$LINENO"; then :
48308   has_dynamic_libstdcxx=yes
48309 else
48310   has_dynamic_libstdcxx=no
48311 fi
48312 rm -f core conftest.err conftest.$ac_objext \
48313     conftest$ac_exeext conftest.$ac_ext
48314     CXXFLAGS="$OLD_CXXFLAGS"
48315     ac_ext=cpp
48316 ac_cpp='$CXXCPP $CPPFLAGS'
48317 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48318 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48319 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48320 
48321     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
48322 $as_echo "$has_dynamic_libstdcxx" >&6; }
48323 
48324     # Test if stdc++ can be linked statically.
48325     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
48326 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
48327     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
48328     ac_ext=cpp
48329 ac_cpp='$CXXCPP $CPPFLAGS'
48330 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48331 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48332 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48333 
48334     OLD_LIBS="$LIBS"
48335     OLD_CXX="$CXX"
48336     LIBS="$STATIC_STDCXX_FLAGS"
48337     CXX="$CC"
48338     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48339 /* end confdefs.h.  */
48340 
48341 int
48342 main ()
48343 {
48344 return 0;
48345   ;
48346   return 0;
48347 }
48348 _ACEOF
48349 if ac_fn_cxx_try_link "$LINENO"; then :
48350   has_static_libstdcxx=yes
48351 else
48352   has_static_libstdcxx=no
48353 fi
48354 rm -f core conftest.err conftest.$ac_objext \
48355     conftest$ac_exeext conftest.$ac_ext
48356     LIBS="$OLD_LIBS"
48357     CXX="$OLD_CXX"
48358     ac_ext=cpp
48359 ac_cpp='$CXXCPP $CPPFLAGS'
48360 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48361 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48362 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48363 
48364     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48365 $as_echo "$has_static_libstdcxx" >&6; }
48366 
48367     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
48368       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
48369     fi
48370 
48371     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
48372       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
48373     fi
48374 
48375     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
48376       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
48377     fi
48378 
48379     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
48380 $as_echo_n "checking how to link with libstdc++... " >&6; }
48381     # If dynamic was requested, it's available since it would fail above otherwise.
48382     # If dynamic wasn't requested, go with static unless it isn't available.
48383     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48384       LIBCXX="$LIBCXX -lstdc++"
48385       LDCXX="$CXX"
48386       STATIC_CXX_SETTING="STATIC_CXX=false"
48387       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
48388 $as_echo "dynamic" >&6; }
48389     else
48390       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
48391       LDCXX="$CC"
48392       STATIC_CXX_SETTING="STATIC_CXX=true"
48393       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
48394 $as_echo "static" >&6; }
48395     fi
48396   fi
48397 
48398 
48399   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48400     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
48401 
48402 pkg_failed=no
48403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
48404 $as_echo_n "checking for LIBFFI... " >&6; }
48405 
48406 if test -n "$LIBFFI_CFLAGS"; then
48407     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
48408  elif test -n "$PKG_CONFIG"; then
48409     if test -n "$PKG_CONFIG" && \
48410     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
48411   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
48412   ac_status=$?
48413   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48414   test $ac_status = 0; }; then
48415   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
48416 else
48417   pkg_failed=yes
48418 fi
48419  else
48420     pkg_failed=untried
48421 fi
48422 if test -n "$LIBFFI_LIBS"; then
48423     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
48424  elif test -n "$PKG_CONFIG"; then
48425     if test -n "$PKG_CONFIG" && \
48426     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
48427   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
48428   ac_status=$?
48429   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48430   test $ac_status = 0; }; then
48431   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
48432 else
48433   pkg_failed=yes
48434 fi
48435  else
48436     pkg_failed=untried
48437 fi
48438 
48439 
48440 
48441 if test $pkg_failed = yes; then
48442 
48443 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48444         _pkg_short_errors_supported=yes
48445 else
48446         _pkg_short_errors_supported=no
48447 fi
48448         if test $_pkg_short_errors_supported = yes; then
48449                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
48450         else
48451                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
48452         fi
48453         # Put the nasty error message in config.log where it belongs
48454         echo "$LIBFFI_PKG_ERRORS" >&5
48455 
48456         as_fn_error $? "Package requirements (libffi) were not met:
48457 
48458 $LIBFFI_PKG_ERRORS
48459 
48460 Consider adjusting the PKG_CONFIG_PATH environment variable if you
48461 installed software in a non-standard prefix.
48462 
48463 Alternatively, you may set the environment variables LIBFFI_CFLAGS
48464 and LIBFFI_LIBS to avoid the need to call pkg-config.
48465 See the pkg-config man page for more details.
48466 " "$LINENO" 5
48467 elif test $pkg_failed = untried; then
48468         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48469 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48470 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
48471 is in your PATH or set the PKG_CONFIG environment variable to the full
48472 path to pkg-config.
48473 
48474 Alternatively, you may set the environment variables LIBFFI_CFLAGS
48475 and LIBFFI_LIBS to avoid the need to call pkg-config.
48476 See the pkg-config man page for more details.
48477 
48478 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
48479 See \`config.log' for more details" "$LINENO" 5; }
48480 else
48481         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
48482         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
48483         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48484 $as_echo "yes" >&6; }
48485         :
48486 fi
48487 
48488   fi
48489 
48490   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48491     # Extract the first word of "llvm-config", so it can be a program name with args.
48492 set dummy llvm-config; ac_word=$2
48493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48494 $as_echo_n "checking for $ac_word... " >&6; }
48495 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
48496   $as_echo_n "(cached) " >&6
48497 else
48498   if test -n "$LLVM_CONFIG"; then
48499   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
48500 else
48501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48502 for as_dir in $PATH
48503 do
48504   IFS=$as_save_IFS
48505   test -z "$as_dir" && as_dir=.
48506     for ac_exec_ext in '' $ac_executable_extensions; do
48507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48508     ac_cv_prog_LLVM_CONFIG="llvm-config"
48509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48510     break 2
48511   fi
48512 done
48513   done
48514 IFS=$as_save_IFS
48515 
48516 fi
48517 fi
48518 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
48519 if test -n "$LLVM_CONFIG"; then
48520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
48521 $as_echo "$LLVM_CONFIG" >&6; }
48522 else
48523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48524 $as_echo "no" >&6; }
48525 fi
48526 
48527 
48528 
48529     if test "x$LLVM_CONFIG" != xllvm-config; then
48530       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
48531     fi
48532 
48533     llvm_components="jit mcjit engine nativecodegen native"
48534     unset LLVM_CFLAGS
48535     for flag in $("$LLVM_CONFIG" --cxxflags); do
48536       if echo "${flag}" | grep -q '^-[ID]'; then
48537         if test "${flag}" != "-D_DEBUG" ; then
48538           if test "${LLVM_CFLAGS}" != "" ; then
48539             LLVM_CFLAGS="${LLVM_CFLAGS} "
48540           fi
48541           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
48542         fi
48543       fi
48544     done
48545     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
48546     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
48547 
48548     unset LLVM_LDFLAGS
48549     for flag in $("${LLVM_CONFIG}" --ldflags); do
48550       if echo "${flag}" | grep -q '^-L'; then
48551         if test "${LLVM_LDFLAGS}" != ""; then
48552           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
48553         fi
48554         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
48555       fi
48556     done
48557 
48558     unset LLVM_LIBS
48559     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
48560       if echo "${flag}" | grep -q '^-l'; then
48561         if test "${LLVM_LIBS}" != ""; then
48562           LLVM_LIBS="${LLVM_LIBS} "
48563         fi
48564         LLVM_LIBS="${LLVM_LIBS}${flag}"
48565       fi
48566     done
48567 
48568 
48569 
48570 
48571   fi
48572 
48573   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48574   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48575     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48576   fi
48577 
48578   # TODO better (platform agnostic) test
48579   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48580     LIBCXX="-lstdc++"
48581   fi
48582 
48583 
48584 
48585 
48586   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48587 
48588 
48589 # Check whether --with-msvcr-dll was given.
48590 if test "${with_msvcr_dll+set}" = set; then :
48591   withval=$with_msvcr_dll;
48592 fi
48593 
48594 
48595   if test "x$with_msvcr_dll" != x; then
48596     # If given explicitely by user, do not probe. If not present, fail directly.
48597 
48598   DLL_NAME="$MSVCR_NAME"
48599   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
48600   METHOD="--with-msvcr-dll"
48601   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48602     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48603 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48604 
48605     # Need to check if the found msvcr is correct architecture
48606     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48607 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48608     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48609     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48610       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48611       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48612       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48613         CORRECT_MSVCR_ARCH="PE32 executable"
48614       else
48615         CORRECT_MSVCR_ARCH="PE32+ executable"
48616       fi
48617     else
48618       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48619         CORRECT_MSVCR_ARCH=386
48620       else
48621         CORRECT_MSVCR_ARCH=x86-64
48622       fi
48623     fi
48624     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48625       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48626 $as_echo "ok" >&6; }
48627       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48628 
48629   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48630 
48631   # Input might be given as Windows format, start by converting to
48632   # unix format.
48633   path="$MSVC_DLL"
48634   new_path=`$CYGPATH -u "$path"`
48635 
48636   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48637   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48638   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48639   # "foo.exe" is OK but "foo" is an error.
48640   #
48641   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48642   # It is also a way to make sure we got the proper file name for the real test later on.
48643   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48644   if test "x$test_shortpath" = x; then
48645     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48646 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48647     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48648   fi
48649 
48650   # Call helper function which possibly converts this using DOS-style short mode.
48651   # If so, the updated path is stored in $new_path.
48652 
48653   input_path="$new_path"
48654   # Check if we need to convert this using DOS-style short mode. If the path
48655   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48656   # take no chances and rewrite it.
48657   # Note: m4 eats our [], so we need to use [ and ] instead.
48658   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48659   if test "x$has_forbidden_chars" != x; then
48660     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48661     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48662     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48663     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48664       # Going to short mode and back again did indeed matter. Since short mode is
48665       # case insensitive, let's make it lowercase to improve readability.
48666       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48667       # Now convert it back to Unix-style (cygpath)
48668       input_path=`$CYGPATH -u "$shortmode_path"`
48669       new_path="$input_path"
48670     fi
48671   fi
48672 
48673   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48674   if test "x$test_cygdrive_prefix" = x; then
48675     # As a simple fix, exclude /usr/bin since it's not a real path.
48676     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48677       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48678       # a path prefixed by /cygdrive for fixpath to work.
48679       new_path="$CYGWIN_ROOT_PATH$input_path"
48680     fi
48681   fi
48682 
48683 
48684   if test "x$path" != "x$new_path"; then
48685     MSVC_DLL="$new_path"
48686     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48687 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48688   fi
48689 
48690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48691 
48692   path="$MSVC_DLL"
48693   has_colon=`$ECHO $path | $GREP ^.:`
48694   new_path="$path"
48695   if test "x$has_colon" = x; then
48696     # Not in mixed or Windows style, start by that.
48697     new_path=`cmd //c echo $path`
48698   fi
48699 
48700 
48701   input_path="$new_path"
48702   # Check if we need to convert this using DOS-style short mode. If the path
48703   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48704   # take no chances and rewrite it.
48705   # Note: m4 eats our [], so we need to use [ and ] instead.
48706   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48707   if test "x$has_forbidden_chars" != x; then
48708     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48709     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48710   fi
48711 
48712 
48713   windows_path="$new_path"
48714   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48715     unix_path=`$CYGPATH -u "$windows_path"`
48716     new_path="$unix_path"
48717   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48718     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48719     new_path="$unix_path"
48720   fi
48721 
48722   if test "x$path" != "x$new_path"; then
48723     MSVC_DLL="$new_path"
48724     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48725 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48726   fi
48727 
48728   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48729   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48730 
48731   else
48732     # We're on a posix platform. Hooray! :)
48733     path="$MSVC_DLL"
48734     has_space=`$ECHO "$path" | $GREP " "`
48735     if test "x$has_space" != x; then
48736       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48737 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48738       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48739     fi
48740 
48741     # Use eval to expand a potential ~
48742     eval path="$path"
48743     if test ! -f "$path" && test ! -d "$path"; then
48744       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48745     fi
48746 
48747     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48748   fi
48749 
48750       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48751 $as_echo_n "checking for $DLL_NAME... " >&6; }
48752       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48753 $as_echo "$MSVC_DLL" >&6; }
48754     else
48755       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48756 $as_echo "incorrect, ignoring" >&6; }
48757       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48758 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48759     fi
48760   fi
48761 
48762     if test "x$MSVC_DLL" = x; then
48763       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
48764     fi
48765     MSVCR_DLL="$MSVC_DLL"
48766   elif test "x$DEVKIT_MSVCR_DLL" != x; then
48767 
48768   DLL_NAME="$MSVCR_NAME"
48769   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
48770   METHOD="devkit"
48771   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48772     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48773 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48774 
48775     # Need to check if the found msvcr is correct architecture
48776     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48777 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48778     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48779     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48780       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48781       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48782       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48783         CORRECT_MSVCR_ARCH="PE32 executable"
48784       else
48785         CORRECT_MSVCR_ARCH="PE32+ executable"
48786       fi
48787     else
48788       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48789         CORRECT_MSVCR_ARCH=386
48790       else
48791         CORRECT_MSVCR_ARCH=x86-64
48792       fi
48793     fi
48794     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48795       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48796 $as_echo "ok" >&6; }
48797       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48798 
48799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48800 
48801   # Input might be given as Windows format, start by converting to
48802   # unix format.
48803   path="$MSVC_DLL"
48804   new_path=`$CYGPATH -u "$path"`
48805 
48806   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48807   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48808   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48809   # "foo.exe" is OK but "foo" is an error.
48810   #
48811   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48812   # It is also a way to make sure we got the proper file name for the real test later on.
48813   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48814   if test "x$test_shortpath" = x; then
48815     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48816 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48817     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48818   fi
48819 
48820   # Call helper function which possibly converts this using DOS-style short mode.
48821   # If so, the updated path is stored in $new_path.
48822 
48823   input_path="$new_path"
48824   # Check if we need to convert this using DOS-style short mode. If the path
48825   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48826   # take no chances and rewrite it.
48827   # Note: m4 eats our [], so we need to use [ and ] instead.
48828   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48829   if test "x$has_forbidden_chars" != x; then
48830     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48831     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48832     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48833     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48834       # Going to short mode and back again did indeed matter. Since short mode is
48835       # case insensitive, let's make it lowercase to improve readability.
48836       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48837       # Now convert it back to Unix-style (cygpath)
48838       input_path=`$CYGPATH -u "$shortmode_path"`
48839       new_path="$input_path"
48840     fi
48841   fi
48842 
48843   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48844   if test "x$test_cygdrive_prefix" = x; then
48845     # As a simple fix, exclude /usr/bin since it's not a real path.
48846     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48847       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48848       # a path prefixed by /cygdrive for fixpath to work.
48849       new_path="$CYGWIN_ROOT_PATH$input_path"
48850     fi
48851   fi
48852 
48853 
48854   if test "x$path" != "x$new_path"; then
48855     MSVC_DLL="$new_path"
48856     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48857 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48858   fi
48859 
48860   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48861 
48862   path="$MSVC_DLL"
48863   has_colon=`$ECHO $path | $GREP ^.:`
48864   new_path="$path"
48865   if test "x$has_colon" = x; then
48866     # Not in mixed or Windows style, start by that.
48867     new_path=`cmd //c echo $path`
48868   fi
48869 
48870 
48871   input_path="$new_path"
48872   # Check if we need to convert this using DOS-style short mode. If the path
48873   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48874   # take no chances and rewrite it.
48875   # Note: m4 eats our [], so we need to use [ and ] instead.
48876   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48877   if test "x$has_forbidden_chars" != x; then
48878     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48879     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48880   fi
48881 
48882 
48883   windows_path="$new_path"
48884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48885     unix_path=`$CYGPATH -u "$windows_path"`
48886     new_path="$unix_path"
48887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48888     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48889     new_path="$unix_path"
48890   fi
48891 
48892   if test "x$path" != "x$new_path"; then
48893     MSVC_DLL="$new_path"
48894     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48895 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48896   fi
48897 
48898   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48899   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48900 
48901   else
48902     # We're on a posix platform. Hooray! :)
48903     path="$MSVC_DLL"
48904     has_space=`$ECHO "$path" | $GREP " "`
48905     if test "x$has_space" != x; then
48906       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48907 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48908       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48909     fi
48910 
48911     # Use eval to expand a potential ~
48912     eval path="$path"
48913     if test ! -f "$path" && test ! -d "$path"; then
48914       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48915     fi
48916 
48917     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48918   fi
48919 
48920       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48921 $as_echo_n "checking for $DLL_NAME... " >&6; }
48922       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48923 $as_echo "$MSVC_DLL" >&6; }
48924     else
48925       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48926 $as_echo "incorrect, ignoring" >&6; }
48927       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48928 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48929     fi
48930   fi
48931 
48932     if test "x$MSVC_DLL" = x; then
48933       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
48934     fi
48935     MSVCR_DLL="$MSVC_DLL"
48936   else
48937 
48938   DLL_NAME="${MSVCR_NAME}"
48939   MSVC_DLL=
48940 
48941   if test "x$MSVC_DLL" = x; then
48942     if test "x$VCINSTALLDIR" != x; then
48943       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48944 
48945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48946 
48947   # Input might be given as Windows format, start by converting to
48948   # unix format.
48949   path="$CYGWIN_VC_INSTALL_DIR"
48950   new_path=`$CYGPATH -u "$path"`
48951 
48952   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48953   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48954   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48955   # "foo.exe" is OK but "foo" is an error.
48956   #
48957   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48958   # It is also a way to make sure we got the proper file name for the real test later on.
48959   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48960   if test "x$test_shortpath" = x; then
48961     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&5
48962 $as_echo "$as_me: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&6;}
48963     as_fn_error $? "Cannot locate the the path of CYGWIN_VC_INSTALL_DIR" "$LINENO" 5
48964   fi
48965 
48966   # Call helper function which possibly converts this using DOS-style short mode.
48967   # If so, the updated path is stored in $new_path.
48968 
48969   input_path="$new_path"
48970   # Check if we need to convert this using DOS-style short mode. If the path
48971   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48972   # take no chances and rewrite it.
48973   # Note: m4 eats our [], so we need to use [ and ] instead.
48974   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48975   if test "x$has_forbidden_chars" != x; then
48976     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48977     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48978     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48979     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48980       # Going to short mode and back again did indeed matter. Since short mode is
48981       # case insensitive, let's make it lowercase to improve readability.
48982       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48983       # Now convert it back to Unix-style (cygpath)
48984       input_path=`$CYGPATH -u "$shortmode_path"`
48985       new_path="$input_path"
48986     fi
48987   fi
48988 
48989   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48990   if test "x$test_cygdrive_prefix" = x; then
48991     # As a simple fix, exclude /usr/bin since it's not a real path.
48992     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48993       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48994       # a path prefixed by /cygdrive for fixpath to work.
48995       new_path="$CYGWIN_ROOT_PATH$input_path"
48996     fi
48997   fi
48998 
48999 
49000   if test "x$path" != "x$new_path"; then
49001     CYGWIN_VC_INSTALL_DIR="$new_path"
49002     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&5
49003 $as_echo "$as_me: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&6;}
49004   fi
49005 
49006   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49007 
49008   path="$CYGWIN_VC_INSTALL_DIR"
49009   has_colon=`$ECHO $path | $GREP ^.:`
49010   new_path="$path"
49011   if test "x$has_colon" = x; then
49012     # Not in mixed or Windows style, start by that.
49013     new_path=`cmd //c echo $path`
49014   fi
49015 
49016 
49017   input_path="$new_path"
49018   # Check if we need to convert this using DOS-style short mode. If the path
49019   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49020   # take no chances and rewrite it.
49021   # Note: m4 eats our [], so we need to use [ and ] instead.
49022   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49023   if test "x$has_forbidden_chars" != x; then
49024     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49025     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49026   fi
49027 
49028 
49029   windows_path="$new_path"
49030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49031     unix_path=`$CYGPATH -u "$windows_path"`
49032     new_path="$unix_path"
49033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49034     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49035     new_path="$unix_path"
49036   fi
49037 
49038   if test "x$path" != "x$new_path"; then
49039     CYGWIN_VC_INSTALL_DIR="$new_path"
49040     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&5
49041 $as_echo "$as_me: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&6;}
49042   fi
49043 
49044   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49045   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49046 
49047   else
49048     # We're on a posix platform. Hooray! :)
49049     path="$CYGWIN_VC_INSTALL_DIR"
49050     has_space=`$ECHO "$path" | $GREP " "`
49051     if test "x$has_space" != x; then
49052       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&5
49053 $as_echo "$as_me: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&6;}
49054       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49055     fi
49056 
49057     # Use eval to expand a potential ~
49058     eval path="$path"
49059     if test ! -f "$path" && test ! -d "$path"; then
49060       as_fn_error $? "The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is not found." "$LINENO" 5
49061     fi
49062 
49063     CYGWIN_VC_INSTALL_DIR="`cd "$path"; $THEPWDCMD -L`"
49064   fi
49065 
49066       if test "$VS_VERSION" -lt 2017; then
49067         # Probe: Using well-known location from Visual Studio 12.0 and older
49068         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49069           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49070         else
49071           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49072         fi
49073       else
49074         # Probe: Using well-known location from VS 2017
49075         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49076           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
49077         else
49078           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
49079         fi
49080       fi
49081       # In case any of the above finds more than one file, loop over them.
49082       for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
49083         $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
49084 
49085   DLL_NAME="$DLL_NAME"
49086   POSSIBLE_MSVC_DLL="$possible_msvc_dll"
49087   METHOD="well-known location in VCINSTALLDIR"
49088   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49089     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49090 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49091 
49092     # Need to check if the found msvcr is correct architecture
49093     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49094 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49095     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49096     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49097       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49098       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49099       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49100         CORRECT_MSVCR_ARCH="PE32 executable"
49101       else
49102         CORRECT_MSVCR_ARCH="PE32+ executable"
49103       fi
49104     else
49105       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49106         CORRECT_MSVCR_ARCH=386
49107       else
49108         CORRECT_MSVCR_ARCH=x86-64
49109       fi
49110     fi
49111     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49112       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49113 $as_echo "ok" >&6; }
49114       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49115 
49116   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49117 
49118   # Input might be given as Windows format, start by converting to
49119   # unix format.
49120   path="$MSVC_DLL"
49121   new_path=`$CYGPATH -u "$path"`
49122 
49123   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49124   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49125   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49126   # "foo.exe" is OK but "foo" is an error.
49127   #
49128   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49129   # It is also a way to make sure we got the proper file name for the real test later on.
49130   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49131   if test "x$test_shortpath" = x; then
49132     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49133 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49134     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49135   fi
49136 
49137   # Call helper function which possibly converts this using DOS-style short mode.
49138   # If so, the updated path is stored in $new_path.
49139 
49140   input_path="$new_path"
49141   # Check if we need to convert this using DOS-style short mode. If the path
49142   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49143   # take no chances and rewrite it.
49144   # Note: m4 eats our [], so we need to use [ and ] instead.
49145   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49146   if test "x$has_forbidden_chars" != x; then
49147     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49148     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49149     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49150     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49151       # Going to short mode and back again did indeed matter. Since short mode is
49152       # case insensitive, let's make it lowercase to improve readability.
49153       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49154       # Now convert it back to Unix-style (cygpath)
49155       input_path=`$CYGPATH -u "$shortmode_path"`
49156       new_path="$input_path"
49157     fi
49158   fi
49159 
49160   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49161   if test "x$test_cygdrive_prefix" = x; then
49162     # As a simple fix, exclude /usr/bin since it's not a real path.
49163     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49164       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49165       # a path prefixed by /cygdrive for fixpath to work.
49166       new_path="$CYGWIN_ROOT_PATH$input_path"
49167     fi
49168   fi
49169 
49170 
49171   if test "x$path" != "x$new_path"; then
49172     MSVC_DLL="$new_path"
49173     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49174 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49175   fi
49176 
49177   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49178 
49179   path="$MSVC_DLL"
49180   has_colon=`$ECHO $path | $GREP ^.:`
49181   new_path="$path"
49182   if test "x$has_colon" = x; then
49183     # Not in mixed or Windows style, start by that.
49184     new_path=`cmd //c echo $path`
49185   fi
49186 
49187 
49188   input_path="$new_path"
49189   # Check if we need to convert this using DOS-style short mode. If the path
49190   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49191   # take no chances and rewrite it.
49192   # Note: m4 eats our [], so we need to use [ and ] instead.
49193   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49194   if test "x$has_forbidden_chars" != x; then
49195     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49196     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49197   fi
49198 
49199 
49200   windows_path="$new_path"
49201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49202     unix_path=`$CYGPATH -u "$windows_path"`
49203     new_path="$unix_path"
49204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49206     new_path="$unix_path"
49207   fi
49208 
49209   if test "x$path" != "x$new_path"; then
49210     MSVC_DLL="$new_path"
49211     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49212 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49213   fi
49214 
49215   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49216   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49217 
49218   else
49219     # We're on a posix platform. Hooray! :)
49220     path="$MSVC_DLL"
49221     has_space=`$ECHO "$path" | $GREP " "`
49222     if test "x$has_space" != x; then
49223       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49224 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49225       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49226     fi
49227 
49228     # Use eval to expand a potential ~
49229     eval path="$path"
49230     if test ! -f "$path" && test ! -d "$path"; then
49231       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49232     fi
49233 
49234     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49235   fi
49236 
49237       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49238 $as_echo_n "checking for $DLL_NAME... " >&6; }
49239       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49240 $as_echo "$MSVC_DLL" >&6; }
49241     else
49242       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49243 $as_echo "incorrect, ignoring" >&6; }
49244       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49245 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49246     fi
49247   fi
49248 
49249       done
49250     fi
49251   fi
49252 
49253   if test "x$MSVC_DLL" = x; then
49254     # Probe: Check in the Boot JDK directory.
49255     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49256 
49257   DLL_NAME="$DLL_NAME"
49258   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49259   METHOD="well-known location in Boot JDK"
49260   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49261     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49262 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49263 
49264     # Need to check if the found msvcr is correct architecture
49265     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49266 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49267     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49268     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49269       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49270       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49271       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49272         CORRECT_MSVCR_ARCH="PE32 executable"
49273       else
49274         CORRECT_MSVCR_ARCH="PE32+ executable"
49275       fi
49276     else
49277       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49278         CORRECT_MSVCR_ARCH=386
49279       else
49280         CORRECT_MSVCR_ARCH=x86-64
49281       fi
49282     fi
49283     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49284       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49285 $as_echo "ok" >&6; }
49286       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49287 
49288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49289 
49290   # Input might be given as Windows format, start by converting to
49291   # unix format.
49292   path="$MSVC_DLL"
49293   new_path=`$CYGPATH -u "$path"`
49294 
49295   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49296   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49297   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49298   # "foo.exe" is OK but "foo" is an error.
49299   #
49300   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49301   # It is also a way to make sure we got the proper file name for the real test later on.
49302   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49303   if test "x$test_shortpath" = x; then
49304     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49305 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49306     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49307   fi
49308 
49309   # Call helper function which possibly converts this using DOS-style short mode.
49310   # If so, the updated path is stored in $new_path.
49311 
49312   input_path="$new_path"
49313   # Check if we need to convert this using DOS-style short mode. If the path
49314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49315   # take no chances and rewrite it.
49316   # Note: m4 eats our [], so we need to use [ and ] instead.
49317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49318   if test "x$has_forbidden_chars" != x; then
49319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49320     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49321     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49322     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49323       # Going to short mode and back again did indeed matter. Since short mode is
49324       # case insensitive, let's make it lowercase to improve readability.
49325       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49326       # Now convert it back to Unix-style (cygpath)
49327       input_path=`$CYGPATH -u "$shortmode_path"`
49328       new_path="$input_path"
49329     fi
49330   fi
49331 
49332   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49333   if test "x$test_cygdrive_prefix" = x; then
49334     # As a simple fix, exclude /usr/bin since it's not a real path.
49335     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49336       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49337       # a path prefixed by /cygdrive for fixpath to work.
49338       new_path="$CYGWIN_ROOT_PATH$input_path"
49339     fi
49340   fi
49341 
49342 
49343   if test "x$path" != "x$new_path"; then
49344     MSVC_DLL="$new_path"
49345     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49346 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49347   fi
49348 
49349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49350 
49351   path="$MSVC_DLL"
49352   has_colon=`$ECHO $path | $GREP ^.:`
49353   new_path="$path"
49354   if test "x$has_colon" = x; then
49355     # Not in mixed or Windows style, start by that.
49356     new_path=`cmd //c echo $path`
49357   fi
49358 
49359 
49360   input_path="$new_path"
49361   # Check if we need to convert this using DOS-style short mode. If the path
49362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49363   # take no chances and rewrite it.
49364   # Note: m4 eats our [], so we need to use [ and ] instead.
49365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49366   if test "x$has_forbidden_chars" != x; then
49367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49368     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49369   fi
49370 
49371 
49372   windows_path="$new_path"
49373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49374     unix_path=`$CYGPATH -u "$windows_path"`
49375     new_path="$unix_path"
49376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49378     new_path="$unix_path"
49379   fi
49380 
49381   if test "x$path" != "x$new_path"; then
49382     MSVC_DLL="$new_path"
49383     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49384 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49385   fi
49386 
49387   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49388   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49389 
49390   else
49391     # We're on a posix platform. Hooray! :)
49392     path="$MSVC_DLL"
49393     has_space=`$ECHO "$path" | $GREP " "`
49394     if test "x$has_space" != x; then
49395       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49396 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49397       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49398     fi
49399 
49400     # Use eval to expand a potential ~
49401     eval path="$path"
49402     if test ! -f "$path" && test ! -d "$path"; then
49403       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49404     fi
49405 
49406     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49407   fi
49408 
49409       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49410 $as_echo_n "checking for $DLL_NAME... " >&6; }
49411       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49412 $as_echo "$MSVC_DLL" >&6; }
49413     else
49414       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49415 $as_echo "incorrect, ignoring" >&6; }
49416       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49417 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49418     fi
49419   fi
49420 
49421   fi
49422 
49423   if test "x$MSVC_DLL" = x; then
49424     # Probe: Look in the Windows system32 directory
49425     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49426 
49427   windows_path="$CYGWIN_SYSTEMROOT"
49428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49429     unix_path=`$CYGPATH -u "$windows_path"`
49430     CYGWIN_SYSTEMROOT="$unix_path"
49431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49432     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49433     CYGWIN_SYSTEMROOT="$unix_path"
49434   fi
49435 
49436     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49437 
49438   DLL_NAME="$DLL_NAME"
49439   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49440   METHOD="well-known location in SYSTEMROOT"
49441   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49442     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49443 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49444 
49445     # Need to check if the found msvcr is correct architecture
49446     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49447 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49448     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49449     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49450       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49451       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49452       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49453         CORRECT_MSVCR_ARCH="PE32 executable"
49454       else
49455         CORRECT_MSVCR_ARCH="PE32+ executable"
49456       fi
49457     else
49458       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49459         CORRECT_MSVCR_ARCH=386
49460       else
49461         CORRECT_MSVCR_ARCH=x86-64
49462       fi
49463     fi
49464     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49465       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49466 $as_echo "ok" >&6; }
49467       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49468 
49469   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49470 
49471   # Input might be given as Windows format, start by converting to
49472   # unix format.
49473   path="$MSVC_DLL"
49474   new_path=`$CYGPATH -u "$path"`
49475 
49476   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49477   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49478   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49479   # "foo.exe" is OK but "foo" is an error.
49480   #
49481   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49482   # It is also a way to make sure we got the proper file name for the real test later on.
49483   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49484   if test "x$test_shortpath" = x; then
49485     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49486 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49487     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49488   fi
49489 
49490   # Call helper function which possibly converts this using DOS-style short mode.
49491   # If so, the updated path is stored in $new_path.
49492 
49493   input_path="$new_path"
49494   # Check if we need to convert this using DOS-style short mode. If the path
49495   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49496   # take no chances and rewrite it.
49497   # Note: m4 eats our [], so we need to use [ and ] instead.
49498   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49499   if test "x$has_forbidden_chars" != x; then
49500     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49501     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49502     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49503     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49504       # Going to short mode and back again did indeed matter. Since short mode is
49505       # case insensitive, let's make it lowercase to improve readability.
49506       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49507       # Now convert it back to Unix-style (cygpath)
49508       input_path=`$CYGPATH -u "$shortmode_path"`
49509       new_path="$input_path"
49510     fi
49511   fi
49512 
49513   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49514   if test "x$test_cygdrive_prefix" = x; then
49515     # As a simple fix, exclude /usr/bin since it's not a real path.
49516     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49517       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49518       # a path prefixed by /cygdrive for fixpath to work.
49519       new_path="$CYGWIN_ROOT_PATH$input_path"
49520     fi
49521   fi
49522 
49523 
49524   if test "x$path" != "x$new_path"; then
49525     MSVC_DLL="$new_path"
49526     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49527 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49528   fi
49529 
49530   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49531 
49532   path="$MSVC_DLL"
49533   has_colon=`$ECHO $path | $GREP ^.:`
49534   new_path="$path"
49535   if test "x$has_colon" = x; then
49536     # Not in mixed or Windows style, start by that.
49537     new_path=`cmd //c echo $path`
49538   fi
49539 
49540 
49541   input_path="$new_path"
49542   # Check if we need to convert this using DOS-style short mode. If the path
49543   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49544   # take no chances and rewrite it.
49545   # Note: m4 eats our [], so we need to use [ and ] instead.
49546   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49547   if test "x$has_forbidden_chars" != x; then
49548     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49549     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49550   fi
49551 
49552 
49553   windows_path="$new_path"
49554   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49555     unix_path=`$CYGPATH -u "$windows_path"`
49556     new_path="$unix_path"
49557   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49558     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49559     new_path="$unix_path"
49560   fi
49561 
49562   if test "x$path" != "x$new_path"; then
49563     MSVC_DLL="$new_path"
49564     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49565 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49566   fi
49567 
49568   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49569   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49570 
49571   else
49572     # We're on a posix platform. Hooray! :)
49573     path="$MSVC_DLL"
49574     has_space=`$ECHO "$path" | $GREP " "`
49575     if test "x$has_space" != x; then
49576       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49577 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49578       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49579     fi
49580 
49581     # Use eval to expand a potential ~
49582     eval path="$path"
49583     if test ! -f "$path" && test ! -d "$path"; then
49584       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49585     fi
49586 
49587     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49588   fi
49589 
49590       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49591 $as_echo_n "checking for $DLL_NAME... " >&6; }
49592       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49593 $as_echo "$MSVC_DLL" >&6; }
49594     else
49595       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49596 $as_echo "incorrect, ignoring" >&6; }
49597       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49598 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49599     fi
49600   fi
49601 
49602   fi
49603 
49604   if test "x$MSVC_DLL" = x; then
49605     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49606     if test "x$VS100COMNTOOLS" != x; then
49607       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49608 
49609   windows_path="$CYGWIN_VS_TOOLS_DIR"
49610   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49611     unix_path=`$CYGPATH -u "$windows_path"`
49612     CYGWIN_VS_TOOLS_DIR="$unix_path"
49613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49614     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49615     CYGWIN_VS_TOOLS_DIR="$unix_path"
49616   fi
49617 
49618       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49619         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49620             | $GREP -i /x64/ | $HEAD --lines 1`
49621       else
49622         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49623             | $GREP -i /x86/ | $HEAD --lines 1`
49624       fi
49625 
49626   DLL_NAME="$DLL_NAME"
49627   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49628   METHOD="search of VS100COMNTOOLS"
49629   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49630     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49631 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49632 
49633     # Need to check if the found msvcr is correct architecture
49634     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49635 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49636     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49637     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49638       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49639       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49640       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49641         CORRECT_MSVCR_ARCH="PE32 executable"
49642       else
49643         CORRECT_MSVCR_ARCH="PE32+ executable"
49644       fi
49645     else
49646       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49647         CORRECT_MSVCR_ARCH=386
49648       else
49649         CORRECT_MSVCR_ARCH=x86-64
49650       fi
49651     fi
49652     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49653       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49654 $as_echo "ok" >&6; }
49655       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49656 
49657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49658 
49659   # Input might be given as Windows format, start by converting to
49660   # unix format.
49661   path="$MSVC_DLL"
49662   new_path=`$CYGPATH -u "$path"`
49663 
49664   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49665   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49666   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49667   # "foo.exe" is OK but "foo" is an error.
49668   #
49669   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49670   # It is also a way to make sure we got the proper file name for the real test later on.
49671   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49672   if test "x$test_shortpath" = x; then
49673     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49674 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49675     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49676   fi
49677 
49678   # Call helper function which possibly converts this using DOS-style short mode.
49679   # If so, the updated path is stored in $new_path.
49680 
49681   input_path="$new_path"
49682   # Check if we need to convert this using DOS-style short mode. If the path
49683   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49684   # take no chances and rewrite it.
49685   # Note: m4 eats our [], so we need to use [ and ] instead.
49686   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49687   if test "x$has_forbidden_chars" != x; then
49688     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49689     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49690     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49691     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49692       # Going to short mode and back again did indeed matter. Since short mode is
49693       # case insensitive, let's make it lowercase to improve readability.
49694       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49695       # Now convert it back to Unix-style (cygpath)
49696       input_path=`$CYGPATH -u "$shortmode_path"`
49697       new_path="$input_path"
49698     fi
49699   fi
49700 
49701   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49702   if test "x$test_cygdrive_prefix" = x; then
49703     # As a simple fix, exclude /usr/bin since it's not a real path.
49704     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49705       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49706       # a path prefixed by /cygdrive for fixpath to work.
49707       new_path="$CYGWIN_ROOT_PATH$input_path"
49708     fi
49709   fi
49710 
49711 
49712   if test "x$path" != "x$new_path"; then
49713     MSVC_DLL="$new_path"
49714     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49715 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49716   fi
49717 
49718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49719 
49720   path="$MSVC_DLL"
49721   has_colon=`$ECHO $path | $GREP ^.:`
49722   new_path="$path"
49723   if test "x$has_colon" = x; then
49724     # Not in mixed or Windows style, start by that.
49725     new_path=`cmd //c echo $path`
49726   fi
49727 
49728 
49729   input_path="$new_path"
49730   # Check if we need to convert this using DOS-style short mode. If the path
49731   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49732   # take no chances and rewrite it.
49733   # Note: m4 eats our [], so we need to use [ and ] instead.
49734   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49735   if test "x$has_forbidden_chars" != x; then
49736     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49737     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49738   fi
49739 
49740 
49741   windows_path="$new_path"
49742   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49743     unix_path=`$CYGPATH -u "$windows_path"`
49744     new_path="$unix_path"
49745   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49746     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49747     new_path="$unix_path"
49748   fi
49749 
49750   if test "x$path" != "x$new_path"; then
49751     MSVC_DLL="$new_path"
49752     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49753 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49754   fi
49755 
49756   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49757   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49758 
49759   else
49760     # We're on a posix platform. Hooray! :)
49761     path="$MSVC_DLL"
49762     has_space=`$ECHO "$path" | $GREP " "`
49763     if test "x$has_space" != x; then
49764       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49765 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49766       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49767     fi
49768 
49769     # Use eval to expand a potential ~
49770     eval path="$path"
49771     if test ! -f "$path" && test ! -d "$path"; then
49772       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49773     fi
49774 
49775     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49776   fi
49777 
49778       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49779 $as_echo_n "checking for $DLL_NAME... " >&6; }
49780       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49781 $as_echo "$MSVC_DLL" >&6; }
49782     else
49783       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49784 $as_echo "incorrect, ignoring" >&6; }
49785       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49786 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49787     fi
49788   fi
49789 
49790     fi
49791   fi
49792 
49793   if test "x$MSVC_DLL" = x; then
49794     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49795     # (This was the original behaviour; kept since it might turn something up)
49796     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49797       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49798         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49799           | $GREP x64 | $HEAD --lines 1`
49800       else
49801         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49802           | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49803         if test "x$POSSIBLE_MSVC_DLL" = x; then
49804           # We're grasping at straws now...
49805           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49806               | $HEAD --lines 1`
49807         fi
49808       fi
49809 
49810 
49811   DLL_NAME="$DLL_NAME"
49812   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49813   METHOD="search of VCINSTALLDIR"
49814   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49815     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49816 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49817 
49818     # Need to check if the found msvcr is correct architecture
49819     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49820 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49821     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49822     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49823       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49824       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49825       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49826         CORRECT_MSVCR_ARCH="PE32 executable"
49827       else
49828         CORRECT_MSVCR_ARCH="PE32+ executable"
49829       fi
49830     else
49831       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49832         CORRECT_MSVCR_ARCH=386
49833       else
49834         CORRECT_MSVCR_ARCH=x86-64
49835       fi
49836     fi
49837     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49838       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49839 $as_echo "ok" >&6; }
49840       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49841 
49842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49843 
49844   # Input might be given as Windows format, start by converting to
49845   # unix format.
49846   path="$MSVC_DLL"
49847   new_path=`$CYGPATH -u "$path"`
49848 
49849   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49850   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49851   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49852   # "foo.exe" is OK but "foo" is an error.
49853   #
49854   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49855   # It is also a way to make sure we got the proper file name for the real test later on.
49856   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49857   if test "x$test_shortpath" = x; then
49858     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49859 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49860     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49861   fi
49862 
49863   # Call helper function which possibly converts this using DOS-style short mode.
49864   # If so, the updated path is stored in $new_path.
49865 
49866   input_path="$new_path"
49867   # Check if we need to convert this using DOS-style short mode. If the path
49868   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49869   # take no chances and rewrite it.
49870   # Note: m4 eats our [], so we need to use [ and ] instead.
49871   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49872   if test "x$has_forbidden_chars" != x; then
49873     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49874     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49875     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49876     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49877       # Going to short mode and back again did indeed matter. Since short mode is
49878       # case insensitive, let's make it lowercase to improve readability.
49879       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49880       # Now convert it back to Unix-style (cygpath)
49881       input_path=`$CYGPATH -u "$shortmode_path"`
49882       new_path="$input_path"
49883     fi
49884   fi
49885 
49886   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49887   if test "x$test_cygdrive_prefix" = x; then
49888     # As a simple fix, exclude /usr/bin since it's not a real path.
49889     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49890       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49891       # a path prefixed by /cygdrive for fixpath to work.
49892       new_path="$CYGWIN_ROOT_PATH$input_path"
49893     fi
49894   fi
49895 
49896 
49897   if test "x$path" != "x$new_path"; then
49898     MSVC_DLL="$new_path"
49899     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49900 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49901   fi
49902 
49903   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49904 
49905   path="$MSVC_DLL"
49906   has_colon=`$ECHO $path | $GREP ^.:`
49907   new_path="$path"
49908   if test "x$has_colon" = x; then
49909     # Not in mixed or Windows style, start by that.
49910     new_path=`cmd //c echo $path`
49911   fi
49912 
49913 
49914   input_path="$new_path"
49915   # Check if we need to convert this using DOS-style short mode. If the path
49916   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49917   # take no chances and rewrite it.
49918   # Note: m4 eats our [], so we need to use [ and ] instead.
49919   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49920   if test "x$has_forbidden_chars" != x; then
49921     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49922     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49923   fi
49924 
49925 
49926   windows_path="$new_path"
49927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49928     unix_path=`$CYGPATH -u "$windows_path"`
49929     new_path="$unix_path"
49930   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49931     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49932     new_path="$unix_path"
49933   fi
49934 
49935   if test "x$path" != "x$new_path"; then
49936     MSVC_DLL="$new_path"
49937     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49938 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49939   fi
49940 
49941   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49942   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49943 
49944   else
49945     # We're on a posix platform. Hooray! :)
49946     path="$MSVC_DLL"
49947     has_space=`$ECHO "$path" | $GREP " "`
49948     if test "x$has_space" != x; then
49949       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49950 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49951       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49952     fi
49953 
49954     # Use eval to expand a potential ~
49955     eval path="$path"
49956     if test ! -f "$path" && test ! -d "$path"; then
49957       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49958     fi
49959 
49960     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49961   fi
49962 
49963       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49964 $as_echo_n "checking for $DLL_NAME... " >&6; }
49965       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49966 $as_echo "$MSVC_DLL" >&6; }
49967     else
49968       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49969 $as_echo "incorrect, ignoring" >&6; }
49970       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49971 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49972     fi
49973   fi
49974 
49975     fi
49976   fi
49977 
49978   if test "x$MSVC_DLL" = x; then
49979     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49980 $as_echo_n "checking for $DLL_NAME... " >&6; }
49981     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49982 $as_echo "no" >&6; }
49983     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49984   fi
49985 
49986     MSVCR_DLL="$MSVC_DLL"
49987   fi
49988 
49989 
49990 
49991 # Check whether --with-msvcp-dll was given.
49992 if test "${with_msvcp_dll+set}" = set; then :
49993   withval=$with_msvcp_dll;
49994 fi
49995 
49996 
49997   if test "x$MSVCP_NAME" != "x"; then
49998     if test "x$with_msvcp_dll" != x; then
49999       # If given explicitely by user, do not probe. If not present, fail directly.
50000 
50001   DLL_NAME="$MSVCP_NAME"
50002   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50003   METHOD="--with-msvcp-dll"
50004   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50005     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50006 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50007 
50008     # Need to check if the found msvcr is correct architecture
50009     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50010 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50011     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50012     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50013       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50014       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50015       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50016         CORRECT_MSVCR_ARCH="PE32 executable"
50017       else
50018         CORRECT_MSVCR_ARCH="PE32+ executable"
50019       fi
50020     else
50021       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50022         CORRECT_MSVCR_ARCH=386
50023       else
50024         CORRECT_MSVCR_ARCH=x86-64
50025       fi
50026     fi
50027     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50028       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50029 $as_echo "ok" >&6; }
50030       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50031 
50032   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50033 
50034   # Input might be given as Windows format, start by converting to
50035   # unix format.
50036   path="$MSVC_DLL"
50037   new_path=`$CYGPATH -u "$path"`
50038 
50039   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50040   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50041   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50042   # "foo.exe" is OK but "foo" is an error.
50043   #
50044   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50045   # It is also a way to make sure we got the proper file name for the real test later on.
50046   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50047   if test "x$test_shortpath" = x; then
50048     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50049 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50050     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50051   fi
50052 
50053   # Call helper function which possibly converts this using DOS-style short mode.
50054   # If so, the updated path is stored in $new_path.
50055 
50056   input_path="$new_path"
50057   # Check if we need to convert this using DOS-style short mode. If the path
50058   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50059   # take no chances and rewrite it.
50060   # Note: m4 eats our [], so we need to use [ and ] instead.
50061   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50062   if test "x$has_forbidden_chars" != x; then
50063     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50064     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50065     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50066     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50067       # Going to short mode and back again did indeed matter. Since short mode is
50068       # case insensitive, let's make it lowercase to improve readability.
50069       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50070       # Now convert it back to Unix-style (cygpath)
50071       input_path=`$CYGPATH -u "$shortmode_path"`
50072       new_path="$input_path"
50073     fi
50074   fi
50075 
50076   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50077   if test "x$test_cygdrive_prefix" = x; then
50078     # As a simple fix, exclude /usr/bin since it's not a real path.
50079     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50080       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50081       # a path prefixed by /cygdrive for fixpath to work.
50082       new_path="$CYGWIN_ROOT_PATH$input_path"
50083     fi
50084   fi
50085 
50086 
50087   if test "x$path" != "x$new_path"; then
50088     MSVC_DLL="$new_path"
50089     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50090 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50091   fi
50092 
50093   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50094 
50095   path="$MSVC_DLL"
50096   has_colon=`$ECHO $path | $GREP ^.:`
50097   new_path="$path"
50098   if test "x$has_colon" = x; then
50099     # Not in mixed or Windows style, start by that.
50100     new_path=`cmd //c echo $path`
50101   fi
50102 
50103 
50104   input_path="$new_path"
50105   # Check if we need to convert this using DOS-style short mode. If the path
50106   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50107   # take no chances and rewrite it.
50108   # Note: m4 eats our [], so we need to use [ and ] instead.
50109   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50110   if test "x$has_forbidden_chars" != x; then
50111     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50112     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50113   fi
50114 
50115 
50116   windows_path="$new_path"
50117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50118     unix_path=`$CYGPATH -u "$windows_path"`
50119     new_path="$unix_path"
50120   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50121     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50122     new_path="$unix_path"
50123   fi
50124 
50125   if test "x$path" != "x$new_path"; then
50126     MSVC_DLL="$new_path"
50127     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50128 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50129   fi
50130 
50131   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50132   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50133 
50134   else
50135     # We're on a posix platform. Hooray! :)
50136     path="$MSVC_DLL"
50137     has_space=`$ECHO "$path" | $GREP " "`
50138     if test "x$has_space" != x; then
50139       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50140 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50141       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50142     fi
50143 
50144     # Use eval to expand a potential ~
50145     eval path="$path"
50146     if test ! -f "$path" && test ! -d "$path"; then
50147       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50148     fi
50149 
50150     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50151   fi
50152 
50153       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50154 $as_echo_n "checking for $DLL_NAME... " >&6; }
50155       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50156 $as_echo "$MSVC_DLL" >&6; }
50157     else
50158       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50159 $as_echo "incorrect, ignoring" >&6; }
50160       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50161 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50162     fi
50163   fi
50164 
50165       if test "x$MSVC_DLL" = x; then
50166         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50167       fi
50168       MSVCP_DLL="$MSVC_DLL"
50169     elif test "x$DEVKIT_MSVCP_DLL" != x; then
50170 
50171   DLL_NAME="$MSVCP_NAME"
50172   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
50173   METHOD="devkit"
50174   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50175     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50176 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50177 
50178     # Need to check if the found msvcr is correct architecture
50179     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50180 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50181     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50182     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50183       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50184       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50185       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50186         CORRECT_MSVCR_ARCH="PE32 executable"
50187       else
50188         CORRECT_MSVCR_ARCH="PE32+ executable"
50189       fi
50190     else
50191       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50192         CORRECT_MSVCR_ARCH=386
50193       else
50194         CORRECT_MSVCR_ARCH=x86-64
50195       fi
50196     fi
50197     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50198       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50199 $as_echo "ok" >&6; }
50200       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50201 
50202   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50203 
50204   # Input might be given as Windows format, start by converting to
50205   # unix format.
50206   path="$MSVC_DLL"
50207   new_path=`$CYGPATH -u "$path"`
50208 
50209   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50210   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50211   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50212   # "foo.exe" is OK but "foo" is an error.
50213   #
50214   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50215   # It is also a way to make sure we got the proper file name for the real test later on.
50216   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50217   if test "x$test_shortpath" = x; then
50218     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50219 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50220     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50221   fi
50222 
50223   # Call helper function which possibly converts this using DOS-style short mode.
50224   # If so, the updated path is stored in $new_path.
50225 
50226   input_path="$new_path"
50227   # Check if we need to convert this using DOS-style short mode. If the path
50228   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50229   # take no chances and rewrite it.
50230   # Note: m4 eats our [], so we need to use [ and ] instead.
50231   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50232   if test "x$has_forbidden_chars" != x; then
50233     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50234     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50235     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50236     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50237       # Going to short mode and back again did indeed matter. Since short mode is
50238       # case insensitive, let's make it lowercase to improve readability.
50239       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50240       # Now convert it back to Unix-style (cygpath)
50241       input_path=`$CYGPATH -u "$shortmode_path"`
50242       new_path="$input_path"
50243     fi
50244   fi
50245 
50246   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50247   if test "x$test_cygdrive_prefix" = x; then
50248     # As a simple fix, exclude /usr/bin since it's not a real path.
50249     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50250       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50251       # a path prefixed by /cygdrive for fixpath to work.
50252       new_path="$CYGWIN_ROOT_PATH$input_path"
50253     fi
50254   fi
50255 
50256 
50257   if test "x$path" != "x$new_path"; then
50258     MSVC_DLL="$new_path"
50259     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50260 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50261   fi
50262 
50263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50264 
50265   path="$MSVC_DLL"
50266   has_colon=`$ECHO $path | $GREP ^.:`
50267   new_path="$path"
50268   if test "x$has_colon" = x; then
50269     # Not in mixed or Windows style, start by that.
50270     new_path=`cmd //c echo $path`
50271   fi
50272 
50273 
50274   input_path="$new_path"
50275   # Check if we need to convert this using DOS-style short mode. If the path
50276   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50277   # take no chances and rewrite it.
50278   # Note: m4 eats our [], so we need to use [ and ] instead.
50279   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50280   if test "x$has_forbidden_chars" != x; then
50281     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50282     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50283   fi
50284 
50285 
50286   windows_path="$new_path"
50287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50288     unix_path=`$CYGPATH -u "$windows_path"`
50289     new_path="$unix_path"
50290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50291     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50292     new_path="$unix_path"
50293   fi
50294 
50295   if test "x$path" != "x$new_path"; then
50296     MSVC_DLL="$new_path"
50297     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50298 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50299   fi
50300 
50301   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50302   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50303 
50304   else
50305     # We're on a posix platform. Hooray! :)
50306     path="$MSVC_DLL"
50307     has_space=`$ECHO "$path" | $GREP " "`
50308     if test "x$has_space" != x; then
50309       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50310 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50311       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50312     fi
50313 
50314     # Use eval to expand a potential ~
50315     eval path="$path"
50316     if test ! -f "$path" && test ! -d "$path"; then
50317       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50318     fi
50319 
50320     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50321   fi
50322 
50323       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50324 $as_echo_n "checking for $DLL_NAME... " >&6; }
50325       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50326 $as_echo "$MSVC_DLL" >&6; }
50327     else
50328       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50329 $as_echo "incorrect, ignoring" >&6; }
50330       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50331 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50332     fi
50333   fi
50334 
50335       if test "x$MSVC_DLL" = x; then
50336         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
50337       fi
50338       MSVCP_DLL="$MSVC_DLL"
50339     else
50340 
50341   DLL_NAME="${MSVCP_NAME}"
50342   MSVC_DLL=
50343 
50344   if test "x$MSVC_DLL" = x; then
50345     if test "x$VCINSTALLDIR" != x; then
50346       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50347 
50348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50349 
50350   # Input might be given as Windows format, start by converting to
50351   # unix format.
50352   path="$CYGWIN_VC_INSTALL_DIR"
50353   new_path=`$CYGPATH -u "$path"`
50354 
50355   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50356   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50357   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50358   # "foo.exe" is OK but "foo" is an error.
50359   #
50360   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50361   # It is also a way to make sure we got the proper file name for the real test later on.
50362   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50363   if test "x$test_shortpath" = x; then
50364     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&5
50365 $as_echo "$as_me: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&6;}
50366     as_fn_error $? "Cannot locate the the path of CYGWIN_VC_INSTALL_DIR" "$LINENO" 5
50367   fi
50368 
50369   # Call helper function which possibly converts this using DOS-style short mode.
50370   # If so, the updated path is stored in $new_path.
50371 
50372   input_path="$new_path"
50373   # Check if we need to convert this using DOS-style short mode. If the path
50374   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50375   # take no chances and rewrite it.
50376   # Note: m4 eats our [], so we need to use [ and ] instead.
50377   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50378   if test "x$has_forbidden_chars" != x; then
50379     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50380     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50381     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50382     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50383       # Going to short mode and back again did indeed matter. Since short mode is
50384       # case insensitive, let's make it lowercase to improve readability.
50385       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50386       # Now convert it back to Unix-style (cygpath)
50387       input_path=`$CYGPATH -u "$shortmode_path"`
50388       new_path="$input_path"
50389     fi
50390   fi
50391 
50392   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50393   if test "x$test_cygdrive_prefix" = x; then
50394     # As a simple fix, exclude /usr/bin since it's not a real path.
50395     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50396       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50397       # a path prefixed by /cygdrive for fixpath to work.
50398       new_path="$CYGWIN_ROOT_PATH$input_path"
50399     fi
50400   fi
50401 
50402 
50403   if test "x$path" != "x$new_path"; then
50404     CYGWIN_VC_INSTALL_DIR="$new_path"
50405     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&5
50406 $as_echo "$as_me: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&6;}
50407   fi
50408 
50409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50410 
50411   path="$CYGWIN_VC_INSTALL_DIR"
50412   has_colon=`$ECHO $path | $GREP ^.:`
50413   new_path="$path"
50414   if test "x$has_colon" = x; then
50415     # Not in mixed or Windows style, start by that.
50416     new_path=`cmd //c echo $path`
50417   fi
50418 
50419 
50420   input_path="$new_path"
50421   # Check if we need to convert this using DOS-style short mode. If the path
50422   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50423   # take no chances and rewrite it.
50424   # Note: m4 eats our [], so we need to use [ and ] instead.
50425   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50426   if test "x$has_forbidden_chars" != x; then
50427     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50428     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50429   fi
50430 
50431 
50432   windows_path="$new_path"
50433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50434     unix_path=`$CYGPATH -u "$windows_path"`
50435     new_path="$unix_path"
50436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50437     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50438     new_path="$unix_path"
50439   fi
50440 
50441   if test "x$path" != "x$new_path"; then
50442     CYGWIN_VC_INSTALL_DIR="$new_path"
50443     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&5
50444 $as_echo "$as_me: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&6;}
50445   fi
50446 
50447   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50448   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50449 
50450   else
50451     # We're on a posix platform. Hooray! :)
50452     path="$CYGWIN_VC_INSTALL_DIR"
50453     has_space=`$ECHO "$path" | $GREP " "`
50454     if test "x$has_space" != x; then
50455       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&5
50456 $as_echo "$as_me: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&6;}
50457       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50458     fi
50459 
50460     # Use eval to expand a potential ~
50461     eval path="$path"
50462     if test ! -f "$path" && test ! -d "$path"; then
50463       as_fn_error $? "The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is not found." "$LINENO" 5
50464     fi
50465 
50466     CYGWIN_VC_INSTALL_DIR="`cd "$path"; $THEPWDCMD -L`"
50467   fi
50468 
50469       if test "$VS_VERSION" -lt 2017; then
50470         # Probe: Using well-known location from Visual Studio 12.0 and older
50471         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50472           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50473         else
50474           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50475         fi
50476       else
50477         # Probe: Using well-known location from VS 2017
50478         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50479           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
50480         else
50481           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
50482         fi
50483       fi
50484       # In case any of the above finds more than one file, loop over them.
50485       for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
50486         $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
50487 
50488   DLL_NAME="$DLL_NAME"
50489   POSSIBLE_MSVC_DLL="$possible_msvc_dll"
50490   METHOD="well-known location in VCINSTALLDIR"
50491   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50492     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50493 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50494 
50495     # Need to check if the found msvcr is correct architecture
50496     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50497 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50498     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50499     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50500       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50501       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50502       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50503         CORRECT_MSVCR_ARCH="PE32 executable"
50504       else
50505         CORRECT_MSVCR_ARCH="PE32+ executable"
50506       fi
50507     else
50508       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50509         CORRECT_MSVCR_ARCH=386
50510       else
50511         CORRECT_MSVCR_ARCH=x86-64
50512       fi
50513     fi
50514     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50515       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50516 $as_echo "ok" >&6; }
50517       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50518 
50519   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50520 
50521   # Input might be given as Windows format, start by converting to
50522   # unix format.
50523   path="$MSVC_DLL"
50524   new_path=`$CYGPATH -u "$path"`
50525 
50526   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50527   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50528   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50529   # "foo.exe" is OK but "foo" is an error.
50530   #
50531   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50532   # It is also a way to make sure we got the proper file name for the real test later on.
50533   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50534   if test "x$test_shortpath" = x; then
50535     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50536 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50537     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50538   fi
50539 
50540   # Call helper function which possibly converts this using DOS-style short mode.
50541   # If so, the updated path is stored in $new_path.
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     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50552     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50553     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50554       # Going to short mode and back again did indeed matter. Since short mode is
50555       # case insensitive, let's make it lowercase to improve readability.
50556       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50557       # Now convert it back to Unix-style (cygpath)
50558       input_path=`$CYGPATH -u "$shortmode_path"`
50559       new_path="$input_path"
50560     fi
50561   fi
50562 
50563   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50564   if test "x$test_cygdrive_prefix" = x; then
50565     # As a simple fix, exclude /usr/bin since it's not a real path.
50566     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50567       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50568       # a path prefixed by /cygdrive for fixpath to work.
50569       new_path="$CYGWIN_ROOT_PATH$input_path"
50570     fi
50571   fi
50572 
50573 
50574   if test "x$path" != "x$new_path"; then
50575     MSVC_DLL="$new_path"
50576     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50577 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50578   fi
50579 
50580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50581 
50582   path="$MSVC_DLL"
50583   has_colon=`$ECHO $path | $GREP ^.:`
50584   new_path="$path"
50585   if test "x$has_colon" = x; then
50586     # Not in mixed or Windows style, start by that.
50587     new_path=`cmd //c echo $path`
50588   fi
50589 
50590 
50591   input_path="$new_path"
50592   # Check if we need to convert this using DOS-style short mode. If the path
50593   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50594   # take no chances and rewrite it.
50595   # Note: m4 eats our [], so we need to use [ and ] instead.
50596   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50597   if test "x$has_forbidden_chars" != x; then
50598     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50599     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50600   fi
50601 
50602 
50603   windows_path="$new_path"
50604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50605     unix_path=`$CYGPATH -u "$windows_path"`
50606     new_path="$unix_path"
50607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50608     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50609     new_path="$unix_path"
50610   fi
50611 
50612   if test "x$path" != "x$new_path"; then
50613     MSVC_DLL="$new_path"
50614     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50615 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50616   fi
50617 
50618   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50619   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50620 
50621   else
50622     # We're on a posix platform. Hooray! :)
50623     path="$MSVC_DLL"
50624     has_space=`$ECHO "$path" | $GREP " "`
50625     if test "x$has_space" != x; then
50626       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50627 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50628       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50629     fi
50630 
50631     # Use eval to expand a potential ~
50632     eval path="$path"
50633     if test ! -f "$path" && test ! -d "$path"; then
50634       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50635     fi
50636 
50637     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50638   fi
50639 
50640       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50641 $as_echo_n "checking for $DLL_NAME... " >&6; }
50642       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50643 $as_echo "$MSVC_DLL" >&6; }
50644     else
50645       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50646 $as_echo "incorrect, ignoring" >&6; }
50647       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50648 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50649     fi
50650   fi
50651 
50652       done
50653     fi
50654   fi
50655 
50656   if test "x$MSVC_DLL" = x; then
50657     # Probe: Check in the Boot JDK directory.
50658     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50659 
50660   DLL_NAME="$DLL_NAME"
50661   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50662   METHOD="well-known location in Boot JDK"
50663   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50664     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50665 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50666 
50667     # Need to check if the found msvcr is correct architecture
50668     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50669 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50670     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50671     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50672       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50673       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50674       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50675         CORRECT_MSVCR_ARCH="PE32 executable"
50676       else
50677         CORRECT_MSVCR_ARCH="PE32+ executable"
50678       fi
50679     else
50680       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50681         CORRECT_MSVCR_ARCH=386
50682       else
50683         CORRECT_MSVCR_ARCH=x86-64
50684       fi
50685     fi
50686     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50687       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50688 $as_echo "ok" >&6; }
50689       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50690 
50691   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50692 
50693   # Input might be given as Windows format, start by converting to
50694   # unix format.
50695   path="$MSVC_DLL"
50696   new_path=`$CYGPATH -u "$path"`
50697 
50698   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50699   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50700   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50701   # "foo.exe" is OK but "foo" is an error.
50702   #
50703   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50704   # It is also a way to make sure we got the proper file name for the real test later on.
50705   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50706   if test "x$test_shortpath" = x; then
50707     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50708 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50709     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50710   fi
50711 
50712   # Call helper function which possibly converts this using DOS-style short mode.
50713   # If so, the updated path is stored in $new_path.
50714 
50715   input_path="$new_path"
50716   # Check if we need to convert this using DOS-style short mode. If the path
50717   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50718   # take no chances and rewrite it.
50719   # Note: m4 eats our [], so we need to use [ and ] instead.
50720   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50721   if test "x$has_forbidden_chars" != x; then
50722     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50723     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50724     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50725     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50726       # Going to short mode and back again did indeed matter. Since short mode is
50727       # case insensitive, let's make it lowercase to improve readability.
50728       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50729       # Now convert it back to Unix-style (cygpath)
50730       input_path=`$CYGPATH -u "$shortmode_path"`
50731       new_path="$input_path"
50732     fi
50733   fi
50734 
50735   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50736   if test "x$test_cygdrive_prefix" = x; then
50737     # As a simple fix, exclude /usr/bin since it's not a real path.
50738     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50739       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50740       # a path prefixed by /cygdrive for fixpath to work.
50741       new_path="$CYGWIN_ROOT_PATH$input_path"
50742     fi
50743   fi
50744 
50745 
50746   if test "x$path" != "x$new_path"; then
50747     MSVC_DLL="$new_path"
50748     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50749 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50750   fi
50751 
50752   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50753 
50754   path="$MSVC_DLL"
50755   has_colon=`$ECHO $path | $GREP ^.:`
50756   new_path="$path"
50757   if test "x$has_colon" = x; then
50758     # Not in mixed or Windows style, start by that.
50759     new_path=`cmd //c echo $path`
50760   fi
50761 
50762 
50763   input_path="$new_path"
50764   # Check if we need to convert this using DOS-style short mode. If the path
50765   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50766   # take no chances and rewrite it.
50767   # Note: m4 eats our [], so we need to use [ and ] instead.
50768   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50769   if test "x$has_forbidden_chars" != x; then
50770     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50771     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50772   fi
50773 
50774 
50775   windows_path="$new_path"
50776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50777     unix_path=`$CYGPATH -u "$windows_path"`
50778     new_path="$unix_path"
50779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50781     new_path="$unix_path"
50782   fi
50783 
50784   if test "x$path" != "x$new_path"; then
50785     MSVC_DLL="$new_path"
50786     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50787 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50788   fi
50789 
50790   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50791   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50792 
50793   else
50794     # We're on a posix platform. Hooray! :)
50795     path="$MSVC_DLL"
50796     has_space=`$ECHO "$path" | $GREP " "`
50797     if test "x$has_space" != x; then
50798       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50799 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50800       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50801     fi
50802 
50803     # Use eval to expand a potential ~
50804     eval path="$path"
50805     if test ! -f "$path" && test ! -d "$path"; then
50806       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50807     fi
50808 
50809     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50810   fi
50811 
50812       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50813 $as_echo_n "checking for $DLL_NAME... " >&6; }
50814       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50815 $as_echo "$MSVC_DLL" >&6; }
50816     else
50817       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50818 $as_echo "incorrect, ignoring" >&6; }
50819       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50820 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50821     fi
50822   fi
50823 
50824   fi
50825 
50826   if test "x$MSVC_DLL" = x; then
50827     # Probe: Look in the Windows system32 directory
50828     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50829 
50830   windows_path="$CYGWIN_SYSTEMROOT"
50831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50832     unix_path=`$CYGPATH -u "$windows_path"`
50833     CYGWIN_SYSTEMROOT="$unix_path"
50834   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50835     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50836     CYGWIN_SYSTEMROOT="$unix_path"
50837   fi
50838 
50839     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50840 
50841   DLL_NAME="$DLL_NAME"
50842   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50843   METHOD="well-known location in SYSTEMROOT"
50844   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50845     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50846 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50847 
50848     # Need to check if the found msvcr is correct architecture
50849     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50850 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50851     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50852     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50853       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50854       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50855       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50856         CORRECT_MSVCR_ARCH="PE32 executable"
50857       else
50858         CORRECT_MSVCR_ARCH="PE32+ executable"
50859       fi
50860     else
50861       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50862         CORRECT_MSVCR_ARCH=386
50863       else
50864         CORRECT_MSVCR_ARCH=x86-64
50865       fi
50866     fi
50867     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50868       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50869 $as_echo "ok" >&6; }
50870       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50871 
50872   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50873 
50874   # Input might be given as Windows format, start by converting to
50875   # unix format.
50876   path="$MSVC_DLL"
50877   new_path=`$CYGPATH -u "$path"`
50878 
50879   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50880   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50881   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50882   # "foo.exe" is OK but "foo" is an error.
50883   #
50884   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50885   # It is also a way to make sure we got the proper file name for the real test later on.
50886   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50887   if test "x$test_shortpath" = x; then
50888     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50889 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50890     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50891   fi
50892 
50893   # Call helper function which possibly converts this using DOS-style short mode.
50894   # If so, the updated path is stored in $new_path.
50895 
50896   input_path="$new_path"
50897   # Check if we need to convert this using DOS-style short mode. If the path
50898   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50899   # take no chances and rewrite it.
50900   # Note: m4 eats our [], so we need to use [ and ] instead.
50901   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50902   if test "x$has_forbidden_chars" != x; then
50903     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50904     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50905     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50906     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50907       # Going to short mode and back again did indeed matter. Since short mode is
50908       # case insensitive, let's make it lowercase to improve readability.
50909       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50910       # Now convert it back to Unix-style (cygpath)
50911       input_path=`$CYGPATH -u "$shortmode_path"`
50912       new_path="$input_path"
50913     fi
50914   fi
50915 
50916   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50917   if test "x$test_cygdrive_prefix" = x; then
50918     # As a simple fix, exclude /usr/bin since it's not a real path.
50919     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50920       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50921       # a path prefixed by /cygdrive for fixpath to work.
50922       new_path="$CYGWIN_ROOT_PATH$input_path"
50923     fi
50924   fi
50925 
50926 
50927   if test "x$path" != "x$new_path"; then
50928     MSVC_DLL="$new_path"
50929     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50930 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50931   fi
50932 
50933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50934 
50935   path="$MSVC_DLL"
50936   has_colon=`$ECHO $path | $GREP ^.:`
50937   new_path="$path"
50938   if test "x$has_colon" = x; then
50939     # Not in mixed or Windows style, start by that.
50940     new_path=`cmd //c echo $path`
50941   fi
50942 
50943 
50944   input_path="$new_path"
50945   # Check if we need to convert this using DOS-style short mode. If the path
50946   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50947   # take no chances and rewrite it.
50948   # Note: m4 eats our [], so we need to use [ and ] instead.
50949   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50950   if test "x$has_forbidden_chars" != x; then
50951     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50952     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50953   fi
50954 
50955 
50956   windows_path="$new_path"
50957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50958     unix_path=`$CYGPATH -u "$windows_path"`
50959     new_path="$unix_path"
50960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50961     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50962     new_path="$unix_path"
50963   fi
50964 
50965   if test "x$path" != "x$new_path"; then
50966     MSVC_DLL="$new_path"
50967     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50968 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50969   fi
50970 
50971   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50972   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50973 
50974   else
50975     # We're on a posix platform. Hooray! :)
50976     path="$MSVC_DLL"
50977     has_space=`$ECHO "$path" | $GREP " "`
50978     if test "x$has_space" != x; then
50979       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50980 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50981       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50982     fi
50983 
50984     # Use eval to expand a potential ~
50985     eval path="$path"
50986     if test ! -f "$path" && test ! -d "$path"; then
50987       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50988     fi
50989 
50990     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50991   fi
50992 
50993       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50994 $as_echo_n "checking for $DLL_NAME... " >&6; }
50995       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50996 $as_echo "$MSVC_DLL" >&6; }
50997     else
50998       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50999 $as_echo "incorrect, ignoring" >&6; }
51000       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51001 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51002     fi
51003   fi
51004 
51005   fi
51006 
51007   if test "x$MSVC_DLL" = x; then
51008     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
51009     if test "x$VS100COMNTOOLS" != x; then
51010       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
51011 
51012   windows_path="$CYGWIN_VS_TOOLS_DIR"
51013   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51014     unix_path=`$CYGPATH -u "$windows_path"`
51015     CYGWIN_VS_TOOLS_DIR="$unix_path"
51016   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51017     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51018     CYGWIN_VS_TOOLS_DIR="$unix_path"
51019   fi
51020 
51021       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51022         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51023             | $GREP -i /x64/ | $HEAD --lines 1`
51024       else
51025         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51026             | $GREP -i /x86/ | $HEAD --lines 1`
51027       fi
51028 
51029   DLL_NAME="$DLL_NAME"
51030   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51031   METHOD="search of VS100COMNTOOLS"
51032   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51033     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51034 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51035 
51036     # Need to check if the found msvcr is correct architecture
51037     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51038 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51039     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51040     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51041       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51042       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51043       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51044         CORRECT_MSVCR_ARCH="PE32 executable"
51045       else
51046         CORRECT_MSVCR_ARCH="PE32+ executable"
51047       fi
51048     else
51049       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51050         CORRECT_MSVCR_ARCH=386
51051       else
51052         CORRECT_MSVCR_ARCH=x86-64
51053       fi
51054     fi
51055     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51056       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51057 $as_echo "ok" >&6; }
51058       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51059 
51060   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51061 
51062   # Input might be given as Windows format, start by converting to
51063   # unix format.
51064   path="$MSVC_DLL"
51065   new_path=`$CYGPATH -u "$path"`
51066 
51067   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51068   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51069   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51070   # "foo.exe" is OK but "foo" is an error.
51071   #
51072   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51073   # It is also a way to make sure we got the proper file name for the real test later on.
51074   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51075   if test "x$test_shortpath" = x; then
51076     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51077 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51078     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51079   fi
51080 
51081   # Call helper function which possibly converts this using DOS-style short mode.
51082   # If so, the updated path is stored in $new_path.
51083 
51084   input_path="$new_path"
51085   # Check if we need to convert this using DOS-style short mode. If the path
51086   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51087   # take no chances and rewrite it.
51088   # Note: m4 eats our [], so we need to use [ and ] instead.
51089   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51090   if test "x$has_forbidden_chars" != x; then
51091     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51092     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51093     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51094     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51095       # Going to short mode and back again did indeed matter. Since short mode is
51096       # case insensitive, let's make it lowercase to improve readability.
51097       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51098       # Now convert it back to Unix-style (cygpath)
51099       input_path=`$CYGPATH -u "$shortmode_path"`
51100       new_path="$input_path"
51101     fi
51102   fi
51103 
51104   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51105   if test "x$test_cygdrive_prefix" = x; then
51106     # As a simple fix, exclude /usr/bin since it's not a real path.
51107     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51108       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51109       # a path prefixed by /cygdrive for fixpath to work.
51110       new_path="$CYGWIN_ROOT_PATH$input_path"
51111     fi
51112   fi
51113 
51114 
51115   if test "x$path" != "x$new_path"; then
51116     MSVC_DLL="$new_path"
51117     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51118 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51119   fi
51120 
51121   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51122 
51123   path="$MSVC_DLL"
51124   has_colon=`$ECHO $path | $GREP ^.:`
51125   new_path="$path"
51126   if test "x$has_colon" = x; then
51127     # Not in mixed or Windows style, start by that.
51128     new_path=`cmd //c echo $path`
51129   fi
51130 
51131 
51132   input_path="$new_path"
51133   # Check if we need to convert this using DOS-style short mode. If the path
51134   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51135   # take no chances and rewrite it.
51136   # Note: m4 eats our [], so we need to use [ and ] instead.
51137   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51138   if test "x$has_forbidden_chars" != x; then
51139     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51140     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51141   fi
51142 
51143 
51144   windows_path="$new_path"
51145   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51146     unix_path=`$CYGPATH -u "$windows_path"`
51147     new_path="$unix_path"
51148   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51149     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51150     new_path="$unix_path"
51151   fi
51152 
51153   if test "x$path" != "x$new_path"; then
51154     MSVC_DLL="$new_path"
51155     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51156 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51157   fi
51158 
51159   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51160   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51161 
51162   else
51163     # We're on a posix platform. Hooray! :)
51164     path="$MSVC_DLL"
51165     has_space=`$ECHO "$path" | $GREP " "`
51166     if test "x$has_space" != x; then
51167       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51168 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51169       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51170     fi
51171 
51172     # Use eval to expand a potential ~
51173     eval path="$path"
51174     if test ! -f "$path" && test ! -d "$path"; then
51175       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51176     fi
51177 
51178     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51179   fi
51180 
51181       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51182 $as_echo_n "checking for $DLL_NAME... " >&6; }
51183       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51184 $as_echo "$MSVC_DLL" >&6; }
51185     else
51186       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51187 $as_echo "incorrect, ignoring" >&6; }
51188       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51189 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51190     fi
51191   fi
51192 
51193     fi
51194   fi
51195 
51196   if test "x$MSVC_DLL" = x; then
51197     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51198     # (This was the original behaviour; kept since it might turn something up)
51199     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51200       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51201         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51202           | $GREP x64 | $HEAD --lines 1`
51203       else
51204         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51205           | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51206         if test "x$POSSIBLE_MSVC_DLL" = x; then
51207           # We're grasping at straws now...
51208           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51209               | $HEAD --lines 1`
51210         fi
51211       fi
51212 
51213 
51214   DLL_NAME="$DLL_NAME"
51215   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51216   METHOD="search of VCINSTALLDIR"
51217   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51218     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51219 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51220 
51221     # Need to check if the found msvcr is correct architecture
51222     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51223 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51224     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51225     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51226       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51227       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51228       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51229         CORRECT_MSVCR_ARCH="PE32 executable"
51230       else
51231         CORRECT_MSVCR_ARCH="PE32+ executable"
51232       fi
51233     else
51234       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51235         CORRECT_MSVCR_ARCH=386
51236       else
51237         CORRECT_MSVCR_ARCH=x86-64
51238       fi
51239     fi
51240     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51241       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51242 $as_echo "ok" >&6; }
51243       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51244 
51245   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51246 
51247   # Input might be given as Windows format, start by converting to
51248   # unix format.
51249   path="$MSVC_DLL"
51250   new_path=`$CYGPATH -u "$path"`
51251 
51252   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51253   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51254   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51255   # "foo.exe" is OK but "foo" is an error.
51256   #
51257   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51258   # It is also a way to make sure we got the proper file name for the real test later on.
51259   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51260   if test "x$test_shortpath" = x; then
51261     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51262 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51263     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51264   fi
51265 
51266   # Call helper function which possibly converts this using DOS-style short mode.
51267   # If so, the updated path is stored in $new_path.
51268 
51269   input_path="$new_path"
51270   # Check if we need to convert this using DOS-style short mode. If the path
51271   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51272   # take no chances and rewrite it.
51273   # Note: m4 eats our [], so we need to use [ and ] instead.
51274   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51275   if test "x$has_forbidden_chars" != x; then
51276     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51277     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51278     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51279     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51280       # Going to short mode and back again did indeed matter. Since short mode is
51281       # case insensitive, let's make it lowercase to improve readability.
51282       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51283       # Now convert it back to Unix-style (cygpath)
51284       input_path=`$CYGPATH -u "$shortmode_path"`
51285       new_path="$input_path"
51286     fi
51287   fi
51288 
51289   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51290   if test "x$test_cygdrive_prefix" = x; then
51291     # As a simple fix, exclude /usr/bin since it's not a real path.
51292     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51293       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51294       # a path prefixed by /cygdrive for fixpath to work.
51295       new_path="$CYGWIN_ROOT_PATH$input_path"
51296     fi
51297   fi
51298 
51299 
51300   if test "x$path" != "x$new_path"; then
51301     MSVC_DLL="$new_path"
51302     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51303 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51304   fi
51305 
51306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51307 
51308   path="$MSVC_DLL"
51309   has_colon=`$ECHO $path | $GREP ^.:`
51310   new_path="$path"
51311   if test "x$has_colon" = x; then
51312     # Not in mixed or Windows style, start by that.
51313     new_path=`cmd //c echo $path`
51314   fi
51315 
51316 
51317   input_path="$new_path"
51318   # Check if we need to convert this using DOS-style short mode. If the path
51319   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51320   # take no chances and rewrite it.
51321   # Note: m4 eats our [], so we need to use [ and ] instead.
51322   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51323   if test "x$has_forbidden_chars" != x; then
51324     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51325     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51326   fi
51327 
51328 
51329   windows_path="$new_path"
51330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51331     unix_path=`$CYGPATH -u "$windows_path"`
51332     new_path="$unix_path"
51333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51334     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51335     new_path="$unix_path"
51336   fi
51337 
51338   if test "x$path" != "x$new_path"; then
51339     MSVC_DLL="$new_path"
51340     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51341 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51342   fi
51343 
51344   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51345   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51346 
51347   else
51348     # We're on a posix platform. Hooray! :)
51349     path="$MSVC_DLL"
51350     has_space=`$ECHO "$path" | $GREP " "`
51351     if test "x$has_space" != x; then
51352       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51353 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51354       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51355     fi
51356 
51357     # Use eval to expand a potential ~
51358     eval path="$path"
51359     if test ! -f "$path" && test ! -d "$path"; then
51360       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51361     fi
51362 
51363     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51364   fi
51365 
51366       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51367 $as_echo_n "checking for $DLL_NAME... " >&6; }
51368       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51369 $as_echo "$MSVC_DLL" >&6; }
51370     else
51371       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51372 $as_echo "incorrect, ignoring" >&6; }
51373       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51374 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51375     fi
51376   fi
51377 
51378     fi
51379   fi
51380 
51381   if test "x$MSVC_DLL" = x; then
51382     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51383 $as_echo_n "checking for $DLL_NAME... " >&6; }
51384     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51385 $as_echo "no" >&6; }
51386     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51387   fi
51388 
51389       MSVCP_DLL="$MSVC_DLL"
51390     fi
51391 
51392   fi
51393 
51394 
51395 # Check whether --with-ucrt-dll-dir was given.
51396 if test "${with_ucrt_dll_dir+set}" = set; then :
51397   withval=$with_ucrt_dll_dir;
51398 fi
51399 
51400 
51401   if test "x$USE_UCRT" = "xtrue"; then
51402     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCRT DLL dir" >&5
51403 $as_echo_n "checking for UCRT DLL dir... " >&6; }
51404     if test "x$with_ucrt_dll_dir" != x; then
51405       if test -z "$(ls -d "$with_ucrt_dll_dir/*.dll" 2> /dev/null)"; then
51406         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51407 $as_echo "no" >&6; }
51408         as_fn_error $? "Could not find any dlls in $with_ucrt_dll_dir" "$LINENO" 5
51409       else
51410         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ucrt_dll_dir" >&5
51411 $as_echo "$with_ucrt_dll_dir" >&6; }
51412         UCRT_DLL_DIR="$with_ucrt_dll_dir"
51413 
51414   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51415 
51416   # Input might be given as Windows format, start by converting to
51417   # unix format.
51418   path="$UCRT_DLL_DIR"
51419   new_path=`$CYGPATH -u "$path"`
51420 
51421   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51422   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51423   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51424   # "foo.exe" is OK but "foo" is an error.
51425   #
51426   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51427   # It is also a way to make sure we got the proper file name for the real test later on.
51428   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51429   if test "x$test_shortpath" = x; then
51430     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of UCRT_DLL_DIR, which resolves as \"$path\", is invalid." >&5
51431 $as_echo "$as_me: The path of UCRT_DLL_DIR, which resolves as \"$path\", is invalid." >&6;}
51432     as_fn_error $? "Cannot locate the the path of UCRT_DLL_DIR" "$LINENO" 5
51433   fi
51434 
51435   # Call helper function which possibly converts this using DOS-style short mode.
51436   # If so, the updated path is stored in $new_path.
51437 
51438   input_path="$new_path"
51439   # Check if we need to convert this using DOS-style short mode. If the path
51440   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51441   # take no chances and rewrite it.
51442   # Note: m4 eats our [], so we need to use [ and ] instead.
51443   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51444   if test "x$has_forbidden_chars" != x; then
51445     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51446     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51447     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51448     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51449       # Going to short mode and back again did indeed matter. Since short mode is
51450       # case insensitive, let's make it lowercase to improve readability.
51451       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51452       # Now convert it back to Unix-style (cygpath)
51453       input_path=`$CYGPATH -u "$shortmode_path"`
51454       new_path="$input_path"
51455     fi
51456   fi
51457 
51458   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51459   if test "x$test_cygdrive_prefix" = x; then
51460     # As a simple fix, exclude /usr/bin since it's not a real path.
51461     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51462       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51463       # a path prefixed by /cygdrive for fixpath to work.
51464       new_path="$CYGWIN_ROOT_PATH$input_path"
51465     fi
51466   fi
51467 
51468 
51469   if test "x$path" != "x$new_path"; then
51470     UCRT_DLL_DIR="$new_path"
51471     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting UCRT_DLL_DIR to \"$new_path\"" >&5
51472 $as_echo "$as_me: Rewriting UCRT_DLL_DIR to \"$new_path\"" >&6;}
51473   fi
51474 
51475   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51476 
51477   path="$UCRT_DLL_DIR"
51478   has_colon=`$ECHO $path | $GREP ^.:`
51479   new_path="$path"
51480   if test "x$has_colon" = x; then
51481     # Not in mixed or Windows style, start by that.
51482     new_path=`cmd //c echo $path`
51483   fi
51484 
51485 
51486   input_path="$new_path"
51487   # Check if we need to convert this using DOS-style short mode. If the path
51488   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51489   # take no chances and rewrite it.
51490   # Note: m4 eats our [], so we need to use [ and ] instead.
51491   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51492   if test "x$has_forbidden_chars" != x; then
51493     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51494     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51495   fi
51496 
51497 
51498   windows_path="$new_path"
51499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51500     unix_path=`$CYGPATH -u "$windows_path"`
51501     new_path="$unix_path"
51502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51503     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51504     new_path="$unix_path"
51505   fi
51506 
51507   if test "x$path" != "x$new_path"; then
51508     UCRT_DLL_DIR="$new_path"
51509     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting UCRT_DLL_DIR to \"$new_path\"" >&5
51510 $as_echo "$as_me: Rewriting UCRT_DLL_DIR to \"$new_path\"" >&6;}
51511   fi
51512 
51513   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51514   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51515 
51516   else
51517     # We're on a posix platform. Hooray! :)
51518     path="$UCRT_DLL_DIR"
51519     has_space=`$ECHO "$path" | $GREP " "`
51520     if test "x$has_space" != x; then
51521       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of UCRT_DLL_DIR, which resolves as \"$path\", is invalid." >&5
51522 $as_echo "$as_me: The path of UCRT_DLL_DIR, which resolves as \"$path\", is invalid." >&6;}
51523       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51524     fi
51525 
51526     # Use eval to expand a potential ~
51527     eval path="$path"
51528     if test ! -f "$path" && test ! -d "$path"; then
51529       as_fn_error $? "The path of UCRT_DLL_DIR, which resolves as \"$path\", is not found." "$LINENO" 5
51530     fi
51531 
51532     UCRT_DLL_DIR="`cd "$path"; $THEPWDCMD -L`"
51533   fi
51534 
51535       fi
51536     elif test "x$DEVKIT_UCRT_DLL_DIR" != "x"; then
51537       UCRT_DLL_DIR="$DEVKIT_UCRT_DLL_DIR"
51538       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UCRT_DLL_DIR" >&5
51539 $as_echo "$UCRT_DLL_DIR" >&6; }
51540     else
51541       CYGWIN_WINDOWSSDKDIR="${WINDOWSSDKDIR}"
51542 
51543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51544 
51545   # Input might be given as Windows format, start by converting to
51546   # unix format.
51547   path="$CYGWIN_WINDOWSSDKDIR"
51548   new_path=`$CYGPATH -u "$path"`
51549 
51550   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51551   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51552   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51553   # "foo.exe" is OK but "foo" is an error.
51554   #
51555   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51556   # It is also a way to make sure we got the proper file name for the real test later on.
51557   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51558   if test "x$test_shortpath" = x; then
51559     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_WINDOWSSDKDIR, which resolves as \"$path\", is invalid." >&5
51560 $as_echo "$as_me: The path of CYGWIN_WINDOWSSDKDIR, which resolves as \"$path\", is invalid." >&6;}
51561     as_fn_error $? "Cannot locate the the path of CYGWIN_WINDOWSSDKDIR" "$LINENO" 5
51562   fi
51563 
51564   # Call helper function which possibly converts this using DOS-style short mode.
51565   # If so, the updated path is stored in $new_path.
51566 
51567   input_path="$new_path"
51568   # Check if we need to convert this using DOS-style short mode. If the path
51569   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51570   # take no chances and rewrite it.
51571   # Note: m4 eats our [], so we need to use [ and ] instead.
51572   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51573   if test "x$has_forbidden_chars" != x; then
51574     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51575     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51576     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51577     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51578       # Going to short mode and back again did indeed matter. Since short mode is
51579       # case insensitive, let's make it lowercase to improve readability.
51580       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51581       # Now convert it back to Unix-style (cygpath)
51582       input_path=`$CYGPATH -u "$shortmode_path"`
51583       new_path="$input_path"
51584     fi
51585   fi
51586 
51587   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51588   if test "x$test_cygdrive_prefix" = x; then
51589     # As a simple fix, exclude /usr/bin since it's not a real path.
51590     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51591       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51592       # a path prefixed by /cygdrive for fixpath to work.
51593       new_path="$CYGWIN_ROOT_PATH$input_path"
51594     fi
51595   fi
51596 
51597 
51598   if test "x$path" != "x$new_path"; then
51599     CYGWIN_WINDOWSSDKDIR="$new_path"
51600     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_WINDOWSSDKDIR to \"$new_path\"" >&5
51601 $as_echo "$as_me: Rewriting CYGWIN_WINDOWSSDKDIR to \"$new_path\"" >&6;}
51602   fi
51603 
51604   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51605 
51606   path="$CYGWIN_WINDOWSSDKDIR"
51607   has_colon=`$ECHO $path | $GREP ^.:`
51608   new_path="$path"
51609   if test "x$has_colon" = x; then
51610     # Not in mixed or Windows style, start by that.
51611     new_path=`cmd //c echo $path`
51612   fi
51613 
51614 
51615   input_path="$new_path"
51616   # Check if we need to convert this using DOS-style short mode. If the path
51617   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51618   # take no chances and rewrite it.
51619   # Note: m4 eats our [], so we need to use [ and ] instead.
51620   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51621   if test "x$has_forbidden_chars" != x; then
51622     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51623     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51624   fi
51625 
51626 
51627   windows_path="$new_path"
51628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51629     unix_path=`$CYGPATH -u "$windows_path"`
51630     new_path="$unix_path"
51631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51632     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51633     new_path="$unix_path"
51634   fi
51635 
51636   if test "x$path" != "x$new_path"; then
51637     CYGWIN_WINDOWSSDKDIR="$new_path"
51638     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_WINDOWSSDKDIR to \"$new_path\"" >&5
51639 $as_echo "$as_me: Rewriting CYGWIN_WINDOWSSDKDIR to \"$new_path\"" >&6;}
51640   fi
51641 
51642   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51643   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51644 
51645   else
51646     # We're on a posix platform. Hooray! :)
51647     path="$CYGWIN_WINDOWSSDKDIR"
51648     has_space=`$ECHO "$path" | $GREP " "`
51649     if test "x$has_space" != x; then
51650       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_WINDOWSSDKDIR, which resolves as \"$path\", is invalid." >&5
51651 $as_echo "$as_me: The path of CYGWIN_WINDOWSSDKDIR, which resolves as \"$path\", is invalid." >&6;}
51652       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51653     fi
51654 
51655     # Use eval to expand a potential ~
51656     eval path="$path"
51657     if test ! -f "$path" && test ! -d "$path"; then
51658       as_fn_error $? "The path of CYGWIN_WINDOWSSDKDIR, which resolves as \"$path\", is not found." "$LINENO" 5
51659     fi
51660 
51661     CYGWIN_WINDOWSSDKDIR="`cd "$path"; $THEPWDCMD -L`"
51662   fi
51663 
51664       dll_subdir=$OPENJDK_TARGET_CPU
51665       if test "x$dll_subdir" = "xx86_64"; then
51666         dll_subdir="x64"
51667       fi
51668       UCRT_DLL_DIR="$CYGWIN_WINDOWSSDKDIR/Redist/ucrt/DLLs/$dll_subdir"
51669       if test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then
51670         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51671 $as_echo "no" >&6; }
51672         as_fn_error $? "Could not find any dlls in $UCRT_DLL_DIR" "$LINENO" 5
51673       else
51674         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UCRT_DLL_DIR" >&5
51675 $as_echo "$UCRT_DLL_DIR" >&6; }
51676       fi
51677     fi
51678   else
51679     UCRT_DLL_DIR=
51680   fi
51681 
51682 
51683 
51684 
51685 # Check whether --with-dxsdk was given.
51686 if test "${with_dxsdk+set}" = set; then :
51687   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
51688 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
51689 fi
51690 
51691 
51692 
51693 
51694 # Check whether --with-dxsdk-lib was given.
51695 if test "${with_dxsdk_lib+set}" = set; then :
51696   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
51697 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
51698 fi
51699 
51700 
51701 
51702 
51703 # Check whether --with-dxsdk-include was given.
51704 if test "${with_dxsdk_include+set}" = set; then :
51705   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
51706 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
51707 fi
51708 
51709 
51710   fi
51711 
51712 
51713 ###############################################################################
51714 #
51715 # We need to do some final tweaking, when everything else is done.
51716 #
51717 ###############################################################################
51718 
51719 
51720   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
51721 
51722 
51723   # The name of the Service Agent jar.
51724   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
51725   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
51726     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
51727   fi
51728 
51729 
51730 
51731     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
51732 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
51733 
51734     if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
51735       ENABLE_INTREE_EC=yes
51736       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51737 $as_echo "yes" >&6; }
51738     else
51739       ENABLE_INTREE_EC=no
51740       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51741 $as_echo "no" >&6; }
51742     fi
51743 
51744 
51745 
51746 
51747 ###############################################################################
51748 #
51749 # Configure parts of the build that only affect the build performance,
51750 # not the result.
51751 #
51752 ###############################################################################
51753 
51754 
51755   # How many cores do we have on this build system?
51756 
51757 # Check whether --with-num-cores was given.
51758 if test "${with_num_cores+set}" = set; then :
51759   withval=$with_num_cores;
51760 fi
51761 
51762   if test "x$with_num_cores" = x; then
51763     # The number of cores were not specified, try to probe them.
51764 
51765   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
51766 $as_echo_n "checking for number of cores... " >&6; }
51767   NUM_CORES=1
51768   FOUND_CORES=no
51769 
51770   if test -f /proc/cpuinfo; then
51771     # Looks like a Linux (or cygwin) system
51772     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
51773     FOUND_CORES=yes
51774   elif test -x /usr/sbin/psrinfo; then
51775     # Looks like a Solaris system
51776     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
51777     FOUND_CORES=yes
51778   elif test -x /usr/sbin/system_profiler; then
51779     # Looks like a MacOSX system
51780     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
51781     FOUND_CORES=yes
51782   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
51783     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
51784     FOUND_CORES=yes
51785   elif test -n "$NUMBER_OF_PROCESSORS"; then
51786     # On windows, look in the env
51787     NUM_CORES=$NUMBER_OF_PROCESSORS
51788     FOUND_CORES=yes
51789   fi
51790 
51791   if test "x$FOUND_CORES" = xyes; then
51792     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
51793 $as_echo "$NUM_CORES" >&6; }
51794   else
51795     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
51796 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
51797     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
51798 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
51799   fi
51800 
51801   else
51802     NUM_CORES=$with_num_cores
51803   fi
51804 
51805 
51806 
51807   # How much memory do we have on this build system?
51808 
51809 # Check whether --with-memory-size was given.
51810 if test "${with_memory_size+set}" = set; then :
51811   withval=$with_memory_size;
51812 fi
51813 
51814   if test "x$with_memory_size" = x; then
51815     # The memory size was not specified, try to probe it.
51816 
51817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
51818 $as_echo_n "checking for memory size... " >&6; }
51819   # Default to 1024 MB
51820   MEMORY_SIZE=1024
51821   FOUND_MEM=no
51822 
51823   if test -f /proc/meminfo; then
51824     # Looks like a Linux (or cygwin) system
51825     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
51826     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
51827     FOUND_MEM=yes
51828   elif test -x /usr/sbin/prtconf; then
51829     # Looks like a Solaris or AIX system
51830     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
51831     FOUND_MEM=yes
51832   elif test -x /usr/sbin/system_profiler; then
51833     # Looks like a MacOSX system
51834     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
51835     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
51836     FOUND_MEM=yes
51837   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51838     # Windows, but without cygwin
51839     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
51840     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
51841     FOUND_MEM=yes
51842   fi
51843 
51844   if test "x$FOUND_MEM" = xyes; then
51845     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
51846 $as_echo "$MEMORY_SIZE MB" >&6; }
51847   else
51848     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
51849 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
51850     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
51851 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
51852   fi
51853 
51854   else
51855     MEMORY_SIZE=$with_memory_size
51856   fi
51857 
51858 
51859 
51860   # Provide a decent default number of parallel jobs for make depending on
51861   # number of cores, amount of memory and machine architecture.
51862 
51863 # Check whether --with-jobs was given.
51864 if test "${with_jobs+set}" = set; then :
51865   withval=$with_jobs;
51866 fi
51867 
51868   if test "x$with_jobs" = x; then
51869     # Number of jobs was not specified, calculate.
51870     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
51871 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
51872     # Approximate memory in GB, rounding up a bit.
51873     memory_gb=`expr $MEMORY_SIZE / 1100`
51874     # Pick the lowest of memory in gb and number of cores.
51875     if test "$memory_gb" -lt "$NUM_CORES"; then
51876       JOBS="$memory_gb"
51877     else
51878       JOBS="$NUM_CORES"
51879       # On bigger machines, leave some room for other processes to run
51880       if test "$JOBS" -gt "4"; then
51881         JOBS=`expr $JOBS '*' 90 / 100`
51882       fi
51883     fi
51884     # Cap number of jobs to 16
51885     if test "$JOBS" -gt "16"; then
51886       JOBS=16
51887     fi
51888     if test "$JOBS" -eq "0"; then
51889       JOBS=1
51890     fi
51891     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
51892 $as_echo "$JOBS" >&6; }
51893   else
51894     JOBS=$with_jobs
51895   fi
51896 
51897 
51898 
51899 # Setup smart javac (after cores and memory have been setup)
51900 
51901 
51902 # Check whether --with-sjavac-server-java was given.
51903 if test "${with_sjavac_server_java+set}" = set; then :
51904   withval=$with_sjavac_server_java;
51905 fi
51906 
51907 
51908   if test "x$with_sjavac_server_java" != x; then
51909     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
51910     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
51911     if test "x$FOUND_VERSION" = x; then
51912       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
51913     fi
51914   else
51915     SJAVAC_SERVER_JAVA=""
51916     # Hotspot specific options.
51917 
51918   $ECHO "Check if jvm arg is ok: -verbosegc" >&5
51919   $ECHO "Command: $JAVA -verbosegc -version" >&5
51920   OUTPUT=`$JAVA -verbosegc -version 2>&1`
51921   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51922   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51923   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51924     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
51925     JVM_ARG_OK=true
51926   else
51927     $ECHO "Arg failed:" >&5
51928     $ECHO "$OUTPUT" >&5
51929     JVM_ARG_OK=false
51930   fi
51931 
51932     # JRockit specific options.
51933 
51934   $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
51935   $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
51936   OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
51937   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51938   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51939   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51940     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
51941     JVM_ARG_OK=true
51942   else
51943     $ECHO "Arg failed:" >&5
51944     $ECHO "$OUTPUT" >&5
51945     JVM_ARG_OK=false
51946   fi
51947 
51948     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
51949   fi
51950 
51951 
51952   if test "$MEMORY_SIZE" -gt "2500"; then
51953 
51954   $ECHO "Check if jvm arg is ok: -d64" >&5
51955   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
51956   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
51957   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51958   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51959   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51960     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
51961     JVM_ARG_OK=true
51962   else
51963     $ECHO "Arg failed:" >&5
51964     $ECHO "$OUTPUT" >&5
51965     JVM_ARG_OK=false
51966   fi
51967 
51968     if test "$JVM_ARG_OK" = true; then
51969       JVM_64BIT=true
51970       JVM_ARG_OK=false
51971     fi
51972   fi
51973 
51974   if test "$JVM_64BIT" = true; then
51975     if test "$MEMORY_SIZE" -gt "17000"; then
51976 
51977   $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
51978   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
51979   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
51980   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51981   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51982   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51983     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
51984     JVM_ARG_OK=true
51985   else
51986     $ECHO "Arg failed:" >&5
51987     $ECHO "$OUTPUT" >&5
51988     JVM_ARG_OK=false
51989   fi
51990 
51991     fi
51992     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
51993 
51994   $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
51995   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
51996   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
51997   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51998   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51999   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52000     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
52001     JVM_ARG_OK=true
52002   else
52003     $ECHO "Arg failed:" >&5
52004     $ECHO "$OUTPUT" >&5
52005     JVM_ARG_OK=false
52006   fi
52007 
52008     fi
52009     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
52010 
52011   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
52012   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
52013   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
52014   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52015   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52016   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52017     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
52018     JVM_ARG_OK=true
52019   else
52020     $ECHO "Arg failed:" >&5
52021     $ECHO "$OUTPUT" >&5
52022     JVM_ARG_OK=false
52023   fi
52024 
52025     fi
52026     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
52027 
52028   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
52029   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
52030   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
52031   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52032   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52033   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52034     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
52035     JVM_ARG_OK=true
52036   else
52037     $ECHO "Arg failed:" >&5
52038     $ECHO "$OUTPUT" >&5
52039     JVM_ARG_OK=false
52040   fi
52041 
52042     fi
52043   fi
52044   if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
52045 
52046   $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
52047   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
52048   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
52049   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52050   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52051   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52052     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
52053     JVM_ARG_OK=true
52054   else
52055     $ECHO "Arg failed:" >&5
52056     $ECHO "$OUTPUT" >&5
52057     JVM_ARG_OK=false
52058   fi
52059 
52060   fi
52061   if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
52062 
52063   $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
52064   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
52065   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
52066   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52067   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52068   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52069     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
52070     JVM_ARG_OK=true
52071   else
52072     $ECHO "Arg failed:" >&5
52073     $ECHO "$OUTPUT" >&5
52074     JVM_ARG_OK=false
52075   fi
52076 
52077   fi
52078   if test "$JVM_ARG_OK" = false; then
52079 
52080   $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
52081   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
52082   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
52083   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52084   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52085   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52086     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
52087     JVM_ARG_OK=true
52088   else
52089     $ECHO "Arg failed:" >&5
52090     $ECHO "$OUTPUT" >&5
52091     JVM_ARG_OK=false
52092   fi
52093 
52094   fi
52095 
52096   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
52097 $as_echo_n "checking whether to use sjavac... " >&6; }
52098   # Check whether --enable-sjavac was given.
52099 if test "${enable_sjavac+set}" = set; then :
52100   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
52101 else
52102   ENABLE_SJAVAC='no'
52103 fi
52104 
52105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
52106 $as_echo "$ENABLE_SJAVAC" >&6; }
52107 
52108 
52109   if test "x$ENABLE_SJAVAC" = xyes; then
52110     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
52111   else
52112     SJAVAC_SERVER_DIR=
52113   fi
52114 
52115 
52116 
52117 # Can the C/C++ compiler use precompiled headers?
52118 
52119 
52120   ###############################################################################
52121   #
52122   # Can the C/C++ compiler use precompiled headers?
52123   #
52124   # Check whether --enable-precompiled-headers was given.
52125 if test "${enable_precompiled_headers+set}" = set; then :
52126   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
52127 else
52128   ENABLE_PRECOMPH=yes
52129 fi
52130 
52131 
52132   USE_PRECOMPILED_HEADER=1
52133   if test "x$ENABLE_PRECOMPH" = xno; then
52134     USE_PRECOMPILED_HEADER=0
52135   fi
52136 
52137   if test "x$ENABLE_PRECOMPH" = xyes; then
52138     # Check that the compiler actually supports precomp headers.
52139     if test "x$TOOLCHAIN_TYPE" = xgcc; then
52140       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
52141 $as_echo_n "checking that precompiled headers work... " >&6; }
52142       echo "int alfa();" > conftest.h
52143       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
52144       if test ! -f conftest.hpp.gch; then
52145         USE_PRECOMPILED_HEADER=0
52146         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52147 $as_echo "no" >&6; }
52148       else
52149         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52150 $as_echo "yes" >&6; }
52151       fi
52152       rm -f conftest.h conftest.hpp.gch
52153     fi
52154   fi
52155 
52156 
52157 
52158 
52159 # Setup use of ccache, if available
52160 
52161   # Check whether --enable-ccache was given.
52162 if test "${enable_ccache+set}" = set; then :
52163   enableval=$enable_ccache;
52164 fi
52165 
52166 
52167   CCACHE=
52168   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
52169 $as_echo_n "checking is ccache enabled... " >&6; }
52170   ENABLE_CCACHE=$enable_ccache
52171   if test "x$enable_ccache" = xyes; then
52172     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52173 $as_echo "yes" >&6; }
52174     OLD_PATH="$PATH"
52175     if test "x$TOOLCHAIN_PATH" != x; then
52176       PATH=$TOOLCHAIN_PATH:$PATH
52177     fi
52178 
52179 
52180 
52181   # Publish this variable in the help.
52182 
52183 
52184   if test "x$CCACHE" = x; then
52185     # The variable is not set by user, try to locate tool using the code snippet
52186     for ac_prog in ccache
52187 do
52188   # Extract the first word of "$ac_prog", so it can be a program name with args.
52189 set dummy $ac_prog; ac_word=$2
52190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52191 $as_echo_n "checking for $ac_word... " >&6; }
52192 if ${ac_cv_path_CCACHE+:} false; then :
52193   $as_echo_n "(cached) " >&6
52194 else
52195   case $CCACHE in
52196   [\\/]* | ?:[\\/]*)
52197   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52198   ;;
52199   *)
52200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52201 for as_dir in $PATH
52202 do
52203   IFS=$as_save_IFS
52204   test -z "$as_dir" && as_dir=.
52205     for ac_exec_ext in '' $ac_executable_extensions; do
52206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52207     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52209     break 2
52210   fi
52211 done
52212   done
52213 IFS=$as_save_IFS
52214 
52215   ;;
52216 esac
52217 fi
52218 CCACHE=$ac_cv_path_CCACHE
52219 if test -n "$CCACHE"; then
52220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52221 $as_echo "$CCACHE" >&6; }
52222 else
52223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52224 $as_echo "no" >&6; }
52225 fi
52226 
52227 
52228   test -n "$CCACHE" && break
52229 done
52230 
52231   else
52232     # The variable is set, but is it from the command line or the environment?
52233 
52234     # Try to remove the string !CCACHE! from our list.
52235     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
52236     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
52237       # If it failed, the variable was not from the command line. Ignore it,
52238       # but warn the user (except for BASH, which is always set by the calling BASH).
52239       if test "xCCACHE" != xBASH; then
52240         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
52241 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
52242       fi
52243       # Try to locate tool using the code snippet
52244       for ac_prog in ccache
52245 do
52246   # Extract the first word of "$ac_prog", so it can be a program name with args.
52247 set dummy $ac_prog; ac_word=$2
52248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52249 $as_echo_n "checking for $ac_word... " >&6; }
52250 if ${ac_cv_path_CCACHE+:} false; then :
52251   $as_echo_n "(cached) " >&6
52252 else
52253   case $CCACHE in
52254   [\\/]* | ?:[\\/]*)
52255   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52256   ;;
52257   *)
52258   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52259 for as_dir in $PATH
52260 do
52261   IFS=$as_save_IFS
52262   test -z "$as_dir" && as_dir=.
52263     for ac_exec_ext in '' $ac_executable_extensions; do
52264   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52265     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52267     break 2
52268   fi
52269 done
52270   done
52271 IFS=$as_save_IFS
52272 
52273   ;;
52274 esac
52275 fi
52276 CCACHE=$ac_cv_path_CCACHE
52277 if test -n "$CCACHE"; then
52278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52279 $as_echo "$CCACHE" >&6; }
52280 else
52281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52282 $as_echo "no" >&6; }
52283 fi
52284 
52285 
52286   test -n "$CCACHE" && break
52287 done
52288 
52289     else
52290       # If it succeeded, then it was overridden by the user. We will use it
52291       # for the tool.
52292 
52293       # First remove it from the list of overridden variables, so we can test
52294       # for unknown variables in the end.
52295       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
52296 
52297       # Check if the provided tool contains a complete path.
52298       tool_specified="$CCACHE"
52299       tool_basename="${tool_specified##*/}"
52300       if test "x$tool_basename" = "x$tool_specified"; then
52301         # A command without a complete path is provided, search $PATH.
52302         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
52303 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
52304         # Extract the first word of "$tool_basename", so it can be a program name with args.
52305 set dummy $tool_basename; ac_word=$2
52306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52307 $as_echo_n "checking for $ac_word... " >&6; }
52308 if ${ac_cv_path_CCACHE+:} false; then :
52309   $as_echo_n "(cached) " >&6
52310 else
52311   case $CCACHE in
52312   [\\/]* | ?:[\\/]*)
52313   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52314   ;;
52315   *)
52316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52317 for as_dir in $PATH
52318 do
52319   IFS=$as_save_IFS
52320   test -z "$as_dir" && as_dir=.
52321     for ac_exec_ext in '' $ac_executable_extensions; do
52322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52323     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52325     break 2
52326   fi
52327 done
52328   done
52329 IFS=$as_save_IFS
52330 
52331   ;;
52332 esac
52333 fi
52334 CCACHE=$ac_cv_path_CCACHE
52335 if test -n "$CCACHE"; then
52336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52337 $as_echo "$CCACHE" >&6; }
52338 else
52339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52340 $as_echo "no" >&6; }
52341 fi
52342 
52343 
52344         if test "x$CCACHE" = x; then
52345           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
52346         fi
52347       else
52348         # Otherwise we believe it is a complete path. Use it as it is.
52349         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
52350 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
52351         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
52352 $as_echo_n "checking for CCACHE... " >&6; }
52353         if test ! -x "$tool_specified"; then
52354           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
52355 $as_echo "not found" >&6; }
52356           as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
52357         fi
52358         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
52359 $as_echo "$tool_specified" >&6; }
52360       fi
52361     fi
52362   fi
52363 
52364 
52365 
52366   if test "x$CCACHE" = x; then
52367     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
52368   fi
52369 
52370 
52371     CCACHE_STATUS="enabled"
52372     PATH="$OLD_PATH"
52373   elif test "x$enable_ccache" = xno; then
52374     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
52375 $as_echo "no, explicitly disabled" >&6; }
52376   elif test "x$enable_ccache" = x; then
52377     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52378 $as_echo "no" >&6; }
52379   else
52380     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
52381 $as_echo "unknown" >&6; }
52382     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
52383   fi
52384 
52385 
52386 
52387 # Check whether --with-ccache-dir was given.
52388 if test "${with_ccache_dir+set}" = set; then :
52389   withval=$with_ccache_dir;
52390 fi
52391 
52392 
52393   if test "x$with_ccache_dir" != x; then
52394     # When using a non home ccache directory, assume the use is to share ccache files
52395     # with other users. Thus change the umask.
52396     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
52397     if test "x$CCACHE" = x; then
52398       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
52399 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
52400     fi
52401   fi
52402 
52403   if test "x$CCACHE" != x; then
52404 
52405   if test "x$CCACHE" != x; then
52406     # Only use ccache if it is 3.1.4 or later, which supports
52407     # precompiled headers.
52408     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
52409 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
52410     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
52411     if test "x$HAS_GOOD_CCACHE" = x; then
52412       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
52413 $as_echo "no, disabling ccache" >&6; }
52414       CCACHE=
52415       CCACHE_STATUS="disabled"
52416     else
52417       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52418 $as_echo "yes" >&6; }
52419       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
52420 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
52421       PUSHED_FLAGS="$CXXFLAGS"
52422       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
52423       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52424 /* end confdefs.h.  */
52425 
52426 int
52427 main ()
52428 {
52429 
52430   ;
52431   return 0;
52432 }
52433 _ACEOF
52434 if ac_fn_cxx_try_compile "$LINENO"; then :
52435   CC_KNOWS_CCACHE_TRICK=yes
52436 else
52437   CC_KNOWS_CCACHE_TRICK=no
52438 fi
52439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52440       CXXFLAGS="$PUSHED_FLAGS"
52441       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
52442         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52443 $as_echo "yes" >&6; }
52444       else
52445         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
52446 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
52447         CCACHE=
52448         CCACHE_STATUS="disabled"
52449       fi
52450     fi
52451   fi
52452 
52453   if test "x$CCACHE" != x; then
52454     CCACHE_SLOPPINESS=time_macros
52455     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
52456     CCACHE_FLAGS=-fpch-preprocess
52457 
52458     if test "x$SET_CCACHE_DIR" != x; then
52459       mkdir -p $CCACHE_DIR > /dev/null 2>&1
52460       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
52461     fi
52462   fi
52463 
52464   fi
52465 
52466 
52467 ###############################################################################
52468 #
52469 # And now the finish...
52470 #
52471 ###############################################################################
52472 
52473 # Check for some common pitfalls
52474 
52475   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52476     file_to_test="$SRC_ROOT/LICENSE"
52477     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
52478       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
52479     fi
52480   fi
52481 
52482 
52483   # Did user specify any unknown variables?
52484 
52485   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
52486     # Replace the separating ! with spaces before presenting for end user.
52487     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
52488     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
52489 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
52490   fi
52491 
52492 
52493   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
52494 $as_echo_n "checking if build directory is on local disk... " >&6; }
52495 
52496   # df -l lists only local disks; if the given directory is not found then
52497   # a non-zero exit code is given
52498   if test "x$DF" = x; then
52499     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52500       # msys does not have df; use Windows "net use" instead.
52501       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
52502       if test "x$IS_NETWORK_DISK" = x; then
52503         OUTPUT_DIR_IS_LOCAL="yes"
52504       else
52505         OUTPUT_DIR_IS_LOCAL="no"
52506       fi
52507     else
52508       # No df here, say it's local
52509       OUTPUT_DIR_IS_LOCAL="yes"
52510     fi
52511   else
52512     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
52513       OUTPUT_DIR_IS_LOCAL="yes"
52514     else
52515       OUTPUT_DIR_IS_LOCAL="no"
52516     fi
52517   fi
52518 
52519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
52520 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
52521 
52522 
52523 
52524   # Check if the user has any old-style ALT_ variables set.
52525   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
52526 
52527   # Before generating output files, test if they exist. If they do, this is a reconfigure.
52528   # Since we can't properly handle the dependencies for this, warn the user about the situation
52529   if test -e $OUTPUT_ROOT/spec.gmk; then
52530     IS_RECONFIGURE=yes
52531   else
52532     IS_RECONFIGURE=no
52533   fi
52534 
52535 
52536 # At the end, call the custom hook. (Dummy macro if no custom sources available)
52537 
52538 
52539 # We're messing a bit with internal autoconf variables to put the config.status
52540 # in the output directory instead of the current directory.
52541 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
52542 
52543 # Create the actual output files. Now the main work of configure is done.
52544 cat >confcache <<\_ACEOF
52545 # This file is a shell script that caches the results of configure
52546 # tests run on this system so they can be shared between configure
52547 # scripts and configure runs, see configure's option --config-cache.
52548 # It is not useful on other systems.  If it contains results you don't
52549 # want to keep, you may remove or edit it.
52550 #
52551 # config.status only pays attention to the cache file if you give it
52552 # the --recheck option to rerun configure.
52553 #
52554 # `ac_cv_env_foo' variables (set or unset) will be overridden when
52555 # loading this file, other *unset* `ac_cv_foo' will be assigned the
52556 # following values.
52557 
52558 _ACEOF
52559 
52560 # The following way of writing the cache mishandles newlines in values,
52561 # but we know of no workaround that is simple, portable, and efficient.
52562 # So, we kill variables containing newlines.
52563 # Ultrix sh set writes to stderr and can't be redirected directly,
52564 # and sets the high bit in the cache file unless we assign to the vars.
52565 (
52566   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
52567     eval ac_val=\$$ac_var
52568     case $ac_val in #(
52569     *${as_nl}*)
52570       case $ac_var in #(
52571       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
52572 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
52573       esac
52574       case $ac_var in #(
52575       _ | IFS | as_nl) ;; #(
52576       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
52577       *) { eval $ac_var=; unset $ac_var;} ;;
52578       esac ;;
52579     esac
52580   done
52581 
52582   (set) 2>&1 |
52583     case $as_nl`(ac_space=' '; set) 2>&1` in #(
52584     *${as_nl}ac_space=\ *)
52585       # `set' does not quote correctly, so add quotes: double-quote
52586       # substitution turns \\\\ into \\, and sed turns \\ into \.
52587       sed -n \
52588         "s/'/'\\\\''/g;
52589           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
52590       ;; #(
52591     *)
52592       # `set' quotes correctly as required by POSIX, so do not add quotes.
52593       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
52594       ;;
52595     esac |
52596     sort
52597 ) |
52598   sed '
52599      /^ac_cv_env_/b end
52600      t clear
52601      :clear
52602      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
52603      t end
52604      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
52605      :end' >>confcache
52606 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
52607   if test -w "$cache_file"; then
52608     if test "x$cache_file" != "x/dev/null"; then
52609       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
52610 $as_echo "$as_me: updating cache $cache_file" >&6;}
52611       if test ! -f "$cache_file" || test -h "$cache_file"; then
52612         cat confcache >"$cache_file"
52613       else
52614         case $cache_file in #(
52615         */* | ?:*)
52616           mv -f confcache "$cache_file"$$ &&
52617           mv -f "$cache_file"$$ "$cache_file" ;; #(
52618         *)
52619           mv -f confcache "$cache_file" ;;
52620         esac
52621       fi
52622     fi
52623   else
52624     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
52625 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
52626   fi
52627 fi
52628 rm -f confcache
52629 
52630 test "x$prefix" = xNONE && prefix=$ac_default_prefix
52631 # Let make expand exec_prefix.
52632 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
52633 
52634 DEFS=-DHAVE_CONFIG_H
52635 
52636 ac_libobjs=
52637 ac_ltlibobjs=
52638 U=
52639 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
52640   # 1. Remove the extension, and $U if already installed.
52641   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
52642   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
52643   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
52644   #    will be set to the directory where LIBOBJS objects are built.
52645   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
52646   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
52647 done
52648 LIBOBJS=$ac_libobjs
52649 
52650 LTLIBOBJS=$ac_ltlibobjs
52651 
52652 
52653 
52654 : "${CONFIG_STATUS=./config.status}"
52655 ac_write_fail=0
52656 ac_clean_files_save=$ac_clean_files
52657 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
52658 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
52659 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
52660 as_write_fail=0
52661 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
52662 #! $SHELL
52663 # Generated by $as_me.
52664 # Run this file to recreate the current configuration.
52665 # Compiler output produced by configure, useful for debugging
52666 # configure, is in config.log if it exists.
52667 
52668 debug=false
52669 ac_cs_recheck=false
52670 ac_cs_silent=false
52671 
52672 SHELL=\${CONFIG_SHELL-$SHELL}
52673 export SHELL
52674 _ASEOF
52675 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
52676 ## -------------------- ##
52677 ## M4sh Initialization. ##
52678 ## -------------------- ##
52679 
52680 # Be more Bourne compatible
52681 DUALCASE=1; export DUALCASE # for MKS sh
52682 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
52683   emulate sh
52684   NULLCMD=:
52685   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
52686   # is contrary to our usage.  Disable this feature.
52687   alias -g '${1+"$@"}'='"$@"'
52688   setopt NO_GLOB_SUBST
52689 else
52690   case `(set -o) 2>/dev/null` in #(
52691   *posix*) :
52692     set -o posix ;; #(
52693   *) :
52694      ;;
52695 esac
52696 fi
52697 
52698 
52699 as_nl='
52700 '
52701 export as_nl
52702 # Printing a long string crashes Solaris 7 /usr/bin/printf.
52703 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
52704 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
52705 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
52706 # Prefer a ksh shell builtin over an external printf program on Solaris,
52707 # but without wasting forks for bash or zsh.
52708 if test -z "$BASH_VERSION$ZSH_VERSION" \
52709     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
52710   as_echo='print -r --'
52711   as_echo_n='print -rn --'
52712 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52713   as_echo='printf %s\n'
52714   as_echo_n='printf %s'
52715 else
52716   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52717     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52718     as_echo_n='/usr/ucb/echo -n'
52719   else
52720     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
52721     as_echo_n_body='eval
52722       arg=$1;
52723       case $arg in #(
52724       *"$as_nl"*)
52725         expr "X$arg" : "X\\(.*\\)$as_nl";
52726         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
52727       esac;
52728       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
52729     '
52730     export as_echo_n_body
52731     as_echo_n='sh -c $as_echo_n_body as_echo'
52732   fi
52733   export as_echo_body
52734   as_echo='sh -c $as_echo_body as_echo'
52735 fi
52736 
52737 # The user is always right.
52738 if test "${PATH_SEPARATOR+set}" != set; then
52739   PATH_SEPARATOR=:
52740   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
52741     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
52742       PATH_SEPARATOR=';'
52743   }
52744 fi
52745 
52746 
52747 # IFS
52748 # We need space, tab and new line, in precisely that order.  Quoting is
52749 # there to prevent editors from complaining about space-tab.
52750 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
52751 # splitting by setting IFS to empty value.)
52752 IFS=" ""        $as_nl"
52753 
52754 # Find who we are.  Look in the path if we contain no directory separator.
52755 as_myself=
52756 case $0 in #((
52757   *[\\/]* ) as_myself=$0 ;;
52758   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52759 for as_dir in $PATH
52760 do
52761   IFS=$as_save_IFS
52762   test -z "$as_dir" && as_dir=.
52763     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
52764   done
52765 IFS=$as_save_IFS
52766 
52767      ;;
52768 esac
52769 # We did not find ourselves, most probably we were run as `sh COMMAND'
52770 # in which case we are not to be found in the path.
52771 if test "x$as_myself" = x; then
52772   as_myself=$0
52773 fi
52774 if test ! -f "$as_myself"; then
52775   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
52776   exit 1
52777 fi
52778 
52779 # Unset variables that we do not need and which cause bugs (e.g. in
52780 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
52781 # suppresses any "Segmentation fault" message there.  '((' could
52782 # trigger a bug in pdksh 5.2.14.
52783 for as_var in BASH_ENV ENV MAIL MAILPATH
52784 do eval test x\${$as_var+set} = xset \
52785   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
52786 done
52787 PS1='$ '
52788 PS2='> '
52789 PS4='+ '
52790 
52791 # NLS nuisances.
52792 LC_ALL=C
52793 export LC_ALL
52794 LANGUAGE=C
52795 export LANGUAGE
52796 
52797 # CDPATH.
52798 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
52799 
52800 
52801 # as_fn_error STATUS ERROR [LINENO LOG_FD]
52802 # ----------------------------------------
52803 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
52804 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
52805 # script with STATUS, using 1 if that was 0.
52806 as_fn_error ()
52807 {
52808   as_status=$1; test $as_status -eq 0 && as_status=1
52809   if test "$4"; then
52810     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
52811     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
52812   fi
52813   $as_echo "$as_me: error: $2" >&2
52814   as_fn_exit $as_status
52815 } # as_fn_error
52816 
52817 
52818 # as_fn_set_status STATUS
52819 # -----------------------
52820 # Set $? to STATUS, without forking.
52821 as_fn_set_status ()
52822 {
52823   return $1
52824 } # as_fn_set_status
52825 
52826 # as_fn_exit STATUS
52827 # -----------------
52828 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
52829 as_fn_exit ()
52830 {
52831   set +e
52832   as_fn_set_status $1
52833   exit $1
52834 } # as_fn_exit
52835 
52836 # as_fn_unset VAR
52837 # ---------------
52838 # Portably unset VAR.
52839 as_fn_unset ()
52840 {
52841   { eval $1=; unset $1;}
52842 }
52843 as_unset=as_fn_unset
52844 # as_fn_append VAR VALUE
52845 # ----------------------
52846 # Append the text in VALUE to the end of the definition contained in VAR. Take
52847 # advantage of any shell optimizations that allow amortized linear growth over
52848 # repeated appends, instead of the typical quadratic growth present in naive
52849 # implementations.
52850 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
52851   eval 'as_fn_append ()
52852   {
52853     eval $1+=\$2
52854   }'
52855 else
52856   as_fn_append ()
52857   {
52858     eval $1=\$$1\$2
52859   }
52860 fi # as_fn_append
52861 
52862 # as_fn_arith ARG...
52863 # ------------------
52864 # Perform arithmetic evaluation on the ARGs, and store the result in the
52865 # global $as_val. Take advantage of shells that can avoid forks. The arguments
52866 # must be portable across $(()) and expr.
52867 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
52868   eval 'as_fn_arith ()
52869   {
52870     as_val=$(( $* ))
52871   }'
52872 else
52873   as_fn_arith ()
52874   {
52875     as_val=`expr "$@" || test $? -eq 1`
52876   }
52877 fi # as_fn_arith
52878 
52879 
52880 if expr a : '\(a\)' >/dev/null 2>&1 &&
52881    test "X`expr 00001 : '.*\(...\)'`" = X001; then
52882   as_expr=expr
52883 else
52884   as_expr=false
52885 fi
52886 
52887 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
52888   as_basename=basename
52889 else
52890   as_basename=false
52891 fi
52892 
52893 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
52894   as_dirname=dirname
52895 else
52896   as_dirname=false
52897 fi
52898 
52899 as_me=`$as_basename -- "$0" ||
52900 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
52901          X"$0" : 'X\(//\)$' \| \
52902          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
52903 $as_echo X/"$0" |
52904     sed '/^.*\/\([^/][^/]*\)\/*$/{
52905             s//\1/
52906             q
52907           }
52908           /^X\/\(\/\/\)$/{
52909             s//\1/
52910             q
52911           }
52912           /^X\/\(\/\).*/{
52913             s//\1/
52914             q
52915           }
52916           s/.*/./; q'`
52917 
52918 # Avoid depending upon Character Ranges.
52919 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
52920 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
52921 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
52922 as_cr_digits='0123456789'
52923 as_cr_alnum=$as_cr_Letters$as_cr_digits
52924 
52925 ECHO_C= ECHO_N= ECHO_T=
52926 case `echo -n x` in #(((((
52927 -n*)
52928   case `echo 'xy\c'` in
52929   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
52930   xy)  ECHO_C='\c';;
52931   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
52932        ECHO_T=' ';;
52933   esac;;
52934 *)
52935   ECHO_N='-n';;
52936 esac
52937 
52938 rm -f conf$$ conf$$.exe conf$$.file
52939 if test -d conf$$.dir; then
52940   rm -f conf$$.dir/conf$$.file
52941 else
52942   rm -f conf$$.dir
52943   mkdir conf$$.dir 2>/dev/null
52944 fi
52945 if (echo >conf$$.file) 2>/dev/null; then
52946   if ln -s conf$$.file conf$$ 2>/dev/null; then
52947     as_ln_s='ln -s'
52948     # ... but there are two gotchas:
52949     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
52950     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
52951     # In both cases, we have to default to `cp -pR'.
52952     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
52953       as_ln_s='cp -pR'
52954   elif ln conf$$.file conf$$ 2>/dev/null; then
52955     as_ln_s=ln
52956   else
52957     as_ln_s='cp -pR'
52958   fi
52959 else
52960   as_ln_s='cp -pR'
52961 fi
52962 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
52963 rmdir conf$$.dir 2>/dev/null
52964 
52965 
52966 # as_fn_mkdir_p
52967 # -------------
52968 # Create "$as_dir" as a directory, including parents if necessary.
52969 as_fn_mkdir_p ()
52970 {
52971 
52972   case $as_dir in #(
52973   -*) as_dir=./$as_dir;;
52974   esac
52975   test -d "$as_dir" || eval $as_mkdir_p || {
52976     as_dirs=
52977     while :; do
52978       case $as_dir in #(
52979       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
52980       *) as_qdir=$as_dir;;
52981       esac
52982       as_dirs="'$as_qdir' $as_dirs"
52983       as_dir=`$as_dirname -- "$as_dir" ||
52984 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52985          X"$as_dir" : 'X\(//\)[^/]' \| \
52986          X"$as_dir" : 'X\(//\)$' \| \
52987          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
52988 $as_echo X"$as_dir" |
52989     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52990             s//\1/
52991             q
52992           }
52993           /^X\(\/\/\)[^/].*/{
52994             s//\1/
52995             q
52996           }
52997           /^X\(\/\/\)$/{
52998             s//\1/
52999             q
53000           }
53001           /^X\(\/\).*/{
53002             s//\1/
53003             q
53004           }
53005           s/.*/./; q'`
53006       test -d "$as_dir" && break
53007     done
53008     test -z "$as_dirs" || eval "mkdir $as_dirs"
53009   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53010 
53011 
53012 } # as_fn_mkdir_p
53013 if mkdir -p . 2>/dev/null; then
53014   as_mkdir_p='mkdir -p "$as_dir"'
53015 else
53016   test -d ./-p && rmdir ./-p
53017   as_mkdir_p=false
53018 fi
53019 
53020 
53021 # as_fn_executable_p FILE
53022 # -----------------------
53023 # Test if FILE is an executable regular file.
53024 as_fn_executable_p ()
53025 {
53026   test -f "$1" && test -x "$1"
53027 } # as_fn_executable_p
53028 as_test_x='test -x'
53029 as_executable_p=as_fn_executable_p
53030 
53031 # Sed expression to map a string onto a valid CPP name.
53032 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
53033 
53034 # Sed expression to map a string onto a valid variable name.
53035 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
53036 
53037 
53038 exec 6>&1
53039 ## ----------------------------------- ##
53040 ## Main body of $CONFIG_STATUS script. ##
53041 ## ----------------------------------- ##
53042 _ASEOF
53043 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
53044 
53045 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53046 # Save the log message, to keep $0 and so on meaningful, and to
53047 # report actual input values of CONFIG_FILES etc. instead of their
53048 # values after options handling.
53049 ac_log="
53050 This file was extended by OpenJDK $as_me jdk8, which was
53051 generated by GNU Autoconf 2.69.  Invocation command line was
53052 
53053   CONFIG_FILES    = $CONFIG_FILES
53054   CONFIG_HEADERS  = $CONFIG_HEADERS
53055   CONFIG_LINKS    = $CONFIG_LINKS
53056   CONFIG_COMMANDS = $CONFIG_COMMANDS
53057   $ $0 $@
53058 
53059 on `(hostname || uname -n) 2>/dev/null | sed 1q`
53060 "
53061 
53062 _ACEOF
53063 
53064 case $ac_config_files in *"
53065 "*) set x $ac_config_files; shift; ac_config_files=$*;;
53066 esac
53067 
53068 case $ac_config_headers in *"
53069 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
53070 esac
53071 
53072 
53073 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53074 # Files that config.status was made for.
53075 config_files="$ac_config_files"
53076 config_headers="$ac_config_headers"
53077 
53078 _ACEOF
53079 
53080 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53081 ac_cs_usage="\
53082 \`$as_me' instantiates files and other configuration actions
53083 from templates according to the current configuration.  Unless the files
53084 and actions are specified as TAGs, all are instantiated by default.
53085 
53086 Usage: $0 [OPTION]... [TAG]...
53087 
53088   -h, --help       print this help, then exit
53089   -V, --version    print version number and configuration settings, then exit
53090       --config     print configuration, then exit
53091   -q, --quiet, --silent
53092                    do not print progress messages
53093   -d, --debug      don't remove temporary files
53094       --recheck    update $as_me by reconfiguring in the same conditions
53095       --file=FILE[:TEMPLATE]
53096                    instantiate the configuration file FILE
53097       --header=FILE[:TEMPLATE]
53098                    instantiate the configuration header FILE
53099 
53100 Configuration files:
53101 $config_files
53102 
53103 Configuration headers:
53104 $config_headers
53105 
53106 Report bugs to <build-dev@openjdk.java.net>.
53107 OpenJDK home page: <http://openjdk.java.net>."
53108 
53109 _ACEOF
53110 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53111 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
53112 ac_cs_version="\\
53113 OpenJDK config.status jdk8
53114 configured by $0, generated by GNU Autoconf 2.69,
53115   with options \\"\$ac_cs_config\\"
53116 
53117 Copyright (C) 2012 Free Software Foundation, Inc.
53118 This config.status script is free software; the Free Software Foundation
53119 gives unlimited permission to copy, distribute and modify it."
53120 
53121 ac_pwd='$ac_pwd'
53122 srcdir='$srcdir'
53123 AWK='$AWK'
53124 test -n "\$AWK" || AWK=awk
53125 _ACEOF
53126 
53127 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53128 # The default lists apply if the user does not specify any file.
53129 ac_need_defaults=:
53130 while test $# != 0
53131 do
53132   case $1 in
53133   --*=?*)
53134     ac_option=`expr "X$1" : 'X\([^=]*\)='`
53135     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
53136     ac_shift=:
53137     ;;
53138   --*=)
53139     ac_option=`expr "X$1" : 'X\([^=]*\)='`
53140     ac_optarg=
53141     ac_shift=:
53142     ;;
53143   *)
53144     ac_option=$1
53145     ac_optarg=$2
53146     ac_shift=shift
53147     ;;
53148   esac
53149 
53150   case $ac_option in
53151   # Handling of the options.
53152   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
53153     ac_cs_recheck=: ;;
53154   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
53155     $as_echo "$ac_cs_version"; exit ;;
53156   --config | --confi | --conf | --con | --co | --c )
53157     $as_echo "$ac_cs_config"; exit ;;
53158   --debug | --debu | --deb | --de | --d | -d )
53159     debug=: ;;
53160   --file | --fil | --fi | --f )
53161     $ac_shift
53162     case $ac_optarg in
53163     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53164     '') as_fn_error $? "missing file argument" ;;
53165     esac
53166     as_fn_append CONFIG_FILES " '$ac_optarg'"
53167     ac_need_defaults=false;;
53168   --header | --heade | --head | --hea )
53169     $ac_shift
53170     case $ac_optarg in
53171     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53172     esac
53173     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
53174     ac_need_defaults=false;;
53175   --he | --h)
53176     # Conflict between --help and --header
53177     as_fn_error $? "ambiguous option: \`$1'
53178 Try \`$0 --help' for more information.";;
53179   --help | --hel | -h )
53180     $as_echo "$ac_cs_usage"; exit ;;
53181   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
53182   | -silent | --silent | --silen | --sile | --sil | --si | --s)
53183     ac_cs_silent=: ;;
53184 
53185   # This is an error.
53186   -*) as_fn_error $? "unrecognized option: \`$1'
53187 Try \`$0 --help' for more information." ;;
53188 
53189   *) as_fn_append ac_config_targets " $1"
53190      ac_need_defaults=false ;;
53191 
53192   esac
53193   shift
53194 done
53195 
53196 ac_configure_extra_args=
53197 
53198 if $ac_cs_silent; then
53199   exec 6>/dev/null
53200   ac_configure_extra_args="$ac_configure_extra_args --silent"
53201 fi
53202 
53203 _ACEOF
53204 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53205 if \$ac_cs_recheck; then
53206   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
53207   shift
53208   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
53209   CONFIG_SHELL='$SHELL'
53210   export CONFIG_SHELL
53211   exec "\$@"
53212 fi
53213 
53214 _ACEOF
53215 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53216 exec 5>>config.log
53217 {
53218   echo
53219   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
53220 ## Running $as_me. ##
53221 _ASBOX
53222   $as_echo "$ac_log"
53223 } >&5
53224 
53225 _ACEOF
53226 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53227 _ACEOF
53228 
53229 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53230 
53231 # Handling of arguments.
53232 for ac_config_target in $ac_config_targets
53233 do
53234   case $ac_config_target in
53235     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
53236     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
53237     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
53238     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
53239     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
53240     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
53241     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
53242 
53243   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
53244   esac
53245 done
53246 
53247 
53248 # If the user did not use the arguments to specify the items to instantiate,
53249 # then the envvar interface is used.  Set only those that are not.
53250 # We use the long form for the default assignment because of an extremely
53251 # bizarre bug on SunOS 4.1.3.
53252 if $ac_need_defaults; then
53253   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
53254   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
53255 fi
53256 
53257 # Have a temporary directory for convenience.  Make it in the build tree
53258 # simply because there is no reason against having it here, and in addition,
53259 # creating and moving files from /tmp can sometimes cause problems.
53260 # Hook for its removal unless debugging.
53261 # Note that there is a small window in which the directory will not be cleaned:
53262 # after its creation but before its name has been assigned to `$tmp'.
53263 $debug ||
53264 {
53265   tmp= ac_tmp=
53266   trap 'exit_status=$?
53267   : "${ac_tmp:=$tmp}"
53268   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
53269 ' 0
53270   trap 'as_fn_exit 1' 1 2 13 15
53271 }
53272 # Create a (secure) tmp directory for tmp files.
53273 
53274 {
53275   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
53276   test -d "$tmp"
53277 }  ||
53278 {
53279   tmp=./conf$$-$RANDOM
53280   (umask 077 && mkdir "$tmp")
53281 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
53282 ac_tmp=$tmp
53283 
53284 # Set up the scripts for CONFIG_FILES section.
53285 # No need to generate them if there are no CONFIG_FILES.
53286 # This happens for instance with `./config.status config.h'.
53287 if test -n "$CONFIG_FILES"; then
53288 
53289 
53290 ac_cr=`echo X | tr X '\015'`
53291 # On cygwin, bash can eat \r inside `` if the user requested igncr.
53292 # But we know of no other shell where ac_cr would be empty at this
53293 # point, so we can use a bashism as a fallback.
53294 if test "x$ac_cr" = x; then
53295   eval ac_cr=\$\'\\r\'
53296 fi
53297 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
53298 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
53299   ac_cs_awk_cr='\\r'
53300 else
53301   ac_cs_awk_cr=$ac_cr
53302 fi
53303 
53304 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
53305 _ACEOF
53306 
53307 
53308 {
53309   echo "cat >conf$$subs.awk <<_ACEOF" &&
53310   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
53311   echo "_ACEOF"
53312 } >conf$$subs.sh ||
53313   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53314 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
53315 ac_delim='%!_!# '
53316 for ac_last_try in false false false false false :; do
53317   . ./conf$$subs.sh ||
53318     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53319 
53320   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
53321   if test $ac_delim_n = $ac_delim_num; then
53322     break
53323   elif $ac_last_try; then
53324     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53325   else
53326     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
53327   fi
53328 done
53329 rm -f conf$$subs.sh
53330 
53331 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53332 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
53333 _ACEOF
53334 sed -n '
53335 h
53336 s/^/S["/; s/!.*/"]=/
53337 p
53338 g
53339 s/^[^!]*!//
53340 :repl
53341 t repl
53342 s/'"$ac_delim"'$//
53343 t delim
53344 :nl
53345 h
53346 s/\(.\{148\}\)..*/\1/
53347 t more1
53348 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
53349 p
53350 n
53351 b repl
53352 :more1
53353 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53354 p
53355 g
53356 s/.\{148\}//
53357 t nl
53358 :delim
53359 h
53360 s/\(.\{148\}\)..*/\1/
53361 t more2
53362 s/["\\]/\\&/g; s/^/"/; s/$/"/
53363 p
53364 b
53365 :more2
53366 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53367 p
53368 g
53369 s/.\{148\}//
53370 t delim
53371 ' <conf$$subs.awk | sed '
53372 /^[^""]/{
53373   N
53374   s/\n//
53375 }
53376 ' >>$CONFIG_STATUS || ac_write_fail=1
53377 rm -f conf$$subs.awk
53378 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53379 _ACAWK
53380 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
53381   for (key in S) S_is_set[key] = 1
53382   FS = ""
53383 
53384 }
53385 {
53386   line = $ 0
53387   nfields = split(line, field, "@")
53388   substed = 0
53389   len = length(field[1])
53390   for (i = 2; i < nfields; i++) {
53391     key = field[i]
53392     keylen = length(key)
53393     if (S_is_set[key]) {
53394       value = S[key]
53395       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
53396       len += length(value) + length(field[++i])
53397       substed = 1
53398     } else
53399       len += 1 + keylen
53400   }
53401 
53402   print line
53403 }
53404 
53405 _ACAWK
53406 _ACEOF
53407 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53408 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
53409   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
53410 else
53411   cat
53412 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
53413   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
53414 _ACEOF
53415 
53416 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
53417 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
53418 # trailing colons and then remove the whole line if VPATH becomes empty
53419 # (actually we leave an empty line to preserve line numbers).
53420 if test "x$srcdir" = x.; then
53421   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
53422 h
53423 s///
53424 s/^/:/
53425 s/[      ]*$/:/
53426 s/:\$(srcdir):/:/g
53427 s/:\${srcdir}:/:/g
53428 s/:@srcdir@:/:/g
53429 s/^:*//
53430 s/:*$//
53431 x
53432 s/\(=[   ]*\).*/\1/
53433 G
53434 s/\n//
53435 s/^[^=]*=[       ]*$//
53436 }'
53437 fi
53438 
53439 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53440 fi # test -n "$CONFIG_FILES"
53441 
53442 # Set up the scripts for CONFIG_HEADERS section.
53443 # No need to generate them if there are no CONFIG_HEADERS.
53444 # This happens for instance with `./config.status Makefile'.
53445 if test -n "$CONFIG_HEADERS"; then
53446 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
53447 BEGIN {
53448 _ACEOF
53449 
53450 # Transform confdefs.h into an awk script `defines.awk', embedded as
53451 # here-document in config.status, that substitutes the proper values into
53452 # config.h.in to produce config.h.
53453 
53454 # Create a delimiter string that does not exist in confdefs.h, to ease
53455 # handling of long lines.
53456 ac_delim='%!_!# '
53457 for ac_last_try in false false :; do
53458   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
53459   if test -z "$ac_tt"; then
53460     break
53461   elif $ac_last_try; then
53462     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
53463   else
53464     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
53465   fi
53466 done
53467 
53468 # For the awk script, D is an array of macro values keyed by name,
53469 # likewise P contains macro parameters if any.  Preserve backslash
53470 # newline sequences.
53471 
53472 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
53473 sed -n '
53474 s/.\{148\}/&'"$ac_delim"'/g
53475 t rset
53476 :rset
53477 s/^[     ]*#[    ]*define[       ][      ]*/ /
53478 t def
53479 d
53480 :def
53481 s/\\$//
53482 t bsnl
53483 s/["\\]/\\&/g
53484 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
53485 D["\1"]=" \3"/p
53486 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
53487 d
53488 :bsnl
53489 s/["\\]/\\&/g
53490 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
53491 D["\1"]=" \3\\\\\\n"\\/p
53492 t cont
53493 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
53494 t cont
53495 d
53496 :cont
53497 n
53498 s/.\{148\}/&'"$ac_delim"'/g
53499 t clear
53500 :clear
53501 s/\\$//
53502 t bsnlc
53503 s/["\\]/\\&/g; s/^/"/; s/$/"/p
53504 d
53505 :bsnlc
53506 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
53507 b cont
53508 ' <confdefs.h | sed '
53509 s/'"$ac_delim"'/"\\\
53510 "/g' >>$CONFIG_STATUS || ac_write_fail=1
53511 
53512 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53513   for (key in D) D_is_set[key] = 1
53514   FS = ""
53515 }
53516 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
53517   line = \$ 0
53518   split(line, arg, " ")
53519   if (arg[1] == "#") {
53520     defundef = arg[2]
53521     mac1 = arg[3]
53522   } else {
53523     defundef = substr(arg[1], 2)
53524     mac1 = arg[2]
53525   }
53526   split(mac1, mac2, "(") #)
53527   macro = mac2[1]
53528   prefix = substr(line, 1, index(line, defundef) - 1)
53529   if (D_is_set[macro]) {
53530     # Preserve the white space surrounding the "#".
53531     print prefix "define", macro P[macro] D[macro]
53532     next
53533   } else {
53534     # Replace #undef with comments.  This is necessary, for example,
53535     # in the case of _POSIX_SOURCE, which is predefined and required
53536     # on some systems where configure will not decide to define it.
53537     if (defundef == "undef") {
53538       print "/*", prefix defundef, macro, "*/"
53539       next
53540     }
53541   }
53542 }
53543 { print }
53544 _ACAWK
53545 _ACEOF
53546 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53547   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
53548 fi # test -n "$CONFIG_HEADERS"
53549 
53550 
53551 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
53552 shift
53553 for ac_tag
53554 do
53555   case $ac_tag in
53556   :[FHLC]) ac_mode=$ac_tag; continue;;
53557   esac
53558   case $ac_mode$ac_tag in
53559   :[FHL]*:*);;
53560   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
53561   :[FH]-) ac_tag=-:-;;
53562   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
53563   esac
53564   ac_save_IFS=$IFS
53565   IFS=:
53566   set x $ac_tag
53567   IFS=$ac_save_IFS
53568   shift
53569   ac_file=$1
53570   shift
53571 
53572   case $ac_mode in
53573   :L) ac_source=$1;;
53574   :[FH])
53575     ac_file_inputs=
53576     for ac_f
53577     do
53578       case $ac_f in
53579       -) ac_f="$ac_tmp/stdin";;
53580       *) # Look for the file first in the build tree, then in the source tree
53581          # (if the path is not absolute).  The absolute path cannot be DOS-style,
53582          # because $ac_f cannot contain `:'.
53583          test -f "$ac_f" ||
53584            case $ac_f in
53585            [\\/$]*) false;;
53586            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
53587            esac ||
53588            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
53589       esac
53590       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
53591       as_fn_append ac_file_inputs " '$ac_f'"
53592     done
53593 
53594     # Let's still pretend it is `configure' which instantiates (i.e., don't
53595     # use $as_me), people would be surprised to read:
53596     #    /* config.h.  Generated by config.status.  */
53597     configure_input='Generated from '`
53598           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
53599         `' by configure.'
53600     if test x"$ac_file" != x-; then
53601       configure_input="$ac_file.  $configure_input"
53602       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
53603 $as_echo "$as_me: creating $ac_file" >&6;}
53604     fi
53605     # Neutralize special characters interpreted by sed in replacement strings.
53606     case $configure_input in #(
53607     *\&* | *\|* | *\\* )
53608        ac_sed_conf_input=`$as_echo "$configure_input" |
53609        sed 's/[\\\\&|]/\\\\&/g'`;; #(
53610     *) ac_sed_conf_input=$configure_input;;
53611     esac
53612 
53613     case $ac_tag in
53614     *:-:* | *:-) cat >"$ac_tmp/stdin" \
53615       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
53616     esac
53617     ;;
53618   esac
53619 
53620   ac_dir=`$as_dirname -- "$ac_file" ||
53621 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53622          X"$ac_file" : 'X\(//\)[^/]' \| \
53623          X"$ac_file" : 'X\(//\)$' \| \
53624          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
53625 $as_echo X"$ac_file" |
53626     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53627             s//\1/
53628             q
53629           }
53630           /^X\(\/\/\)[^/].*/{
53631             s//\1/
53632             q
53633           }
53634           /^X\(\/\/\)$/{
53635             s//\1/
53636             q
53637           }
53638           /^X\(\/\).*/{
53639             s//\1/
53640             q
53641           }
53642           s/.*/./; q'`
53643   as_dir="$ac_dir"; as_fn_mkdir_p
53644   ac_builddir=.
53645 
53646 case "$ac_dir" in
53647 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
53648 *)
53649   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
53650   # A ".." for each directory in $ac_dir_suffix.
53651   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
53652   case $ac_top_builddir_sub in
53653   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
53654   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
53655   esac ;;
53656 esac
53657 ac_abs_top_builddir=$ac_pwd
53658 ac_abs_builddir=$ac_pwd$ac_dir_suffix
53659 # for backward compatibility:
53660 ac_top_builddir=$ac_top_build_prefix
53661 
53662 case $srcdir in
53663   .)  # We are building in place.
53664     ac_srcdir=.
53665     ac_top_srcdir=$ac_top_builddir_sub
53666     ac_abs_top_srcdir=$ac_pwd ;;
53667   [\\/]* | ?:[\\/]* )  # Absolute name.
53668     ac_srcdir=$srcdir$ac_dir_suffix;
53669     ac_top_srcdir=$srcdir
53670     ac_abs_top_srcdir=$srcdir ;;
53671   *) # Relative name.
53672     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
53673     ac_top_srcdir=$ac_top_build_prefix$srcdir
53674     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
53675 esac
53676 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
53677 
53678 
53679   case $ac_mode in
53680   :F)
53681   #
53682   # CONFIG_FILE
53683   #
53684 
53685 _ACEOF
53686 
53687 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53688 # If the template does not know about datarootdir, expand it.
53689 # FIXME: This hack should be removed a few years after 2.60.
53690 ac_datarootdir_hack=; ac_datarootdir_seen=
53691 ac_sed_dataroot='
53692 /datarootdir/ {
53693   p
53694   q
53695 }
53696 /@datadir@/p
53697 /@docdir@/p
53698 /@infodir@/p
53699 /@localedir@/p
53700 /@mandir@/p'
53701 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
53702 *datarootdir*) ac_datarootdir_seen=yes;;
53703 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
53704   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
53705 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
53706 _ACEOF
53707 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53708   ac_datarootdir_hack='
53709   s&@datadir@&$datadir&g
53710   s&@docdir@&$docdir&g
53711   s&@infodir@&$infodir&g
53712   s&@localedir@&$localedir&g
53713   s&@mandir@&$mandir&g
53714   s&\\\${datarootdir}&$datarootdir&g' ;;
53715 esac
53716 _ACEOF
53717 
53718 # Neutralize VPATH when `$srcdir' = `.'.
53719 # Shell code in configure.ac might set extrasub.
53720 # FIXME: do we really want to maintain this feature?
53721 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53722 ac_sed_extra="$ac_vpsub
53723 $extrasub
53724 _ACEOF
53725 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53726 :t
53727 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
53728 s|@configure_input@|$ac_sed_conf_input|;t t
53729 s&@top_builddir@&$ac_top_builddir_sub&;t t
53730 s&@top_build_prefix@&$ac_top_build_prefix&;t t
53731 s&@srcdir@&$ac_srcdir&;t t
53732 s&@abs_srcdir@&$ac_abs_srcdir&;t t
53733 s&@top_srcdir@&$ac_top_srcdir&;t t
53734 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
53735 s&@builddir@&$ac_builddir&;t t
53736 s&@abs_builddir@&$ac_abs_builddir&;t t
53737 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
53738 $ac_datarootdir_hack
53739 "
53740 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
53741   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53742 
53743 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
53744   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
53745   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
53746       "$ac_tmp/out"`; test -z "$ac_out"; } &&
53747   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
53748 which seems to be undefined.  Please make sure it is defined" >&5
53749 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
53750 which seems to be undefined.  Please make sure it is defined" >&2;}
53751 
53752   rm -f "$ac_tmp/stdin"
53753   case $ac_file in
53754   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
53755   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
53756   esac \
53757   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53758  ;;
53759   :H)
53760   #
53761   # CONFIG_HEADER
53762   #
53763   if test x"$ac_file" != x-; then
53764     {
53765       $as_echo "/* $configure_input  */" \
53766       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
53767     } >"$ac_tmp/config.h" \
53768       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53769     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
53770       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
53771 $as_echo "$as_me: $ac_file is unchanged" >&6;}
53772     else
53773       rm -f "$ac_file"
53774       mv "$ac_tmp/config.h" "$ac_file" \
53775         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53776     fi
53777   else
53778     $as_echo "/* $configure_input  */" \
53779       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
53780       || as_fn_error $? "could not create -" "$LINENO" 5
53781   fi
53782  ;;
53783 
53784 
53785   esac
53786 
53787 done # for ac_tag
53788 
53789 
53790 as_fn_exit 0
53791 _ACEOF
53792 ac_clean_files=$ac_clean_files_save
53793 
53794 test $ac_write_fail = 0 ||
53795   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
53796 
53797 
53798 # configure is writing to config.log, and then calls config.status.
53799 # config.status does its own redirection, appending to config.log.
53800 # Unfortunately, on DOS this fails, as config.log is still kept open
53801 # by configure, so config.status won't be able to write to it; its
53802 # output is simply discarded.  So we exec the FD to /dev/null,
53803 # effectively closing config.log, so it can be properly (re)opened and
53804 # appended to by config.status.  When coming back to configure, we
53805 # need to make the FD available again.
53806 if test "$no_create" != yes; then
53807   ac_cs_success=:
53808   ac_config_status_args=
53809   test "$silent" = yes &&
53810     ac_config_status_args="$ac_config_status_args --quiet"
53811   exec 5>/dev/null
53812   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
53813   exec 5>>config.log
53814   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
53815   # would make configure fail if this is the last instruction.
53816   $ac_cs_success || as_fn_exit 1
53817 fi
53818 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
53819   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
53820 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
53821 fi
53822 
53823 
53824 
53825 # Try to move the config.log file to the output directory.
53826 if test -e ./config.log; then
53827   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
53828 fi
53829 
53830 # Make the compare script executable
53831 $CHMOD +x $OUTPUT_ROOT/compare.sh
53832 
53833 # Finally output some useful information to the user
53834 
53835   # Finally output some useful information to the user
53836 
53837   printf "\n"
53838   printf "====================================================\n"
53839   printf "A new configuration has been successfully created in\n"
53840   printf "$OUTPUT_ROOT\n"
53841   if test "x$CONFIGURE_COMMAND_LINE" != x; then
53842     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
53843   else
53844     printf "using default settings.\n"
53845   fi
53846 
53847   printf "\n"
53848   printf "Configuration summary:\n"
53849   printf "* Debug level:    $DEBUG_LEVEL\n"
53850   printf "* JDK variant:    $JDK_VARIANT\n"
53851   printf "* JVM variants:   $with_jvm_variants\n"
53852   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
53853 
53854   printf "\n"
53855   printf "Tools summary:\n"
53856   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
53857     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
53858   fi
53859   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
53860   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
53861   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
53862   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
53863 
53864   printf "\n"
53865   printf "Build performance summary:\n"
53866   printf "* Cores to use:   $JOBS\n"
53867   printf "* Memory limit:   $MEMORY_SIZE MB\n"
53868   if test "x$CCACHE_STATUS" != "x"; then
53869     printf "* ccache status:  $CCACHE_STATUS\n"
53870   fi
53871   printf "\n"
53872 
53873   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
53874     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
53875     printf "will result in longer build times.\n"
53876     printf "\n"
53877   fi
53878 
53879   if test "x$FOUND_ALT_VARIABLES" != "x"; then
53880     printf "WARNING: You have old-style ALT_ environment variables set.\n"
53881     printf "These are not respected, and will be ignored. It is recommended\n"
53882     printf "that you clean your environment. The following variables are set:\n"
53883     printf "$FOUND_ALT_VARIABLES\n"
53884     printf "\n"
53885   fi
53886 
53887   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
53888     printf "WARNING: Your build output directory is not on a local disk.\n"
53889     printf "This will severely degrade build performance!\n"
53890     printf "It is recommended that you create an output directory on a local disk,\n"
53891     printf "and run the configure script again from that directory.\n"
53892     printf "\n"
53893   fi
53894 
53895   if test "x$IS_RECONFIGURE" = "xyes"; then
53896     printf "WARNING: The result of this configuration has overridden an older\n"
53897     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
53898     printf "proper build. Failure to do so might result in strange build problems.\n"
53899     printf "\n"
53900   fi
53901 
53902   if test "x$UNSUPPORTED_TOOLCHAIN_VERSION" = "xyes"; then
53903     printf "WARNING: The toolchain version used is known to have issues. Please\n"
53904     printf "consider using a supported version unless you know what you are doing.\n"
53905     printf "\n"
53906   fi
53907