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 jdk9.
  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='jdk9'
 590 PACKAGE_STRING='OpenJDK jdk9'
 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 MSVCR_DLL
 644 LIBCXX
 645 LLVM_LIBS
 646 LLVM_LDFLAGS
 647 LLVM_CFLAGS
 648 LLVM_CONFIG
 649 LIBFFI_LIBS
 650 LIBFFI_CFLAGS
 651 STATIC_CXX_SETTING
 652 LIBDL
 653 LIBM
 654 LIBZIP_CAN_USE_MMAP
 655 USE_EXTERNAL_LIBZ
 656 USE_EXTERNAL_LIBPNG
 657 PNG_LIBS
 658 PNG_CFLAGS
 659 USE_EXTERNAL_LCMS
 660 LCMS_LIBS
 661 LCMS_CFLAGS
 662 USE_EXTERNAL_LIBGIF
 663 USE_EXTERNAL_LIBJPEG
 664 ALSA_LIBS
 665 ALSA_CFLAGS
 666 FREETYPE_BUNDLE_LIB_PATH
 667 FREETYPE_LIBS
 668 FREETYPE_CFLAGS
 669 CUPS_CFLAGS
 670 X_EXTRA_LIBS
 671 X_LIBS
 672 X_PRE_LIBS
 673 X_CFLAGS
 674 XMKMF
 675 FIXPATH
 676 ZIP_DEBUGINFO_FILES
 677 ENABLE_DEBUG_SYMBOLS
 678 CFLAGS_WARNINGS_ARE_ERRORS
 679 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 680 ZERO_ARCHFLAG
 681 LDFLAGS_CXX_JDK
 682 LDFLAGS_JDKEXE_SUFFIX
 683 LDFLAGS_JDKLIB_SUFFIX
 684 LDFLAGS_JDKEXE
 685 LDFLAGS_JDKLIB
 686 CXXFLAGS_JDKEXE
 687 CXXFLAGS_JDKLIB
 688 CFLAGS_JDKEXE
 689 CFLAGS_JDKLIB
 690 MACOSX_VERSION_MIN
 691 LEGACY_EXTRA_LDFLAGS
 692 LEGACY_EXTRA_CXXFLAGS
 693 LEGACY_EXTRA_CFLAGS
 694 CXX_O_FLAG_NONE
 695 CXX_O_FLAG_DEBUG
 696 CXX_O_FLAG_NORM
 697 CXX_O_FLAG_HI
 698 CXX_O_FLAG_HIGHEST
 699 C_O_FLAG_NONE
 700 C_O_FLAG_DEBUG
 701 C_O_FLAG_NORM
 702 C_O_FLAG_HI
 703 C_O_FLAG_HIGHEST
 704 CXXFLAGS_DEBUG_OPTIONS
 705 CFLAGS_DEBUG_OPTIONS
 706 CXXFLAGS_DEBUG_SYMBOLS
 707 CFLAGS_DEBUG_SYMBOLS
 708 CXX_FLAG_DEPS
 709 C_FLAG_DEPS
 710 SET_SHARED_LIBRARY_MAPFILE
 711 SET_SHARED_LIBRARY_NAME
 712 SET_SHARED_LIBRARY_ORIGIN
 713 SET_EXECUTABLE_ORIGIN
 714 SHARED_LIBRARY_FLAGS
 715 CXX_FLAG_REORDER
 716 C_FLAG_REORDER
 717 SYSROOT_LDFLAGS
 718 SYSROOT_CFLAGS
 719 RC_FLAGS
 720 AR_OUT_OPTION
 721 LD_OUT_OPTION
 722 EXE_OUT_OPTION
 723 CC_OUT_OPTION
 724 POST_MCS_CMD
 725 POST_STRIP_CMD
 726 ARFLAGS
 727 COMPILER_TARGET_BITS_FLAG
 728 JT_HOME
 729 JTREGEXE
 730 USING_BROKEN_SUSE_LD
 731 PACKAGE_PATH
 732 LDEXECXX
 733 LDEXE
 734 USE_CLANG
 735 HOTSPOT_LD
 736 HOTSPOT_CXX
 737 HOTSPOT_RC
 738 HOTSPOT_MT
 739 BUILD_LD
 740 BUILD_CXX
 741 BUILD_CC
 742 ac_ct_OBJDUMP
 743 OBJDUMP
 744 ac_ct_OBJCOPY
 745 OBJCOPY
 746 ac_ct_NM
 747 ac_ct_STRIP
 748 MCS
 749 GNM
 750 NM
 751 STRIP
 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 ac_ct_CXX
 767 CXXFLAGS
 768 CXX
 769 ac_ct_PROPER_COMPILER_CXX
 770 PROPER_COMPILER_CXX
 771 TOOLCHAIN_PATH_CXX
 772 POTENTIAL_CXX
 773 OBJEXT
 774 EXEEXT
 775 ac_ct_CC
 776 CPPFLAGS
 777 LDFLAGS
 778 CFLAGS
 779 CC
 780 ac_ct_PROPER_COMPILER_CC
 781 PROPER_COMPILER_CC
 782 TOOLCHAIN_PATH_CC
 783 POTENTIAL_CC
 784 VS_LIB
 785 VS_INCLUDE
 786 VS_PATH
 787 CYGWIN_LINK
 788 EXE_SUFFIX
 789 OBJ_SUFFIX
 790 STATIC_LIBRARY
 791 SHARED_LIBRARY
 792 STATIC_LIBRARY_SUFFIX
 793 SHARED_LIBRARY_SUFFIX
 794 LIBRARY_PREFIX
 795 TOOLCHAIN_TYPE
 796 BUILD_HOTSPOT
 797 HOTSPOT_DIST
 798 BUILD_OUTPUT
 799 OVERRIDE_SRC_ROOT
 800 ADD_SRC_ROOT
 801 JDK_TOPDIR
 802 NASHORN_TOPDIR
 803 HOTSPOT_TOPDIR
 804 JAXWS_TOPDIR
 805 JAXP_TOPDIR
 806 CORBA_TOPDIR
 807 LANGTOOLS_TOPDIR
 808 JAVA_FLAGS_SMALL
 809 JAVA_FLAGS_BIG
 810 JAVA_FLAGS
 811 JAVAC_FLAGS
 812 BOOT_JDK_SOURCETARGET
 813 JARSIGNER
 814 NATIVE2ASCII
 815 JAR
 816 JAVAH
 817 JAVAC
 818 JAVA
 819 BOOT_JDK
 820 BOOT_TOOLSJAR
 821 BOOT_RTJAR
 822 JAVA_CHECK
 823 JAVAC_CHECK
 824 COOKED_BUILD_NUMBER
 825 JDK_VERSION
 826 COPYRIGHT_YEAR
 827 MACOSX_BUNDLE_ID_BASE
 828 MACOSX_BUNDLE_NAME_BASE
 829 COMPANY_NAME
 830 JDK_RC_PLATFORM_NAME
 831 PRODUCT_SUFFIX
 832 PRODUCT_NAME
 833 LAUNCHER_NAME
 834 MILESTONE
 835 JDK_BUILD_NUMBER
 836 JDK_UPDATE_VERSION
 837 JDK_MICRO_VERSION
 838 JDK_MINOR_VERSION
 839 JDK_MAJOR_VERSION
 840 USER_RELEASE_SUFFIX
 841 COMPRESS_JARS
 842 RMICONNECTOR_IIOP
 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 OTOOL
 864 LDD
 865 ZIP
 866 UNZIP
 867 FIND_DELETE
 868 MAKE
 869 CHECK_TOOLSDIR_MAKE
 870 CHECK_TOOLSDIR_GMAKE
 871 CHECK_MAKE
 872 CHECK_GMAKE
 873 PKGHANDLER
 874 OUTPUT_ROOT
 875 CONF_NAME
 876 SPEC
 877 SDKROOT
 878 XCODEBUILD
 879 BUILD_VARIANT_RELEASE
 880 DEBUG_CLASSFILES
 881 FASTDEBUG
 882 VARIANT
 883 DEBUG_LEVEL
 884 MACOSX_UNIVERSAL
 885 INCLUDE_SA
 886 JVM_VARIANT_CORE
 887 JVM_VARIANT_ZEROSHARK
 888 JVM_VARIANT_ZERO
 889 JVM_VARIANT_KERNEL
 890 JVM_VARIANT_MINIMAL1
 891 JVM_VARIANT_CLIENT
 892 JVM_VARIANT_SERVER
 893 JVM_VARIANTS
 894 JVM_INTERPRETER
 895 JDK_VARIANT
 896 SET_OPENJDK
 897 BUILD_LOG_WRAPPER
 898 BUILD_LOG_PREVIOUS
 899 BUILD_LOG
 900 TOPDIR
 901 PATH_SEP
 902 ZERO_ARCHDEF
 903 DEFINE_CROSS_COMPILE_ARCH
 904 LP64
 905 OPENJDK_TARGET_OS_EXPORT_DIR
 906 OPENJDK_TARGET_OS_API_DIR
 907 OPENJDK_TARGET_CPU_JLI_CFLAGS
 908 OPENJDK_TARGET_CPU_OSARCH
 909 OPENJDK_TARGET_CPU_ISADIR
 910 OPENJDK_TARGET_CPU_LIBDIR
 911 OPENJDK_TARGET_CPU_LEGACY_LIB
 912 OPENJDK_TARGET_CPU_LEGACY
 913 REQUIRED_OS_VERSION
 914 REQUIRED_OS_NAME
 915 COMPILE_TYPE
 916 OPENJDK_TARGET_CPU_ENDIAN
 917 OPENJDK_TARGET_CPU_BITS
 918 OPENJDK_TARGET_CPU_ARCH
 919 OPENJDK_TARGET_CPU
 920 OPENJDK_TARGET_OS_ENV
 921 OPENJDK_TARGET_OS_API
 922 OPENJDK_TARGET_OS
 923 OPENJDK_BUILD_CPU_ENDIAN
 924 OPENJDK_BUILD_CPU_BITS
 925 OPENJDK_BUILD_CPU_ARCH
 926 OPENJDK_BUILD_CPU
 927 OPENJDK_BUILD_OS_ENV
 928 OPENJDK_BUILD_OS_API
 929 OPENJDK_BUILD_OS
 930 OPENJDK_BUILD_AUTOCONF_NAME
 931 OPENJDK_TARGET_AUTOCONF_NAME
 932 target_os
 933 target_vendor
 934 target_cpu
 935 target
 936 host_os
 937 host_vendor
 938 host_cpu
 939 host
 940 build_os
 941 build_vendor
 942 build_cpu
 943 build
 944 CPIO
 945 SETFILE
 946 DF
 947 READLINK
 948 CYGPATH
 949 SED
 950 FGREP
 951 EGREP
 952 GREP
 953 AWK
 954 XARGS
 955 WHICH
 956 WC
 957 UNIQ
 958 UNAME
 959 TR
 960 TOUCH
 961 TEE
 962 TAR
 963 TAIL
 964 SORT
 965 SH
 966 RM
 967 PRINTF
 968 NAWK
 969 MV
 970 MKTEMP
 971 MKDIR
 972 LS
 973 LN
 974 HEAD
 975 FIND
 976 FILE
 977 EXPR
 978 ECHO
 979 DIRNAME
 980 DIFF
 981 DATE
 982 CUT
 983 CP
 984 COMM
 985 CMP
 986 CHMOD
 987 CAT
 988 BASH
 989 BASENAME
 990 DATE_WHEN_CONFIGURED
 991 CONFIGURE_COMMAND_LINE
 992 target_alias
 993 host_alias
 994 build_alias
 995 LIBS
 996 ECHO_T
 997 ECHO_N
 998 ECHO_C
 999 DEFS
1000 mandir
1001 localedir
1002 libdir
1003 psdir
1004 pdfdir
1005 dvidir
1006 htmldir
1007 infodir
1008 docdir
1009 oldincludedir
1010 includedir
1011 localstatedir
1012 sharedstatedir
1013 sysconfdir
1014 datadir
1015 datarootdir
1016 libexecdir
1017 sbindir
1018 bindir
1019 program_transform_name
1020 prefix
1021 exec_prefix
1022 PACKAGE_URL
1023 PACKAGE_BUGREPORT
1024 PACKAGE_STRING
1025 PACKAGE_VERSION
1026 PACKAGE_TARNAME
1027 PACKAGE_NAME
1028 PATH_SEPARATOR
1029 SHELL'
1030 ac_subst_files=''
1031 ac_user_opts='
1032 enable_option_checking
1033 with_target_bits
1034 enable_openjdk_only
1035 with_custom_make_dir
1036 with_jdk_variant
1037 with_jvm_interpreter
1038 with_jvm_variants
1039 enable_debug
1040 with_debug_level
1041 with_devkit
1042 with_sys_root
1043 with_sysroot
1044 with_tools_dir
1045 with_toolchain_path
1046 with_extra_path
1047 with_sdk_name
1048 with_conf_name
1049 with_builddeps_conf
1050 with_builddeps_server
1051 with_builddeps_dir
1052 with_builddeps_group
1053 enable_headful
1054 enable_hotspot_test_in_build
1055 with_cacerts_file
1056 enable_unlimited_crypto
1057 enable_rmiconnector_iiop
1058 with_milestone
1059 with_update_version
1060 with_user_release_suffix
1061 with_build_number
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_jtreg
1077 with_extra_cflags
1078 with_extra_cxxflags
1079 with_extra_ldflags
1080 enable_debug_symbols
1081 enable_zip_debug_info
1082 with_x
1083 with_cups
1084 with_cups_include
1085 with_freetype
1086 with_freetype_include
1087 with_freetype_lib
1088 enable_freetype_bundling
1089 with_alsa
1090 with_alsa_include
1091 with_alsa_lib
1092 with_libjpeg
1093 with_giflib
1094 with_lcms
1095 with_libpng
1096 with_zlib
1097 with_stdc__lib
1098 with_msvcr_dll
1099 with_dxsdk
1100 with_dxsdk_lib
1101 with_dxsdk_include
1102 with_num_cores
1103 with_memory_size
1104 with_jobs
1105 with_sjavac_server_java
1106 enable_sjavac
1107 enable_precompiled_headers
1108 enable_ccache
1109 with_ccache_dir
1110 '
1111       ac_precious_vars='build_alias
1112 host_alias
1113 target_alias
1114 BASENAME
1115 BASH
1116 CAT
1117 CHMOD
1118 CMP
1119 COMM
1120 CP
1121 CUT
1122 DATE
1123 DIFF
1124 DIRNAME
1125 ECHO
1126 EXPR
1127 FILE
1128 FIND
1129 HEAD
1130 LN
1131 LS
1132 MKDIR
1133 MKTEMP
1134 MV
1135 NAWK
1136 PRINTF
1137 RM
1138 SH
1139 SORT
1140 TAIL
1141 TAR
1142 TEE
1143 TOUCH
1144 TR
1145 UNAME
1146 UNIQ
1147 WC
1148 WHICH
1149 XARGS
1150 AWK
1151 GREP
1152 EGREP
1153 FGREP
1154 SED
1155 CYGPATH
1156 READLINK
1157 DF
1158 SETFILE
1159 CPIO
1160 UNZIP
1161 ZIP
1162 LDD
1163 OTOOL
1164 READELF
1165 HG
1166 STAT
1167 TIME
1168 DSYMUTIL
1169 XATTR
1170 CODESIGN
1171 PKG_CONFIG
1172 JAVA
1173 JAVAC
1174 JAVAH
1175 JAR
1176 NATIVE2ASCII
1177 JARSIGNER
1178 CC
1179 CFLAGS
1180 LDFLAGS
1181 LIBS
1182 CPPFLAGS
1183 CXX
1184 CXXFLAGS
1185 CCC
1186 CPP
1187 CXXCPP
1188 AS
1189 AR
1190 OBJC
1191 OBJCFLAGS
1192 LIPO
1193 STRIP
1194 NM
1195 GNM
1196 MCS
1197 OBJCOPY
1198 OBJDUMP
1199 BUILD_CC
1200 BUILD_CXX
1201 BUILD_LD
1202 JTREGEXE
1203 XMKMF
1204 FREETYPE_CFLAGS
1205 FREETYPE_LIBS
1206 ALSA_CFLAGS
1207 ALSA_LIBS
1208 LCMS_CFLAGS
1209 LCMS_LIBS
1210 PNG_CFLAGS
1211 PNG_LIBS
1212 LIBFFI_CFLAGS
1213 LIBFFI_LIBS
1214 CCACHE'
1215 
1216 
1217 # Initialize some variables set by options.
1218 ac_init_help=
1219 ac_init_version=false
1220 ac_unrecognized_opts=
1221 ac_unrecognized_sep=
1222 # The variables have the same names as the options, with
1223 # dashes changed to underlines.
1224 cache_file=/dev/null
1225 exec_prefix=NONE
1226 no_create=
1227 no_recursion=
1228 prefix=NONE
1229 program_prefix=NONE
1230 program_suffix=NONE
1231 program_transform_name=s,x,x,
1232 silent=
1233 site=
1234 srcdir=
1235 verbose=
1236 x_includes=NONE
1237 x_libraries=NONE
1238 
1239 # Installation directory options.
1240 # These are left unexpanded so users can "make install exec_prefix=/foo"
1241 # and all the variables that are supposed to be based on exec_prefix
1242 # by default will actually change.
1243 # Use braces instead of parens because sh, perl, etc. also accept them.
1244 # (The list follows the same order as the GNU Coding Standards.)
1245 bindir='${exec_prefix}/bin'
1246 sbindir='${exec_prefix}/sbin'
1247 libexecdir='${exec_prefix}/libexec'
1248 datarootdir='${prefix}/share'
1249 datadir='${datarootdir}'
1250 sysconfdir='${prefix}/etc'
1251 sharedstatedir='${prefix}/com'
1252 localstatedir='${prefix}/var'
1253 includedir='${prefix}/include'
1254 oldincludedir='/usr/include'
1255 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1256 infodir='${datarootdir}/info'
1257 htmldir='${docdir}'
1258 dvidir='${docdir}'
1259 pdfdir='${docdir}'
1260 psdir='${docdir}'
1261 libdir='${exec_prefix}/lib'
1262 localedir='${datarootdir}/locale'
1263 mandir='${datarootdir}/man'
1264 
1265 ac_prev=
1266 ac_dashdash=
1267 for ac_option
1268 do
1269   # If the previous option needs an argument, assign it.
1270   if test -n "$ac_prev"; then
1271     eval $ac_prev=\$ac_option
1272     ac_prev=
1273     continue
1274   fi
1275 
1276   case $ac_option in
1277   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1278   *=)   ac_optarg= ;;
1279   *)    ac_optarg=yes ;;
1280   esac
1281 
1282   # Accept the important Cygnus configure options, so we can diagnose typos.
1283 
1284   case $ac_dashdash$ac_option in
1285   --)
1286     ac_dashdash=yes ;;
1287 
1288   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1289     ac_prev=bindir ;;
1290   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1291     bindir=$ac_optarg ;;
1292 
1293   -build | --build | --buil | --bui | --bu)
1294     ac_prev=build_alias ;;
1295   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1296     build_alias=$ac_optarg ;;
1297 
1298   -cache-file | --cache-file | --cache-fil | --cache-fi \
1299   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1300     ac_prev=cache_file ;;
1301   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1302   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1303     cache_file=$ac_optarg ;;
1304 
1305   --config-cache | -C)
1306     cache_file=config.cache ;;
1307 
1308   -datadir | --datadir | --datadi | --datad)
1309     ac_prev=datadir ;;
1310   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1311     datadir=$ac_optarg ;;
1312 
1313   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1314   | --dataroo | --dataro | --datar)
1315     ac_prev=datarootdir ;;
1316   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1317   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1318     datarootdir=$ac_optarg ;;
1319 
1320   -disable-* | --disable-*)
1321     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1322     # Reject names that are not valid shell variable names.
1323     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1324       as_fn_error $? "invalid feature name: $ac_useropt"
1325     ac_useropt_orig=$ac_useropt
1326     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1327     case $ac_user_opts in
1328       *"
1329 "enable_$ac_useropt"
1330 "*) ;;
1331       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1332          ac_unrecognized_sep=', ';;
1333     esac
1334     eval enable_$ac_useropt=no ;;
1335 
1336   -docdir | --docdir | --docdi | --doc | --do)
1337     ac_prev=docdir ;;
1338   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1339     docdir=$ac_optarg ;;
1340 
1341   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1342     ac_prev=dvidir ;;
1343   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1344     dvidir=$ac_optarg ;;
1345 
1346   -enable-* | --enable-*)
1347     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1348     # Reject names that are not valid shell variable names.
1349     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1350       as_fn_error $? "invalid feature name: $ac_useropt"
1351     ac_useropt_orig=$ac_useropt
1352     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1353     case $ac_user_opts in
1354       *"
1355 "enable_$ac_useropt"
1356 "*) ;;
1357       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1358          ac_unrecognized_sep=', ';;
1359     esac
1360     eval enable_$ac_useropt=\$ac_optarg ;;
1361 
1362   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1363   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1364   | --exec | --exe | --ex)
1365     ac_prev=exec_prefix ;;
1366   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1367   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1368   | --exec=* | --exe=* | --ex=*)
1369     exec_prefix=$ac_optarg ;;
1370 
1371   -gas | --gas | --ga | --g)
1372     # Obsolete; use --with-gas.
1373     with_gas=yes ;;
1374 
1375   -help | --help | --hel | --he | -h)
1376     ac_init_help=long ;;
1377   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1378     ac_init_help=recursive ;;
1379   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1380     ac_init_help=short ;;
1381 
1382   -host | --host | --hos | --ho)
1383     ac_prev=host_alias ;;
1384   -host=* | --host=* | --hos=* | --ho=*)
1385     host_alias=$ac_optarg ;;
1386 
1387   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1388     ac_prev=htmldir ;;
1389   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1390   | --ht=*)
1391     htmldir=$ac_optarg ;;
1392 
1393   -includedir | --includedir | --includedi | --included | --include \
1394   | --includ | --inclu | --incl | --inc)
1395     ac_prev=includedir ;;
1396   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1397   | --includ=* | --inclu=* | --incl=* | --inc=*)
1398     includedir=$ac_optarg ;;
1399 
1400   -infodir | --infodir | --infodi | --infod | --info | --inf)
1401     ac_prev=infodir ;;
1402   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1403     infodir=$ac_optarg ;;
1404 
1405   -libdir | --libdir | --libdi | --libd)
1406     ac_prev=libdir ;;
1407   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1408     libdir=$ac_optarg ;;
1409 
1410   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1411   | --libexe | --libex | --libe)
1412     ac_prev=libexecdir ;;
1413   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1414   | --libexe=* | --libex=* | --libe=*)
1415     libexecdir=$ac_optarg ;;
1416 
1417   -localedir | --localedir | --localedi | --localed | --locale)
1418     ac_prev=localedir ;;
1419   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1420     localedir=$ac_optarg ;;
1421 
1422   -localstatedir | --localstatedir | --localstatedi | --localstated \
1423   | --localstate | --localstat | --localsta | --localst | --locals)
1424     ac_prev=localstatedir ;;
1425   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1426   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1427     localstatedir=$ac_optarg ;;
1428 
1429   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1430     ac_prev=mandir ;;
1431   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1432     mandir=$ac_optarg ;;
1433 
1434   -nfp | --nfp | --nf)
1435     # Obsolete; use --without-fp.
1436     with_fp=no ;;
1437 
1438   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1439   | --no-cr | --no-c | -n)
1440     no_create=yes ;;
1441 
1442   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1443   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1444     no_recursion=yes ;;
1445 
1446   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1447   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1448   | --oldin | --oldi | --old | --ol | --o)
1449     ac_prev=oldincludedir ;;
1450   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1451   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1452   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1453     oldincludedir=$ac_optarg ;;
1454 
1455   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1456     ac_prev=prefix ;;
1457   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1458     prefix=$ac_optarg ;;
1459 
1460   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1461   | --program-pre | --program-pr | --program-p)
1462     ac_prev=program_prefix ;;
1463   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1464   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1465     program_prefix=$ac_optarg ;;
1466 
1467   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1468   | --program-suf | --program-su | --program-s)
1469     ac_prev=program_suffix ;;
1470   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1471   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1472     program_suffix=$ac_optarg ;;
1473 
1474   -program-transform-name | --program-transform-name \
1475   | --program-transform-nam | --program-transform-na \
1476   | --program-transform-n | --program-transform- \
1477   | --program-transform | --program-transfor \
1478   | --program-transfo | --program-transf \
1479   | --program-trans | --program-tran \
1480   | --progr-tra | --program-tr | --program-t)
1481     ac_prev=program_transform_name ;;
1482   -program-transform-name=* | --program-transform-name=* \
1483   | --program-transform-nam=* | --program-transform-na=* \
1484   | --program-transform-n=* | --program-transform-=* \
1485   | --program-transform=* | --program-transfor=* \
1486   | --program-transfo=* | --program-transf=* \
1487   | --program-trans=* | --program-tran=* \
1488   | --progr-tra=* | --program-tr=* | --program-t=*)
1489     program_transform_name=$ac_optarg ;;
1490 
1491   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1492     ac_prev=pdfdir ;;
1493   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1494     pdfdir=$ac_optarg ;;
1495 
1496   -psdir | --psdir | --psdi | --psd | --ps)
1497     ac_prev=psdir ;;
1498   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1499     psdir=$ac_optarg ;;
1500 
1501   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1502   | -silent | --silent | --silen | --sile | --sil)
1503     silent=yes ;;
1504 
1505   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1506     ac_prev=sbindir ;;
1507   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1508   | --sbi=* | --sb=*)
1509     sbindir=$ac_optarg ;;
1510 
1511   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1512   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1513   | --sharedst | --shareds | --shared | --share | --shar \
1514   | --sha | --sh)
1515     ac_prev=sharedstatedir ;;
1516   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1517   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1518   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1519   | --sha=* | --sh=*)
1520     sharedstatedir=$ac_optarg ;;
1521 
1522   -site | --site | --sit)
1523     ac_prev=site ;;
1524   -site=* | --site=* | --sit=*)
1525     site=$ac_optarg ;;
1526 
1527   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1528     ac_prev=srcdir ;;
1529   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1530     srcdir=$ac_optarg ;;
1531 
1532   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1533   | --syscon | --sysco | --sysc | --sys | --sy)
1534     ac_prev=sysconfdir ;;
1535   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1536   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1537     sysconfdir=$ac_optarg ;;
1538 
1539   -target | --target | --targe | --targ | --tar | --ta | --t)
1540     ac_prev=target_alias ;;
1541   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1542     target_alias=$ac_optarg ;;
1543 
1544   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1545     verbose=yes ;;
1546 
1547   -version | --version | --versio | --versi | --vers | -V)
1548     ac_init_version=: ;;
1549 
1550   -with-* | --with-*)
1551     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1552     # Reject names that are not valid shell variable names.
1553     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1554       as_fn_error $? "invalid package name: $ac_useropt"
1555     ac_useropt_orig=$ac_useropt
1556     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1557     case $ac_user_opts in
1558       *"
1559 "with_$ac_useropt"
1560 "*) ;;
1561       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1562          ac_unrecognized_sep=', ';;
1563     esac
1564     eval with_$ac_useropt=\$ac_optarg ;;
1565 
1566   -without-* | --without-*)
1567     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1568     # Reject names that are not valid shell variable names.
1569     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1570       as_fn_error $? "invalid package name: $ac_useropt"
1571     ac_useropt_orig=$ac_useropt
1572     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1573     case $ac_user_opts in
1574       *"
1575 "with_$ac_useropt"
1576 "*) ;;
1577       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1578          ac_unrecognized_sep=', ';;
1579     esac
1580     eval with_$ac_useropt=no ;;
1581 
1582   --x)
1583     # Obsolete; use --with-x.
1584     with_x=yes ;;
1585 
1586   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1587   | --x-incl | --x-inc | --x-in | --x-i)
1588     ac_prev=x_includes ;;
1589   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1590   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1591     x_includes=$ac_optarg ;;
1592 
1593   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1594   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1595     ac_prev=x_libraries ;;
1596   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1597   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1598     x_libraries=$ac_optarg ;;
1599 
1600   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1601 Try \`$0 --help' for more information"
1602     ;;
1603 
1604   *=*)
1605     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1606     # Reject names that are not valid shell variable names.
1607     case $ac_envvar in #(
1608       '' | [0-9]* | *[!_$as_cr_alnum]* )
1609       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1610     esac
1611     eval $ac_envvar=\$ac_optarg
1612     export $ac_envvar ;;
1613 
1614   *)
1615     # FIXME: should be removed in autoconf 3.0.
1616     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1617     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1618       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1619     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1620     ;;
1621 
1622   esac
1623 done
1624 
1625 if test -n "$ac_prev"; then
1626   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1627   as_fn_error $? "missing argument to $ac_option"
1628 fi
1629 
1630 if test -n "$ac_unrecognized_opts"; then
1631   case $enable_option_checking in
1632     no) ;;
1633     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1634     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1635   esac
1636 fi
1637 
1638 # Check all directory arguments for consistency.
1639 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1640                 datadir sysconfdir sharedstatedir localstatedir includedir \
1641                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1642                 libdir localedir mandir
1643 do
1644   eval ac_val=\$$ac_var
1645   # Remove trailing slashes.
1646   case $ac_val in
1647     */ )
1648       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1649       eval $ac_var=\$ac_val;;
1650   esac
1651   # Be sure to have absolute directory names.
1652   case $ac_val in
1653     [\\/$]* | ?:[\\/]* )  continue;;
1654     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1655   esac
1656   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1657 done
1658 
1659 # There might be people who depend on the old broken behavior: `$host'
1660 # used to hold the argument of --host etc.
1661 # FIXME: To remove some day.
1662 build=$build_alias
1663 host=$host_alias
1664 target=$target_alias
1665 
1666 # FIXME: To remove some day.
1667 if test "x$host_alias" != x; then
1668   if test "x$build_alias" = x; then
1669     cross_compiling=maybe
1670   elif test "x$build_alias" != "x$host_alias"; then
1671     cross_compiling=yes
1672   fi
1673 fi
1674 
1675 ac_tool_prefix=
1676 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1677 
1678 test "$silent" = yes && exec 6>/dev/null
1679 
1680 
1681 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1682 ac_ls_di=`ls -di .` &&
1683 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1684   as_fn_error $? "working directory cannot be determined"
1685 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1686   as_fn_error $? "pwd does not report name of working directory"
1687 
1688 
1689 # Find the source files, if location was not specified.
1690 if test -z "$srcdir"; then
1691   ac_srcdir_defaulted=yes
1692   # Try the directory containing this script, then the parent directory.
1693   ac_confdir=`$as_dirname -- "$as_myself" ||
1694 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1695          X"$as_myself" : 'X\(//\)[^/]' \| \
1696          X"$as_myself" : 'X\(//\)$' \| \
1697          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1698 $as_echo X"$as_myself" |
1699     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1700             s//\1/
1701             q
1702           }
1703           /^X\(\/\/\)[^/].*/{
1704             s//\1/
1705             q
1706           }
1707           /^X\(\/\/\)$/{
1708             s//\1/
1709             q
1710           }
1711           /^X\(\/\).*/{
1712             s//\1/
1713             q
1714           }
1715           s/.*/./; q'`
1716   srcdir=$ac_confdir
1717   if test ! -r "$srcdir/$ac_unique_file"; then
1718     srcdir=..
1719   fi
1720 else
1721   ac_srcdir_defaulted=no
1722 fi
1723 if test ! -r "$srcdir/$ac_unique_file"; then
1724   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1725   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1726 fi
1727 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1728 ac_abs_confdir=`(
1729         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1730         pwd)`
1731 # When building in place, set srcdir=.
1732 if test "$ac_abs_confdir" = "$ac_pwd"; then
1733   srcdir=.
1734 fi
1735 # Remove unnecessary trailing slashes from srcdir.
1736 # Double slashes in file names in object file debugging info
1737 # mess up M-x gdb in Emacs.
1738 case $srcdir in
1739 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1740 esac
1741 for ac_var in $ac_precious_vars; do
1742   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1743   eval ac_env_${ac_var}_value=\$${ac_var}
1744   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1745   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1746 done
1747 
1748 #
1749 # Report the --help message.
1750 #
1751 if test "$ac_init_help" = "long"; then
1752   # Omit some internal or obsolete options to make the list less imposing.
1753   # This message is too long to be a string in the A/UX 3.1 sh.
1754   cat <<_ACEOF
1755 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1756 
1757 Usage: $0 [OPTION]... [VAR=VALUE]...
1758 
1759 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1760 VAR=VALUE.  See below for descriptions of some of the useful variables.
1761 
1762 Defaults for the options are specified in brackets.
1763 
1764 Configuration:
1765   -h, --help              display this help and exit
1766       --help=short        display options specific to this package
1767       --help=recursive    display the short help of all the included packages
1768   -V, --version           display version information and exit
1769   -q, --quiet, --silent   do not print \`checking ...' messages
1770       --cache-file=FILE   cache test results in FILE [disabled]
1771   -C, --config-cache      alias for \`--cache-file=config.cache'
1772   -n, --no-create         do not create output files
1773       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1774 
1775 Installation directories:
1776   --prefix=PREFIX         install architecture-independent files in PREFIX
1777                           [$ac_default_prefix]
1778   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1779                           [PREFIX]
1780 
1781 By default, \`make install' will install all the files in
1782 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1783 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1784 for instance \`--prefix=\$HOME'.
1785 
1786 For better control, use the options below.
1787 
1788 Fine tuning of the installation directories:
1789   --bindir=DIR            user executables [EPREFIX/bin]
1790   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1791   --libexecdir=DIR        program executables [EPREFIX/libexec]
1792   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1793   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1794   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1795   --libdir=DIR            object code libraries [EPREFIX/lib]
1796   --includedir=DIR        C header files [PREFIX/include]
1797   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1798   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1799   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1800   --infodir=DIR           info documentation [DATAROOTDIR/info]
1801   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1802   --mandir=DIR            man documentation [DATAROOTDIR/man]
1803   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1804   --htmldir=DIR           html documentation [DOCDIR]
1805   --dvidir=DIR            dvi documentation [DOCDIR]
1806   --pdfdir=DIR            pdf documentation [DOCDIR]
1807   --psdir=DIR             ps documentation [DOCDIR]
1808 _ACEOF
1809 
1810   cat <<\_ACEOF
1811 
1812 X features:
1813   --x-includes=DIR    X include files are in DIR
1814   --x-libraries=DIR   X library files are in DIR
1815 
1816 System types:
1817   --build=BUILD     configure for building on BUILD [guessed]
1818   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1819   --target=TARGET   configure for building compilers for TARGET [HOST]
1820 _ACEOF
1821 fi
1822 
1823 if test -n "$ac_init_help"; then
1824   case $ac_init_help in
1825      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1826    esac
1827   cat <<\_ACEOF
1828 
1829 Optional Features:
1830   --disable-option-checking  ignore unrecognized --enable/--with options
1831   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1832   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1833   --enable-openjdk-only   suppress building custom source even if present
1834                           [disabled]
1835   --enable-debug          set the debug level to fastdebug (shorthand for
1836                           --with-debug-level=fastdebug) [disabled]
1837   --disable-headful       disable building headful support (graphical UI
1838                           support) [enabled]
1839   --enable-hotspot-test-in-build
1840                           run the Queens test after Hotspot build [disabled]
1841   --enable-unlimited-crypto
1842                           Enable unlimited crypto policy [disabled]
1843   --enable-rmiconnector-iiop
1844                           enable the JMX RMIConnector iiop transport
1845                           [disabled]
1846   --disable-debug-symbols disable generation of debug symbols [enabled]
1847   --disable-zip-debug-info
1848                           disable zipping of debug-info files [enabled]
1849   --disable-freetype-bundling
1850                           disable bundling of the freetype library with the
1851                           build result [enabled on Windows or when using
1852                           --with-freetype, disabled otherwise]
1853   --enable-sjavac         use sjavac to do fast incremental compiles
1854                           [disabled]
1855   --disable-precompiled-headers
1856                           disable using precompiled headers when compiling C++
1857                           [enabled]
1858   --enable-ccache         enable using ccache to speed up recompilations
1859                           [disabled]
1860 
1861 Optional Packages:
1862   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1863   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1864   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1865                           support it), e.g. --with-target-bits=32 [guessed]
1866   --with-custom-make-dir  Deprecated. Option is kept for backwards
1867                           compatibility and is ignored
1868   --with-jdk-variant      JDK variant to build (normal) [normal]
1869   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1870   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1871                           client, minimal1, kernel, zero, zeroshark, core)
1872                           [server]
1873   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1874                           optimized (HotSpot build only)) [release]
1875   --with-devkit           use this devkit for compilers, tools and resources
1876   --with-sys-root         alias for --with-sysroot for backwards compatability
1877   --with-sysroot          use this directory as sysroot
1878   --with-tools-dir        alias for --with-toolchain-path for backwards
1879                           compatibility
1880   --with-toolchain-path   prepend these directories when searching for
1881                           toolchain binaries (compilers etc)
1882   --with-extra-path       prepend these directories to the default path
1883   --with-sdk-name         use the platform SDK of the given name. [macosx]
1884   --with-conf-name        use this as the name of the configuration [generated
1885                           from important configuration options]
1886   --with-builddeps-conf   use this configuration file for the builddeps
1887   --with-builddeps-server download and use build dependencies from this server
1888                           url
1889   --with-builddeps-dir    store downloaded build dependencies here
1890                           [/localhome/builddeps]
1891   --with-builddeps-group  chgrp the downloaded build dependencies to this
1892                           group
1893   --with-cacerts-file     specify alternative cacerts file
1894   --with-milestone        Set milestone value for build [internal]
1895   --with-update-version   Set update version value for build [b00]
1896   --with-user-release-suffix
1897                           Add a custom string to the version string if build
1898                           number is not set.[username_builddateb00]
1899   --with-build-number     Set build number value for build [b00]
1900   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1901   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1902                           invocations of boot JDK, overriding the default
1903                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1904                           -enableassertions"
1905   --with-add-source-root  for each and every source directory, look in this
1906                           additional source root for the same directory; if it
1907                           exists and have files in it, include it in the build
1908   --with-override-source-root
1909                           for each and every source directory, look in this
1910                           override source root for the same directory; if it
1911                           exists, use that directory instead and ignore the
1912                           directory in the original source root
1913   --with-adds-and-overrides
1914                           use the subdirs 'adds' and 'overrides' in the
1915                           specified directory as add-source-root and
1916                           override-source-root
1917   --with-override-langtools
1918                           use this langtools dir for the build
1919   --with-override-corba   use this corba dir for the build
1920   --with-override-jaxp    use this jaxp dir for the build
1921   --with-override-jaxws   use this jaxws dir for the build
1922   --with-override-hotspot use this hotspot dir for the build
1923   --with-override-nashorn use this nashorn dir for the build
1924   --with-override-jdk     use this jdk dir for the build
1925   --with-import-hotspot   import hotspot binaries from this jdk image or
1926                           hotspot build dist dir instead of building from
1927                           source
1928   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1929                           to show possible values [platform 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-x                use the X Window System
1935   --with-cups             specify prefix directory for the cups package
1936                           (expecting the headers under PATH/include)
1937   --with-cups-include     specify directory for the cups include files
1938   --with-freetype         specify prefix directory for the freetype package
1939                           (expecting the libraries under PATH/lib and the
1940                           headers under PATH/include)
1941   --with-freetype-include specify directory for the freetype include files
1942   --with-freetype-lib     specify directory for the freetype library
1943   --with-alsa             specify prefix directory for the alsa package
1944                           (expecting the libraries under PATH/lib and the
1945                           headers under PATH/include)
1946   --with-alsa-include     specify directory for the alsa include files
1947   --with-alsa-lib         specify directory for the alsa library
1948   --with-libjpeg          use libjpeg from build system or OpenJDK source
1949                           (system, bundled) [bundled]
1950   --with-giflib           use giflib from build system or OpenJDK source
1951                           (system, bundled) [bundled]
1952   --with-lcms             use lcms2 from build system or OpenJDK source
1953                           (system, bundled) [bundled]
1954   --with-libpng           use libpng from build system or OpenJDK source
1955                           (system, bundled) [bundled]
1956   --with-zlib             use zlib from build system or OpenJDK source
1957                           (system, bundled) [bundled]
1958   --with-stdc++lib=<static>,<dynamic>,<default>
1959                           force linking of the C++ runtime on Linux to either
1960                           static or dynamic, default is static with dynamic as
1961                           fallback
1962   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1963                           only) [probed]
1964   --with-dxsdk            Deprecated. Option is kept for backwards
1965                           compatibility and is ignored
1966   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1967                           compatibility and is ignored
1968   --with-dxsdk-include    Deprecated. Option is kept for backwards
1969                           compatibility and is ignored
1970   --with-num-cores        number of cores in the build system, e.g.
1971                           --with-num-cores=8 [probed]
1972   --with-memory-size      memory (in MB) available in the build system, e.g.
1973                           --with-memory-size=1024 [probed]
1974   --with-jobs             number of parallel jobs to let make run [calculated
1975                           based on cores and memory]
1976   --with-sjavac-server-java
1977                           use this java binary for running the sjavac
1978                           background server [Boot JDK java]
1979   --with-ccache-dir       where to store ccache files [~/.ccache]
1980 
1981 Some influential environment variables:
1982   BASENAME    Override default value for BASENAME
1983   BASH        Override default value for BASH
1984   CAT         Override default value for CAT
1985   CHMOD       Override default value for CHMOD
1986   CMP         Override default value for CMP
1987   COMM        Override default value for COMM
1988   CP          Override default value for CP
1989   CUT         Override default value for CUT
1990   DATE        Override default value for DATE
1991   DIFF        Override default value for DIFF
1992   DIRNAME     Override default value for DIRNAME
1993   ECHO        Override default value for ECHO
1994   EXPR        Override default value for EXPR
1995   FILE        Override default value for FILE
1996   FIND        Override default value for FIND
1997   HEAD        Override default value for HEAD
1998   LN          Override default value for LN
1999   LS          Override default value for LS
2000   MKDIR       Override default value for MKDIR
2001   MKTEMP      Override default value for MKTEMP
2002   MV          Override default value for MV
2003   NAWK        Override default value for NAWK
2004   PRINTF      Override default value for PRINTF
2005   RM          Override default value for RM
2006   SH          Override default value for SH
2007   SORT        Override default value for SORT
2008   TAIL        Override default value for TAIL
2009   TAR         Override default value for TAR
2010   TEE         Override default value for TEE
2011   TOUCH       Override default value for TOUCH
2012   TR          Override default value for TR
2013   UNAME       Override default value for UNAME
2014   UNIQ        Override default value for UNIQ
2015   WC          Override default value for WC
2016   WHICH       Override default value for WHICH
2017   XARGS       Override default value for XARGS
2018   AWK         Override default value for AWK
2019   GREP        Override default value for GREP
2020   EGREP       Override default value for EGREP
2021   FGREP       Override default value for FGREP
2022   SED         Override default value for SED
2023   CYGPATH     Override default value for CYGPATH
2024   READLINK    Override default value for READLINK
2025   DF          Override default value for DF
2026   SETFILE     Override default value for SETFILE
2027   CPIO        Override default value for CPIO
2028   UNZIP       Override default value for UNZIP
2029   ZIP         Override default value for ZIP
2030   LDD         Override default value for LDD
2031   OTOOL       Override default value for OTOOL
2032   READELF     Override default value for READELF
2033   HG          Override default value for HG
2034   STAT        Override default value for STAT
2035   TIME        Override default value for TIME
2036   DSYMUTIL    Override default value for DSYMUTIL
2037   XATTR       Override default value for XATTR
2038   CODESIGN    Override default value for CODESIGN
2039   PKG_CONFIG  path to pkg-config utility
2040   JAVA        Override default value for JAVA
2041   JAVAC       Override default value for JAVAC
2042   JAVAH       Override default value for JAVAH
2043   JAR         Override default value for JAR
2044   NATIVE2ASCII
2045               Override default value for NATIVE2ASCII
2046   JARSIGNER   Override default value for JARSIGNER
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   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2081   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2082   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2083   PNG_LIBS    linker flags for PNG, overriding pkg-config
2084   LIBFFI_CFLAGS
2085               C compiler flags for LIBFFI, overriding pkg-config
2086   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2087   CCACHE      Override default value for CCACHE
2088 
2089 Use these variables to override the choices made by `configure' or to help
2090 it to find libraries and programs with nonstandard names/locations.
2091 
2092 Report bugs to <build-dev@openjdk.java.net>.
2093 OpenJDK home page: <http://openjdk.java.net>.
2094 _ACEOF
2095 ac_status=$?
2096 fi
2097 
2098 if test "$ac_init_help" = "recursive"; then
2099   # If there are subdirs, report their specific --help.
2100   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2101     test -d "$ac_dir" ||
2102       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2103       continue
2104     ac_builddir=.
2105 
2106 case "$ac_dir" in
2107 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2108 *)
2109   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2110   # A ".." for each directory in $ac_dir_suffix.
2111   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2112   case $ac_top_builddir_sub in
2113   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2114   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2115   esac ;;
2116 esac
2117 ac_abs_top_builddir=$ac_pwd
2118 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2119 # for backward compatibility:
2120 ac_top_builddir=$ac_top_build_prefix
2121 
2122 case $srcdir in
2123   .)  # We are building in place.
2124     ac_srcdir=.
2125     ac_top_srcdir=$ac_top_builddir_sub
2126     ac_abs_top_srcdir=$ac_pwd ;;
2127   [\\/]* | ?:[\\/]* )  # Absolute name.
2128     ac_srcdir=$srcdir$ac_dir_suffix;
2129     ac_top_srcdir=$srcdir
2130     ac_abs_top_srcdir=$srcdir ;;
2131   *) # Relative name.
2132     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2133     ac_top_srcdir=$ac_top_build_prefix$srcdir
2134     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2135 esac
2136 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2137 
2138     cd "$ac_dir" || { ac_status=$?; continue; }
2139     # Check for guested configure.
2140     if test -f "$ac_srcdir/configure.gnu"; then
2141       echo &&
2142       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2143     elif test -f "$ac_srcdir/configure"; then
2144       echo &&
2145       $SHELL "$ac_srcdir/configure" --help=recursive
2146     else
2147       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2148     fi || ac_status=$?
2149     cd "$ac_pwd" || { ac_status=$?; break; }
2150   done
2151 fi
2152 
2153 test -n "$ac_init_help" && exit $ac_status
2154 if $ac_init_version; then
2155   cat <<\_ACEOF
2156 OpenJDK configure jdk9
2157 generated by GNU Autoconf 2.69
2158 
2159 Copyright (C) 2012 Free Software Foundation, Inc.
2160 This configure script is free software; the Free Software Foundation
2161 gives unlimited permission to copy, distribute and modify it.
2162 _ACEOF
2163   exit
2164 fi
2165 
2166 ## ------------------------ ##
2167 ## Autoconf initialization. ##
2168 ## ------------------------ ##
2169 
2170 # ac_fn_c_try_compile LINENO
2171 # --------------------------
2172 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2173 ac_fn_c_try_compile ()
2174 {
2175   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2176   rm -f conftest.$ac_objext
2177   if { { ac_try="$ac_compile"
2178 case "(($ac_try" in
2179   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2180   *) ac_try_echo=$ac_try;;
2181 esac
2182 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2183 $as_echo "$ac_try_echo"; } >&5
2184   (eval "$ac_compile") 2>conftest.err
2185   ac_status=$?
2186   if test -s conftest.err; then
2187     grep -v '^ *+' conftest.err >conftest.er1
2188     cat conftest.er1 >&5
2189     mv -f conftest.er1 conftest.err
2190   fi
2191   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2192   test $ac_status = 0; } && {
2193          test -z "$ac_c_werror_flag" ||
2194          test ! -s conftest.err
2195        } && test -s conftest.$ac_objext; then :
2196   ac_retval=0
2197 else
2198   $as_echo "$as_me: failed program was:" >&5
2199 sed 's/^/| /' conftest.$ac_ext >&5
2200 
2201         ac_retval=1
2202 fi
2203   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2204   as_fn_set_status $ac_retval
2205 
2206 } # ac_fn_c_try_compile
2207 
2208 # ac_fn_cxx_try_compile LINENO
2209 # ----------------------------
2210 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2211 ac_fn_cxx_try_compile ()
2212 {
2213   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2214   rm -f conftest.$ac_objext
2215   if { { ac_try="$ac_compile"
2216 case "(($ac_try" in
2217   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2218   *) ac_try_echo=$ac_try;;
2219 esac
2220 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2221 $as_echo "$ac_try_echo"; } >&5
2222   (eval "$ac_compile") 2>conftest.err
2223   ac_status=$?
2224   if test -s conftest.err; then
2225     grep -v '^ *+' conftest.err >conftest.er1
2226     cat conftest.er1 >&5
2227     mv -f conftest.er1 conftest.err
2228   fi
2229   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2230   test $ac_status = 0; } && {
2231          test -z "$ac_cxx_werror_flag" ||
2232          test ! -s conftest.err
2233        } && test -s conftest.$ac_objext; then :
2234   ac_retval=0
2235 else
2236   $as_echo "$as_me: failed program was:" >&5
2237 sed 's/^/| /' conftest.$ac_ext >&5
2238 
2239         ac_retval=1
2240 fi
2241   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2242   as_fn_set_status $ac_retval
2243 
2244 } # ac_fn_cxx_try_compile
2245 
2246 # ac_fn_c_try_cpp LINENO
2247 # ----------------------
2248 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2249 ac_fn_c_try_cpp ()
2250 {
2251   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2252   if { { ac_try="$ac_cpp conftest.$ac_ext"
2253 case "(($ac_try" in
2254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2255   *) ac_try_echo=$ac_try;;
2256 esac
2257 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2258 $as_echo "$ac_try_echo"; } >&5
2259   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2260   ac_status=$?
2261   if test -s conftest.err; then
2262     grep -v '^ *+' conftest.err >conftest.er1
2263     cat conftest.er1 >&5
2264     mv -f conftest.er1 conftest.err
2265   fi
2266   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2267   test $ac_status = 0; } > conftest.i && {
2268          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2269          test ! -s conftest.err
2270        }; then :
2271   ac_retval=0
2272 else
2273   $as_echo "$as_me: failed program was:" >&5
2274 sed 's/^/| /' conftest.$ac_ext >&5
2275 
2276     ac_retval=1
2277 fi
2278   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2279   as_fn_set_status $ac_retval
2280 
2281 } # ac_fn_c_try_cpp
2282 
2283 # ac_fn_cxx_try_cpp LINENO
2284 # ------------------------
2285 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2286 ac_fn_cxx_try_cpp ()
2287 {
2288   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2289   if { { ac_try="$ac_cpp conftest.$ac_ext"
2290 case "(($ac_try" in
2291   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2292   *) ac_try_echo=$ac_try;;
2293 esac
2294 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2295 $as_echo "$ac_try_echo"; } >&5
2296   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2297   ac_status=$?
2298   if test -s conftest.err; then
2299     grep -v '^ *+' conftest.err >conftest.er1
2300     cat conftest.er1 >&5
2301     mv -f conftest.er1 conftest.err
2302   fi
2303   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2304   test $ac_status = 0; } > conftest.i && {
2305          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2306          test ! -s conftest.err
2307        }; then :
2308   ac_retval=0
2309 else
2310   $as_echo "$as_me: failed program was:" >&5
2311 sed 's/^/| /' conftest.$ac_ext >&5
2312 
2313     ac_retval=1
2314 fi
2315   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2316   as_fn_set_status $ac_retval
2317 
2318 } # ac_fn_cxx_try_cpp
2319 
2320 # ac_fn_objc_try_compile LINENO
2321 # -----------------------------
2322 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2323 ac_fn_objc_try_compile ()
2324 {
2325   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2326   rm -f conftest.$ac_objext
2327   if { { ac_try="$ac_compile"
2328 case "(($ac_try" in
2329   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2330   *) ac_try_echo=$ac_try;;
2331 esac
2332 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2333 $as_echo "$ac_try_echo"; } >&5
2334   (eval "$ac_compile") 2>conftest.err
2335   ac_status=$?
2336   if test -s conftest.err; then
2337     grep -v '^ *+' conftest.err >conftest.er1
2338     cat conftest.er1 >&5
2339     mv -f conftest.er1 conftest.err
2340   fi
2341   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2342   test $ac_status = 0; } && {
2343          test -z "$ac_objc_werror_flag" ||
2344          test ! -s conftest.err
2345        } && test -s conftest.$ac_objext; then :
2346   ac_retval=0
2347 else
2348   $as_echo "$as_me: failed program was:" >&5
2349 sed 's/^/| /' conftest.$ac_ext >&5
2350 
2351         ac_retval=1
2352 fi
2353   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2354   as_fn_set_status $ac_retval
2355 
2356 } # ac_fn_objc_try_compile
2357 
2358 # ac_fn_c_try_link LINENO
2359 # -----------------------
2360 # Try to link conftest.$ac_ext, and return whether this succeeded.
2361 ac_fn_c_try_link ()
2362 {
2363   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2364   rm -f conftest.$ac_objext conftest$ac_exeext
2365   if { { ac_try="$ac_link"
2366 case "(($ac_try" in
2367   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2368   *) ac_try_echo=$ac_try;;
2369 esac
2370 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2371 $as_echo "$ac_try_echo"; } >&5
2372   (eval "$ac_link") 2>conftest.err
2373   ac_status=$?
2374   if test -s conftest.err; then
2375     grep -v '^ *+' conftest.err >conftest.er1
2376     cat conftest.er1 >&5
2377     mv -f conftest.er1 conftest.err
2378   fi
2379   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2380   test $ac_status = 0; } && {
2381          test -z "$ac_c_werror_flag" ||
2382          test ! -s conftest.err
2383        } && test -s conftest$ac_exeext && {
2384          test "$cross_compiling" = yes ||
2385          test -x conftest$ac_exeext
2386        }; then :
2387   ac_retval=0
2388 else
2389   $as_echo "$as_me: failed program was:" >&5
2390 sed 's/^/| /' conftest.$ac_ext >&5
2391 
2392         ac_retval=1
2393 fi
2394   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2395   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2396   # interfere with the next link command; also delete a directory that is
2397   # left behind by Apple's compiler.  We do this before executing the actions.
2398   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2399   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2400   as_fn_set_status $ac_retval
2401 
2402 } # ac_fn_c_try_link
2403 
2404 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2405 # ---------------------------------------------------------
2406 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2407 # the include files in INCLUDES and setting the cache variable VAR
2408 # accordingly.
2409 ac_fn_cxx_check_header_mongrel ()
2410 {
2411   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2412   if eval \${$3+:} false; then :
2413   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2414 $as_echo_n "checking for $2... " >&6; }
2415 if eval \${$3+:} false; then :
2416   $as_echo_n "(cached) " >&6
2417 fi
2418 eval ac_res=\$$3
2419                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2420 $as_echo "$ac_res" >&6; }
2421 else
2422   # Is the header compilable?
2423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2424 $as_echo_n "checking $2 usability... " >&6; }
2425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426 /* end confdefs.h.  */
2427 $4
2428 #include <$2>
2429 _ACEOF
2430 if ac_fn_cxx_try_compile "$LINENO"; then :
2431   ac_header_compiler=yes
2432 else
2433   ac_header_compiler=no
2434 fi
2435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2437 $as_echo "$ac_header_compiler" >&6; }
2438 
2439 # Is the header present?
2440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2441 $as_echo_n "checking $2 presence... " >&6; }
2442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2443 /* end confdefs.h.  */
2444 #include <$2>
2445 _ACEOF
2446 if ac_fn_cxx_try_cpp "$LINENO"; then :
2447   ac_header_preproc=yes
2448 else
2449   ac_header_preproc=no
2450 fi
2451 rm -f conftest.err conftest.i conftest.$ac_ext
2452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2453 $as_echo "$ac_header_preproc" >&6; }
2454 
2455 # So?  What about this header?
2456 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2457   yes:no: )
2458     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2459 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2460     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2461 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2462     ;;
2463   no:yes:* )
2464     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2465 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2466     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2467 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2468     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2469 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2470     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2471 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2472     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2473 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2474 ( $as_echo "## ----------------------------------------- ##
2475 ## Report this to build-dev@openjdk.java.net ##
2476 ## ----------------------------------------- ##"
2477      ) | sed "s/^/$as_me: WARNING:     /" >&2
2478     ;;
2479 esac
2480   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2481 $as_echo_n "checking for $2... " >&6; }
2482 if eval \${$3+:} false; then :
2483   $as_echo_n "(cached) " >&6
2484 else
2485   eval "$3=\$ac_header_compiler"
2486 fi
2487 eval ac_res=\$$3
2488                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2489 $as_echo "$ac_res" >&6; }
2490 fi
2491   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2492 
2493 } # ac_fn_cxx_check_header_mongrel
2494 
2495 # ac_fn_cxx_try_run LINENO
2496 # ------------------------
2497 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2498 # that executables *can* be run.
2499 ac_fn_cxx_try_run ()
2500 {
2501   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2502   if { { ac_try="$ac_link"
2503 case "(($ac_try" in
2504   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2505   *) ac_try_echo=$ac_try;;
2506 esac
2507 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2508 $as_echo "$ac_try_echo"; } >&5
2509   (eval "$ac_link") 2>&5
2510   ac_status=$?
2511   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2512   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2513   { { case "(($ac_try" in
2514   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2515   *) ac_try_echo=$ac_try;;
2516 esac
2517 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2518 $as_echo "$ac_try_echo"; } >&5
2519   (eval "$ac_try") 2>&5
2520   ac_status=$?
2521   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2522   test $ac_status = 0; }; }; then :
2523   ac_retval=0
2524 else
2525   $as_echo "$as_me: program exited with status $ac_status" >&5
2526        $as_echo "$as_me: failed program was:" >&5
2527 sed 's/^/| /' conftest.$ac_ext >&5
2528 
2529        ac_retval=$ac_status
2530 fi
2531   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2532   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2533   as_fn_set_status $ac_retval
2534 
2535 } # ac_fn_cxx_try_run
2536 
2537 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2538 # ---------------------------------------------------------
2539 # Tests whether HEADER exists and can be compiled using the include files in
2540 # INCLUDES, setting the cache variable VAR accordingly.
2541 ac_fn_cxx_check_header_compile ()
2542 {
2543   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2544   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2545 $as_echo_n "checking for $2... " >&6; }
2546 if eval \${$3+:} false; then :
2547   $as_echo_n "(cached) " >&6
2548 else
2549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2550 /* end confdefs.h.  */
2551 $4
2552 #include <$2>
2553 _ACEOF
2554 if ac_fn_cxx_try_compile "$LINENO"; then :
2555   eval "$3=yes"
2556 else
2557   eval "$3=no"
2558 fi
2559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2560 fi
2561 eval ac_res=\$$3
2562                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2563 $as_echo "$ac_res" >&6; }
2564   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2565 
2566 } # ac_fn_cxx_check_header_compile
2567 
2568 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2569 # ----------------------------------------------
2570 # Tries to find the compile-time value of EXPR in a program that includes
2571 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2572 # computed
2573 ac_fn_cxx_compute_int ()
2574 {
2575   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2576   if test "$cross_compiling" = yes; then
2577     # Depending upon the size, compute the lo and hi bounds.
2578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2579 /* end confdefs.h.  */
2580 $4
2581 int
2582 main ()
2583 {
2584 static int test_array [1 - 2 * !(($2) >= 0)];
2585 test_array [0] = 0;
2586 return test_array [0];
2587 
2588   ;
2589   return 0;
2590 }
2591 _ACEOF
2592 if ac_fn_cxx_try_compile "$LINENO"; then :
2593   ac_lo=0 ac_mid=0
2594   while :; do
2595     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2596 /* end confdefs.h.  */
2597 $4
2598 int
2599 main ()
2600 {
2601 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2602 test_array [0] = 0;
2603 return test_array [0];
2604 
2605   ;
2606   return 0;
2607 }
2608 _ACEOF
2609 if ac_fn_cxx_try_compile "$LINENO"; then :
2610   ac_hi=$ac_mid; break
2611 else
2612   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2613                         if test $ac_lo -le $ac_mid; then
2614                           ac_lo= ac_hi=
2615                           break
2616                         fi
2617                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2618 fi
2619 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2620   done
2621 else
2622   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2623 /* end confdefs.h.  */
2624 $4
2625 int
2626 main ()
2627 {
2628 static int test_array [1 - 2 * !(($2) < 0)];
2629 test_array [0] = 0;
2630 return test_array [0];
2631 
2632   ;
2633   return 0;
2634 }
2635 _ACEOF
2636 if ac_fn_cxx_try_compile "$LINENO"; then :
2637   ac_hi=-1 ac_mid=-1
2638   while :; do
2639     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2640 /* end confdefs.h.  */
2641 $4
2642 int
2643 main ()
2644 {
2645 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2646 test_array [0] = 0;
2647 return test_array [0];
2648 
2649   ;
2650   return 0;
2651 }
2652 _ACEOF
2653 if ac_fn_cxx_try_compile "$LINENO"; then :
2654   ac_lo=$ac_mid; break
2655 else
2656   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2657                         if test $ac_mid -le $ac_hi; then
2658                           ac_lo= ac_hi=
2659                           break
2660                         fi
2661                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2662 fi
2663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2664   done
2665 else
2666   ac_lo= ac_hi=
2667 fi
2668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2669 fi
2670 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2671 # Binary search between lo and hi bounds.
2672 while test "x$ac_lo" != "x$ac_hi"; do
2673   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2674   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2675 /* end confdefs.h.  */
2676 $4
2677 int
2678 main ()
2679 {
2680 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2681 test_array [0] = 0;
2682 return test_array [0];
2683 
2684   ;
2685   return 0;
2686 }
2687 _ACEOF
2688 if ac_fn_cxx_try_compile "$LINENO"; then :
2689   ac_hi=$ac_mid
2690 else
2691   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2692 fi
2693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2694 done
2695 case $ac_lo in #((
2696 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2697 '') ac_retval=1 ;;
2698 esac
2699   else
2700     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2701 /* end confdefs.h.  */
2702 $4
2703 static long int longval () { return $2; }
2704 static unsigned long int ulongval () { return $2; }
2705 #include <stdio.h>
2706 #include <stdlib.h>
2707 int
2708 main ()
2709 {
2710 
2711   FILE *f = fopen ("conftest.val", "w");
2712   if (! f)
2713     return 1;
2714   if (($2) < 0)
2715     {
2716       long int i = longval ();
2717       if (i != ($2))
2718         return 1;
2719       fprintf (f, "%ld", i);
2720     }
2721   else
2722     {
2723       unsigned long int i = ulongval ();
2724       if (i != ($2))
2725         return 1;
2726       fprintf (f, "%lu", i);
2727     }
2728   /* Do not output a trailing newline, as this causes \r\n confusion
2729      on some platforms.  */
2730   return ferror (f) || fclose (f) != 0;
2731 
2732   ;
2733   return 0;
2734 }
2735 _ACEOF
2736 if ac_fn_cxx_try_run "$LINENO"; then :
2737   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2738 else
2739   ac_retval=1
2740 fi
2741 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2742   conftest.$ac_objext conftest.beam conftest.$ac_ext
2743 rm -f conftest.val
2744 
2745   fi
2746   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2747   as_fn_set_status $ac_retval
2748 
2749 } # ac_fn_cxx_compute_int
2750 
2751 # ac_fn_cxx_try_link LINENO
2752 # -------------------------
2753 # Try to link conftest.$ac_ext, and return whether this succeeded.
2754 ac_fn_cxx_try_link ()
2755 {
2756   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2757   rm -f conftest.$ac_objext conftest$ac_exeext
2758   if { { ac_try="$ac_link"
2759 case "(($ac_try" in
2760   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2761   *) ac_try_echo=$ac_try;;
2762 esac
2763 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2764 $as_echo "$ac_try_echo"; } >&5
2765   (eval "$ac_link") 2>conftest.err
2766   ac_status=$?
2767   if test -s conftest.err; then
2768     grep -v '^ *+' conftest.err >conftest.er1
2769     cat conftest.er1 >&5
2770     mv -f conftest.er1 conftest.err
2771   fi
2772   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2773   test $ac_status = 0; } && {
2774          test -z "$ac_cxx_werror_flag" ||
2775          test ! -s conftest.err
2776        } && test -s conftest$ac_exeext && {
2777          test "$cross_compiling" = yes ||
2778          test -x conftest$ac_exeext
2779        }; then :
2780   ac_retval=0
2781 else
2782   $as_echo "$as_me: failed program was:" >&5
2783 sed 's/^/| /' conftest.$ac_ext >&5
2784 
2785         ac_retval=1
2786 fi
2787   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2788   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2789   # interfere with the next link command; also delete a directory that is
2790   # left behind by Apple's compiler.  We do this before executing the actions.
2791   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2792   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2793   as_fn_set_status $ac_retval
2794 
2795 } # ac_fn_cxx_try_link
2796 
2797 # ac_fn_cxx_check_func LINENO FUNC VAR
2798 # ------------------------------------
2799 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2800 ac_fn_cxx_check_func ()
2801 {
2802   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2803   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2804 $as_echo_n "checking for $2... " >&6; }
2805 if eval \${$3+:} false; then :
2806   $as_echo_n "(cached) " >&6
2807 else
2808   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2809 /* end confdefs.h.  */
2810 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2811    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2812 #define $2 innocuous_$2
2813 
2814 /* System header to define __stub macros and hopefully few prototypes,
2815     which can conflict with char $2 (); below.
2816     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2817     <limits.h> exists even on freestanding compilers.  */
2818 
2819 #ifdef __STDC__
2820 # include <limits.h>
2821 #else
2822 # include <assert.h>
2823 #endif
2824 
2825 #undef $2
2826 
2827 /* Override any GCC internal prototype to avoid an error.
2828    Use char because int might match the return type of a GCC
2829    builtin and then its argument prototype would still apply.  */
2830 #ifdef __cplusplus
2831 extern "C"
2832 #endif
2833 char $2 ();
2834 /* The GNU C library defines this for functions which it implements
2835     to always fail with ENOSYS.  Some functions are actually named
2836     something starting with __ and the normal name is an alias.  */
2837 #if defined __stub_$2 || defined __stub___$2
2838 choke me
2839 #endif
2840 
2841 int
2842 main ()
2843 {
2844 return $2 ();
2845   ;
2846   return 0;
2847 }
2848 _ACEOF
2849 if ac_fn_cxx_try_link "$LINENO"; then :
2850   eval "$3=yes"
2851 else
2852   eval "$3=no"
2853 fi
2854 rm -f core conftest.err conftest.$ac_objext \
2855     conftest$ac_exeext conftest.$ac_ext
2856 fi
2857 eval ac_res=\$$3
2858                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2859 $as_echo "$ac_res" >&6; }
2860   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2861 
2862 } # ac_fn_cxx_check_func
2863 
2864 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2865 # -------------------------------------------------------
2866 # Tests whether HEADER exists and can be compiled using the include files in
2867 # INCLUDES, setting the cache variable VAR accordingly.
2868 ac_fn_c_check_header_compile ()
2869 {
2870   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2871   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2872 $as_echo_n "checking for $2... " >&6; }
2873 if eval \${$3+:} false; then :
2874   $as_echo_n "(cached) " >&6
2875 else
2876   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2877 /* end confdefs.h.  */
2878 $4
2879 #include <$2>
2880 _ACEOF
2881 if ac_fn_c_try_compile "$LINENO"; then :
2882   eval "$3=yes"
2883 else
2884   eval "$3=no"
2885 fi
2886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2887 fi
2888 eval ac_res=\$$3
2889                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2890 $as_echo "$ac_res" >&6; }
2891   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2892 
2893 } # ac_fn_c_check_header_compile
2894 cat >config.log <<_ACEOF
2895 This file contains any messages produced by compilers while
2896 running configure, to aid debugging if configure makes a mistake.
2897 
2898 It was created by OpenJDK $as_me jdk9, which was
2899 generated by GNU Autoconf 2.69.  Invocation command line was
2900 
2901   $ $0 $@
2902 
2903 _ACEOF
2904 exec 5>>config.log
2905 {
2906 cat <<_ASUNAME
2907 ## --------- ##
2908 ## Platform. ##
2909 ## --------- ##
2910 
2911 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2912 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2913 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2914 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2915 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2916 
2917 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2918 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2919 
2920 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2921 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2922 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2923 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2924 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2925 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2926 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2927 
2928 _ASUNAME
2929 
2930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2931 for as_dir in $PATH
2932 do
2933   IFS=$as_save_IFS
2934   test -z "$as_dir" && as_dir=.
2935     $as_echo "PATH: $as_dir"
2936   done
2937 IFS=$as_save_IFS
2938 
2939 } >&5
2940 
2941 cat >&5 <<_ACEOF
2942 
2943 
2944 ## ----------- ##
2945 ## Core tests. ##
2946 ## ----------- ##
2947 
2948 _ACEOF
2949 
2950 
2951 # Keep a trace of the command line.
2952 # Strip out --no-create and --no-recursion so they do not pile up.
2953 # Strip out --silent because we don't want to record it for future runs.
2954 # Also quote any args containing shell meta-characters.
2955 # Make two passes to allow for proper duplicate-argument suppression.
2956 ac_configure_args=
2957 ac_configure_args0=
2958 ac_configure_args1=
2959 ac_must_keep_next=false
2960 for ac_pass in 1 2
2961 do
2962   for ac_arg
2963   do
2964     case $ac_arg in
2965     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2966     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2967     | -silent | --silent | --silen | --sile | --sil)
2968       continue ;;
2969     *\'*)
2970       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2971     esac
2972     case $ac_pass in
2973     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2974     2)
2975       as_fn_append ac_configure_args1 " '$ac_arg'"
2976       if test $ac_must_keep_next = true; then
2977         ac_must_keep_next=false # Got value, back to normal.
2978       else
2979         case $ac_arg in
2980           *=* | --config-cache | -C | -disable-* | --disable-* \
2981           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2982           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2983           | -with-* | --with-* | -without-* | --without-* | --x)
2984             case "$ac_configure_args0 " in
2985               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2986             esac
2987             ;;
2988           -* ) ac_must_keep_next=true ;;
2989         esac
2990       fi
2991       as_fn_append ac_configure_args " '$ac_arg'"
2992       ;;
2993     esac
2994   done
2995 done
2996 { ac_configure_args0=; unset ac_configure_args0;}
2997 { ac_configure_args1=; unset ac_configure_args1;}
2998 
2999 # When interrupted or exit'd, cleanup temporary files, and complete
3000 # config.log.  We remove comments because anyway the quotes in there
3001 # would cause problems or look ugly.
3002 # WARNING: Use '\'' to represent an apostrophe within the trap.
3003 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3004 trap 'exit_status=$?
3005   # Save into config.log some information that might help in debugging.
3006   {
3007     echo
3008 
3009     $as_echo "## ---------------- ##
3010 ## Cache variables. ##
3011 ## ---------------- ##"
3012     echo
3013     # The following way of writing the cache mishandles newlines in values,
3014 (
3015   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3016     eval ac_val=\$$ac_var
3017     case $ac_val in #(
3018     *${as_nl}*)
3019       case $ac_var in #(
3020       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3021 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3022       esac
3023       case $ac_var in #(
3024       _ | IFS | as_nl) ;; #(
3025       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3026       *) { eval $ac_var=; unset $ac_var;} ;;
3027       esac ;;
3028     esac
3029   done
3030   (set) 2>&1 |
3031     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3032     *${as_nl}ac_space=\ *)
3033       sed -n \
3034         "s/'\''/'\''\\\\'\'''\''/g;
3035           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3036       ;; #(
3037     *)
3038       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3039       ;;
3040     esac |
3041     sort
3042 )
3043     echo
3044 
3045     $as_echo "## ----------------- ##
3046 ## Output variables. ##
3047 ## ----------------- ##"
3048     echo
3049     for ac_var in $ac_subst_vars
3050     do
3051       eval ac_val=\$$ac_var
3052       case $ac_val in
3053       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3054       esac
3055       $as_echo "$ac_var='\''$ac_val'\''"
3056     done | sort
3057     echo
3058 
3059     if test -n "$ac_subst_files"; then
3060       $as_echo "## ------------------- ##
3061 ## File substitutions. ##
3062 ## ------------------- ##"
3063       echo
3064       for ac_var in $ac_subst_files
3065       do
3066         eval ac_val=\$$ac_var
3067         case $ac_val in
3068         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3069         esac
3070         $as_echo "$ac_var='\''$ac_val'\''"
3071       done | sort
3072       echo
3073     fi
3074 
3075     if test -s confdefs.h; then
3076       $as_echo "## ----------- ##
3077 ## confdefs.h. ##
3078 ## ----------- ##"
3079       echo
3080       cat confdefs.h
3081       echo
3082     fi
3083     test "$ac_signal" != 0 &&
3084       $as_echo "$as_me: caught signal $ac_signal"
3085     $as_echo "$as_me: exit $exit_status"
3086   } >&5
3087   rm -f core *.core core.conftest.* &&
3088     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3089     exit $exit_status
3090 ' 0
3091 for ac_signal in 1 2 13 15; do
3092   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3093 done
3094 ac_signal=0
3095 
3096 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3097 rm -f -r conftest* confdefs.h
3098 
3099 $as_echo "/* confdefs.h */" > confdefs.h
3100 
3101 # Predefined preprocessor variables.
3102 
3103 cat >>confdefs.h <<_ACEOF
3104 #define PACKAGE_NAME "$PACKAGE_NAME"
3105 _ACEOF
3106 
3107 cat >>confdefs.h <<_ACEOF
3108 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3109 _ACEOF
3110 
3111 cat >>confdefs.h <<_ACEOF
3112 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3113 _ACEOF
3114 
3115 cat >>confdefs.h <<_ACEOF
3116 #define PACKAGE_STRING "$PACKAGE_STRING"
3117 _ACEOF
3118 
3119 cat >>confdefs.h <<_ACEOF
3120 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3121 _ACEOF
3122 
3123 cat >>confdefs.h <<_ACEOF
3124 #define PACKAGE_URL "$PACKAGE_URL"
3125 _ACEOF
3126 
3127 
3128 # Let the site file select an alternate cache file if it wants to.
3129 # Prefer an explicitly selected file to automatically selected ones.
3130 ac_site_file1=NONE
3131 ac_site_file2=NONE
3132 if test -n "$CONFIG_SITE"; then
3133   # We do not want a PATH search for config.site.
3134   case $CONFIG_SITE in #((
3135     -*)  ac_site_file1=./$CONFIG_SITE;;
3136     */*) ac_site_file1=$CONFIG_SITE;;
3137     *)   ac_site_file1=./$CONFIG_SITE;;
3138   esac
3139 elif test "x$prefix" != xNONE; then
3140   ac_site_file1=$prefix/share/config.site
3141   ac_site_file2=$prefix/etc/config.site
3142 else
3143   ac_site_file1=$ac_default_prefix/share/config.site
3144   ac_site_file2=$ac_default_prefix/etc/config.site
3145 fi
3146 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3147 do
3148   test "x$ac_site_file" = xNONE && continue
3149   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3150     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3151 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3152     sed 's/^/| /' "$ac_site_file" >&5
3153     . "$ac_site_file" \
3154       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3155 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3156 as_fn_error $? "failed to load site script $ac_site_file
3157 See \`config.log' for more details" "$LINENO" 5; }
3158   fi
3159 done
3160 
3161 if test -r "$cache_file"; then
3162   # Some versions of bash will fail to source /dev/null (special files
3163   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3164   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3165     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3166 $as_echo "$as_me: loading cache $cache_file" >&6;}
3167     case $cache_file in
3168       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3169       *)                      . "./$cache_file";;
3170     esac
3171   fi
3172 else
3173   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3174 $as_echo "$as_me: creating cache $cache_file" >&6;}
3175   >$cache_file
3176 fi
3177 
3178 # Check that the precious variables saved in the cache have kept the same
3179 # value.
3180 ac_cache_corrupted=false
3181 for ac_var in $ac_precious_vars; do
3182   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3183   eval ac_new_set=\$ac_env_${ac_var}_set
3184   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3185   eval ac_new_val=\$ac_env_${ac_var}_value
3186   case $ac_old_set,$ac_new_set in
3187     set,)
3188       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3189 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3190       ac_cache_corrupted=: ;;
3191     ,set)
3192       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3193 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3194       ac_cache_corrupted=: ;;
3195     ,);;
3196     *)
3197       if test "x$ac_old_val" != "x$ac_new_val"; then
3198         # differences in whitespace do not lead to failure.
3199         ac_old_val_w=`echo x $ac_old_val`
3200         ac_new_val_w=`echo x $ac_new_val`
3201         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3202           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3203 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3204           ac_cache_corrupted=:
3205         else
3206           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3207 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3208           eval $ac_var=\$ac_old_val
3209         fi
3210         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3211 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3212         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3213 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3214       fi;;
3215   esac
3216   # Pass precious variables to config.status.
3217   if test "$ac_new_set" = set; then
3218     case $ac_new_val in
3219     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3220     *) ac_arg=$ac_var=$ac_new_val ;;
3221     esac
3222     case " $ac_configure_args " in
3223       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3224       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3225     esac
3226   fi
3227 done
3228 if $ac_cache_corrupted; then
3229   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3230 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3231   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3232 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3233   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3234 fi
3235 ## -------------------- ##
3236 ## Main body of script. ##
3237 ## -------------------- ##
3238 
3239 ac_ext=c
3240 ac_cpp='$CPP $CPPFLAGS'
3241 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3242 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3243 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3244 
3245 
3246 
3247 ac_aux_dir=
3248 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3249   if test -f "$ac_dir/install-sh"; then
3250     ac_aux_dir=$ac_dir
3251     ac_install_sh="$ac_aux_dir/install-sh -c"
3252     break
3253   elif test -f "$ac_dir/install.sh"; then
3254     ac_aux_dir=$ac_dir
3255     ac_install_sh="$ac_aux_dir/install.sh -c"
3256     break
3257   elif test -f "$ac_dir/shtool"; then
3258     ac_aux_dir=$ac_dir
3259     ac_install_sh="$ac_aux_dir/shtool install -c"
3260     break
3261   fi
3262 done
3263 if test -z "$ac_aux_dir"; then
3264   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
3265 fi
3266 
3267 # These three variables are undocumented and unsupported,
3268 # and are intended to be withdrawn in a future Autoconf release.
3269 # They can cause serious problems if a builder's source tree is in a directory
3270 # whose full name contains unusual characters.
3271 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3272 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3273 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3274 
3275 
3276 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3277 
3278 #
3279 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3280 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3281 #
3282 # This code is free software; you can redistribute it and/or modify it
3283 # under the terms of the GNU General Public License version 2 only, as
3284 # published by the Free Software Foundation.  Oracle designates this
3285 # particular file as subject to the "Classpath" exception as provided
3286 # by Oracle in the LICENSE file that accompanied this code.
3287 #
3288 # This code is distributed in the hope that it will be useful, but WITHOUT
3289 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3290 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3291 # version 2 for more details (a copy is included in the LICENSE file that
3292 # accompanied this code).
3293 #
3294 # You should have received a copy of the GNU General Public License version
3295 # 2 along with this work; if not, write to the Free Software Foundation,
3296 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3297 #
3298 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3299 # or visit www.oracle.com if you need additional information or have any
3300 # questions.
3301 #
3302 
3303 #
3304 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3305 #
3306 # This program is free software; you can redistribute it and/or modify
3307 # it under the terms of the GNU General Public License as published by
3308 # the Free Software Foundation; either version 2 of the License, or
3309 # (at your option) any later version.
3310 #
3311 # This program is distributed in the hope that it will be useful, but
3312 # WITHOUT ANY WARRANTY; without even the implied warranty of
3313 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3314 # General Public License for more details.
3315 #
3316 # You should have received a copy of the GNU General Public License
3317 # along with this program; if not, write to the Free Software
3318 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3319 #
3320 # As a special exception to the GNU General Public License, if you
3321 # distribute this file as part of a program that contains a
3322 # configuration script generated by Autoconf, you may include it under
3323 # the same distribution terms that you use for the rest of that program.
3324 
3325 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3326 # ----------------------------------
3327 # PKG_PROG_PKG_CONFIG
3328 
3329 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3330 #
3331 # Check to see whether a particular set of modules exists.  Similar
3332 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3333 #
3334 #
3335 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3336 # this or PKG_CHECK_MODULES is called, or make sure to call
3337 # PKG_CHECK_EXISTS manually
3338 # --------------------------------------------------------------
3339 
3340 
3341 
3342 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3343 # ---------------------------------------------
3344 # _PKG_CONFIG
3345 
3346 # _PKG_SHORT_ERRORS_SUPPORTED
3347 # -----------------------------
3348 # _PKG_SHORT_ERRORS_SUPPORTED
3349 
3350 
3351 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3352 # [ACTION-IF-NOT-FOUND])
3353 #
3354 #
3355 # Note that if there is a possibility the first call to
3356 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3357 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3358 #
3359 #
3360 # --------------------------------------------------------------
3361 # PKG_CHECK_MODULES
3362 
3363 
3364 # Include these first...
3365 #
3366 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3367 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3368 #
3369 # This code is free software; you can redistribute it and/or modify it
3370 # under the terms of the GNU General Public License version 2 only, as
3371 # published by the Free Software Foundation.  Oracle designates this
3372 # particular file as subject to the "Classpath" exception as provided
3373 # by Oracle in the LICENSE file that accompanied this code.
3374 #
3375 # This code is distributed in the hope that it will be useful, but WITHOUT
3376 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3377 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3378 # version 2 for more details (a copy is included in the LICENSE file that
3379 # accompanied this code).
3380 #
3381 # You should have received a copy of the GNU General Public License version
3382 # 2 along with this work; if not, write to the Free Software Foundation,
3383 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3384 #
3385 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3386 # or visit www.oracle.com if you need additional information or have any
3387 # questions.
3388 #
3389 
3390 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3391 # If so, then append $1 to $2 \
3392 # Also set JVM_ARG_OK to true/false depending on outcome.
3393 
3394 
3395 # Appends a string to a path variable, only adding the : when needed.
3396 
3397 
3398 # Prepends a string to a path variable, only adding the : when needed.
3399 
3400 
3401 # This will make sure the given variable points to a full and proper
3402 # path. This means:
3403 # 1) There will be no spaces in the path. On posix platforms,
3404 #    spaces in the path will result in an error. On Windows,
3405 #    the path will be rewritten using short-style to be space-free.
3406 # 2) The path will be absolute, and it will be in unix-style (on
3407 #     cygwin).
3408 # $1: The name of the variable to fix
3409 
3410 
3411 # This will make sure the given variable points to a executable
3412 # with a full and proper path. This means:
3413 # 1) There will be no spaces in the path. On posix platforms,
3414 #    spaces in the path will result in an error. On Windows,
3415 #    the path will be rewritten using short-style to be space-free.
3416 # 2) The path will be absolute, and it will be in unix-style (on
3417 #     cygwin).
3418 # Any arguments given to the executable is preserved.
3419 # If the input variable does not have a directory specification, then
3420 # it need to be in the PATH.
3421 # $1: The name of the variable to fix
3422 
3423 
3424 
3425 
3426 # Register a --with argument but mark it as deprecated
3427 # $1: The name of the with argument to deprecate, not including --with-
3428 
3429 
3430 # Register a --enable argument but mark it as deprecated
3431 # $1: The name of the with argument to deprecate, not including --enable-
3432 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3433 
3434 
3435 
3436 
3437 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3438 # $1: variable to check
3439 
3440 
3441 # Check that there are no unprocessed overridden variables left.
3442 # If so, they are an incorrect argument and we will exit with an error.
3443 
3444 
3445 # Setup a tool for the given variable. If correctly specified by the user,
3446 # use that value, otherwise search for the tool using the supplied code snippet.
3447 # $1: variable to set
3448 # $2: code snippet to call to look for the tool
3449 
3450 
3451 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3452 # $1: variable to set
3453 # $2: executable name (or list of names) to look for
3454 
3455 
3456 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3457 # $1: variable to set
3458 # $2: executable name (or list of names) to look for
3459 
3460 
3461 # Like BASIC_PATH_PROGS but fails if no tool was found.
3462 # $1: variable to set
3463 # $2: executable name (or list of names) to look for
3464 
3465 
3466 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3467 # $1: variable to set
3468 # $2: autoconf macro to call to look for the special tool
3469 
3470 
3471 # Setup the most fundamental tools that relies on not much else to set up,
3472 # but is used by much of the early bootstrap code.
3473 
3474 
3475 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3476 
3477 
3478 
3479 
3480 
3481 
3482 
3483 
3484 
3485 #%%% Simple tools %%%
3486 
3487 # Check if we have found a usable version of make
3488 # $1: the path to a potential make binary (or empty)
3489 # $2: the description on how we found this
3490 
3491 
3492 # Goes looking for a usable version of GNU make.
3493 
3494 
3495 
3496 
3497 
3498 
3499 # Check if build directory is on local disk. If not possible to determine,
3500 # we prefer to claim it's local.
3501 # Argument 1: directory to test
3502 # Argument 2: what to do if it is on local disk
3503 # Argument 3: what to do otherwise (remote disk or failure)
3504 
3505 
3506 # Check that source files have basic read permissions set. This might
3507 # not be the case in cygwin in certain conditions.
3508 
3509 
3510 
3511 
3512 #
3513 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3514 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3515 #
3516 # This code is free software; you can redistribute it and/or modify it
3517 # under the terms of the GNU General Public License version 2 only, as
3518 # published by the Free Software Foundation.  Oracle designates this
3519 # particular file as subject to the "Classpath" exception as provided
3520 # by Oracle in the LICENSE file that accompanied this code.
3521 #
3522 # This code is distributed in the hope that it will be useful, but WITHOUT
3523 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3524 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3525 # version 2 for more details (a copy is included in the LICENSE file that
3526 # accompanied this code).
3527 #
3528 # You should have received a copy of the GNU General Public License version
3529 # 2 along with this work; if not, write to the Free Software Foundation,
3530 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3531 #
3532 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3533 # or visit www.oracle.com if you need additional information or have any
3534 # questions.
3535 #
3536 
3537 
3538 
3539 
3540 
3541 # Helper function which possibly converts a path using DOS-style short mode.
3542 # If so, the updated path is stored in $new_path.
3543 # $1: The path to check
3544 
3545 
3546 # Helper function which possibly converts a path using DOS-style short mode.
3547 # If so, the updated path is stored in $new_path.
3548 # $1: The path to check
3549 
3550 
3551 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3552 # and could probably be heavily simplified. However, all changes in this
3553 # area tend to need lot of testing in different scenarios, and in lack of
3554 # proper unit testing, cleaning this up has not been deemed worth the effort
3555 # at the moment.
3556 
3557 
3558 
3559 
3560 
3561 
3562 
3563 
3564 
3565 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3566 
3567 
3568 
3569 
3570 #
3571 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3572 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3573 #
3574 # This code is free software; you can redistribute it and/or modify it
3575 # under the terms of the GNU General Public License version 2 only, as
3576 # published by the Free Software Foundation.  Oracle designates this
3577 # particular file as subject to the "Classpath" exception as provided
3578 # by Oracle in the LICENSE file that accompanied this code.
3579 #
3580 # This code is distributed in the hope that it will be useful, but WITHOUT
3581 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3582 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3583 # version 2 for more details (a copy is included in the LICENSE file that
3584 # accompanied this code).
3585 #
3586 # You should have received a copy of the GNU General Public License version
3587 # 2 along with this work; if not, write to the Free Software Foundation,
3588 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3589 #
3590 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3591 # or visit www.oracle.com if you need additional information or have any
3592 # questions.
3593 #
3594 
3595 
3596 
3597 
3598 
3599 
3600 
3601 
3602 
3603 
3604 
3605 # ... then the rest
3606 #
3607 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3608 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3609 #
3610 # This code is free software; you can redistribute it and/or modify it
3611 # under the terms of the GNU General Public License version 2 only, as
3612 # published by the Free Software Foundation.  Oracle designates this
3613 # particular file as subject to the "Classpath" exception as provided
3614 # by Oracle in the LICENSE file that accompanied this code.
3615 #
3616 # This code is distributed in the hope that it will be useful, but WITHOUT
3617 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3618 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3619 # version 2 for more details (a copy is included in the LICENSE file that
3620 # accompanied this code).
3621 #
3622 # You should have received a copy of the GNU General Public License version
3623 # 2 along with this work; if not, write to the Free Software Foundation,
3624 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3625 #
3626 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3627 # or visit www.oracle.com if you need additional information or have any
3628 # questions.
3629 #
3630 
3631 ########################################################################
3632 # This file handles detection of the Boot JDK. The Boot JDK detection
3633 # process has been developed as a response to solve a complex real-world
3634 # problem. Initially, it was simple, but it has grown as platform after
3635 # platform, idiosyncracy after idiosyncracy has been supported.
3636 #
3637 # The basic idea is this:
3638 # 1) You need an acceptable *) JDK to use as a Boot JDK
3639 # 2) There are several ways to locate a JDK, that are mostly platform
3640 #    dependent **)
3641 # 3) You can have multiple JDKs installed
3642 # 4) If possible, configure should try to dig out an acceptable JDK
3643 #    automatically, without having to resort to command-line options
3644 #
3645 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3646 #     javac) and not a JRE, etc.
3647 #
3648 # **) On Windows we typically use a well-known path.
3649 #     On MacOSX we typically use the tool java_home.
3650 #     On Linux we typically find javac in the $PATH, and then follow a
3651 #     chain of symlinks that often ends up in a real JDK.
3652 #
3653 # This leads to the code where we check in different ways to locate a
3654 # JDK, and if one is found, check if it is acceptable. If not, we print
3655 # our reasons for rejecting it (useful when debugging non-working
3656 # configure situations) and continue checking the next one.
3657 ########################################################################
3658 
3659 # Execute the check given as argument, and verify the result
3660 # If the Boot JDK was previously found, do nothing
3661 # $1 A command line (typically autoconf macro) to execute
3662 
3663 
3664 # Test: Is bootjdk explicitely set by command line arguments?
3665 
3666 
3667 # Test: Is bootjdk available from builddeps?
3668 
3669 
3670 # Test: Is $JAVA_HOME set?
3671 
3672 
3673 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3674 
3675 
3676 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3677 # $1: Argument to the java_home binary (optional)
3678 
3679 
3680 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3681 
3682 
3683 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3684 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3685 # $1 = Path to directory containing jdk installations.
3686 # $2 = String to append to the found JDK directory to get the proper JDK home
3687 
3688 
3689 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3690 # environmental variable as base for where to look.
3691 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3692 
3693 
3694 # Test: Is there a JDK installed in default, well-known locations?
3695 
3696 
3697 # Check that a command-line tool in the Boot JDK is correct
3698 # $1 = name of variable to assign
3699 # $2 = name of binary
3700 
3701 
3702 ###############################################################################
3703 #
3704 # We need a Boot JDK to bootstrap the build.
3705 #
3706 
3707 
3708 
3709 
3710 
3711 #
3712 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3713 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3714 #
3715 # This code is free software; you can redistribute it and/or modify it
3716 # under the terms of the GNU General Public License version 2 only, as
3717 # published by the Free Software Foundation.  Oracle designates this
3718 # particular file as subject to the "Classpath" exception as provided
3719 # by Oracle in the LICENSE file that accompanied this code.
3720 #
3721 # This code is distributed in the hope that it will be useful, but WITHOUT
3722 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3723 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3724 # version 2 for more details (a copy is included in the LICENSE file that
3725 # accompanied this code).
3726 #
3727 # You should have received a copy of the GNU General Public License version
3728 # 2 along with this work; if not, write to the Free Software Foundation,
3729 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3730 #
3731 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3732 # or visit www.oracle.com if you need additional information or have any
3733 # questions.
3734 #
3735 
3736 
3737 
3738 
3739 
3740 
3741 
3742 
3743 
3744 
3745 
3746 
3747 
3748 
3749 
3750 
3751 
3752 
3753 
3754 
3755 #
3756 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3757 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3758 #
3759 # This code is free software; you can redistribute it and/or modify it
3760 # under the terms of the GNU General Public License version 2 only, as
3761 # published by the Free Software Foundation.  Oracle designates this
3762 # particular file as subject to the "Classpath" exception as provided
3763 # by Oracle in the LICENSE file that accompanied this code.
3764 #
3765 # This code is distributed in the hope that it will be useful, but WITHOUT
3766 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3767 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3768 # version 2 for more details (a copy is included in the LICENSE file that
3769 # accompanied this code).
3770 #
3771 # You should have received a copy of the GNU General Public License version
3772 # 2 along with this work; if not, write to the Free Software Foundation,
3773 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3774 #
3775 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3776 # or visit www.oracle.com if you need additional information or have any
3777 # questions.
3778 #
3779 
3780 
3781 
3782 
3783 
3784 # Documentation on common flags used for solstudio in HIGHEST.
3785 #
3786 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3787 #          done with care, there are some assumptions below that need to
3788 #          be understood about the use of pointers, and IEEE behavior.
3789 #
3790 # -fns: Use non-standard floating point mode (not IEEE 754)
3791 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3792 # -fsingle: Use single precision floating point with 'float'
3793 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3794 #   (Source with excessing pointer casting and data access with mixed
3795 #    pointer types are not recommended)
3796 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3797 #   (If you expect perfect errno behavior, do not use this)
3798 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3799 # -xrestrict: Pointer parameters to functions do not overlap
3800 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3801 #    If you pass in multiple pointers to the same data, do not use this)
3802 # -xlibmil: Inline some library routines
3803 #   (If you expect perfect errno behavior, do not use this)
3804 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3805 #   (If you expect perfect errno behavior, do not use this)
3806 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3807 
3808     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3809     # Bug?
3810     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3811     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3812     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3813     #fi
3814 
3815 
3816 
3817 
3818 
3819 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3820 #                                   [RUN-IF-FALSE])
3821 # ------------------------------------------------------------
3822 # Check that the c and c++ compilers support an argument
3823 
3824 
3825 # FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3826 #                                    [RUN-IF-FALSE])
3827 # ------------------------------------------------------------
3828 # Check that the linker support an argument
3829 
3830 
3831 
3832 
3833 #
3834 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3835 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3836 #
3837 # This code is free software; you can redistribute it and/or modify it
3838 # under the terms of the GNU General Public License version 2 only, as
3839 # published by the Free Software Foundation.  Oracle designates this
3840 # particular file as subject to the "Classpath" exception as provided
3841 # by Oracle in the LICENSE file that accompanied this code.
3842 #
3843 # This code is distributed in the hope that it will be useful, but WITHOUT
3844 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3845 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3846 # version 2 for more details (a copy is included in the LICENSE file that
3847 # accompanied this code).
3848 #
3849 # You should have received a copy of the GNU General Public License version
3850 # 2 along with this work; if not, write to the Free Software Foundation,
3851 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3852 #
3853 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3854 # or visit www.oracle.com if you need additional information or have any
3855 # questions.
3856 #
3857 
3858 
3859 
3860 
3861 
3862 cygwin_help() {
3863   case $1 in
3864     unzip)
3865       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3866       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3867       ;;
3868     zip)
3869       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3870       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3871       ;;
3872     make)
3873       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3874       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3875       ;;
3876     freetype)
3877       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3878         HELP_MSG="To install freetype, run:
3879 wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3880 chmod +x /tmp/freetype-setup.exe
3881 /tmp/freetype-setup.exe
3882 Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3883 After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3884       else
3885         HELP_MSG="You need to build a 64-bit version of freetype.
3886 This is not readily available.
3887 You can find source code and build instructions on
3888 http://www.freetype.org/
3889 If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3890       fi
3891       ;;
3892   esac
3893 }
3894 
3895 msys_help() {
3896   PKGHANDLER_COMMAND=""
3897 }
3898 
3899 apt_help() {
3900   case $1 in
3901     devkit)
3902       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3903     openjdk)
3904       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3905     alsa)
3906       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3907     cups)
3908       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3909     freetype)
3910       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3911     pulse)
3912       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3913     x11)
3914       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3915     ccache)
3916       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3917   esac
3918 }
3919 
3920 yum_help() {
3921   case $1 in
3922     devkit)
3923       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3924     openjdk)
3925       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3926     alsa)
3927       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3928     cups)
3929       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3930     freetype)
3931       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3932     pulse)
3933       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3934     x11)
3935       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3936     ccache)
3937       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3938   esac
3939 }
3940 
3941 port_help() {
3942   PKGHANDLER_COMMAND=""
3943 }
3944 
3945 pkgutil_help() {
3946   PKGHANDLER_COMMAND=""
3947 }
3948 
3949 pkgadd_help() {
3950   PKGHANDLER_COMMAND=""
3951 }
3952 
3953 # This function will check if we're called from the "configure" wrapper while
3954 # printing --help. If so, we will print out additional information that can
3955 # only be extracted within the autoconf script, and then exit. This must be
3956 # called at the very beginning in configure.ac.
3957 
3958 
3959 
3960 
3961 #
3962 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3963 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3964 #
3965 # This code is free software; you can redistribute it and/or modify it
3966 # under the terms of the GNU General Public License version 2 only, as
3967 # published by the Free Software Foundation.  Oracle designates this
3968 # particular file as subject to the "Classpath" exception as provided
3969 # by Oracle in the LICENSE file that accompanied this code.
3970 #
3971 # This code is distributed in the hope that it will be useful, but WITHOUT
3972 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3973 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3974 # version 2 for more details (a copy is included in the LICENSE file that
3975 # accompanied this code).
3976 #
3977 # You should have received a copy of the GNU General Public License version
3978 # 2 along with this work; if not, write to the Free Software Foundation,
3979 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3980 #
3981 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3982 # or visit www.oracle.com if you need additional information or have any
3983 # questions.
3984 #
3985 
3986 
3987 
3988 
3989 
3990 
3991 
3992 
3993 
3994 
3995 ###############################################################################
3996 #
3997 # Should we build only OpenJDK even if closed sources are present?
3998 #
3999 
4000 
4001 
4002 
4003 ###############################################################################
4004 #
4005 # Setup version numbers
4006 #
4007 
4008 
4009 
4010 
4011 
4012 
4013 #
4014 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4015 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4016 #
4017 # This code is free software; you can redistribute it and/or modify it
4018 # under the terms of the GNU General Public License version 2 only, as
4019 # published by the Free Software Foundation.  Oracle designates this
4020 # particular file as subject to the "Classpath" exception as provided
4021 # by Oracle in the LICENSE file that accompanied this code.
4022 #
4023 # This code is distributed in the hope that it will be useful, but WITHOUT
4024 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4025 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4026 # version 2 for more details (a copy is included in the LICENSE file that
4027 # accompanied this code).
4028 #
4029 # You should have received a copy of the GNU General Public License version
4030 # 2 along with this work; if not, write to the Free Software Foundation,
4031 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4032 #
4033 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4034 # or visit www.oracle.com if you need additional information or have any
4035 # questions.
4036 #
4037 
4038 
4039 
4040 
4041 
4042 
4043 
4044 
4045 
4046 
4047 
4048 
4049 
4050 
4051 
4052 
4053 
4054 
4055 
4056 #
4057 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4058 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4059 #
4060 # This code is free software; you can redistribute it and/or modify it
4061 # under the terms of the GNU General Public License version 2 only, as
4062 # published by the Free Software Foundation.  Oracle designates this
4063 # particular file as subject to the "Classpath" exception as provided
4064 # by Oracle in the LICENSE file that accompanied this code.
4065 #
4066 # This code is distributed in the hope that it will be useful, but WITHOUT
4067 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4068 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4069 # version 2 for more details (a copy is included in the LICENSE file that
4070 # accompanied this code).
4071 #
4072 # You should have received a copy of the GNU General Public License version
4073 # 2 along with this work; if not, write to the Free Software Foundation,
4074 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4075 #
4076 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4077 # or visit www.oracle.com if you need additional information or have any
4078 # questions.
4079 #
4080 
4081 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4082 # Converts autoconf style CPU name to OpenJDK style, into
4083 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4084 
4085 
4086 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4087 # Converts autoconf style OS name to OpenJDK style, into
4088 # VAR_OS and VAR_OS_API.
4089 
4090 
4091 # Expects $host_os $host_cpu $build_os and $build_cpu
4092 # and $with_target_bits to have been setup!
4093 #
4094 # Translate the standard triplet(quadruplet) definition
4095 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4096 # OPENJDK_BUILD_OS, etc.
4097 
4098 
4099 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4100 # accordingly. Must be done after setting up build and target system, but before
4101 # doing anything else with these values.
4102 
4103 
4104 # Setup the legacy variables, for controlling the old makefiles.
4105 #
4106 
4107 
4108 
4109 
4110 #%%% Build and target systems %%%
4111 
4112 
4113 
4114 
4115 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4116 # Add -mX to various FLAGS variables.
4117 
4118 
4119 
4120 
4121 
4122 
4123 #
4124 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4125 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4126 #
4127 # This code is free software; you can redistribute it and/or modify it
4128 # under the terms of the GNU General Public License version 2 only, as
4129 # published by the Free Software Foundation.  Oracle designates this
4130 # particular file as subject to the "Classpath" exception as provided
4131 # by Oracle in the LICENSE file that accompanied this code.
4132 #
4133 # This code is distributed in the hope that it will be useful, but WITHOUT
4134 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4135 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4136 # version 2 for more details (a copy is included in the LICENSE file that
4137 # accompanied this code).
4138 #
4139 # You should have received a copy of the GNU General Public License version
4140 # 2 along with this work; if not, write to the Free Software Foundation,
4141 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4142 #
4143 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4144 # or visit www.oracle.com if you need additional information or have any
4145 # questions.
4146 #
4147 
4148 
4149 
4150 
4151 
4152 
4153 
4154 
4155 #
4156 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4157 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4158 #
4159 # This code is free software; you can redistribute it and/or modify it
4160 # under the terms of the GNU General Public License version 2 only, as
4161 # published by the Free Software Foundation.  Oracle designates this
4162 # particular file as subject to the "Classpath" exception as provided
4163 # by Oracle in the LICENSE file that accompanied this code.
4164 #
4165 # This code is distributed in the hope that it will be useful, but WITHOUT
4166 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4167 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4168 # version 2 for more details (a copy is included in the LICENSE file that
4169 # accompanied this code).
4170 #
4171 # You should have received a copy of the GNU General Public License version
4172 # 2 along with this work; if not, write to the Free Software Foundation,
4173 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4174 #
4175 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4176 # or visit www.oracle.com if you need additional information or have any
4177 # questions.
4178 #
4179 
4180 ########################################################################
4181 # This file is responsible for detecting, verifying and setting up the
4182 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4183 # proper paths to the binaries, but it will not setup any flags.
4184 #
4185 # The binaries used is determined by the toolchain type, which is the family of
4186 # compilers and related tools that are used.
4187 ########################################################################
4188 
4189 
4190 # All valid toolchains, regardless of platform (used by help.m4)
4191 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4192 
4193 # These toolchains are valid on different platforms
4194 VALID_TOOLCHAINS_linux="gcc clang"
4195 VALID_TOOLCHAINS_solaris="solstudio"
4196 VALID_TOOLCHAINS_macosx="gcc clang"
4197 VALID_TOOLCHAINS_aix="xlc"
4198 VALID_TOOLCHAINS_windows="microsoft"
4199 
4200 # Toolchain descriptions
4201 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4202 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4203 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4204 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4205 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4206 
4207 # Setup a number of variables describing how native output files are
4208 # named on this platform/toolchain.
4209 
4210 
4211 # Determine which toolchain type to use, and make sure it is valid for this
4212 # platform. Setup various information about the selected toolchain.
4213 
4214 
4215 # Before we start detecting the toolchain executables, we might need some
4216 # special setup, e.g. additional paths etc.
4217 
4218 
4219 # Restore path, etc
4220 
4221 
4222 # Check if a compiler is of the toolchain type we expect, and save the version
4223 # information from it. If the compiler does not match the expected type,
4224 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4225 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4226 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4227 #
4228 # $1 = compiler to test (CC or CXX)
4229 # $2 = human readable name of compiler (C or C++)
4230 
4231 
4232 # Try to locate the given C or C++ compiler in the path, or otherwise.
4233 #
4234 # $1 = compiler to test (CC or CXX)
4235 # $2 = human readable name of compiler (C or C++)
4236 # $3 = list of compiler names to search for
4237 
4238 
4239 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4240 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4241 # archiver (AR). Verify that the compilers are correct according to the
4242 # toolchain type.
4243 
4244 
4245 # Setup additional tools that is considered a part of the toolchain, but not the
4246 # core part. Many of these are highly platform-specific and do not exist,
4247 # and/or are not needed on all platforms.
4248 
4249 
4250 # Setup the build tools (i.e, the compiler and linker used to build programs
4251 # that should be run on the build platform, not the target platform, as a build
4252 # helper). Since the non-cross-compile case uses the normal, target compilers
4253 # for this, we can only do this after these have been setup.
4254 
4255 
4256 # Setup legacy variables that are still needed as alternative ways to refer to
4257 # parts of the toolchain.
4258 
4259 
4260 # Do some additional checks on the detected tools.
4261 
4262 
4263 # Setup the JTReg Regression Test Harness.
4264 
4265 
4266 #
4267 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4268 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4269 #
4270 # This code is free software; you can redistribute it and/or modify it
4271 # under the terms of the GNU General Public License version 2 only, as
4272 # published by the Free Software Foundation.  Oracle designates this
4273 # particular file as subject to the "Classpath" exception as provided
4274 # by Oracle in the LICENSE file that accompanied this code.
4275 #
4276 # This code is distributed in the hope that it will be useful, but WITHOUT
4277 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4278 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4279 # version 2 for more details (a copy is included in the LICENSE file that
4280 # accompanied this code).
4281 #
4282 # You should have received a copy of the GNU General Public License version
4283 # 2 along with this work; if not, write to the Free Software Foundation,
4284 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4285 #
4286 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4287 # or visit www.oracle.com if you need additional information or have any
4288 # questions.
4289 #
4290 
4291 
4292 
4293 
4294 
4295 
4296 
4297 # Check if the VS env variables were setup prior to running configure.
4298 # If not, then find vcvarsall.bat and run it automatically, and integrate
4299 # the set env variables into the spec file.
4300 
4301 
4302 
4303 
4304 
4305 
4306 
4307 
4308 
4309 
4310 # This line needs to be here, verbatim, after all includes and the dummy hook
4311 # definitions. It is replaced with custom functionality when building
4312 # custom sources.
4313 #CUSTOM_AUTOCONF_INCLUDE
4314 
4315 # Do not change or remove the following line, it is needed for consistency checks:
4316 DATE_WHEN_GENERATED=1407326260
4317 
4318 ###############################################################################
4319 #
4320 # Initialization / Boot-strapping
4321 #
4322 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4323 # thus it jumps back and forth, each time gaining something needed later on.
4324 #
4325 ###############################################################################
4326 
4327 # If we are requested to print additional help, do that and then exit.
4328 # This must be the very first call.
4329 
4330   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4331     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4332     $PRINTF "Which are valid to use depends on the build platform.\n"
4333     for toolchain in $VALID_TOOLCHAINS_all; do
4334       # Use indirect variable referencing
4335       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4336       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4337       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4338     done
4339 
4340     # And now exit directly
4341     exit 0
4342   fi
4343 
4344 
4345 # Basic initialization that must happen first of all in the normal process.
4346 
4347   # Save the original command line. This is passed to us by the wrapper configure script.
4348 
4349   DATE_WHEN_CONFIGURED=`LANG=C date`
4350 
4351   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4352 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4353   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4354 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4355 
4356 
4357   # Start with tools that do not need have cross compilation support
4358   # and can be expected to be found in the default PATH. These tools are
4359   # used by configure. Nor are these tools expected to be found in the
4360   # devkit from the builddeps server either, since they are
4361   # needed to download the devkit.
4362 
4363   # First are all the simple required tools.
4364 
4365 
4366 
4367   # Publish this variable in the help.
4368 
4369 
4370   if test "x$BASENAME" = x; then
4371     # The variable is not set by user, try to locate tool using the code snippet
4372     for ac_prog in basename
4373 do
4374   # Extract the first word of "$ac_prog", so it can be a program name with args.
4375 set dummy $ac_prog; ac_word=$2
4376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4377 $as_echo_n "checking for $ac_word... " >&6; }
4378 if ${ac_cv_path_BASENAME+:} false; then :
4379   $as_echo_n "(cached) " >&6
4380 else
4381   case $BASENAME in
4382   [\\/]* | ?:[\\/]*)
4383   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4384   ;;
4385   *)
4386   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4387 for as_dir in $PATH
4388 do
4389   IFS=$as_save_IFS
4390   test -z "$as_dir" && as_dir=.
4391     for ac_exec_ext in '' $ac_executable_extensions; do
4392   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4393     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4394     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4395     break 2
4396   fi
4397 done
4398   done
4399 IFS=$as_save_IFS
4400 
4401   ;;
4402 esac
4403 fi
4404 BASENAME=$ac_cv_path_BASENAME
4405 if test -n "$BASENAME"; then
4406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4407 $as_echo "$BASENAME" >&6; }
4408 else
4409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4410 $as_echo "no" >&6; }
4411 fi
4412 
4413 
4414   test -n "$BASENAME" && break
4415 done
4416 
4417   else
4418     # The variable is set, but is it from the command line or the environment?
4419 
4420     # Try to remove the string !BASENAME! from our list.
4421     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4422     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4423       # If it failed, the variable was not from the command line. Ignore it,
4424       # but warn the user (except for BASH, which is always set by the calling BASH).
4425       if test "xBASENAME" != xBASH; then
4426         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4427 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4428       fi
4429       # Try to locate tool using the code snippet
4430       for ac_prog in basename
4431 do
4432   # Extract the first word of "$ac_prog", so it can be a program name with args.
4433 set dummy $ac_prog; ac_word=$2
4434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4435 $as_echo_n "checking for $ac_word... " >&6; }
4436 if ${ac_cv_path_BASENAME+:} false; then :
4437   $as_echo_n "(cached) " >&6
4438 else
4439   case $BASENAME in
4440   [\\/]* | ?:[\\/]*)
4441   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4442   ;;
4443   *)
4444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4445 for as_dir in $PATH
4446 do
4447   IFS=$as_save_IFS
4448   test -z "$as_dir" && as_dir=.
4449     for ac_exec_ext in '' $ac_executable_extensions; do
4450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4451     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4453     break 2
4454   fi
4455 done
4456   done
4457 IFS=$as_save_IFS
4458 
4459   ;;
4460 esac
4461 fi
4462 BASENAME=$ac_cv_path_BASENAME
4463 if test -n "$BASENAME"; then
4464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4465 $as_echo "$BASENAME" >&6; }
4466 else
4467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4468 $as_echo "no" >&6; }
4469 fi
4470 
4471 
4472   test -n "$BASENAME" && break
4473 done
4474 
4475     else
4476       # If it succeeded, then it was overridden by the user. We will use it
4477       # for the tool.
4478 
4479       # First remove it from the list of overridden variables, so we can test
4480       # for unknown variables in the end.
4481       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4482 
4483       # Check if the provided tool contains a complete path.
4484       tool_specified="$BASENAME"
4485       tool_basename="${tool_specified##*/}"
4486       if test "x$tool_basename" = "x$tool_specified"; then
4487         # A command without a complete path is provided, search $PATH.
4488         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4489 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4490         # Extract the first word of "$tool_basename", so it can be a program name with args.
4491 set dummy $tool_basename; ac_word=$2
4492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4493 $as_echo_n "checking for $ac_word... " >&6; }
4494 if ${ac_cv_path_BASENAME+:} false; then :
4495   $as_echo_n "(cached) " >&6
4496 else
4497   case $BASENAME in
4498   [\\/]* | ?:[\\/]*)
4499   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4500   ;;
4501   *)
4502   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4503 for as_dir in $PATH
4504 do
4505   IFS=$as_save_IFS
4506   test -z "$as_dir" && as_dir=.
4507     for ac_exec_ext in '' $ac_executable_extensions; do
4508   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4509     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4510     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4511     break 2
4512   fi
4513 done
4514   done
4515 IFS=$as_save_IFS
4516 
4517   ;;
4518 esac
4519 fi
4520 BASENAME=$ac_cv_path_BASENAME
4521 if test -n "$BASENAME"; then
4522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4523 $as_echo "$BASENAME" >&6; }
4524 else
4525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4526 $as_echo "no" >&6; }
4527 fi
4528 
4529 
4530         if test "x$BASENAME" = x; then
4531           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4532         fi
4533       else
4534         # Otherwise we believe it is a complete path. Use it as it is.
4535         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4536 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4537         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4538 $as_echo_n "checking for BASENAME... " >&6; }
4539         if test ! -x "$tool_specified"; then
4540           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4541 $as_echo "not found" >&6; }
4542           as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4543         fi
4544         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4545 $as_echo "$tool_specified" >&6; }
4546       fi
4547     fi
4548   fi
4549 
4550 
4551 
4552   if test "x$BASENAME" = x; then
4553     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4554   fi
4555 
4556 
4557 
4558 
4559 
4560   # Publish this variable in the help.
4561 
4562 
4563   if test "x$BASH" = x; then
4564     # The variable is not set by user, try to locate tool using the code snippet
4565     for ac_prog in bash
4566 do
4567   # Extract the first word of "$ac_prog", so it can be a program name with args.
4568 set dummy $ac_prog; ac_word=$2
4569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4570 $as_echo_n "checking for $ac_word... " >&6; }
4571 if ${ac_cv_path_BASH+:} false; then :
4572   $as_echo_n "(cached) " >&6
4573 else
4574   case $BASH in
4575   [\\/]* | ?:[\\/]*)
4576   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4577   ;;
4578   *)
4579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4580 for as_dir in $PATH
4581 do
4582   IFS=$as_save_IFS
4583   test -z "$as_dir" && as_dir=.
4584     for ac_exec_ext in '' $ac_executable_extensions; do
4585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4586     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4588     break 2
4589   fi
4590 done
4591   done
4592 IFS=$as_save_IFS
4593 
4594   ;;
4595 esac
4596 fi
4597 BASH=$ac_cv_path_BASH
4598 if test -n "$BASH"; then
4599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4600 $as_echo "$BASH" >&6; }
4601 else
4602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4603 $as_echo "no" >&6; }
4604 fi
4605 
4606 
4607   test -n "$BASH" && break
4608 done
4609 
4610   else
4611     # The variable is set, but is it from the command line or the environment?
4612 
4613     # Try to remove the string !BASH! from our list.
4614     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4615     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4616       # If it failed, the variable was not from the command line. Ignore it,
4617       # but warn the user (except for BASH, which is always set by the calling BASH).
4618       if test "xBASH" != xBASH; then
4619         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4620 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4621       fi
4622       # Try to locate tool using the code snippet
4623       for ac_prog in bash
4624 do
4625   # Extract the first word of "$ac_prog", so it can be a program name with args.
4626 set dummy $ac_prog; ac_word=$2
4627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4628 $as_echo_n "checking for $ac_word... " >&6; }
4629 if ${ac_cv_path_BASH+:} false; then :
4630   $as_echo_n "(cached) " >&6
4631 else
4632   case $BASH in
4633   [\\/]* | ?:[\\/]*)
4634   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4635   ;;
4636   *)
4637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638 for as_dir in $PATH
4639 do
4640   IFS=$as_save_IFS
4641   test -z "$as_dir" && as_dir=.
4642     for ac_exec_ext in '' $ac_executable_extensions; do
4643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4644     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4646     break 2
4647   fi
4648 done
4649   done
4650 IFS=$as_save_IFS
4651 
4652   ;;
4653 esac
4654 fi
4655 BASH=$ac_cv_path_BASH
4656 if test -n "$BASH"; then
4657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4658 $as_echo "$BASH" >&6; }
4659 else
4660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4661 $as_echo "no" >&6; }
4662 fi
4663 
4664 
4665   test -n "$BASH" && break
4666 done
4667 
4668     else
4669       # If it succeeded, then it was overridden by the user. We will use it
4670       # for the tool.
4671 
4672       # First remove it from the list of overridden variables, so we can test
4673       # for unknown variables in the end.
4674       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4675 
4676       # Check if the provided tool contains a complete path.
4677       tool_specified="$BASH"
4678       tool_basename="${tool_specified##*/}"
4679       if test "x$tool_basename" = "x$tool_specified"; then
4680         # A command without a complete path is provided, search $PATH.
4681         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4682 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4683         # Extract the first word of "$tool_basename", so it can be a program name with args.
4684 set dummy $tool_basename; ac_word=$2
4685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4686 $as_echo_n "checking for $ac_word... " >&6; }
4687 if ${ac_cv_path_BASH+:} false; then :
4688   $as_echo_n "(cached) " >&6
4689 else
4690   case $BASH in
4691   [\\/]* | ?:[\\/]*)
4692   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4693   ;;
4694   *)
4695   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4696 for as_dir in $PATH
4697 do
4698   IFS=$as_save_IFS
4699   test -z "$as_dir" && as_dir=.
4700     for ac_exec_ext in '' $ac_executable_extensions; do
4701   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4702     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4703     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4704     break 2
4705   fi
4706 done
4707   done
4708 IFS=$as_save_IFS
4709 
4710   ;;
4711 esac
4712 fi
4713 BASH=$ac_cv_path_BASH
4714 if test -n "$BASH"; then
4715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4716 $as_echo "$BASH" >&6; }
4717 else
4718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4719 $as_echo "no" >&6; }
4720 fi
4721 
4722 
4723         if test "x$BASH" = x; then
4724           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4725         fi
4726       else
4727         # Otherwise we believe it is a complete path. Use it as it is.
4728         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4729 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4730         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4731 $as_echo_n "checking for BASH... " >&6; }
4732         if test ! -x "$tool_specified"; then
4733           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4734 $as_echo "not found" >&6; }
4735           as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4736         fi
4737         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4738 $as_echo "$tool_specified" >&6; }
4739       fi
4740     fi
4741   fi
4742 
4743 
4744 
4745   if test "x$BASH" = x; then
4746     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4747   fi
4748 
4749 
4750 
4751 
4752 
4753   # Publish this variable in the help.
4754 
4755 
4756   if test "x$CAT" = x; then
4757     # The variable is not set by user, try to locate tool using the code snippet
4758     for ac_prog in cat
4759 do
4760   # Extract the first word of "$ac_prog", so it can be a program name with args.
4761 set dummy $ac_prog; ac_word=$2
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4763 $as_echo_n "checking for $ac_word... " >&6; }
4764 if ${ac_cv_path_CAT+:} false; then :
4765   $as_echo_n "(cached) " >&6
4766 else
4767   case $CAT in
4768   [\\/]* | ?:[\\/]*)
4769   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4770   ;;
4771   *)
4772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4773 for as_dir in $PATH
4774 do
4775   IFS=$as_save_IFS
4776   test -z "$as_dir" && as_dir=.
4777     for ac_exec_ext in '' $ac_executable_extensions; do
4778   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4779     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4780     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4781     break 2
4782   fi
4783 done
4784   done
4785 IFS=$as_save_IFS
4786 
4787   ;;
4788 esac
4789 fi
4790 CAT=$ac_cv_path_CAT
4791 if test -n "$CAT"; then
4792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4793 $as_echo "$CAT" >&6; }
4794 else
4795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4796 $as_echo "no" >&6; }
4797 fi
4798 
4799 
4800   test -n "$CAT" && break
4801 done
4802 
4803   else
4804     # The variable is set, but is it from the command line or the environment?
4805 
4806     # Try to remove the string !CAT! from our list.
4807     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4808     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4809       # If it failed, the variable was not from the command line. Ignore it,
4810       # but warn the user (except for BASH, which is always set by the calling BASH).
4811       if test "xCAT" != xBASH; then
4812         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4813 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4814       fi
4815       # Try to locate tool using the code snippet
4816       for ac_prog in cat
4817 do
4818   # Extract the first word of "$ac_prog", so it can be a program name with args.
4819 set dummy $ac_prog; ac_word=$2
4820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4821 $as_echo_n "checking for $ac_word... " >&6; }
4822 if ${ac_cv_path_CAT+:} false; then :
4823   $as_echo_n "(cached) " >&6
4824 else
4825   case $CAT in
4826   [\\/]* | ?:[\\/]*)
4827   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4828   ;;
4829   *)
4830   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4831 for as_dir in $PATH
4832 do
4833   IFS=$as_save_IFS
4834   test -z "$as_dir" && as_dir=.
4835     for ac_exec_ext in '' $ac_executable_extensions; do
4836   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4837     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4838     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4839     break 2
4840   fi
4841 done
4842   done
4843 IFS=$as_save_IFS
4844 
4845   ;;
4846 esac
4847 fi
4848 CAT=$ac_cv_path_CAT
4849 if test -n "$CAT"; then
4850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4851 $as_echo "$CAT" >&6; }
4852 else
4853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4854 $as_echo "no" >&6; }
4855 fi
4856 
4857 
4858   test -n "$CAT" && break
4859 done
4860 
4861     else
4862       # If it succeeded, then it was overridden by the user. We will use it
4863       # for the tool.
4864 
4865       # First remove it from the list of overridden variables, so we can test
4866       # for unknown variables in the end.
4867       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4868 
4869       # Check if the provided tool contains a complete path.
4870       tool_specified="$CAT"
4871       tool_basename="${tool_specified##*/}"
4872       if test "x$tool_basename" = "x$tool_specified"; then
4873         # A command without a complete path is provided, search $PATH.
4874         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4875 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4876         # Extract the first word of "$tool_basename", so it can be a program name with args.
4877 set dummy $tool_basename; ac_word=$2
4878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4879 $as_echo_n "checking for $ac_word... " >&6; }
4880 if ${ac_cv_path_CAT+:} false; then :
4881   $as_echo_n "(cached) " >&6
4882 else
4883   case $CAT in
4884   [\\/]* | ?:[\\/]*)
4885   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4886   ;;
4887   *)
4888   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4889 for as_dir in $PATH
4890 do
4891   IFS=$as_save_IFS
4892   test -z "$as_dir" && as_dir=.
4893     for ac_exec_ext in '' $ac_executable_extensions; do
4894   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4895     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4896     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4897     break 2
4898   fi
4899 done
4900   done
4901 IFS=$as_save_IFS
4902 
4903   ;;
4904 esac
4905 fi
4906 CAT=$ac_cv_path_CAT
4907 if test -n "$CAT"; then
4908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4909 $as_echo "$CAT" >&6; }
4910 else
4911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4912 $as_echo "no" >&6; }
4913 fi
4914 
4915 
4916         if test "x$CAT" = x; then
4917           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4918         fi
4919       else
4920         # Otherwise we believe it is a complete path. Use it as it is.
4921         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4922 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4923         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4924 $as_echo_n "checking for CAT... " >&6; }
4925         if test ! -x "$tool_specified"; then
4926           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4927 $as_echo "not found" >&6; }
4928           as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4929         fi
4930         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4931 $as_echo "$tool_specified" >&6; }
4932       fi
4933     fi
4934   fi
4935 
4936 
4937 
4938   if test "x$CAT" = x; then
4939     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4940   fi
4941 
4942 
4943 
4944 
4945 
4946   # Publish this variable in the help.
4947 
4948 
4949   if test "x$CHMOD" = x; then
4950     # The variable is not set by user, try to locate tool using the code snippet
4951     for ac_prog in chmod
4952 do
4953   # Extract the first word of "$ac_prog", so it can be a program name with args.
4954 set dummy $ac_prog; ac_word=$2
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4956 $as_echo_n "checking for $ac_word... " >&6; }
4957 if ${ac_cv_path_CHMOD+:} false; then :
4958   $as_echo_n "(cached) " >&6
4959 else
4960   case $CHMOD in
4961   [\\/]* | ?:[\\/]*)
4962   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4963   ;;
4964   *)
4965   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4966 for as_dir in $PATH
4967 do
4968   IFS=$as_save_IFS
4969   test -z "$as_dir" && as_dir=.
4970     for ac_exec_ext in '' $ac_executable_extensions; do
4971   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4972     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4974     break 2
4975   fi
4976 done
4977   done
4978 IFS=$as_save_IFS
4979 
4980   ;;
4981 esac
4982 fi
4983 CHMOD=$ac_cv_path_CHMOD
4984 if test -n "$CHMOD"; then
4985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4986 $as_echo "$CHMOD" >&6; }
4987 else
4988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4989 $as_echo "no" >&6; }
4990 fi
4991 
4992 
4993   test -n "$CHMOD" && break
4994 done
4995 
4996   else
4997     # The variable is set, but is it from the command line or the environment?
4998 
4999     # Try to remove the string !CHMOD! from our list.
5000     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5001     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5002       # If it failed, the variable was not from the command line. Ignore it,
5003       # but warn the user (except for BASH, which is always set by the calling BASH).
5004       if test "xCHMOD" != xBASH; then
5005         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5006 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5007       fi
5008       # Try to locate tool using the code snippet
5009       for ac_prog in chmod
5010 do
5011   # Extract the first word of "$ac_prog", so it can be a program name with args.
5012 set dummy $ac_prog; ac_word=$2
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5014 $as_echo_n "checking for $ac_word... " >&6; }
5015 if ${ac_cv_path_CHMOD+:} false; then :
5016   $as_echo_n "(cached) " >&6
5017 else
5018   case $CHMOD in
5019   [\\/]* | ?:[\\/]*)
5020   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5021   ;;
5022   *)
5023   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5024 for as_dir in $PATH
5025 do
5026   IFS=$as_save_IFS
5027   test -z "$as_dir" && as_dir=.
5028     for ac_exec_ext in '' $ac_executable_extensions; do
5029   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5030     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5032     break 2
5033   fi
5034 done
5035   done
5036 IFS=$as_save_IFS
5037 
5038   ;;
5039 esac
5040 fi
5041 CHMOD=$ac_cv_path_CHMOD
5042 if test -n "$CHMOD"; then
5043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5044 $as_echo "$CHMOD" >&6; }
5045 else
5046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5047 $as_echo "no" >&6; }
5048 fi
5049 
5050 
5051   test -n "$CHMOD" && break
5052 done
5053 
5054     else
5055       # If it succeeded, then it was overridden by the user. We will use it
5056       # for the tool.
5057 
5058       # First remove it from the list of overridden variables, so we can test
5059       # for unknown variables in the end.
5060       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5061 
5062       # Check if the provided tool contains a complete path.
5063       tool_specified="$CHMOD"
5064       tool_basename="${tool_specified##*/}"
5065       if test "x$tool_basename" = "x$tool_specified"; then
5066         # A command without a complete path is provided, search $PATH.
5067         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5068 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5069         # Extract the first word of "$tool_basename", so it can be a program name with args.
5070 set dummy $tool_basename; ac_word=$2
5071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5072 $as_echo_n "checking for $ac_word... " >&6; }
5073 if ${ac_cv_path_CHMOD+:} false; then :
5074   $as_echo_n "(cached) " >&6
5075 else
5076   case $CHMOD in
5077   [\\/]* | ?:[\\/]*)
5078   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5079   ;;
5080   *)
5081   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5082 for as_dir in $PATH
5083 do
5084   IFS=$as_save_IFS
5085   test -z "$as_dir" && as_dir=.
5086     for ac_exec_ext in '' $ac_executable_extensions; do
5087   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5088     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5090     break 2
5091   fi
5092 done
5093   done
5094 IFS=$as_save_IFS
5095 
5096   ;;
5097 esac
5098 fi
5099 CHMOD=$ac_cv_path_CHMOD
5100 if test -n "$CHMOD"; then
5101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5102 $as_echo "$CHMOD" >&6; }
5103 else
5104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5105 $as_echo "no" >&6; }
5106 fi
5107 
5108 
5109         if test "x$CHMOD" = x; then
5110           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5111         fi
5112       else
5113         # Otherwise we believe it is a complete path. Use it as it is.
5114         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5115 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5116         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5117 $as_echo_n "checking for CHMOD... " >&6; }
5118         if test ! -x "$tool_specified"; then
5119           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5120 $as_echo "not found" >&6; }
5121           as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5122         fi
5123         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5124 $as_echo "$tool_specified" >&6; }
5125       fi
5126     fi
5127   fi
5128 
5129 
5130 
5131   if test "x$CHMOD" = x; then
5132     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5133   fi
5134 
5135 
5136 
5137 
5138 
5139   # Publish this variable in the help.
5140 
5141 
5142   if test "x$CMP" = x; then
5143     # The variable is not set by user, try to locate tool using the code snippet
5144     for ac_prog in cmp
5145 do
5146   # Extract the first word of "$ac_prog", so it can be a program name with args.
5147 set dummy $ac_prog; ac_word=$2
5148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5149 $as_echo_n "checking for $ac_word... " >&6; }
5150 if ${ac_cv_path_CMP+:} false; then :
5151   $as_echo_n "(cached) " >&6
5152 else
5153   case $CMP in
5154   [\\/]* | ?:[\\/]*)
5155   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5156   ;;
5157   *)
5158   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5159 for as_dir in $PATH
5160 do
5161   IFS=$as_save_IFS
5162   test -z "$as_dir" && as_dir=.
5163     for ac_exec_ext in '' $ac_executable_extensions; do
5164   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5165     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5166     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5167     break 2
5168   fi
5169 done
5170   done
5171 IFS=$as_save_IFS
5172 
5173   ;;
5174 esac
5175 fi
5176 CMP=$ac_cv_path_CMP
5177 if test -n "$CMP"; then
5178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5179 $as_echo "$CMP" >&6; }
5180 else
5181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5182 $as_echo "no" >&6; }
5183 fi
5184 
5185 
5186   test -n "$CMP" && break
5187 done
5188 
5189   else
5190     # The variable is set, but is it from the command line or the environment?
5191 
5192     # Try to remove the string !CMP! from our list.
5193     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5194     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5195       # If it failed, the variable was not from the command line. Ignore it,
5196       # but warn the user (except for BASH, which is always set by the calling BASH).
5197       if test "xCMP" != xBASH; then
5198         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5199 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5200       fi
5201       # Try to locate tool using the code snippet
5202       for ac_prog in cmp
5203 do
5204   # Extract the first word of "$ac_prog", so it can be a program name with args.
5205 set dummy $ac_prog; ac_word=$2
5206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5207 $as_echo_n "checking for $ac_word... " >&6; }
5208 if ${ac_cv_path_CMP+:} false; then :
5209   $as_echo_n "(cached) " >&6
5210 else
5211   case $CMP in
5212   [\\/]* | ?:[\\/]*)
5213   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5214   ;;
5215   *)
5216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5217 for as_dir in $PATH
5218 do
5219   IFS=$as_save_IFS
5220   test -z "$as_dir" && as_dir=.
5221     for ac_exec_ext in '' $ac_executable_extensions; do
5222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5223     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5225     break 2
5226   fi
5227 done
5228   done
5229 IFS=$as_save_IFS
5230 
5231   ;;
5232 esac
5233 fi
5234 CMP=$ac_cv_path_CMP
5235 if test -n "$CMP"; then
5236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5237 $as_echo "$CMP" >&6; }
5238 else
5239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5240 $as_echo "no" >&6; }
5241 fi
5242 
5243 
5244   test -n "$CMP" && break
5245 done
5246 
5247     else
5248       # If it succeeded, then it was overridden by the user. We will use it
5249       # for the tool.
5250 
5251       # First remove it from the list of overridden variables, so we can test
5252       # for unknown variables in the end.
5253       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5254 
5255       # Check if the provided tool contains a complete path.
5256       tool_specified="$CMP"
5257       tool_basename="${tool_specified##*/}"
5258       if test "x$tool_basename" = "x$tool_specified"; then
5259         # A command without a complete path is provided, search $PATH.
5260         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5261 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5262         # Extract the first word of "$tool_basename", so it can be a program name with args.
5263 set dummy $tool_basename; ac_word=$2
5264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5265 $as_echo_n "checking for $ac_word... " >&6; }
5266 if ${ac_cv_path_CMP+:} false; then :
5267   $as_echo_n "(cached) " >&6
5268 else
5269   case $CMP in
5270   [\\/]* | ?:[\\/]*)
5271   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5272   ;;
5273   *)
5274   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5275 for as_dir in $PATH
5276 do
5277   IFS=$as_save_IFS
5278   test -z "$as_dir" && as_dir=.
5279     for ac_exec_ext in '' $ac_executable_extensions; do
5280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5281     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5283     break 2
5284   fi
5285 done
5286   done
5287 IFS=$as_save_IFS
5288 
5289   ;;
5290 esac
5291 fi
5292 CMP=$ac_cv_path_CMP
5293 if test -n "$CMP"; then
5294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5295 $as_echo "$CMP" >&6; }
5296 else
5297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5298 $as_echo "no" >&6; }
5299 fi
5300 
5301 
5302         if test "x$CMP" = x; then
5303           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5304         fi
5305       else
5306         # Otherwise we believe it is a complete path. Use it as it is.
5307         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5308 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5309         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5310 $as_echo_n "checking for CMP... " >&6; }
5311         if test ! -x "$tool_specified"; then
5312           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5313 $as_echo "not found" >&6; }
5314           as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5315         fi
5316         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5317 $as_echo "$tool_specified" >&6; }
5318       fi
5319     fi
5320   fi
5321 
5322 
5323 
5324   if test "x$CMP" = x; then
5325     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5326   fi
5327 
5328 
5329 
5330 
5331 
5332   # Publish this variable in the help.
5333 
5334 
5335   if test "x$COMM" = x; then
5336     # The variable is not set by user, try to locate tool using the code snippet
5337     for ac_prog in comm
5338 do
5339   # Extract the first word of "$ac_prog", so it can be a program name with args.
5340 set dummy $ac_prog; ac_word=$2
5341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5342 $as_echo_n "checking for $ac_word... " >&6; }
5343 if ${ac_cv_path_COMM+:} false; then :
5344   $as_echo_n "(cached) " >&6
5345 else
5346   case $COMM in
5347   [\\/]* | ?:[\\/]*)
5348   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5349   ;;
5350   *)
5351   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5352 for as_dir in $PATH
5353 do
5354   IFS=$as_save_IFS
5355   test -z "$as_dir" && as_dir=.
5356     for ac_exec_ext in '' $ac_executable_extensions; do
5357   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5358     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5359     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5360     break 2
5361   fi
5362 done
5363   done
5364 IFS=$as_save_IFS
5365 
5366   ;;
5367 esac
5368 fi
5369 COMM=$ac_cv_path_COMM
5370 if test -n "$COMM"; then
5371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5372 $as_echo "$COMM" >&6; }
5373 else
5374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5375 $as_echo "no" >&6; }
5376 fi
5377 
5378 
5379   test -n "$COMM" && break
5380 done
5381 
5382   else
5383     # The variable is set, but is it from the command line or the environment?
5384 
5385     # Try to remove the string !COMM! from our list.
5386     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5387     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5388       # If it failed, the variable was not from the command line. Ignore it,
5389       # but warn the user (except for BASH, which is always set by the calling BASH).
5390       if test "xCOMM" != xBASH; then
5391         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5392 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5393       fi
5394       # Try to locate tool using the code snippet
5395       for ac_prog in comm
5396 do
5397   # Extract the first word of "$ac_prog", so it can be a program name with args.
5398 set dummy $ac_prog; ac_word=$2
5399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5400 $as_echo_n "checking for $ac_word... " >&6; }
5401 if ${ac_cv_path_COMM+:} false; then :
5402   $as_echo_n "(cached) " >&6
5403 else
5404   case $COMM in
5405   [\\/]* | ?:[\\/]*)
5406   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5407   ;;
5408   *)
5409   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5410 for as_dir in $PATH
5411 do
5412   IFS=$as_save_IFS
5413   test -z "$as_dir" && as_dir=.
5414     for ac_exec_ext in '' $ac_executable_extensions; do
5415   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5416     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5417     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5418     break 2
5419   fi
5420 done
5421   done
5422 IFS=$as_save_IFS
5423 
5424   ;;
5425 esac
5426 fi
5427 COMM=$ac_cv_path_COMM
5428 if test -n "$COMM"; then
5429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5430 $as_echo "$COMM" >&6; }
5431 else
5432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5433 $as_echo "no" >&6; }
5434 fi
5435 
5436 
5437   test -n "$COMM" && break
5438 done
5439 
5440     else
5441       # If it succeeded, then it was overridden by the user. We will use it
5442       # for the tool.
5443 
5444       # First remove it from the list of overridden variables, so we can test
5445       # for unknown variables in the end.
5446       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5447 
5448       # Check if the provided tool contains a complete path.
5449       tool_specified="$COMM"
5450       tool_basename="${tool_specified##*/}"
5451       if test "x$tool_basename" = "x$tool_specified"; then
5452         # A command without a complete path is provided, search $PATH.
5453         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5454 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5455         # Extract the first word of "$tool_basename", so it can be a program name with args.
5456 set dummy $tool_basename; ac_word=$2
5457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5458 $as_echo_n "checking for $ac_word... " >&6; }
5459 if ${ac_cv_path_COMM+:} false; then :
5460   $as_echo_n "(cached) " >&6
5461 else
5462   case $COMM in
5463   [\\/]* | ?:[\\/]*)
5464   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5465   ;;
5466   *)
5467   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5468 for as_dir in $PATH
5469 do
5470   IFS=$as_save_IFS
5471   test -z "$as_dir" && as_dir=.
5472     for ac_exec_ext in '' $ac_executable_extensions; do
5473   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5474     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5476     break 2
5477   fi
5478 done
5479   done
5480 IFS=$as_save_IFS
5481 
5482   ;;
5483 esac
5484 fi
5485 COMM=$ac_cv_path_COMM
5486 if test -n "$COMM"; then
5487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5488 $as_echo "$COMM" >&6; }
5489 else
5490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5491 $as_echo "no" >&6; }
5492 fi
5493 
5494 
5495         if test "x$COMM" = x; then
5496           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5497         fi
5498       else
5499         # Otherwise we believe it is a complete path. Use it as it is.
5500         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5501 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5502         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5503 $as_echo_n "checking for COMM... " >&6; }
5504         if test ! -x "$tool_specified"; then
5505           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5506 $as_echo "not found" >&6; }
5507           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5508         fi
5509         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5510 $as_echo "$tool_specified" >&6; }
5511       fi
5512     fi
5513   fi
5514 
5515 
5516 
5517   if test "x$COMM" = x; then
5518     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5519   fi
5520 
5521 
5522 
5523 
5524 
5525   # Publish this variable in the help.
5526 
5527 
5528   if test "x$CP" = x; then
5529     # The variable is not set by user, try to locate tool using the code snippet
5530     for ac_prog in cp
5531 do
5532   # Extract the first word of "$ac_prog", so it can be a program name with args.
5533 set dummy $ac_prog; ac_word=$2
5534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5535 $as_echo_n "checking for $ac_word... " >&6; }
5536 if ${ac_cv_path_CP+:} false; then :
5537   $as_echo_n "(cached) " >&6
5538 else
5539   case $CP in
5540   [\\/]* | ?:[\\/]*)
5541   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5542   ;;
5543   *)
5544   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5545 for as_dir in $PATH
5546 do
5547   IFS=$as_save_IFS
5548   test -z "$as_dir" && as_dir=.
5549     for ac_exec_ext in '' $ac_executable_extensions; do
5550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5551     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5553     break 2
5554   fi
5555 done
5556   done
5557 IFS=$as_save_IFS
5558 
5559   ;;
5560 esac
5561 fi
5562 CP=$ac_cv_path_CP
5563 if test -n "$CP"; then
5564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5565 $as_echo "$CP" >&6; }
5566 else
5567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5568 $as_echo "no" >&6; }
5569 fi
5570 
5571 
5572   test -n "$CP" && break
5573 done
5574 
5575   else
5576     # The variable is set, but is it from the command line or the environment?
5577 
5578     # Try to remove the string !CP! from our list.
5579     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5580     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5581       # If it failed, the variable was not from the command line. Ignore it,
5582       # but warn the user (except for BASH, which is always set by the calling BASH).
5583       if test "xCP" != xBASH; then
5584         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5585 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5586       fi
5587       # Try to locate tool using the code snippet
5588       for ac_prog in cp
5589 do
5590   # Extract the first word of "$ac_prog", so it can be a program name with args.
5591 set dummy $ac_prog; ac_word=$2
5592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5593 $as_echo_n "checking for $ac_word... " >&6; }
5594 if ${ac_cv_path_CP+:} false; then :
5595   $as_echo_n "(cached) " >&6
5596 else
5597   case $CP in
5598   [\\/]* | ?:[\\/]*)
5599   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5600   ;;
5601   *)
5602   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5603 for as_dir in $PATH
5604 do
5605   IFS=$as_save_IFS
5606   test -z "$as_dir" && as_dir=.
5607     for ac_exec_ext in '' $ac_executable_extensions; do
5608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5609     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5611     break 2
5612   fi
5613 done
5614   done
5615 IFS=$as_save_IFS
5616 
5617   ;;
5618 esac
5619 fi
5620 CP=$ac_cv_path_CP
5621 if test -n "$CP"; then
5622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5623 $as_echo "$CP" >&6; }
5624 else
5625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5626 $as_echo "no" >&6; }
5627 fi
5628 
5629 
5630   test -n "$CP" && break
5631 done
5632 
5633     else
5634       # If it succeeded, then it was overridden by the user. We will use it
5635       # for the tool.
5636 
5637       # First remove it from the list of overridden variables, so we can test
5638       # for unknown variables in the end.
5639       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5640 
5641       # Check if the provided tool contains a complete path.
5642       tool_specified="$CP"
5643       tool_basename="${tool_specified##*/}"
5644       if test "x$tool_basename" = "x$tool_specified"; then
5645         # A command without a complete path is provided, search $PATH.
5646         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5647 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5648         # Extract the first word of "$tool_basename", so it can be a program name with args.
5649 set dummy $tool_basename; ac_word=$2
5650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5651 $as_echo_n "checking for $ac_word... " >&6; }
5652 if ${ac_cv_path_CP+:} false; then :
5653   $as_echo_n "(cached) " >&6
5654 else
5655   case $CP in
5656   [\\/]* | ?:[\\/]*)
5657   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5658   ;;
5659   *)
5660   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5661 for as_dir in $PATH
5662 do
5663   IFS=$as_save_IFS
5664   test -z "$as_dir" && as_dir=.
5665     for ac_exec_ext in '' $ac_executable_extensions; do
5666   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5667     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5669     break 2
5670   fi
5671 done
5672   done
5673 IFS=$as_save_IFS
5674 
5675   ;;
5676 esac
5677 fi
5678 CP=$ac_cv_path_CP
5679 if test -n "$CP"; then
5680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5681 $as_echo "$CP" >&6; }
5682 else
5683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5684 $as_echo "no" >&6; }
5685 fi
5686 
5687 
5688         if test "x$CP" = x; then
5689           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5690         fi
5691       else
5692         # Otherwise we believe it is a complete path. Use it as it is.
5693         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5694 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5695         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5696 $as_echo_n "checking for CP... " >&6; }
5697         if test ! -x "$tool_specified"; then
5698           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5699 $as_echo "not found" >&6; }
5700           as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5701         fi
5702         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5703 $as_echo "$tool_specified" >&6; }
5704       fi
5705     fi
5706   fi
5707 
5708 
5709 
5710   if test "x$CP" = x; then
5711     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5712   fi
5713 
5714 
5715 
5716 
5717 
5718   # Publish this variable in the help.
5719 
5720 
5721   if test "x$CUT" = x; then
5722     # The variable is not set by user, try to locate tool using the code snippet
5723     for ac_prog in cut
5724 do
5725   # Extract the first word of "$ac_prog", so it can be a program name with args.
5726 set dummy $ac_prog; ac_word=$2
5727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5728 $as_echo_n "checking for $ac_word... " >&6; }
5729 if ${ac_cv_path_CUT+:} false; then :
5730   $as_echo_n "(cached) " >&6
5731 else
5732   case $CUT in
5733   [\\/]* | ?:[\\/]*)
5734   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5735   ;;
5736   *)
5737   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5738 for as_dir in $PATH
5739 do
5740   IFS=$as_save_IFS
5741   test -z "$as_dir" && as_dir=.
5742     for ac_exec_ext in '' $ac_executable_extensions; do
5743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5744     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5746     break 2
5747   fi
5748 done
5749   done
5750 IFS=$as_save_IFS
5751 
5752   ;;
5753 esac
5754 fi
5755 CUT=$ac_cv_path_CUT
5756 if test -n "$CUT"; then
5757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5758 $as_echo "$CUT" >&6; }
5759 else
5760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5761 $as_echo "no" >&6; }
5762 fi
5763 
5764 
5765   test -n "$CUT" && break
5766 done
5767 
5768   else
5769     # The variable is set, but is it from the command line or the environment?
5770 
5771     # Try to remove the string !CUT! from our list.
5772     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5773     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5774       # If it failed, the variable was not from the command line. Ignore it,
5775       # but warn the user (except for BASH, which is always set by the calling BASH).
5776       if test "xCUT" != xBASH; then
5777         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5778 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5779       fi
5780       # Try to locate tool using the code snippet
5781       for ac_prog in cut
5782 do
5783   # Extract the first word of "$ac_prog", so it can be a program name with args.
5784 set dummy $ac_prog; ac_word=$2
5785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5786 $as_echo_n "checking for $ac_word... " >&6; }
5787 if ${ac_cv_path_CUT+:} false; then :
5788   $as_echo_n "(cached) " >&6
5789 else
5790   case $CUT in
5791   [\\/]* | ?:[\\/]*)
5792   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5793   ;;
5794   *)
5795   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5796 for as_dir in $PATH
5797 do
5798   IFS=$as_save_IFS
5799   test -z "$as_dir" && as_dir=.
5800     for ac_exec_ext in '' $ac_executable_extensions; do
5801   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5802     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5803     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5804     break 2
5805   fi
5806 done
5807   done
5808 IFS=$as_save_IFS
5809 
5810   ;;
5811 esac
5812 fi
5813 CUT=$ac_cv_path_CUT
5814 if test -n "$CUT"; then
5815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5816 $as_echo "$CUT" >&6; }
5817 else
5818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5819 $as_echo "no" >&6; }
5820 fi
5821 
5822 
5823   test -n "$CUT" && break
5824 done
5825 
5826     else
5827       # If it succeeded, then it was overridden by the user. We will use it
5828       # for the tool.
5829 
5830       # First remove it from the list of overridden variables, so we can test
5831       # for unknown variables in the end.
5832       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5833 
5834       # Check if the provided tool contains a complete path.
5835       tool_specified="$CUT"
5836       tool_basename="${tool_specified##*/}"
5837       if test "x$tool_basename" = "x$tool_specified"; then
5838         # A command without a complete path is provided, search $PATH.
5839         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5840 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5841         # Extract the first word of "$tool_basename", so it can be a program name with args.
5842 set dummy $tool_basename; ac_word=$2
5843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5844 $as_echo_n "checking for $ac_word... " >&6; }
5845 if ${ac_cv_path_CUT+:} false; then :
5846   $as_echo_n "(cached) " >&6
5847 else
5848   case $CUT in
5849   [\\/]* | ?:[\\/]*)
5850   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5851   ;;
5852   *)
5853   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5854 for as_dir in $PATH
5855 do
5856   IFS=$as_save_IFS
5857   test -z "$as_dir" && as_dir=.
5858     for ac_exec_ext in '' $ac_executable_extensions; do
5859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5860     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5862     break 2
5863   fi
5864 done
5865   done
5866 IFS=$as_save_IFS
5867 
5868   ;;
5869 esac
5870 fi
5871 CUT=$ac_cv_path_CUT
5872 if test -n "$CUT"; then
5873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5874 $as_echo "$CUT" >&6; }
5875 else
5876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5877 $as_echo "no" >&6; }
5878 fi
5879 
5880 
5881         if test "x$CUT" = x; then
5882           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5883         fi
5884       else
5885         # Otherwise we believe it is a complete path. Use it as it is.
5886         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5887 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5888         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5889 $as_echo_n "checking for CUT... " >&6; }
5890         if test ! -x "$tool_specified"; then
5891           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5892 $as_echo "not found" >&6; }
5893           as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5894         fi
5895         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5896 $as_echo "$tool_specified" >&6; }
5897       fi
5898     fi
5899   fi
5900 
5901 
5902 
5903   if test "x$CUT" = x; then
5904     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5905   fi
5906 
5907 
5908 
5909 
5910 
5911   # Publish this variable in the help.
5912 
5913 
5914   if test "x$DATE" = x; then
5915     # The variable is not set by user, try to locate tool using the code snippet
5916     for ac_prog in date
5917 do
5918   # Extract the first word of "$ac_prog", so it can be a program name with args.
5919 set dummy $ac_prog; ac_word=$2
5920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5921 $as_echo_n "checking for $ac_word... " >&6; }
5922 if ${ac_cv_path_DATE+:} false; then :
5923   $as_echo_n "(cached) " >&6
5924 else
5925   case $DATE in
5926   [\\/]* | ?:[\\/]*)
5927   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5928   ;;
5929   *)
5930   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5931 for as_dir in $PATH
5932 do
5933   IFS=$as_save_IFS
5934   test -z "$as_dir" && as_dir=.
5935     for ac_exec_ext in '' $ac_executable_extensions; do
5936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5937     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5939     break 2
5940   fi
5941 done
5942   done
5943 IFS=$as_save_IFS
5944 
5945   ;;
5946 esac
5947 fi
5948 DATE=$ac_cv_path_DATE
5949 if test -n "$DATE"; then
5950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5951 $as_echo "$DATE" >&6; }
5952 else
5953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5954 $as_echo "no" >&6; }
5955 fi
5956 
5957 
5958   test -n "$DATE" && break
5959 done
5960 
5961   else
5962     # The variable is set, but is it from the command line or the environment?
5963 
5964     # Try to remove the string !DATE! from our list.
5965     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5966     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5967       # If it failed, the variable was not from the command line. Ignore it,
5968       # but warn the user (except for BASH, which is always set by the calling BASH).
5969       if test "xDATE" != xBASH; then
5970         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5971 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5972       fi
5973       # Try to locate tool using the code snippet
5974       for ac_prog in date
5975 do
5976   # Extract the first word of "$ac_prog", so it can be a program name with args.
5977 set dummy $ac_prog; ac_word=$2
5978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5979 $as_echo_n "checking for $ac_word... " >&6; }
5980 if ${ac_cv_path_DATE+:} false; then :
5981   $as_echo_n "(cached) " >&6
5982 else
5983   case $DATE in
5984   [\\/]* | ?:[\\/]*)
5985   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5986   ;;
5987   *)
5988   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5989 for as_dir in $PATH
5990 do
5991   IFS=$as_save_IFS
5992   test -z "$as_dir" && as_dir=.
5993     for ac_exec_ext in '' $ac_executable_extensions; do
5994   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5995     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5997     break 2
5998   fi
5999 done
6000   done
6001 IFS=$as_save_IFS
6002 
6003   ;;
6004 esac
6005 fi
6006 DATE=$ac_cv_path_DATE
6007 if test -n "$DATE"; then
6008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6009 $as_echo "$DATE" >&6; }
6010 else
6011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6012 $as_echo "no" >&6; }
6013 fi
6014 
6015 
6016   test -n "$DATE" && break
6017 done
6018 
6019     else
6020       # If it succeeded, then it was overridden by the user. We will use it
6021       # for the tool.
6022 
6023       # First remove it from the list of overridden variables, so we can test
6024       # for unknown variables in the end.
6025       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6026 
6027       # Check if the provided tool contains a complete path.
6028       tool_specified="$DATE"
6029       tool_basename="${tool_specified##*/}"
6030       if test "x$tool_basename" = "x$tool_specified"; then
6031         # A command without a complete path is provided, search $PATH.
6032         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6033 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6034         # Extract the first word of "$tool_basename", so it can be a program name with args.
6035 set dummy $tool_basename; ac_word=$2
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6037 $as_echo_n "checking for $ac_word... " >&6; }
6038 if ${ac_cv_path_DATE+:} false; then :
6039   $as_echo_n "(cached) " >&6
6040 else
6041   case $DATE in
6042   [\\/]* | ?:[\\/]*)
6043   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6044   ;;
6045   *)
6046   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6047 for as_dir in $PATH
6048 do
6049   IFS=$as_save_IFS
6050   test -z "$as_dir" && as_dir=.
6051     for ac_exec_ext in '' $ac_executable_extensions; do
6052   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6053     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6054     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6055     break 2
6056   fi
6057 done
6058   done
6059 IFS=$as_save_IFS
6060 
6061   ;;
6062 esac
6063 fi
6064 DATE=$ac_cv_path_DATE
6065 if test -n "$DATE"; then
6066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6067 $as_echo "$DATE" >&6; }
6068 else
6069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6070 $as_echo "no" >&6; }
6071 fi
6072 
6073 
6074         if test "x$DATE" = x; then
6075           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6076         fi
6077       else
6078         # Otherwise we believe it is a complete path. Use it as it is.
6079         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6080 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6081         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6082 $as_echo_n "checking for DATE... " >&6; }
6083         if test ! -x "$tool_specified"; then
6084           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6085 $as_echo "not found" >&6; }
6086           as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6087         fi
6088         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6089 $as_echo "$tool_specified" >&6; }
6090       fi
6091     fi
6092   fi
6093 
6094 
6095 
6096   if test "x$DATE" = x; then
6097     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6098   fi
6099 
6100 
6101 
6102 
6103 
6104   # Publish this variable in the help.
6105 
6106 
6107   if test "x$DIFF" = x; then
6108     # The variable is not set by user, try to locate tool using the code snippet
6109     for ac_prog in gdiff diff
6110 do
6111   # Extract the first word of "$ac_prog", so it can be a program name with args.
6112 set dummy $ac_prog; ac_word=$2
6113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6114 $as_echo_n "checking for $ac_word... " >&6; }
6115 if ${ac_cv_path_DIFF+:} false; then :
6116   $as_echo_n "(cached) " >&6
6117 else
6118   case $DIFF in
6119   [\\/]* | ?:[\\/]*)
6120   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6121   ;;
6122   *)
6123   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6124 for as_dir in $PATH
6125 do
6126   IFS=$as_save_IFS
6127   test -z "$as_dir" && as_dir=.
6128     for ac_exec_ext in '' $ac_executable_extensions; do
6129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6130     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6132     break 2
6133   fi
6134 done
6135   done
6136 IFS=$as_save_IFS
6137 
6138   ;;
6139 esac
6140 fi
6141 DIFF=$ac_cv_path_DIFF
6142 if test -n "$DIFF"; then
6143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6144 $as_echo "$DIFF" >&6; }
6145 else
6146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6147 $as_echo "no" >&6; }
6148 fi
6149 
6150 
6151   test -n "$DIFF" && break
6152 done
6153 
6154   else
6155     # The variable is set, but is it from the command line or the environment?
6156 
6157     # Try to remove the string !DIFF! from our list.
6158     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6159     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6160       # If it failed, the variable was not from the command line. Ignore it,
6161       # but warn the user (except for BASH, which is always set by the calling BASH).
6162       if test "xDIFF" != xBASH; then
6163         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6164 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6165       fi
6166       # Try to locate tool using the code snippet
6167       for ac_prog in gdiff diff
6168 do
6169   # Extract the first word of "$ac_prog", so it can be a program name with args.
6170 set dummy $ac_prog; ac_word=$2
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6172 $as_echo_n "checking for $ac_word... " >&6; }
6173 if ${ac_cv_path_DIFF+:} false; then :
6174   $as_echo_n "(cached) " >&6
6175 else
6176   case $DIFF in
6177   [\\/]* | ?:[\\/]*)
6178   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6179   ;;
6180   *)
6181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6182 for as_dir in $PATH
6183 do
6184   IFS=$as_save_IFS
6185   test -z "$as_dir" && as_dir=.
6186     for ac_exec_ext in '' $ac_executable_extensions; do
6187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6188     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6190     break 2
6191   fi
6192 done
6193   done
6194 IFS=$as_save_IFS
6195 
6196   ;;
6197 esac
6198 fi
6199 DIFF=$ac_cv_path_DIFF
6200 if test -n "$DIFF"; then
6201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6202 $as_echo "$DIFF" >&6; }
6203 else
6204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6205 $as_echo "no" >&6; }
6206 fi
6207 
6208 
6209   test -n "$DIFF" && break
6210 done
6211 
6212     else
6213       # If it succeeded, then it was overridden by the user. We will use it
6214       # for the tool.
6215 
6216       # First remove it from the list of overridden variables, so we can test
6217       # for unknown variables in the end.
6218       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6219 
6220       # Check if the provided tool contains a complete path.
6221       tool_specified="$DIFF"
6222       tool_basename="${tool_specified##*/}"
6223       if test "x$tool_basename" = "x$tool_specified"; then
6224         # A command without a complete path is provided, search $PATH.
6225         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6226 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6227         # Extract the first word of "$tool_basename", so it can be a program name with args.
6228 set dummy $tool_basename; ac_word=$2
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6230 $as_echo_n "checking for $ac_word... " >&6; }
6231 if ${ac_cv_path_DIFF+:} false; then :
6232   $as_echo_n "(cached) " >&6
6233 else
6234   case $DIFF in
6235   [\\/]* | ?:[\\/]*)
6236   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6237   ;;
6238   *)
6239   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6240 for as_dir in $PATH
6241 do
6242   IFS=$as_save_IFS
6243   test -z "$as_dir" && as_dir=.
6244     for ac_exec_ext in '' $ac_executable_extensions; do
6245   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6246     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6247     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6248     break 2
6249   fi
6250 done
6251   done
6252 IFS=$as_save_IFS
6253 
6254   ;;
6255 esac
6256 fi
6257 DIFF=$ac_cv_path_DIFF
6258 if test -n "$DIFF"; then
6259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6260 $as_echo "$DIFF" >&6; }
6261 else
6262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6263 $as_echo "no" >&6; }
6264 fi
6265 
6266 
6267         if test "x$DIFF" = x; then
6268           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6269         fi
6270       else
6271         # Otherwise we believe it is a complete path. Use it as it is.
6272         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6273 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6274         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6275 $as_echo_n "checking for DIFF... " >&6; }
6276         if test ! -x "$tool_specified"; then
6277           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6278 $as_echo "not found" >&6; }
6279           as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6280         fi
6281         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6282 $as_echo "$tool_specified" >&6; }
6283       fi
6284     fi
6285   fi
6286 
6287 
6288 
6289   if test "x$DIFF" = x; then
6290     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6291   fi
6292 
6293 
6294 
6295 
6296 
6297   # Publish this variable in the help.
6298 
6299 
6300   if test "x$DIRNAME" = x; then
6301     # The variable is not set by user, try to locate tool using the code snippet
6302     for ac_prog in dirname
6303 do
6304   # Extract the first word of "$ac_prog", so it can be a program name with args.
6305 set dummy $ac_prog; ac_word=$2
6306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6307 $as_echo_n "checking for $ac_word... " >&6; }
6308 if ${ac_cv_path_DIRNAME+:} false; then :
6309   $as_echo_n "(cached) " >&6
6310 else
6311   case $DIRNAME in
6312   [\\/]* | ?:[\\/]*)
6313   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6314   ;;
6315   *)
6316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6317 for as_dir in $PATH
6318 do
6319   IFS=$as_save_IFS
6320   test -z "$as_dir" && as_dir=.
6321     for ac_exec_ext in '' $ac_executable_extensions; do
6322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6323     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6325     break 2
6326   fi
6327 done
6328   done
6329 IFS=$as_save_IFS
6330 
6331   ;;
6332 esac
6333 fi
6334 DIRNAME=$ac_cv_path_DIRNAME
6335 if test -n "$DIRNAME"; then
6336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6337 $as_echo "$DIRNAME" >&6; }
6338 else
6339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6340 $as_echo "no" >&6; }
6341 fi
6342 
6343 
6344   test -n "$DIRNAME" && break
6345 done
6346 
6347   else
6348     # The variable is set, but is it from the command line or the environment?
6349 
6350     # Try to remove the string !DIRNAME! from our list.
6351     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6352     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6353       # If it failed, the variable was not from the command line. Ignore it,
6354       # but warn the user (except for BASH, which is always set by the calling BASH).
6355       if test "xDIRNAME" != xBASH; then
6356         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6357 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6358       fi
6359       # Try to locate tool using the code snippet
6360       for ac_prog in dirname
6361 do
6362   # Extract the first word of "$ac_prog", so it can be a program name with args.
6363 set dummy $ac_prog; ac_word=$2
6364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6365 $as_echo_n "checking for $ac_word... " >&6; }
6366 if ${ac_cv_path_DIRNAME+:} false; then :
6367   $as_echo_n "(cached) " >&6
6368 else
6369   case $DIRNAME in
6370   [\\/]* | ?:[\\/]*)
6371   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6372   ;;
6373   *)
6374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6375 for as_dir in $PATH
6376 do
6377   IFS=$as_save_IFS
6378   test -z "$as_dir" && as_dir=.
6379     for ac_exec_ext in '' $ac_executable_extensions; do
6380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6381     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6383     break 2
6384   fi
6385 done
6386   done
6387 IFS=$as_save_IFS
6388 
6389   ;;
6390 esac
6391 fi
6392 DIRNAME=$ac_cv_path_DIRNAME
6393 if test -n "$DIRNAME"; then
6394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6395 $as_echo "$DIRNAME" >&6; }
6396 else
6397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6398 $as_echo "no" >&6; }
6399 fi
6400 
6401 
6402   test -n "$DIRNAME" && break
6403 done
6404 
6405     else
6406       # If it succeeded, then it was overridden by the user. We will use it
6407       # for the tool.
6408 
6409       # First remove it from the list of overridden variables, so we can test
6410       # for unknown variables in the end.
6411       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6412 
6413       # Check if the provided tool contains a complete path.
6414       tool_specified="$DIRNAME"
6415       tool_basename="${tool_specified##*/}"
6416       if test "x$tool_basename" = "x$tool_specified"; then
6417         # A command without a complete path is provided, search $PATH.
6418         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6419 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6420         # Extract the first word of "$tool_basename", so it can be a program name with args.
6421 set dummy $tool_basename; ac_word=$2
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6423 $as_echo_n "checking for $ac_word... " >&6; }
6424 if ${ac_cv_path_DIRNAME+:} false; then :
6425   $as_echo_n "(cached) " >&6
6426 else
6427   case $DIRNAME in
6428   [\\/]* | ?:[\\/]*)
6429   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6430   ;;
6431   *)
6432   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6433 for as_dir in $PATH
6434 do
6435   IFS=$as_save_IFS
6436   test -z "$as_dir" && as_dir=.
6437     for ac_exec_ext in '' $ac_executable_extensions; do
6438   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6439     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6440     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6441     break 2
6442   fi
6443 done
6444   done
6445 IFS=$as_save_IFS
6446 
6447   ;;
6448 esac
6449 fi
6450 DIRNAME=$ac_cv_path_DIRNAME
6451 if test -n "$DIRNAME"; then
6452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6453 $as_echo "$DIRNAME" >&6; }
6454 else
6455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6456 $as_echo "no" >&6; }
6457 fi
6458 
6459 
6460         if test "x$DIRNAME" = x; then
6461           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6462         fi
6463       else
6464         # Otherwise we believe it is a complete path. Use it as it is.
6465         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6466 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6467         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6468 $as_echo_n "checking for DIRNAME... " >&6; }
6469         if test ! -x "$tool_specified"; then
6470           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6471 $as_echo "not found" >&6; }
6472           as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6473         fi
6474         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6475 $as_echo "$tool_specified" >&6; }
6476       fi
6477     fi
6478   fi
6479 
6480 
6481 
6482   if test "x$DIRNAME" = x; then
6483     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6484   fi
6485 
6486 
6487 
6488 
6489 
6490   # Publish this variable in the help.
6491 
6492 
6493   if test "x$ECHO" = x; then
6494     # The variable is not set by user, try to locate tool using the code snippet
6495     for ac_prog in echo
6496 do
6497   # Extract the first word of "$ac_prog", so it can be a program name with args.
6498 set dummy $ac_prog; ac_word=$2
6499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6500 $as_echo_n "checking for $ac_word... " >&6; }
6501 if ${ac_cv_path_ECHO+:} false; then :
6502   $as_echo_n "(cached) " >&6
6503 else
6504   case $ECHO in
6505   [\\/]* | ?:[\\/]*)
6506   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6507   ;;
6508   *)
6509   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6510 for as_dir in $PATH
6511 do
6512   IFS=$as_save_IFS
6513   test -z "$as_dir" && as_dir=.
6514     for ac_exec_ext in '' $ac_executable_extensions; do
6515   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6516     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6518     break 2
6519   fi
6520 done
6521   done
6522 IFS=$as_save_IFS
6523 
6524   ;;
6525 esac
6526 fi
6527 ECHO=$ac_cv_path_ECHO
6528 if test -n "$ECHO"; then
6529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6530 $as_echo "$ECHO" >&6; }
6531 else
6532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6533 $as_echo "no" >&6; }
6534 fi
6535 
6536 
6537   test -n "$ECHO" && break
6538 done
6539 
6540   else
6541     # The variable is set, but is it from the command line or the environment?
6542 
6543     # Try to remove the string !ECHO! from our list.
6544     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6545     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6546       # If it failed, the variable was not from the command line. Ignore it,
6547       # but warn the user (except for BASH, which is always set by the calling BASH).
6548       if test "xECHO" != xBASH; then
6549         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6550 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6551       fi
6552       # Try to locate tool using the code snippet
6553       for ac_prog in echo
6554 do
6555   # Extract the first word of "$ac_prog", so it can be a program name with args.
6556 set dummy $ac_prog; ac_word=$2
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6558 $as_echo_n "checking for $ac_word... " >&6; }
6559 if ${ac_cv_path_ECHO+:} false; then :
6560   $as_echo_n "(cached) " >&6
6561 else
6562   case $ECHO in
6563   [\\/]* | ?:[\\/]*)
6564   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6565   ;;
6566   *)
6567   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6568 for as_dir in $PATH
6569 do
6570   IFS=$as_save_IFS
6571   test -z "$as_dir" && as_dir=.
6572     for ac_exec_ext in '' $ac_executable_extensions; do
6573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6574     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6576     break 2
6577   fi
6578 done
6579   done
6580 IFS=$as_save_IFS
6581 
6582   ;;
6583 esac
6584 fi
6585 ECHO=$ac_cv_path_ECHO
6586 if test -n "$ECHO"; then
6587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6588 $as_echo "$ECHO" >&6; }
6589 else
6590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6591 $as_echo "no" >&6; }
6592 fi
6593 
6594 
6595   test -n "$ECHO" && break
6596 done
6597 
6598     else
6599       # If it succeeded, then it was overridden by the user. We will use it
6600       # for the tool.
6601 
6602       # First remove it from the list of overridden variables, so we can test
6603       # for unknown variables in the end.
6604       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6605 
6606       # Check if the provided tool contains a complete path.
6607       tool_specified="$ECHO"
6608       tool_basename="${tool_specified##*/}"
6609       if test "x$tool_basename" = "x$tool_specified"; then
6610         # A command without a complete path is provided, search $PATH.
6611         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6612 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6613         # Extract the first word of "$tool_basename", so it can be a program name with args.
6614 set dummy $tool_basename; ac_word=$2
6615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6616 $as_echo_n "checking for $ac_word... " >&6; }
6617 if ${ac_cv_path_ECHO+:} false; then :
6618   $as_echo_n "(cached) " >&6
6619 else
6620   case $ECHO in
6621   [\\/]* | ?:[\\/]*)
6622   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6623   ;;
6624   *)
6625   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6626 for as_dir in $PATH
6627 do
6628   IFS=$as_save_IFS
6629   test -z "$as_dir" && as_dir=.
6630     for ac_exec_ext in '' $ac_executable_extensions; do
6631   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6632     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6634     break 2
6635   fi
6636 done
6637   done
6638 IFS=$as_save_IFS
6639 
6640   ;;
6641 esac
6642 fi
6643 ECHO=$ac_cv_path_ECHO
6644 if test -n "$ECHO"; then
6645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6646 $as_echo "$ECHO" >&6; }
6647 else
6648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6649 $as_echo "no" >&6; }
6650 fi
6651 
6652 
6653         if test "x$ECHO" = x; then
6654           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6655         fi
6656       else
6657         # Otherwise we believe it is a complete path. Use it as it is.
6658         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6659 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6660         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6661 $as_echo_n "checking for ECHO... " >&6; }
6662         if test ! -x "$tool_specified"; then
6663           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6664 $as_echo "not found" >&6; }
6665           as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6666         fi
6667         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6668 $as_echo "$tool_specified" >&6; }
6669       fi
6670     fi
6671   fi
6672 
6673 
6674 
6675   if test "x$ECHO" = x; then
6676     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6677   fi
6678 
6679 
6680 
6681 
6682 
6683   # Publish this variable in the help.
6684 
6685 
6686   if test "x$EXPR" = x; then
6687     # The variable is not set by user, try to locate tool using the code snippet
6688     for ac_prog in expr
6689 do
6690   # Extract the first word of "$ac_prog", so it can be a program name with args.
6691 set dummy $ac_prog; ac_word=$2
6692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6693 $as_echo_n "checking for $ac_word... " >&6; }
6694 if ${ac_cv_path_EXPR+:} false; then :
6695   $as_echo_n "(cached) " >&6
6696 else
6697   case $EXPR in
6698   [\\/]* | ?:[\\/]*)
6699   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6700   ;;
6701   *)
6702   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6703 for as_dir in $PATH
6704 do
6705   IFS=$as_save_IFS
6706   test -z "$as_dir" && as_dir=.
6707     for ac_exec_ext in '' $ac_executable_extensions; do
6708   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6709     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6711     break 2
6712   fi
6713 done
6714   done
6715 IFS=$as_save_IFS
6716 
6717   ;;
6718 esac
6719 fi
6720 EXPR=$ac_cv_path_EXPR
6721 if test -n "$EXPR"; then
6722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6723 $as_echo "$EXPR" >&6; }
6724 else
6725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6726 $as_echo "no" >&6; }
6727 fi
6728 
6729 
6730   test -n "$EXPR" && break
6731 done
6732 
6733   else
6734     # The variable is set, but is it from the command line or the environment?
6735 
6736     # Try to remove the string !EXPR! from our list.
6737     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6738     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6739       # If it failed, the variable was not from the command line. Ignore it,
6740       # but warn the user (except for BASH, which is always set by the calling BASH).
6741       if test "xEXPR" != xBASH; then
6742         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6743 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6744       fi
6745       # Try to locate tool using the code snippet
6746       for ac_prog in expr
6747 do
6748   # Extract the first word of "$ac_prog", so it can be a program name with args.
6749 set dummy $ac_prog; ac_word=$2
6750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6751 $as_echo_n "checking for $ac_word... " >&6; }
6752 if ${ac_cv_path_EXPR+:} false; then :
6753   $as_echo_n "(cached) " >&6
6754 else
6755   case $EXPR in
6756   [\\/]* | ?:[\\/]*)
6757   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6758   ;;
6759   *)
6760   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6761 for as_dir in $PATH
6762 do
6763   IFS=$as_save_IFS
6764   test -z "$as_dir" && as_dir=.
6765     for ac_exec_ext in '' $ac_executable_extensions; do
6766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6767     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6769     break 2
6770   fi
6771 done
6772   done
6773 IFS=$as_save_IFS
6774 
6775   ;;
6776 esac
6777 fi
6778 EXPR=$ac_cv_path_EXPR
6779 if test -n "$EXPR"; then
6780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6781 $as_echo "$EXPR" >&6; }
6782 else
6783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6784 $as_echo "no" >&6; }
6785 fi
6786 
6787 
6788   test -n "$EXPR" && break
6789 done
6790 
6791     else
6792       # If it succeeded, then it was overridden by the user. We will use it
6793       # for the tool.
6794 
6795       # First remove it from the list of overridden variables, so we can test
6796       # for unknown variables in the end.
6797       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6798 
6799       # Check if the provided tool contains a complete path.
6800       tool_specified="$EXPR"
6801       tool_basename="${tool_specified##*/}"
6802       if test "x$tool_basename" = "x$tool_specified"; then
6803         # A command without a complete path is provided, search $PATH.
6804         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6805 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6806         # Extract the first word of "$tool_basename", so it can be a program name with args.
6807 set dummy $tool_basename; ac_word=$2
6808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6809 $as_echo_n "checking for $ac_word... " >&6; }
6810 if ${ac_cv_path_EXPR+:} false; then :
6811   $as_echo_n "(cached) " >&6
6812 else
6813   case $EXPR in
6814   [\\/]* | ?:[\\/]*)
6815   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6816   ;;
6817   *)
6818   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6819 for as_dir in $PATH
6820 do
6821   IFS=$as_save_IFS
6822   test -z "$as_dir" && as_dir=.
6823     for ac_exec_ext in '' $ac_executable_extensions; do
6824   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6825     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6827     break 2
6828   fi
6829 done
6830   done
6831 IFS=$as_save_IFS
6832 
6833   ;;
6834 esac
6835 fi
6836 EXPR=$ac_cv_path_EXPR
6837 if test -n "$EXPR"; then
6838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6839 $as_echo "$EXPR" >&6; }
6840 else
6841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6842 $as_echo "no" >&6; }
6843 fi
6844 
6845 
6846         if test "x$EXPR" = x; then
6847           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6848         fi
6849       else
6850         # Otherwise we believe it is a complete path. Use it as it is.
6851         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6852 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6853         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6854 $as_echo_n "checking for EXPR... " >&6; }
6855         if test ! -x "$tool_specified"; then
6856           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6857 $as_echo "not found" >&6; }
6858           as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6859         fi
6860         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6861 $as_echo "$tool_specified" >&6; }
6862       fi
6863     fi
6864   fi
6865 
6866 
6867 
6868   if test "x$EXPR" = x; then
6869     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6870   fi
6871 
6872 
6873 
6874 
6875 
6876   # Publish this variable in the help.
6877 
6878 
6879   if test "x$FILE" = x; then
6880     # The variable is not set by user, try to locate tool using the code snippet
6881     for ac_prog in file
6882 do
6883   # Extract the first word of "$ac_prog", so it can be a program name with args.
6884 set dummy $ac_prog; ac_word=$2
6885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6886 $as_echo_n "checking for $ac_word... " >&6; }
6887 if ${ac_cv_path_FILE+:} false; then :
6888   $as_echo_n "(cached) " >&6
6889 else
6890   case $FILE in
6891   [\\/]* | ?:[\\/]*)
6892   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6893   ;;
6894   *)
6895   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6896 for as_dir in $PATH
6897 do
6898   IFS=$as_save_IFS
6899   test -z "$as_dir" && as_dir=.
6900     for ac_exec_ext in '' $ac_executable_extensions; do
6901   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6902     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6903     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6904     break 2
6905   fi
6906 done
6907   done
6908 IFS=$as_save_IFS
6909 
6910   ;;
6911 esac
6912 fi
6913 FILE=$ac_cv_path_FILE
6914 if test -n "$FILE"; then
6915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6916 $as_echo "$FILE" >&6; }
6917 else
6918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6919 $as_echo "no" >&6; }
6920 fi
6921 
6922 
6923   test -n "$FILE" && break
6924 done
6925 
6926   else
6927     # The variable is set, but is it from the command line or the environment?
6928 
6929     # Try to remove the string !FILE! from our list.
6930     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6931     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6932       # If it failed, the variable was not from the command line. Ignore it,
6933       # but warn the user (except for BASH, which is always set by the calling BASH).
6934       if test "xFILE" != xBASH; then
6935         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6936 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6937       fi
6938       # Try to locate tool using the code snippet
6939       for ac_prog in file
6940 do
6941   # Extract the first word of "$ac_prog", so it can be a program name with args.
6942 set dummy $ac_prog; ac_word=$2
6943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6944 $as_echo_n "checking for $ac_word... " >&6; }
6945 if ${ac_cv_path_FILE+:} false; then :
6946   $as_echo_n "(cached) " >&6
6947 else
6948   case $FILE in
6949   [\\/]* | ?:[\\/]*)
6950   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6951   ;;
6952   *)
6953   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6954 for as_dir in $PATH
6955 do
6956   IFS=$as_save_IFS
6957   test -z "$as_dir" && as_dir=.
6958     for ac_exec_ext in '' $ac_executable_extensions; do
6959   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6960     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6961     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6962     break 2
6963   fi
6964 done
6965   done
6966 IFS=$as_save_IFS
6967 
6968   ;;
6969 esac
6970 fi
6971 FILE=$ac_cv_path_FILE
6972 if test -n "$FILE"; then
6973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6974 $as_echo "$FILE" >&6; }
6975 else
6976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6977 $as_echo "no" >&6; }
6978 fi
6979 
6980 
6981   test -n "$FILE" && break
6982 done
6983 
6984     else
6985       # If it succeeded, then it was overridden by the user. We will use it
6986       # for the tool.
6987 
6988       # First remove it from the list of overridden variables, so we can test
6989       # for unknown variables in the end.
6990       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6991 
6992       # Check if the provided tool contains a complete path.
6993       tool_specified="$FILE"
6994       tool_basename="${tool_specified##*/}"
6995       if test "x$tool_basename" = "x$tool_specified"; then
6996         # A command without a complete path is provided, search $PATH.
6997         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
6998 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
6999         # Extract the first word of "$tool_basename", so it can be a program name with args.
7000 set dummy $tool_basename; ac_word=$2
7001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7002 $as_echo_n "checking for $ac_word... " >&6; }
7003 if ${ac_cv_path_FILE+:} false; then :
7004   $as_echo_n "(cached) " >&6
7005 else
7006   case $FILE in
7007   [\\/]* | ?:[\\/]*)
7008   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7009   ;;
7010   *)
7011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7012 for as_dir in $PATH
7013 do
7014   IFS=$as_save_IFS
7015   test -z "$as_dir" && as_dir=.
7016     for ac_exec_ext in '' $ac_executable_extensions; do
7017   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7018     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7019     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7020     break 2
7021   fi
7022 done
7023   done
7024 IFS=$as_save_IFS
7025 
7026   ;;
7027 esac
7028 fi
7029 FILE=$ac_cv_path_FILE
7030 if test -n "$FILE"; then
7031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7032 $as_echo "$FILE" >&6; }
7033 else
7034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7035 $as_echo "no" >&6; }
7036 fi
7037 
7038 
7039         if test "x$FILE" = x; then
7040           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7041         fi
7042       else
7043         # Otherwise we believe it is a complete path. Use it as it is.
7044         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7045 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7046         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7047 $as_echo_n "checking for FILE... " >&6; }
7048         if test ! -x "$tool_specified"; then
7049           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7050 $as_echo "not found" >&6; }
7051           as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7052         fi
7053         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7054 $as_echo "$tool_specified" >&6; }
7055       fi
7056     fi
7057   fi
7058 
7059 
7060 
7061   if test "x$FILE" = x; then
7062     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7063   fi
7064 
7065 
7066 
7067 
7068 
7069   # Publish this variable in the help.
7070 
7071 
7072   if test "x$FIND" = x; then
7073     # The variable is not set by user, try to locate tool using the code snippet
7074     for ac_prog in find
7075 do
7076   # Extract the first word of "$ac_prog", so it can be a program name with args.
7077 set dummy $ac_prog; ac_word=$2
7078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7079 $as_echo_n "checking for $ac_word... " >&6; }
7080 if ${ac_cv_path_FIND+:} false; then :
7081   $as_echo_n "(cached) " >&6
7082 else
7083   case $FIND in
7084   [\\/]* | ?:[\\/]*)
7085   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7086   ;;
7087   *)
7088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7089 for as_dir in $PATH
7090 do
7091   IFS=$as_save_IFS
7092   test -z "$as_dir" && as_dir=.
7093     for ac_exec_ext in '' $ac_executable_extensions; do
7094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7095     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7097     break 2
7098   fi
7099 done
7100   done
7101 IFS=$as_save_IFS
7102 
7103   ;;
7104 esac
7105 fi
7106 FIND=$ac_cv_path_FIND
7107 if test -n "$FIND"; then
7108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7109 $as_echo "$FIND" >&6; }
7110 else
7111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7112 $as_echo "no" >&6; }
7113 fi
7114 
7115 
7116   test -n "$FIND" && break
7117 done
7118 
7119   else
7120     # The variable is set, but is it from the command line or the environment?
7121 
7122     # Try to remove the string !FIND! from our list.
7123     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7124     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7125       # If it failed, the variable was not from the command line. Ignore it,
7126       # but warn the user (except for BASH, which is always set by the calling BASH).
7127       if test "xFIND" != xBASH; then
7128         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7129 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7130       fi
7131       # Try to locate tool using the code snippet
7132       for ac_prog in find
7133 do
7134   # Extract the first word of "$ac_prog", so it can be a program name with args.
7135 set dummy $ac_prog; ac_word=$2
7136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7137 $as_echo_n "checking for $ac_word... " >&6; }
7138 if ${ac_cv_path_FIND+:} false; then :
7139   $as_echo_n "(cached) " >&6
7140 else
7141   case $FIND in
7142   [\\/]* | ?:[\\/]*)
7143   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7144   ;;
7145   *)
7146   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7147 for as_dir in $PATH
7148 do
7149   IFS=$as_save_IFS
7150   test -z "$as_dir" && as_dir=.
7151     for ac_exec_ext in '' $ac_executable_extensions; do
7152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7153     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7155     break 2
7156   fi
7157 done
7158   done
7159 IFS=$as_save_IFS
7160 
7161   ;;
7162 esac
7163 fi
7164 FIND=$ac_cv_path_FIND
7165 if test -n "$FIND"; then
7166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7167 $as_echo "$FIND" >&6; }
7168 else
7169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7170 $as_echo "no" >&6; }
7171 fi
7172 
7173 
7174   test -n "$FIND" && break
7175 done
7176 
7177     else
7178       # If it succeeded, then it was overridden by the user. We will use it
7179       # for the tool.
7180 
7181       # First remove it from the list of overridden variables, so we can test
7182       # for unknown variables in the end.
7183       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7184 
7185       # Check if the provided tool contains a complete path.
7186       tool_specified="$FIND"
7187       tool_basename="${tool_specified##*/}"
7188       if test "x$tool_basename" = "x$tool_specified"; then
7189         # A command without a complete path is provided, search $PATH.
7190         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7191 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7192         # Extract the first word of "$tool_basename", so it can be a program name with args.
7193 set dummy $tool_basename; ac_word=$2
7194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7195 $as_echo_n "checking for $ac_word... " >&6; }
7196 if ${ac_cv_path_FIND+:} false; then :
7197   $as_echo_n "(cached) " >&6
7198 else
7199   case $FIND in
7200   [\\/]* | ?:[\\/]*)
7201   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7202   ;;
7203   *)
7204   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7205 for as_dir in $PATH
7206 do
7207   IFS=$as_save_IFS
7208   test -z "$as_dir" && as_dir=.
7209     for ac_exec_ext in '' $ac_executable_extensions; do
7210   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7211     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7212     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7213     break 2
7214   fi
7215 done
7216   done
7217 IFS=$as_save_IFS
7218 
7219   ;;
7220 esac
7221 fi
7222 FIND=$ac_cv_path_FIND
7223 if test -n "$FIND"; then
7224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7225 $as_echo "$FIND" >&6; }
7226 else
7227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7228 $as_echo "no" >&6; }
7229 fi
7230 
7231 
7232         if test "x$FIND" = x; then
7233           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7234         fi
7235       else
7236         # Otherwise we believe it is a complete path. Use it as it is.
7237         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7238 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7239         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7240 $as_echo_n "checking for FIND... " >&6; }
7241         if test ! -x "$tool_specified"; then
7242           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7243 $as_echo "not found" >&6; }
7244           as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7245         fi
7246         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7247 $as_echo "$tool_specified" >&6; }
7248       fi
7249     fi
7250   fi
7251 
7252 
7253 
7254   if test "x$FIND" = x; then
7255     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7256   fi
7257 
7258 
7259 
7260 
7261 
7262   # Publish this variable in the help.
7263 
7264 
7265   if test "x$HEAD" = x; then
7266     # The variable is not set by user, try to locate tool using the code snippet
7267     for ac_prog in head
7268 do
7269   # Extract the first word of "$ac_prog", so it can be a program name with args.
7270 set dummy $ac_prog; ac_word=$2
7271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7272 $as_echo_n "checking for $ac_word... " >&6; }
7273 if ${ac_cv_path_HEAD+:} false; then :
7274   $as_echo_n "(cached) " >&6
7275 else
7276   case $HEAD in
7277   [\\/]* | ?:[\\/]*)
7278   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7279   ;;
7280   *)
7281   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7282 for as_dir in $PATH
7283 do
7284   IFS=$as_save_IFS
7285   test -z "$as_dir" && as_dir=.
7286     for ac_exec_ext in '' $ac_executable_extensions; do
7287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7288     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7290     break 2
7291   fi
7292 done
7293   done
7294 IFS=$as_save_IFS
7295 
7296   ;;
7297 esac
7298 fi
7299 HEAD=$ac_cv_path_HEAD
7300 if test -n "$HEAD"; then
7301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7302 $as_echo "$HEAD" >&6; }
7303 else
7304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7305 $as_echo "no" >&6; }
7306 fi
7307 
7308 
7309   test -n "$HEAD" && break
7310 done
7311 
7312   else
7313     # The variable is set, but is it from the command line or the environment?
7314 
7315     # Try to remove the string !HEAD! from our list.
7316     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7317     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7318       # If it failed, the variable was not from the command line. Ignore it,
7319       # but warn the user (except for BASH, which is always set by the calling BASH).
7320       if test "xHEAD" != xBASH; then
7321         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7322 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7323       fi
7324       # Try to locate tool using the code snippet
7325       for ac_prog in head
7326 do
7327   # Extract the first word of "$ac_prog", so it can be a program name with args.
7328 set dummy $ac_prog; ac_word=$2
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7330 $as_echo_n "checking for $ac_word... " >&6; }
7331 if ${ac_cv_path_HEAD+:} false; then :
7332   $as_echo_n "(cached) " >&6
7333 else
7334   case $HEAD in
7335   [\\/]* | ?:[\\/]*)
7336   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7337   ;;
7338   *)
7339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7340 for as_dir in $PATH
7341 do
7342   IFS=$as_save_IFS
7343   test -z "$as_dir" && as_dir=.
7344     for ac_exec_ext in '' $ac_executable_extensions; do
7345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7346     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7348     break 2
7349   fi
7350 done
7351   done
7352 IFS=$as_save_IFS
7353 
7354   ;;
7355 esac
7356 fi
7357 HEAD=$ac_cv_path_HEAD
7358 if test -n "$HEAD"; then
7359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7360 $as_echo "$HEAD" >&6; }
7361 else
7362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7363 $as_echo "no" >&6; }
7364 fi
7365 
7366 
7367   test -n "$HEAD" && break
7368 done
7369 
7370     else
7371       # If it succeeded, then it was overridden by the user. We will use it
7372       # for the tool.
7373 
7374       # First remove it from the list of overridden variables, so we can test
7375       # for unknown variables in the end.
7376       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7377 
7378       # Check if the provided tool contains a complete path.
7379       tool_specified="$HEAD"
7380       tool_basename="${tool_specified##*/}"
7381       if test "x$tool_basename" = "x$tool_specified"; then
7382         # A command without a complete path is provided, search $PATH.
7383         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7384 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7385         # Extract the first word of "$tool_basename", so it can be a program name with args.
7386 set dummy $tool_basename; ac_word=$2
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7388 $as_echo_n "checking for $ac_word... " >&6; }
7389 if ${ac_cv_path_HEAD+:} false; then :
7390   $as_echo_n "(cached) " >&6
7391 else
7392   case $HEAD in
7393   [\\/]* | ?:[\\/]*)
7394   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7395   ;;
7396   *)
7397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7398 for as_dir in $PATH
7399 do
7400   IFS=$as_save_IFS
7401   test -z "$as_dir" && as_dir=.
7402     for ac_exec_ext in '' $ac_executable_extensions; do
7403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7404     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7406     break 2
7407   fi
7408 done
7409   done
7410 IFS=$as_save_IFS
7411 
7412   ;;
7413 esac
7414 fi
7415 HEAD=$ac_cv_path_HEAD
7416 if test -n "$HEAD"; then
7417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7418 $as_echo "$HEAD" >&6; }
7419 else
7420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7421 $as_echo "no" >&6; }
7422 fi
7423 
7424 
7425         if test "x$HEAD" = x; then
7426           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7427         fi
7428       else
7429         # Otherwise we believe it is a complete path. Use it as it is.
7430         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7431 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7432         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7433 $as_echo_n "checking for HEAD... " >&6; }
7434         if test ! -x "$tool_specified"; then
7435           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7436 $as_echo "not found" >&6; }
7437           as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7438         fi
7439         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7440 $as_echo "$tool_specified" >&6; }
7441       fi
7442     fi
7443   fi
7444 
7445 
7446 
7447   if test "x$HEAD" = x; then
7448     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7449   fi
7450 
7451 
7452 
7453 
7454 
7455   # Publish this variable in the help.
7456 
7457 
7458   if test "x$LN" = x; then
7459     # The variable is not set by user, try to locate tool using the code snippet
7460     for ac_prog in ln
7461 do
7462   # Extract the first word of "$ac_prog", so it can be a program name with args.
7463 set dummy $ac_prog; ac_word=$2
7464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7465 $as_echo_n "checking for $ac_word... " >&6; }
7466 if ${ac_cv_path_LN+:} false; then :
7467   $as_echo_n "(cached) " >&6
7468 else
7469   case $LN in
7470   [\\/]* | ?:[\\/]*)
7471   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7472   ;;
7473   *)
7474   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7475 for as_dir in $PATH
7476 do
7477   IFS=$as_save_IFS
7478   test -z "$as_dir" && as_dir=.
7479     for ac_exec_ext in '' $ac_executable_extensions; do
7480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7481     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7483     break 2
7484   fi
7485 done
7486   done
7487 IFS=$as_save_IFS
7488 
7489   ;;
7490 esac
7491 fi
7492 LN=$ac_cv_path_LN
7493 if test -n "$LN"; then
7494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7495 $as_echo "$LN" >&6; }
7496 else
7497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7498 $as_echo "no" >&6; }
7499 fi
7500 
7501 
7502   test -n "$LN" && break
7503 done
7504 
7505   else
7506     # The variable is set, but is it from the command line or the environment?
7507 
7508     # Try to remove the string !LN! from our list.
7509     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7510     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7511       # If it failed, the variable was not from the command line. Ignore it,
7512       # but warn the user (except for BASH, which is always set by the calling BASH).
7513       if test "xLN" != xBASH; then
7514         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7515 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7516       fi
7517       # Try to locate tool using the code snippet
7518       for ac_prog in ln
7519 do
7520   # Extract the first word of "$ac_prog", so it can be a program name with args.
7521 set dummy $ac_prog; ac_word=$2
7522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7523 $as_echo_n "checking for $ac_word... " >&6; }
7524 if ${ac_cv_path_LN+:} false; then :
7525   $as_echo_n "(cached) " >&6
7526 else
7527   case $LN in
7528   [\\/]* | ?:[\\/]*)
7529   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7530   ;;
7531   *)
7532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7533 for as_dir in $PATH
7534 do
7535   IFS=$as_save_IFS
7536   test -z "$as_dir" && as_dir=.
7537     for ac_exec_ext in '' $ac_executable_extensions; do
7538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7539     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7541     break 2
7542   fi
7543 done
7544   done
7545 IFS=$as_save_IFS
7546 
7547   ;;
7548 esac
7549 fi
7550 LN=$ac_cv_path_LN
7551 if test -n "$LN"; then
7552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7553 $as_echo "$LN" >&6; }
7554 else
7555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7556 $as_echo "no" >&6; }
7557 fi
7558 
7559 
7560   test -n "$LN" && break
7561 done
7562 
7563     else
7564       # If it succeeded, then it was overridden by the user. We will use it
7565       # for the tool.
7566 
7567       # First remove it from the list of overridden variables, so we can test
7568       # for unknown variables in the end.
7569       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7570 
7571       # Check if the provided tool contains a complete path.
7572       tool_specified="$LN"
7573       tool_basename="${tool_specified##*/}"
7574       if test "x$tool_basename" = "x$tool_specified"; then
7575         # A command without a complete path is provided, search $PATH.
7576         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7577 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7578         # Extract the first word of "$tool_basename", so it can be a program name with args.
7579 set dummy $tool_basename; ac_word=$2
7580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7581 $as_echo_n "checking for $ac_word... " >&6; }
7582 if ${ac_cv_path_LN+:} false; then :
7583   $as_echo_n "(cached) " >&6
7584 else
7585   case $LN in
7586   [\\/]* | ?:[\\/]*)
7587   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7588   ;;
7589   *)
7590   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7591 for as_dir in $PATH
7592 do
7593   IFS=$as_save_IFS
7594   test -z "$as_dir" && as_dir=.
7595     for ac_exec_ext in '' $ac_executable_extensions; do
7596   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7597     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7599     break 2
7600   fi
7601 done
7602   done
7603 IFS=$as_save_IFS
7604 
7605   ;;
7606 esac
7607 fi
7608 LN=$ac_cv_path_LN
7609 if test -n "$LN"; then
7610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7611 $as_echo "$LN" >&6; }
7612 else
7613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7614 $as_echo "no" >&6; }
7615 fi
7616 
7617 
7618         if test "x$LN" = x; then
7619           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7620         fi
7621       else
7622         # Otherwise we believe it is a complete path. Use it as it is.
7623         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7624 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7625         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7626 $as_echo_n "checking for LN... " >&6; }
7627         if test ! -x "$tool_specified"; then
7628           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7629 $as_echo "not found" >&6; }
7630           as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7631         fi
7632         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7633 $as_echo "$tool_specified" >&6; }
7634       fi
7635     fi
7636   fi
7637 
7638 
7639 
7640   if test "x$LN" = x; then
7641     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7642   fi
7643 
7644 
7645 
7646 
7647 
7648   # Publish this variable in the help.
7649 
7650 
7651   if test "x$LS" = x; then
7652     # The variable is not set by user, try to locate tool using the code snippet
7653     for ac_prog in ls
7654 do
7655   # Extract the first word of "$ac_prog", so it can be a program name with args.
7656 set dummy $ac_prog; ac_word=$2
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7658 $as_echo_n "checking for $ac_word... " >&6; }
7659 if ${ac_cv_path_LS+:} false; then :
7660   $as_echo_n "(cached) " >&6
7661 else
7662   case $LS in
7663   [\\/]* | ?:[\\/]*)
7664   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7665   ;;
7666   *)
7667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7668 for as_dir in $PATH
7669 do
7670   IFS=$as_save_IFS
7671   test -z "$as_dir" && as_dir=.
7672     for ac_exec_ext in '' $ac_executable_extensions; do
7673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7674     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7676     break 2
7677   fi
7678 done
7679   done
7680 IFS=$as_save_IFS
7681 
7682   ;;
7683 esac
7684 fi
7685 LS=$ac_cv_path_LS
7686 if test -n "$LS"; then
7687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7688 $as_echo "$LS" >&6; }
7689 else
7690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7691 $as_echo "no" >&6; }
7692 fi
7693 
7694 
7695   test -n "$LS" && break
7696 done
7697 
7698   else
7699     # The variable is set, but is it from the command line or the environment?
7700 
7701     # Try to remove the string !LS! from our list.
7702     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7703     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7704       # If it failed, the variable was not from the command line. Ignore it,
7705       # but warn the user (except for BASH, which is always set by the calling BASH).
7706       if test "xLS" != xBASH; then
7707         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7708 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7709       fi
7710       # Try to locate tool using the code snippet
7711       for ac_prog in ls
7712 do
7713   # Extract the first word of "$ac_prog", so it can be a program name with args.
7714 set dummy $ac_prog; ac_word=$2
7715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7716 $as_echo_n "checking for $ac_word... " >&6; }
7717 if ${ac_cv_path_LS+:} false; then :
7718   $as_echo_n "(cached) " >&6
7719 else
7720   case $LS in
7721   [\\/]* | ?:[\\/]*)
7722   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7723   ;;
7724   *)
7725   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7726 for as_dir in $PATH
7727 do
7728   IFS=$as_save_IFS
7729   test -z "$as_dir" && as_dir=.
7730     for ac_exec_ext in '' $ac_executable_extensions; do
7731   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7732     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7733     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7734     break 2
7735   fi
7736 done
7737   done
7738 IFS=$as_save_IFS
7739 
7740   ;;
7741 esac
7742 fi
7743 LS=$ac_cv_path_LS
7744 if test -n "$LS"; then
7745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7746 $as_echo "$LS" >&6; }
7747 else
7748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7749 $as_echo "no" >&6; }
7750 fi
7751 
7752 
7753   test -n "$LS" && break
7754 done
7755 
7756     else
7757       # If it succeeded, then it was overridden by the user. We will use it
7758       # for the tool.
7759 
7760       # First remove it from the list of overridden variables, so we can test
7761       # for unknown variables in the end.
7762       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7763 
7764       # Check if the provided tool contains a complete path.
7765       tool_specified="$LS"
7766       tool_basename="${tool_specified##*/}"
7767       if test "x$tool_basename" = "x$tool_specified"; then
7768         # A command without a complete path is provided, search $PATH.
7769         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7770 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7771         # Extract the first word of "$tool_basename", so it can be a program name with args.
7772 set dummy $tool_basename; ac_word=$2
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7774 $as_echo_n "checking for $ac_word... " >&6; }
7775 if ${ac_cv_path_LS+:} false; then :
7776   $as_echo_n "(cached) " >&6
7777 else
7778   case $LS in
7779   [\\/]* | ?:[\\/]*)
7780   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7781   ;;
7782   *)
7783   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7784 for as_dir in $PATH
7785 do
7786   IFS=$as_save_IFS
7787   test -z "$as_dir" && as_dir=.
7788     for ac_exec_ext in '' $ac_executable_extensions; do
7789   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7790     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7791     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7792     break 2
7793   fi
7794 done
7795   done
7796 IFS=$as_save_IFS
7797 
7798   ;;
7799 esac
7800 fi
7801 LS=$ac_cv_path_LS
7802 if test -n "$LS"; then
7803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7804 $as_echo "$LS" >&6; }
7805 else
7806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7807 $as_echo "no" >&6; }
7808 fi
7809 
7810 
7811         if test "x$LS" = x; then
7812           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7813         fi
7814       else
7815         # Otherwise we believe it is a complete path. Use it as it is.
7816         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7817 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7818         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7819 $as_echo_n "checking for LS... " >&6; }
7820         if test ! -x "$tool_specified"; then
7821           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7822 $as_echo "not found" >&6; }
7823           as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7824         fi
7825         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7826 $as_echo "$tool_specified" >&6; }
7827       fi
7828     fi
7829   fi
7830 
7831 
7832 
7833   if test "x$LS" = x; then
7834     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7835   fi
7836 
7837 
7838 
7839 
7840 
7841   # Publish this variable in the help.
7842 
7843 
7844   if test "x$MKDIR" = x; then
7845     # The variable is not set by user, try to locate tool using the code snippet
7846     for ac_prog in mkdir
7847 do
7848   # Extract the first word of "$ac_prog", so it can be a program name with args.
7849 set dummy $ac_prog; ac_word=$2
7850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7851 $as_echo_n "checking for $ac_word... " >&6; }
7852 if ${ac_cv_path_MKDIR+:} false; then :
7853   $as_echo_n "(cached) " >&6
7854 else
7855   case $MKDIR in
7856   [\\/]* | ?:[\\/]*)
7857   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7858   ;;
7859   *)
7860   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7861 for as_dir in $PATH
7862 do
7863   IFS=$as_save_IFS
7864   test -z "$as_dir" && as_dir=.
7865     for ac_exec_ext in '' $ac_executable_extensions; do
7866   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7867     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7869     break 2
7870   fi
7871 done
7872   done
7873 IFS=$as_save_IFS
7874 
7875   ;;
7876 esac
7877 fi
7878 MKDIR=$ac_cv_path_MKDIR
7879 if test -n "$MKDIR"; then
7880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7881 $as_echo "$MKDIR" >&6; }
7882 else
7883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7884 $as_echo "no" >&6; }
7885 fi
7886 
7887 
7888   test -n "$MKDIR" && break
7889 done
7890 
7891   else
7892     # The variable is set, but is it from the command line or the environment?
7893 
7894     # Try to remove the string !MKDIR! from our list.
7895     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7896     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7897       # If it failed, the variable was not from the command line. Ignore it,
7898       # but warn the user (except for BASH, which is always set by the calling BASH).
7899       if test "xMKDIR" != xBASH; then
7900         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7901 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7902       fi
7903       # Try to locate tool using the code snippet
7904       for ac_prog in mkdir
7905 do
7906   # Extract the first word of "$ac_prog", so it can be a program name with args.
7907 set dummy $ac_prog; ac_word=$2
7908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7909 $as_echo_n "checking for $ac_word... " >&6; }
7910 if ${ac_cv_path_MKDIR+:} false; then :
7911   $as_echo_n "(cached) " >&6
7912 else
7913   case $MKDIR in
7914   [\\/]* | ?:[\\/]*)
7915   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7916   ;;
7917   *)
7918   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7919 for as_dir in $PATH
7920 do
7921   IFS=$as_save_IFS
7922   test -z "$as_dir" && as_dir=.
7923     for ac_exec_ext in '' $ac_executable_extensions; do
7924   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7925     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7926     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7927     break 2
7928   fi
7929 done
7930   done
7931 IFS=$as_save_IFS
7932 
7933   ;;
7934 esac
7935 fi
7936 MKDIR=$ac_cv_path_MKDIR
7937 if test -n "$MKDIR"; then
7938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7939 $as_echo "$MKDIR" >&6; }
7940 else
7941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7942 $as_echo "no" >&6; }
7943 fi
7944 
7945 
7946   test -n "$MKDIR" && break
7947 done
7948 
7949     else
7950       # If it succeeded, then it was overridden by the user. We will use it
7951       # for the tool.
7952 
7953       # First remove it from the list of overridden variables, so we can test
7954       # for unknown variables in the end.
7955       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7956 
7957       # Check if the provided tool contains a complete path.
7958       tool_specified="$MKDIR"
7959       tool_basename="${tool_specified##*/}"
7960       if test "x$tool_basename" = "x$tool_specified"; then
7961         # A command without a complete path is provided, search $PATH.
7962         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7963 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7964         # Extract the first word of "$tool_basename", so it can be a program name with args.
7965 set dummy $tool_basename; ac_word=$2
7966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7967 $as_echo_n "checking for $ac_word... " >&6; }
7968 if ${ac_cv_path_MKDIR+:} false; then :
7969   $as_echo_n "(cached) " >&6
7970 else
7971   case $MKDIR in
7972   [\\/]* | ?:[\\/]*)
7973   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7974   ;;
7975   *)
7976   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7977 for as_dir in $PATH
7978 do
7979   IFS=$as_save_IFS
7980   test -z "$as_dir" && as_dir=.
7981     for ac_exec_ext in '' $ac_executable_extensions; do
7982   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7983     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7984     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7985     break 2
7986   fi
7987 done
7988   done
7989 IFS=$as_save_IFS
7990 
7991   ;;
7992 esac
7993 fi
7994 MKDIR=$ac_cv_path_MKDIR
7995 if test -n "$MKDIR"; then
7996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7997 $as_echo "$MKDIR" >&6; }
7998 else
7999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8000 $as_echo "no" >&6; }
8001 fi
8002 
8003 
8004         if test "x$MKDIR" = x; then
8005           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8006         fi
8007       else
8008         # Otherwise we believe it is a complete path. Use it as it is.
8009         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8010 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8011         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8012 $as_echo_n "checking for MKDIR... " >&6; }
8013         if test ! -x "$tool_specified"; then
8014           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8015 $as_echo "not found" >&6; }
8016           as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8017         fi
8018         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8019 $as_echo "$tool_specified" >&6; }
8020       fi
8021     fi
8022   fi
8023 
8024 
8025 
8026   if test "x$MKDIR" = x; then
8027     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8028   fi
8029 
8030 
8031 
8032 
8033 
8034   # Publish this variable in the help.
8035 
8036 
8037   if test "x$MKTEMP" = x; then
8038     # The variable is not set by user, try to locate tool using the code snippet
8039     for ac_prog in mktemp
8040 do
8041   # Extract the first word of "$ac_prog", so it can be a program name with args.
8042 set dummy $ac_prog; ac_word=$2
8043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8044 $as_echo_n "checking for $ac_word... " >&6; }
8045 if ${ac_cv_path_MKTEMP+:} false; then :
8046   $as_echo_n "(cached) " >&6
8047 else
8048   case $MKTEMP in
8049   [\\/]* | ?:[\\/]*)
8050   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8051   ;;
8052   *)
8053   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8054 for as_dir in $PATH
8055 do
8056   IFS=$as_save_IFS
8057   test -z "$as_dir" && as_dir=.
8058     for ac_exec_ext in '' $ac_executable_extensions; do
8059   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8060     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8062     break 2
8063   fi
8064 done
8065   done
8066 IFS=$as_save_IFS
8067 
8068   ;;
8069 esac
8070 fi
8071 MKTEMP=$ac_cv_path_MKTEMP
8072 if test -n "$MKTEMP"; then
8073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8074 $as_echo "$MKTEMP" >&6; }
8075 else
8076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8077 $as_echo "no" >&6; }
8078 fi
8079 
8080 
8081   test -n "$MKTEMP" && break
8082 done
8083 
8084   else
8085     # The variable is set, but is it from the command line or the environment?
8086 
8087     # Try to remove the string !MKTEMP! from our list.
8088     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8089     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8090       # If it failed, the variable was not from the command line. Ignore it,
8091       # but warn the user (except for BASH, which is always set by the calling BASH).
8092       if test "xMKTEMP" != xBASH; then
8093         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8094 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8095       fi
8096       # Try to locate tool using the code snippet
8097       for ac_prog in mktemp
8098 do
8099   # Extract the first word of "$ac_prog", so it can be a program name with args.
8100 set dummy $ac_prog; ac_word=$2
8101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8102 $as_echo_n "checking for $ac_word... " >&6; }
8103 if ${ac_cv_path_MKTEMP+:} false; then :
8104   $as_echo_n "(cached) " >&6
8105 else
8106   case $MKTEMP in
8107   [\\/]* | ?:[\\/]*)
8108   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8109   ;;
8110   *)
8111   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8112 for as_dir in $PATH
8113 do
8114   IFS=$as_save_IFS
8115   test -z "$as_dir" && as_dir=.
8116     for ac_exec_ext in '' $ac_executable_extensions; do
8117   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8118     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8119     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8120     break 2
8121   fi
8122 done
8123   done
8124 IFS=$as_save_IFS
8125 
8126   ;;
8127 esac
8128 fi
8129 MKTEMP=$ac_cv_path_MKTEMP
8130 if test -n "$MKTEMP"; then
8131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8132 $as_echo "$MKTEMP" >&6; }
8133 else
8134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8135 $as_echo "no" >&6; }
8136 fi
8137 
8138 
8139   test -n "$MKTEMP" && break
8140 done
8141 
8142     else
8143       # If it succeeded, then it was overridden by the user. We will use it
8144       # for the tool.
8145 
8146       # First remove it from the list of overridden variables, so we can test
8147       # for unknown variables in the end.
8148       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8149 
8150       # Check if the provided tool contains a complete path.
8151       tool_specified="$MKTEMP"
8152       tool_basename="${tool_specified##*/}"
8153       if test "x$tool_basename" = "x$tool_specified"; then
8154         # A command without a complete path is provided, search $PATH.
8155         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8156 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8157         # Extract the first word of "$tool_basename", so it can be a program name with args.
8158 set dummy $tool_basename; ac_word=$2
8159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8160 $as_echo_n "checking for $ac_word... " >&6; }
8161 if ${ac_cv_path_MKTEMP+:} false; then :
8162   $as_echo_n "(cached) " >&6
8163 else
8164   case $MKTEMP in
8165   [\\/]* | ?:[\\/]*)
8166   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8167   ;;
8168   *)
8169   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8170 for as_dir in $PATH
8171 do
8172   IFS=$as_save_IFS
8173   test -z "$as_dir" && as_dir=.
8174     for ac_exec_ext in '' $ac_executable_extensions; do
8175   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8176     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8177     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8178     break 2
8179   fi
8180 done
8181   done
8182 IFS=$as_save_IFS
8183 
8184   ;;
8185 esac
8186 fi
8187 MKTEMP=$ac_cv_path_MKTEMP
8188 if test -n "$MKTEMP"; then
8189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8190 $as_echo "$MKTEMP" >&6; }
8191 else
8192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8193 $as_echo "no" >&6; }
8194 fi
8195 
8196 
8197         if test "x$MKTEMP" = x; then
8198           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8199         fi
8200       else
8201         # Otherwise we believe it is a complete path. Use it as it is.
8202         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8203 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8204         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8205 $as_echo_n "checking for MKTEMP... " >&6; }
8206         if test ! -x "$tool_specified"; then
8207           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8208 $as_echo "not found" >&6; }
8209           as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8210         fi
8211         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8212 $as_echo "$tool_specified" >&6; }
8213       fi
8214     fi
8215   fi
8216 
8217 
8218 
8219   if test "x$MKTEMP" = x; then
8220     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8221   fi
8222 
8223 
8224 
8225 
8226 
8227   # Publish this variable in the help.
8228 
8229 
8230   if test "x$MV" = x; then
8231     # The variable is not set by user, try to locate tool using the code snippet
8232     for ac_prog in mv
8233 do
8234   # Extract the first word of "$ac_prog", so it can be a program name with args.
8235 set dummy $ac_prog; ac_word=$2
8236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8237 $as_echo_n "checking for $ac_word... " >&6; }
8238 if ${ac_cv_path_MV+:} false; then :
8239   $as_echo_n "(cached) " >&6
8240 else
8241   case $MV in
8242   [\\/]* | ?:[\\/]*)
8243   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8244   ;;
8245   *)
8246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8247 for as_dir in $PATH
8248 do
8249   IFS=$as_save_IFS
8250   test -z "$as_dir" && as_dir=.
8251     for ac_exec_ext in '' $ac_executable_extensions; do
8252   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8253     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8255     break 2
8256   fi
8257 done
8258   done
8259 IFS=$as_save_IFS
8260 
8261   ;;
8262 esac
8263 fi
8264 MV=$ac_cv_path_MV
8265 if test -n "$MV"; then
8266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8267 $as_echo "$MV" >&6; }
8268 else
8269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8270 $as_echo "no" >&6; }
8271 fi
8272 
8273 
8274   test -n "$MV" && break
8275 done
8276 
8277   else
8278     # The variable is set, but is it from the command line or the environment?
8279 
8280     # Try to remove the string !MV! from our list.
8281     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8282     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8283       # If it failed, the variable was not from the command line. Ignore it,
8284       # but warn the user (except for BASH, which is always set by the calling BASH).
8285       if test "xMV" != xBASH; then
8286         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8287 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8288       fi
8289       # Try to locate tool using the code snippet
8290       for ac_prog in mv
8291 do
8292   # Extract the first word of "$ac_prog", so it can be a program name with args.
8293 set dummy $ac_prog; ac_word=$2
8294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8295 $as_echo_n "checking for $ac_word... " >&6; }
8296 if ${ac_cv_path_MV+:} false; then :
8297   $as_echo_n "(cached) " >&6
8298 else
8299   case $MV in
8300   [\\/]* | ?:[\\/]*)
8301   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8302   ;;
8303   *)
8304   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8305 for as_dir in $PATH
8306 do
8307   IFS=$as_save_IFS
8308   test -z "$as_dir" && as_dir=.
8309     for ac_exec_ext in '' $ac_executable_extensions; do
8310   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8311     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8312     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8313     break 2
8314   fi
8315 done
8316   done
8317 IFS=$as_save_IFS
8318 
8319   ;;
8320 esac
8321 fi
8322 MV=$ac_cv_path_MV
8323 if test -n "$MV"; then
8324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8325 $as_echo "$MV" >&6; }
8326 else
8327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8328 $as_echo "no" >&6; }
8329 fi
8330 
8331 
8332   test -n "$MV" && break
8333 done
8334 
8335     else
8336       # If it succeeded, then it was overridden by the user. We will use it
8337       # for the tool.
8338 
8339       # First remove it from the list of overridden variables, so we can test
8340       # for unknown variables in the end.
8341       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8342 
8343       # Check if the provided tool contains a complete path.
8344       tool_specified="$MV"
8345       tool_basename="${tool_specified##*/}"
8346       if test "x$tool_basename" = "x$tool_specified"; then
8347         # A command without a complete path is provided, search $PATH.
8348         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8349 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8350         # Extract the first word of "$tool_basename", so it can be a program name with args.
8351 set dummy $tool_basename; ac_word=$2
8352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8353 $as_echo_n "checking for $ac_word... " >&6; }
8354 if ${ac_cv_path_MV+:} false; then :
8355   $as_echo_n "(cached) " >&6
8356 else
8357   case $MV in
8358   [\\/]* | ?:[\\/]*)
8359   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8360   ;;
8361   *)
8362   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8363 for as_dir in $PATH
8364 do
8365   IFS=$as_save_IFS
8366   test -z "$as_dir" && as_dir=.
8367     for ac_exec_ext in '' $ac_executable_extensions; do
8368   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8369     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8371     break 2
8372   fi
8373 done
8374   done
8375 IFS=$as_save_IFS
8376 
8377   ;;
8378 esac
8379 fi
8380 MV=$ac_cv_path_MV
8381 if test -n "$MV"; then
8382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8383 $as_echo "$MV" >&6; }
8384 else
8385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386 $as_echo "no" >&6; }
8387 fi
8388 
8389 
8390         if test "x$MV" = x; then
8391           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8392         fi
8393       else
8394         # Otherwise we believe it is a complete path. Use it as it is.
8395         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8396 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8397         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8398 $as_echo_n "checking for MV... " >&6; }
8399         if test ! -x "$tool_specified"; then
8400           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8401 $as_echo "not found" >&6; }
8402           as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8403         fi
8404         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8405 $as_echo "$tool_specified" >&6; }
8406       fi
8407     fi
8408   fi
8409 
8410 
8411 
8412   if test "x$MV" = x; then
8413     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8414   fi
8415 
8416 
8417 
8418 
8419 
8420   # Publish this variable in the help.
8421 
8422 
8423   if test "x$NAWK" = x; then
8424     # The variable is not set by user, try to locate tool using the code snippet
8425     for ac_prog in nawk gawk awk
8426 do
8427   # Extract the first word of "$ac_prog", so it can be a program name with args.
8428 set dummy $ac_prog; ac_word=$2
8429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8430 $as_echo_n "checking for $ac_word... " >&6; }
8431 if ${ac_cv_path_NAWK+:} false; then :
8432   $as_echo_n "(cached) " >&6
8433 else
8434   case $NAWK in
8435   [\\/]* | ?:[\\/]*)
8436   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8437   ;;
8438   *)
8439   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8440 for as_dir in $PATH
8441 do
8442   IFS=$as_save_IFS
8443   test -z "$as_dir" && as_dir=.
8444     for ac_exec_ext in '' $ac_executable_extensions; do
8445   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8446     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8448     break 2
8449   fi
8450 done
8451   done
8452 IFS=$as_save_IFS
8453 
8454   ;;
8455 esac
8456 fi
8457 NAWK=$ac_cv_path_NAWK
8458 if test -n "$NAWK"; then
8459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8460 $as_echo "$NAWK" >&6; }
8461 else
8462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8463 $as_echo "no" >&6; }
8464 fi
8465 
8466 
8467   test -n "$NAWK" && break
8468 done
8469 
8470   else
8471     # The variable is set, but is it from the command line or the environment?
8472 
8473     # Try to remove the string !NAWK! from our list.
8474     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8475     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8476       # If it failed, the variable was not from the command line. Ignore it,
8477       # but warn the user (except for BASH, which is always set by the calling BASH).
8478       if test "xNAWK" != xBASH; then
8479         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8480 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8481       fi
8482       # Try to locate tool using the code snippet
8483       for ac_prog in nawk gawk awk
8484 do
8485   # Extract the first word of "$ac_prog", so it can be a program name with args.
8486 set dummy $ac_prog; ac_word=$2
8487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8488 $as_echo_n "checking for $ac_word... " >&6; }
8489 if ${ac_cv_path_NAWK+:} false; then :
8490   $as_echo_n "(cached) " >&6
8491 else
8492   case $NAWK in
8493   [\\/]* | ?:[\\/]*)
8494   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8495   ;;
8496   *)
8497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8498 for as_dir in $PATH
8499 do
8500   IFS=$as_save_IFS
8501   test -z "$as_dir" && as_dir=.
8502     for ac_exec_ext in '' $ac_executable_extensions; do
8503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8504     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8506     break 2
8507   fi
8508 done
8509   done
8510 IFS=$as_save_IFS
8511 
8512   ;;
8513 esac
8514 fi
8515 NAWK=$ac_cv_path_NAWK
8516 if test -n "$NAWK"; then
8517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8518 $as_echo "$NAWK" >&6; }
8519 else
8520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8521 $as_echo "no" >&6; }
8522 fi
8523 
8524 
8525   test -n "$NAWK" && break
8526 done
8527 
8528     else
8529       # If it succeeded, then it was overridden by the user. We will use it
8530       # for the tool.
8531 
8532       # First remove it from the list of overridden variables, so we can test
8533       # for unknown variables in the end.
8534       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8535 
8536       # Check if the provided tool contains a complete path.
8537       tool_specified="$NAWK"
8538       tool_basename="${tool_specified##*/}"
8539       if test "x$tool_basename" = "x$tool_specified"; then
8540         # A command without a complete path is provided, search $PATH.
8541         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8542 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8543         # Extract the first word of "$tool_basename", so it can be a program name with args.
8544 set dummy $tool_basename; ac_word=$2
8545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8546 $as_echo_n "checking for $ac_word... " >&6; }
8547 if ${ac_cv_path_NAWK+:} false; then :
8548   $as_echo_n "(cached) " >&6
8549 else
8550   case $NAWK in
8551   [\\/]* | ?:[\\/]*)
8552   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8553   ;;
8554   *)
8555   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8556 for as_dir in $PATH
8557 do
8558   IFS=$as_save_IFS
8559   test -z "$as_dir" && as_dir=.
8560     for ac_exec_ext in '' $ac_executable_extensions; do
8561   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8562     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8564     break 2
8565   fi
8566 done
8567   done
8568 IFS=$as_save_IFS
8569 
8570   ;;
8571 esac
8572 fi
8573 NAWK=$ac_cv_path_NAWK
8574 if test -n "$NAWK"; then
8575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8576 $as_echo "$NAWK" >&6; }
8577 else
8578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8579 $as_echo "no" >&6; }
8580 fi
8581 
8582 
8583         if test "x$NAWK" = x; then
8584           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8585         fi
8586       else
8587         # Otherwise we believe it is a complete path. Use it as it is.
8588         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8589 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8590         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8591 $as_echo_n "checking for NAWK... " >&6; }
8592         if test ! -x "$tool_specified"; then
8593           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8594 $as_echo "not found" >&6; }
8595           as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8596         fi
8597         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8598 $as_echo "$tool_specified" >&6; }
8599       fi
8600     fi
8601   fi
8602 
8603 
8604 
8605   if test "x$NAWK" = x; then
8606     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8607   fi
8608 
8609 
8610 
8611 
8612 
8613   # Publish this variable in the help.
8614 
8615 
8616   if test "x$PRINTF" = x; then
8617     # The variable is not set by user, try to locate tool using the code snippet
8618     for ac_prog in printf
8619 do
8620   # Extract the first word of "$ac_prog", so it can be a program name with args.
8621 set dummy $ac_prog; ac_word=$2
8622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8623 $as_echo_n "checking for $ac_word... " >&6; }
8624 if ${ac_cv_path_PRINTF+:} false; then :
8625   $as_echo_n "(cached) " >&6
8626 else
8627   case $PRINTF in
8628   [\\/]* | ?:[\\/]*)
8629   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8630   ;;
8631   *)
8632   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8633 for as_dir in $PATH
8634 do
8635   IFS=$as_save_IFS
8636   test -z "$as_dir" && as_dir=.
8637     for ac_exec_ext in '' $ac_executable_extensions; do
8638   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8639     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8640     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8641     break 2
8642   fi
8643 done
8644   done
8645 IFS=$as_save_IFS
8646 
8647   ;;
8648 esac
8649 fi
8650 PRINTF=$ac_cv_path_PRINTF
8651 if test -n "$PRINTF"; then
8652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8653 $as_echo "$PRINTF" >&6; }
8654 else
8655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8656 $as_echo "no" >&6; }
8657 fi
8658 
8659 
8660   test -n "$PRINTF" && break
8661 done
8662 
8663   else
8664     # The variable is set, but is it from the command line or the environment?
8665 
8666     # Try to remove the string !PRINTF! from our list.
8667     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8668     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8669       # If it failed, the variable was not from the command line. Ignore it,
8670       # but warn the user (except for BASH, which is always set by the calling BASH).
8671       if test "xPRINTF" != xBASH; then
8672         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8673 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8674       fi
8675       # Try to locate tool using the code snippet
8676       for ac_prog in printf
8677 do
8678   # Extract the first word of "$ac_prog", so it can be a program name with args.
8679 set dummy $ac_prog; ac_word=$2
8680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8681 $as_echo_n "checking for $ac_word... " >&6; }
8682 if ${ac_cv_path_PRINTF+:} false; then :
8683   $as_echo_n "(cached) " >&6
8684 else
8685   case $PRINTF in
8686   [\\/]* | ?:[\\/]*)
8687   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8688   ;;
8689   *)
8690   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8691 for as_dir in $PATH
8692 do
8693   IFS=$as_save_IFS
8694   test -z "$as_dir" && as_dir=.
8695     for ac_exec_ext in '' $ac_executable_extensions; do
8696   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8697     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8698     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8699     break 2
8700   fi
8701 done
8702   done
8703 IFS=$as_save_IFS
8704 
8705   ;;
8706 esac
8707 fi
8708 PRINTF=$ac_cv_path_PRINTF
8709 if test -n "$PRINTF"; then
8710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8711 $as_echo "$PRINTF" >&6; }
8712 else
8713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8714 $as_echo "no" >&6; }
8715 fi
8716 
8717 
8718   test -n "$PRINTF" && break
8719 done
8720 
8721     else
8722       # If it succeeded, then it was overridden by the user. We will use it
8723       # for the tool.
8724 
8725       # First remove it from the list of overridden variables, so we can test
8726       # for unknown variables in the end.
8727       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8728 
8729       # Check if the provided tool contains a complete path.
8730       tool_specified="$PRINTF"
8731       tool_basename="${tool_specified##*/}"
8732       if test "x$tool_basename" = "x$tool_specified"; then
8733         # A command without a complete path is provided, search $PATH.
8734         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8735 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8736         # Extract the first word of "$tool_basename", so it can be a program name with args.
8737 set dummy $tool_basename; ac_word=$2
8738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8739 $as_echo_n "checking for $ac_word... " >&6; }
8740 if ${ac_cv_path_PRINTF+:} false; then :
8741   $as_echo_n "(cached) " >&6
8742 else
8743   case $PRINTF in
8744   [\\/]* | ?:[\\/]*)
8745   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8746   ;;
8747   *)
8748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8749 for as_dir in $PATH
8750 do
8751   IFS=$as_save_IFS
8752   test -z "$as_dir" && as_dir=.
8753     for ac_exec_ext in '' $ac_executable_extensions; do
8754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8755     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8757     break 2
8758   fi
8759 done
8760   done
8761 IFS=$as_save_IFS
8762 
8763   ;;
8764 esac
8765 fi
8766 PRINTF=$ac_cv_path_PRINTF
8767 if test -n "$PRINTF"; then
8768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8769 $as_echo "$PRINTF" >&6; }
8770 else
8771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8772 $as_echo "no" >&6; }
8773 fi
8774 
8775 
8776         if test "x$PRINTF" = x; then
8777           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8778         fi
8779       else
8780         # Otherwise we believe it is a complete path. Use it as it is.
8781         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8782 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8783         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8784 $as_echo_n "checking for PRINTF... " >&6; }
8785         if test ! -x "$tool_specified"; then
8786           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8787 $as_echo "not found" >&6; }
8788           as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8789         fi
8790         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8791 $as_echo "$tool_specified" >&6; }
8792       fi
8793     fi
8794   fi
8795 
8796 
8797 
8798   if test "x$PRINTF" = x; then
8799     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8800   fi
8801 
8802 
8803 
8804 
8805 
8806   # Publish this variable in the help.
8807 
8808 
8809   if test "x$RM" = x; then
8810     # The variable is not set by user, try to locate tool using the code snippet
8811     for ac_prog in rm
8812 do
8813   # Extract the first word of "$ac_prog", so it can be a program name with args.
8814 set dummy $ac_prog; ac_word=$2
8815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8816 $as_echo_n "checking for $ac_word... " >&6; }
8817 if ${ac_cv_path_RM+:} false; then :
8818   $as_echo_n "(cached) " >&6
8819 else
8820   case $RM in
8821   [\\/]* | ?:[\\/]*)
8822   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8823   ;;
8824   *)
8825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8826 for as_dir in $PATH
8827 do
8828   IFS=$as_save_IFS
8829   test -z "$as_dir" && as_dir=.
8830     for ac_exec_ext in '' $ac_executable_extensions; do
8831   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8832     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8834     break 2
8835   fi
8836 done
8837   done
8838 IFS=$as_save_IFS
8839 
8840   ;;
8841 esac
8842 fi
8843 RM=$ac_cv_path_RM
8844 if test -n "$RM"; then
8845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8846 $as_echo "$RM" >&6; }
8847 else
8848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8849 $as_echo "no" >&6; }
8850 fi
8851 
8852 
8853   test -n "$RM" && break
8854 done
8855 
8856   else
8857     # The variable is set, but is it from the command line or the environment?
8858 
8859     # Try to remove the string !RM! from our list.
8860     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8861     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8862       # If it failed, the variable was not from the command line. Ignore it,
8863       # but warn the user (except for BASH, which is always set by the calling BASH).
8864       if test "xRM" != xBASH; then
8865         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8866 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8867       fi
8868       # Try to locate tool using the code snippet
8869       for ac_prog in rm
8870 do
8871   # Extract the first word of "$ac_prog", so it can be a program name with args.
8872 set dummy $ac_prog; ac_word=$2
8873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8874 $as_echo_n "checking for $ac_word... " >&6; }
8875 if ${ac_cv_path_RM+:} false; then :
8876   $as_echo_n "(cached) " >&6
8877 else
8878   case $RM in
8879   [\\/]* | ?:[\\/]*)
8880   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8881   ;;
8882   *)
8883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8884 for as_dir in $PATH
8885 do
8886   IFS=$as_save_IFS
8887   test -z "$as_dir" && as_dir=.
8888     for ac_exec_ext in '' $ac_executable_extensions; do
8889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8890     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8892     break 2
8893   fi
8894 done
8895   done
8896 IFS=$as_save_IFS
8897 
8898   ;;
8899 esac
8900 fi
8901 RM=$ac_cv_path_RM
8902 if test -n "$RM"; then
8903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8904 $as_echo "$RM" >&6; }
8905 else
8906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8907 $as_echo "no" >&6; }
8908 fi
8909 
8910 
8911   test -n "$RM" && break
8912 done
8913 
8914     else
8915       # If it succeeded, then it was overridden by the user. We will use it
8916       # for the tool.
8917 
8918       # First remove it from the list of overridden variables, so we can test
8919       # for unknown variables in the end.
8920       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8921 
8922       # Check if the provided tool contains a complete path.
8923       tool_specified="$RM"
8924       tool_basename="${tool_specified##*/}"
8925       if test "x$tool_basename" = "x$tool_specified"; then
8926         # A command without a complete path is provided, search $PATH.
8927         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8928 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8929         # Extract the first word of "$tool_basename", so it can be a program name with args.
8930 set dummy $tool_basename; ac_word=$2
8931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8932 $as_echo_n "checking for $ac_word... " >&6; }
8933 if ${ac_cv_path_RM+:} false; then :
8934   $as_echo_n "(cached) " >&6
8935 else
8936   case $RM in
8937   [\\/]* | ?:[\\/]*)
8938   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8939   ;;
8940   *)
8941   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8942 for as_dir in $PATH
8943 do
8944   IFS=$as_save_IFS
8945   test -z "$as_dir" && as_dir=.
8946     for ac_exec_ext in '' $ac_executable_extensions; do
8947   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8948     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8949     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8950     break 2
8951   fi
8952 done
8953   done
8954 IFS=$as_save_IFS
8955 
8956   ;;
8957 esac
8958 fi
8959 RM=$ac_cv_path_RM
8960 if test -n "$RM"; then
8961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8962 $as_echo "$RM" >&6; }
8963 else
8964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8965 $as_echo "no" >&6; }
8966 fi
8967 
8968 
8969         if test "x$RM" = x; then
8970           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8971         fi
8972       else
8973         # Otherwise we believe it is a complete path. Use it as it is.
8974         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8975 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8976         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8977 $as_echo_n "checking for RM... " >&6; }
8978         if test ! -x "$tool_specified"; then
8979           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8980 $as_echo "not found" >&6; }
8981           as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8982         fi
8983         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8984 $as_echo "$tool_specified" >&6; }
8985       fi
8986     fi
8987   fi
8988 
8989 
8990 
8991   if test "x$RM" = x; then
8992     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
8993   fi
8994 
8995 
8996 
8997 
8998 
8999   # Publish this variable in the help.
9000 
9001 
9002   if test "x$SH" = x; then
9003     # The variable is not set by user, try to locate tool using the code snippet
9004     for ac_prog in sh
9005 do
9006   # Extract the first word of "$ac_prog", so it can be a program name with args.
9007 set dummy $ac_prog; ac_word=$2
9008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9009 $as_echo_n "checking for $ac_word... " >&6; }
9010 if ${ac_cv_path_SH+:} false; then :
9011   $as_echo_n "(cached) " >&6
9012 else
9013   case $SH in
9014   [\\/]* | ?:[\\/]*)
9015   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9016   ;;
9017   *)
9018   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9019 for as_dir in $PATH
9020 do
9021   IFS=$as_save_IFS
9022   test -z "$as_dir" && as_dir=.
9023     for ac_exec_ext in '' $ac_executable_extensions; do
9024   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9025     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9026     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9027     break 2
9028   fi
9029 done
9030   done
9031 IFS=$as_save_IFS
9032 
9033   ;;
9034 esac
9035 fi
9036 SH=$ac_cv_path_SH
9037 if test -n "$SH"; then
9038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9039 $as_echo "$SH" >&6; }
9040 else
9041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9042 $as_echo "no" >&6; }
9043 fi
9044 
9045 
9046   test -n "$SH" && break
9047 done
9048 
9049   else
9050     # The variable is set, but is it from the command line or the environment?
9051 
9052     # Try to remove the string !SH! from our list.
9053     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9054     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9055       # If it failed, the variable was not from the command line. Ignore it,
9056       # but warn the user (except for BASH, which is always set by the calling BASH).
9057       if test "xSH" != xBASH; then
9058         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9059 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9060       fi
9061       # Try to locate tool using the code snippet
9062       for ac_prog in sh
9063 do
9064   # Extract the first word of "$ac_prog", so it can be a program name with args.
9065 set dummy $ac_prog; ac_word=$2
9066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9067 $as_echo_n "checking for $ac_word... " >&6; }
9068 if ${ac_cv_path_SH+:} false; then :
9069   $as_echo_n "(cached) " >&6
9070 else
9071   case $SH in
9072   [\\/]* | ?:[\\/]*)
9073   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9074   ;;
9075   *)
9076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9077 for as_dir in $PATH
9078 do
9079   IFS=$as_save_IFS
9080   test -z "$as_dir" && as_dir=.
9081     for ac_exec_ext in '' $ac_executable_extensions; do
9082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9083     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9085     break 2
9086   fi
9087 done
9088   done
9089 IFS=$as_save_IFS
9090 
9091   ;;
9092 esac
9093 fi
9094 SH=$ac_cv_path_SH
9095 if test -n "$SH"; then
9096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9097 $as_echo "$SH" >&6; }
9098 else
9099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9100 $as_echo "no" >&6; }
9101 fi
9102 
9103 
9104   test -n "$SH" && break
9105 done
9106 
9107     else
9108       # If it succeeded, then it was overridden by the user. We will use it
9109       # for the tool.
9110 
9111       # First remove it from the list of overridden variables, so we can test
9112       # for unknown variables in the end.
9113       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9114 
9115       # Check if the provided tool contains a complete path.
9116       tool_specified="$SH"
9117       tool_basename="${tool_specified##*/}"
9118       if test "x$tool_basename" = "x$tool_specified"; then
9119         # A command without a complete path is provided, search $PATH.
9120         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9121 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9122         # Extract the first word of "$tool_basename", so it can be a program name with args.
9123 set dummy $tool_basename; ac_word=$2
9124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9125 $as_echo_n "checking for $ac_word... " >&6; }
9126 if ${ac_cv_path_SH+:} false; then :
9127   $as_echo_n "(cached) " >&6
9128 else
9129   case $SH in
9130   [\\/]* | ?:[\\/]*)
9131   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9132   ;;
9133   *)
9134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9135 for as_dir in $PATH
9136 do
9137   IFS=$as_save_IFS
9138   test -z "$as_dir" && as_dir=.
9139     for ac_exec_ext in '' $ac_executable_extensions; do
9140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9141     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9143     break 2
9144   fi
9145 done
9146   done
9147 IFS=$as_save_IFS
9148 
9149   ;;
9150 esac
9151 fi
9152 SH=$ac_cv_path_SH
9153 if test -n "$SH"; then
9154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9155 $as_echo "$SH" >&6; }
9156 else
9157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9158 $as_echo "no" >&6; }
9159 fi
9160 
9161 
9162         if test "x$SH" = x; then
9163           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9164         fi
9165       else
9166         # Otherwise we believe it is a complete path. Use it as it is.
9167         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9168 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9169         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9170 $as_echo_n "checking for SH... " >&6; }
9171         if test ! -x "$tool_specified"; then
9172           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9173 $as_echo "not found" >&6; }
9174           as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9175         fi
9176         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9177 $as_echo "$tool_specified" >&6; }
9178       fi
9179     fi
9180   fi
9181 
9182 
9183 
9184   if test "x$SH" = x; then
9185     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9186   fi
9187 
9188 
9189 
9190 
9191 
9192   # Publish this variable in the help.
9193 
9194 
9195   if test "x$SORT" = x; then
9196     # The variable is not set by user, try to locate tool using the code snippet
9197     for ac_prog in sort
9198 do
9199   # Extract the first word of "$ac_prog", so it can be a program name with args.
9200 set dummy $ac_prog; ac_word=$2
9201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9202 $as_echo_n "checking for $ac_word... " >&6; }
9203 if ${ac_cv_path_SORT+:} false; then :
9204   $as_echo_n "(cached) " >&6
9205 else
9206   case $SORT in
9207   [\\/]* | ?:[\\/]*)
9208   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9209   ;;
9210   *)
9211   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9212 for as_dir in $PATH
9213 do
9214   IFS=$as_save_IFS
9215   test -z "$as_dir" && as_dir=.
9216     for ac_exec_ext in '' $ac_executable_extensions; do
9217   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9218     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9220     break 2
9221   fi
9222 done
9223   done
9224 IFS=$as_save_IFS
9225 
9226   ;;
9227 esac
9228 fi
9229 SORT=$ac_cv_path_SORT
9230 if test -n "$SORT"; then
9231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9232 $as_echo "$SORT" >&6; }
9233 else
9234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9235 $as_echo "no" >&6; }
9236 fi
9237 
9238 
9239   test -n "$SORT" && break
9240 done
9241 
9242   else
9243     # The variable is set, but is it from the command line or the environment?
9244 
9245     # Try to remove the string !SORT! from our list.
9246     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9247     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9248       # If it failed, the variable was not from the command line. Ignore it,
9249       # but warn the user (except for BASH, which is always set by the calling BASH).
9250       if test "xSORT" != xBASH; then
9251         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9252 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9253       fi
9254       # Try to locate tool using the code snippet
9255       for ac_prog in sort
9256 do
9257   # Extract the first word of "$ac_prog", so it can be a program name with args.
9258 set dummy $ac_prog; ac_word=$2
9259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9260 $as_echo_n "checking for $ac_word... " >&6; }
9261 if ${ac_cv_path_SORT+:} false; then :
9262   $as_echo_n "(cached) " >&6
9263 else
9264   case $SORT in
9265   [\\/]* | ?:[\\/]*)
9266   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9267   ;;
9268   *)
9269   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9270 for as_dir in $PATH
9271 do
9272   IFS=$as_save_IFS
9273   test -z "$as_dir" && as_dir=.
9274     for ac_exec_ext in '' $ac_executable_extensions; do
9275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9276     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9278     break 2
9279   fi
9280 done
9281   done
9282 IFS=$as_save_IFS
9283 
9284   ;;
9285 esac
9286 fi
9287 SORT=$ac_cv_path_SORT
9288 if test -n "$SORT"; then
9289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9290 $as_echo "$SORT" >&6; }
9291 else
9292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9293 $as_echo "no" >&6; }
9294 fi
9295 
9296 
9297   test -n "$SORT" && break
9298 done
9299 
9300     else
9301       # If it succeeded, then it was overridden by the user. We will use it
9302       # for the tool.
9303 
9304       # First remove it from the list of overridden variables, so we can test
9305       # for unknown variables in the end.
9306       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9307 
9308       # Check if the provided tool contains a complete path.
9309       tool_specified="$SORT"
9310       tool_basename="${tool_specified##*/}"
9311       if test "x$tool_basename" = "x$tool_specified"; then
9312         # A command without a complete path is provided, search $PATH.
9313         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9314 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9315         # Extract the first word of "$tool_basename", so it can be a program name with args.
9316 set dummy $tool_basename; ac_word=$2
9317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9318 $as_echo_n "checking for $ac_word... " >&6; }
9319 if ${ac_cv_path_SORT+:} false; then :
9320   $as_echo_n "(cached) " >&6
9321 else
9322   case $SORT in
9323   [\\/]* | ?:[\\/]*)
9324   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9325   ;;
9326   *)
9327   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9328 for as_dir in $PATH
9329 do
9330   IFS=$as_save_IFS
9331   test -z "$as_dir" && as_dir=.
9332     for ac_exec_ext in '' $ac_executable_extensions; do
9333   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9334     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9336     break 2
9337   fi
9338 done
9339   done
9340 IFS=$as_save_IFS
9341 
9342   ;;
9343 esac
9344 fi
9345 SORT=$ac_cv_path_SORT
9346 if test -n "$SORT"; then
9347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9348 $as_echo "$SORT" >&6; }
9349 else
9350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9351 $as_echo "no" >&6; }
9352 fi
9353 
9354 
9355         if test "x$SORT" = x; then
9356           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9357         fi
9358       else
9359         # Otherwise we believe it is a complete path. Use it as it is.
9360         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9361 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9362         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9363 $as_echo_n "checking for SORT... " >&6; }
9364         if test ! -x "$tool_specified"; then
9365           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9366 $as_echo "not found" >&6; }
9367           as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9368         fi
9369         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9370 $as_echo "$tool_specified" >&6; }
9371       fi
9372     fi
9373   fi
9374 
9375 
9376 
9377   if test "x$SORT" = x; then
9378     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9379   fi
9380 
9381 
9382 
9383 
9384 
9385   # Publish this variable in the help.
9386 
9387 
9388   if test "x$TAIL" = x; then
9389     # The variable is not set by user, try to locate tool using the code snippet
9390     for ac_prog in tail
9391 do
9392   # Extract the first word of "$ac_prog", so it can be a program name with args.
9393 set dummy $ac_prog; ac_word=$2
9394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9395 $as_echo_n "checking for $ac_word... " >&6; }
9396 if ${ac_cv_path_TAIL+:} false; then :
9397   $as_echo_n "(cached) " >&6
9398 else
9399   case $TAIL in
9400   [\\/]* | ?:[\\/]*)
9401   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9402   ;;
9403   *)
9404   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9405 for as_dir in $PATH
9406 do
9407   IFS=$as_save_IFS
9408   test -z "$as_dir" && as_dir=.
9409     for ac_exec_ext in '' $ac_executable_extensions; do
9410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9411     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9413     break 2
9414   fi
9415 done
9416   done
9417 IFS=$as_save_IFS
9418 
9419   ;;
9420 esac
9421 fi
9422 TAIL=$ac_cv_path_TAIL
9423 if test -n "$TAIL"; then
9424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9425 $as_echo "$TAIL" >&6; }
9426 else
9427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9428 $as_echo "no" >&6; }
9429 fi
9430 
9431 
9432   test -n "$TAIL" && break
9433 done
9434 
9435   else
9436     # The variable is set, but is it from the command line or the environment?
9437 
9438     # Try to remove the string !TAIL! from our list.
9439     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9440     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9441       # If it failed, the variable was not from the command line. Ignore it,
9442       # but warn the user (except for BASH, which is always set by the calling BASH).
9443       if test "xTAIL" != xBASH; then
9444         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9445 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9446       fi
9447       # Try to locate tool using the code snippet
9448       for ac_prog in tail
9449 do
9450   # Extract the first word of "$ac_prog", so it can be a program name with args.
9451 set dummy $ac_prog; ac_word=$2
9452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9453 $as_echo_n "checking for $ac_word... " >&6; }
9454 if ${ac_cv_path_TAIL+:} false; then :
9455   $as_echo_n "(cached) " >&6
9456 else
9457   case $TAIL in
9458   [\\/]* | ?:[\\/]*)
9459   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9460   ;;
9461   *)
9462   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9463 for as_dir in $PATH
9464 do
9465   IFS=$as_save_IFS
9466   test -z "$as_dir" && as_dir=.
9467     for ac_exec_ext in '' $ac_executable_extensions; do
9468   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9469     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9470     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9471     break 2
9472   fi
9473 done
9474   done
9475 IFS=$as_save_IFS
9476 
9477   ;;
9478 esac
9479 fi
9480 TAIL=$ac_cv_path_TAIL
9481 if test -n "$TAIL"; then
9482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9483 $as_echo "$TAIL" >&6; }
9484 else
9485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9486 $as_echo "no" >&6; }
9487 fi
9488 
9489 
9490   test -n "$TAIL" && break
9491 done
9492 
9493     else
9494       # If it succeeded, then it was overridden by the user. We will use it
9495       # for the tool.
9496 
9497       # First remove it from the list of overridden variables, so we can test
9498       # for unknown variables in the end.
9499       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9500 
9501       # Check if the provided tool contains a complete path.
9502       tool_specified="$TAIL"
9503       tool_basename="${tool_specified##*/}"
9504       if test "x$tool_basename" = "x$tool_specified"; then
9505         # A command without a complete path is provided, search $PATH.
9506         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9507 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9508         # Extract the first word of "$tool_basename", so it can be a program name with args.
9509 set dummy $tool_basename; ac_word=$2
9510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9511 $as_echo_n "checking for $ac_word... " >&6; }
9512 if ${ac_cv_path_TAIL+:} false; then :
9513   $as_echo_n "(cached) " >&6
9514 else
9515   case $TAIL in
9516   [\\/]* | ?:[\\/]*)
9517   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9518   ;;
9519   *)
9520   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9521 for as_dir in $PATH
9522 do
9523   IFS=$as_save_IFS
9524   test -z "$as_dir" && as_dir=.
9525     for ac_exec_ext in '' $ac_executable_extensions; do
9526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9527     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9529     break 2
9530   fi
9531 done
9532   done
9533 IFS=$as_save_IFS
9534 
9535   ;;
9536 esac
9537 fi
9538 TAIL=$ac_cv_path_TAIL
9539 if test -n "$TAIL"; then
9540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9541 $as_echo "$TAIL" >&6; }
9542 else
9543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9544 $as_echo "no" >&6; }
9545 fi
9546 
9547 
9548         if test "x$TAIL" = x; then
9549           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9550         fi
9551       else
9552         # Otherwise we believe it is a complete path. Use it as it is.
9553         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9554 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9555         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9556 $as_echo_n "checking for TAIL... " >&6; }
9557         if test ! -x "$tool_specified"; then
9558           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9559 $as_echo "not found" >&6; }
9560           as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9561         fi
9562         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9563 $as_echo "$tool_specified" >&6; }
9564       fi
9565     fi
9566   fi
9567 
9568 
9569 
9570   if test "x$TAIL" = x; then
9571     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9572   fi
9573 
9574 
9575 
9576 
9577 
9578   # Publish this variable in the help.
9579 
9580 
9581   if test "x$TAR" = x; then
9582     # The variable is not set by user, try to locate tool using the code snippet
9583     for ac_prog in tar
9584 do
9585   # Extract the first word of "$ac_prog", so it can be a program name with args.
9586 set dummy $ac_prog; ac_word=$2
9587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9588 $as_echo_n "checking for $ac_word... " >&6; }
9589 if ${ac_cv_path_TAR+:} false; then :
9590   $as_echo_n "(cached) " >&6
9591 else
9592   case $TAR in
9593   [\\/]* | ?:[\\/]*)
9594   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9595   ;;
9596   *)
9597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9598 for as_dir in $PATH
9599 do
9600   IFS=$as_save_IFS
9601   test -z "$as_dir" && as_dir=.
9602     for ac_exec_ext in '' $ac_executable_extensions; do
9603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9604     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9606     break 2
9607   fi
9608 done
9609   done
9610 IFS=$as_save_IFS
9611 
9612   ;;
9613 esac
9614 fi
9615 TAR=$ac_cv_path_TAR
9616 if test -n "$TAR"; then
9617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9618 $as_echo "$TAR" >&6; }
9619 else
9620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9621 $as_echo "no" >&6; }
9622 fi
9623 
9624 
9625   test -n "$TAR" && break
9626 done
9627 
9628   else
9629     # The variable is set, but is it from the command line or the environment?
9630 
9631     # Try to remove the string !TAR! from our list.
9632     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9633     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9634       # If it failed, the variable was not from the command line. Ignore it,
9635       # but warn the user (except for BASH, which is always set by the calling BASH).
9636       if test "xTAR" != xBASH; then
9637         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9638 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9639       fi
9640       # Try to locate tool using the code snippet
9641       for ac_prog in tar
9642 do
9643   # Extract the first word of "$ac_prog", so it can be a program name with args.
9644 set dummy $ac_prog; ac_word=$2
9645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9646 $as_echo_n "checking for $ac_word... " >&6; }
9647 if ${ac_cv_path_TAR+:} false; then :
9648   $as_echo_n "(cached) " >&6
9649 else
9650   case $TAR in
9651   [\\/]* | ?:[\\/]*)
9652   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9653   ;;
9654   *)
9655   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9656 for as_dir in $PATH
9657 do
9658   IFS=$as_save_IFS
9659   test -z "$as_dir" && as_dir=.
9660     for ac_exec_ext in '' $ac_executable_extensions; do
9661   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9662     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9663     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9664     break 2
9665   fi
9666 done
9667   done
9668 IFS=$as_save_IFS
9669 
9670   ;;
9671 esac
9672 fi
9673 TAR=$ac_cv_path_TAR
9674 if test -n "$TAR"; then
9675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9676 $as_echo "$TAR" >&6; }
9677 else
9678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9679 $as_echo "no" >&6; }
9680 fi
9681 
9682 
9683   test -n "$TAR" && break
9684 done
9685 
9686     else
9687       # If it succeeded, then it was overridden by the user. We will use it
9688       # for the tool.
9689 
9690       # First remove it from the list of overridden variables, so we can test
9691       # for unknown variables in the end.
9692       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9693 
9694       # Check if the provided tool contains a complete path.
9695       tool_specified="$TAR"
9696       tool_basename="${tool_specified##*/}"
9697       if test "x$tool_basename" = "x$tool_specified"; then
9698         # A command without a complete path is provided, search $PATH.
9699         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9700 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9701         # Extract the first word of "$tool_basename", so it can be a program name with args.
9702 set dummy $tool_basename; ac_word=$2
9703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9704 $as_echo_n "checking for $ac_word... " >&6; }
9705 if ${ac_cv_path_TAR+:} false; then :
9706   $as_echo_n "(cached) " >&6
9707 else
9708   case $TAR in
9709   [\\/]* | ?:[\\/]*)
9710   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9711   ;;
9712   *)
9713   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9714 for as_dir in $PATH
9715 do
9716   IFS=$as_save_IFS
9717   test -z "$as_dir" && as_dir=.
9718     for ac_exec_ext in '' $ac_executable_extensions; do
9719   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9720     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9721     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9722     break 2
9723   fi
9724 done
9725   done
9726 IFS=$as_save_IFS
9727 
9728   ;;
9729 esac
9730 fi
9731 TAR=$ac_cv_path_TAR
9732 if test -n "$TAR"; then
9733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9734 $as_echo "$TAR" >&6; }
9735 else
9736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9737 $as_echo "no" >&6; }
9738 fi
9739 
9740 
9741         if test "x$TAR" = x; then
9742           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9743         fi
9744       else
9745         # Otherwise we believe it is a complete path. Use it as it is.
9746         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9747 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9748         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9749 $as_echo_n "checking for TAR... " >&6; }
9750         if test ! -x "$tool_specified"; then
9751           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9752 $as_echo "not found" >&6; }
9753           as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9754         fi
9755         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9756 $as_echo "$tool_specified" >&6; }
9757       fi
9758     fi
9759   fi
9760 
9761 
9762 
9763   if test "x$TAR" = x; then
9764     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9765   fi
9766 
9767 
9768 
9769 
9770 
9771   # Publish this variable in the help.
9772 
9773 
9774   if test "x$TEE" = x; then
9775     # The variable is not set by user, try to locate tool using the code snippet
9776     for ac_prog in tee
9777 do
9778   # Extract the first word of "$ac_prog", so it can be a program name with args.
9779 set dummy $ac_prog; ac_word=$2
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9781 $as_echo_n "checking for $ac_word... " >&6; }
9782 if ${ac_cv_path_TEE+:} false; then :
9783   $as_echo_n "(cached) " >&6
9784 else
9785   case $TEE in
9786   [\\/]* | ?:[\\/]*)
9787   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9788   ;;
9789   *)
9790   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9791 for as_dir in $PATH
9792 do
9793   IFS=$as_save_IFS
9794   test -z "$as_dir" && as_dir=.
9795     for ac_exec_ext in '' $ac_executable_extensions; do
9796   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9797     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9798     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9799     break 2
9800   fi
9801 done
9802   done
9803 IFS=$as_save_IFS
9804 
9805   ;;
9806 esac
9807 fi
9808 TEE=$ac_cv_path_TEE
9809 if test -n "$TEE"; then
9810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9811 $as_echo "$TEE" >&6; }
9812 else
9813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814 $as_echo "no" >&6; }
9815 fi
9816 
9817 
9818   test -n "$TEE" && break
9819 done
9820 
9821   else
9822     # The variable is set, but is it from the command line or the environment?
9823 
9824     # Try to remove the string !TEE! from our list.
9825     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9826     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9827       # If it failed, the variable was not from the command line. Ignore it,
9828       # but warn the user (except for BASH, which is always set by the calling BASH).
9829       if test "xTEE" != xBASH; then
9830         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9831 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9832       fi
9833       # Try to locate tool using the code snippet
9834       for ac_prog in tee
9835 do
9836   # Extract the first word of "$ac_prog", so it can be a program name with args.
9837 set dummy $ac_prog; ac_word=$2
9838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9839 $as_echo_n "checking for $ac_word... " >&6; }
9840 if ${ac_cv_path_TEE+:} false; then :
9841   $as_echo_n "(cached) " >&6
9842 else
9843   case $TEE in
9844   [\\/]* | ?:[\\/]*)
9845   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9846   ;;
9847   *)
9848   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9849 for as_dir in $PATH
9850 do
9851   IFS=$as_save_IFS
9852   test -z "$as_dir" && as_dir=.
9853     for ac_exec_ext in '' $ac_executable_extensions; do
9854   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9855     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9856     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9857     break 2
9858   fi
9859 done
9860   done
9861 IFS=$as_save_IFS
9862 
9863   ;;
9864 esac
9865 fi
9866 TEE=$ac_cv_path_TEE
9867 if test -n "$TEE"; then
9868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9869 $as_echo "$TEE" >&6; }
9870 else
9871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9872 $as_echo "no" >&6; }
9873 fi
9874 
9875 
9876   test -n "$TEE" && break
9877 done
9878 
9879     else
9880       # If it succeeded, then it was overridden by the user. We will use it
9881       # for the tool.
9882 
9883       # First remove it from the list of overridden variables, so we can test
9884       # for unknown variables in the end.
9885       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9886 
9887       # Check if the provided tool contains a complete path.
9888       tool_specified="$TEE"
9889       tool_basename="${tool_specified##*/}"
9890       if test "x$tool_basename" = "x$tool_specified"; then
9891         # A command without a complete path is provided, search $PATH.
9892         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9893 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9894         # Extract the first word of "$tool_basename", so it can be a program name with args.
9895 set dummy $tool_basename; ac_word=$2
9896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9897 $as_echo_n "checking for $ac_word... " >&6; }
9898 if ${ac_cv_path_TEE+:} false; then :
9899   $as_echo_n "(cached) " >&6
9900 else
9901   case $TEE in
9902   [\\/]* | ?:[\\/]*)
9903   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9904   ;;
9905   *)
9906   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9907 for as_dir in $PATH
9908 do
9909   IFS=$as_save_IFS
9910   test -z "$as_dir" && as_dir=.
9911     for ac_exec_ext in '' $ac_executable_extensions; do
9912   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9913     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9914     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9915     break 2
9916   fi
9917 done
9918   done
9919 IFS=$as_save_IFS
9920 
9921   ;;
9922 esac
9923 fi
9924 TEE=$ac_cv_path_TEE
9925 if test -n "$TEE"; then
9926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9927 $as_echo "$TEE" >&6; }
9928 else
9929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9930 $as_echo "no" >&6; }
9931 fi
9932 
9933 
9934         if test "x$TEE" = x; then
9935           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9936         fi
9937       else
9938         # Otherwise we believe it is a complete path. Use it as it is.
9939         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9940 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9941         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9942 $as_echo_n "checking for TEE... " >&6; }
9943         if test ! -x "$tool_specified"; then
9944           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9945 $as_echo "not found" >&6; }
9946           as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9947         fi
9948         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9949 $as_echo "$tool_specified" >&6; }
9950       fi
9951     fi
9952   fi
9953 
9954 
9955 
9956   if test "x$TEE" = x; then
9957     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9958   fi
9959 
9960 
9961 
9962 
9963 
9964   # Publish this variable in the help.
9965 
9966 
9967   if test "x$TOUCH" = x; then
9968     # The variable is not set by user, try to locate tool using the code snippet
9969     for ac_prog in touch
9970 do
9971   # Extract the first word of "$ac_prog", so it can be a program name with args.
9972 set dummy $ac_prog; ac_word=$2
9973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9974 $as_echo_n "checking for $ac_word... " >&6; }
9975 if ${ac_cv_path_TOUCH+:} false; then :
9976   $as_echo_n "(cached) " >&6
9977 else
9978   case $TOUCH in
9979   [\\/]* | ?:[\\/]*)
9980   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9981   ;;
9982   *)
9983   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9984 for as_dir in $PATH
9985 do
9986   IFS=$as_save_IFS
9987   test -z "$as_dir" && as_dir=.
9988     for ac_exec_ext in '' $ac_executable_extensions; do
9989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9990     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
9991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9992     break 2
9993   fi
9994 done
9995   done
9996 IFS=$as_save_IFS
9997 
9998   ;;
9999 esac
10000 fi
10001 TOUCH=$ac_cv_path_TOUCH
10002 if test -n "$TOUCH"; then
10003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10004 $as_echo "$TOUCH" >&6; }
10005 else
10006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10007 $as_echo "no" >&6; }
10008 fi
10009 
10010 
10011   test -n "$TOUCH" && break
10012 done
10013 
10014   else
10015     # The variable is set, but is it from the command line or the environment?
10016 
10017     # Try to remove the string !TOUCH! from our list.
10018     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10019     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10020       # If it failed, the variable was not from the command line. Ignore it,
10021       # but warn the user (except for BASH, which is always set by the calling BASH).
10022       if test "xTOUCH" != xBASH; then
10023         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10024 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10025       fi
10026       # Try to locate tool using the code snippet
10027       for ac_prog in touch
10028 do
10029   # Extract the first word of "$ac_prog", so it can be a program name with args.
10030 set dummy $ac_prog; ac_word=$2
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10032 $as_echo_n "checking for $ac_word... " >&6; }
10033 if ${ac_cv_path_TOUCH+:} false; then :
10034   $as_echo_n "(cached) " >&6
10035 else
10036   case $TOUCH in
10037   [\\/]* | ?:[\\/]*)
10038   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10039   ;;
10040   *)
10041   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10042 for as_dir in $PATH
10043 do
10044   IFS=$as_save_IFS
10045   test -z "$as_dir" && as_dir=.
10046     for ac_exec_ext in '' $ac_executable_extensions; do
10047   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10048     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10049     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10050     break 2
10051   fi
10052 done
10053   done
10054 IFS=$as_save_IFS
10055 
10056   ;;
10057 esac
10058 fi
10059 TOUCH=$ac_cv_path_TOUCH
10060 if test -n "$TOUCH"; then
10061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10062 $as_echo "$TOUCH" >&6; }
10063 else
10064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10065 $as_echo "no" >&6; }
10066 fi
10067 
10068 
10069   test -n "$TOUCH" && break
10070 done
10071 
10072     else
10073       # If it succeeded, then it was overridden by the user. We will use it
10074       # for the tool.
10075 
10076       # First remove it from the list of overridden variables, so we can test
10077       # for unknown variables in the end.
10078       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10079 
10080       # Check if the provided tool contains a complete path.
10081       tool_specified="$TOUCH"
10082       tool_basename="${tool_specified##*/}"
10083       if test "x$tool_basename" = "x$tool_specified"; then
10084         # A command without a complete path is provided, search $PATH.
10085         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10086 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10087         # Extract the first word of "$tool_basename", so it can be a program name with args.
10088 set dummy $tool_basename; ac_word=$2
10089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10090 $as_echo_n "checking for $ac_word... " >&6; }
10091 if ${ac_cv_path_TOUCH+:} false; then :
10092   $as_echo_n "(cached) " >&6
10093 else
10094   case $TOUCH in
10095   [\\/]* | ?:[\\/]*)
10096   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10097   ;;
10098   *)
10099   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10100 for as_dir in $PATH
10101 do
10102   IFS=$as_save_IFS
10103   test -z "$as_dir" && as_dir=.
10104     for ac_exec_ext in '' $ac_executable_extensions; do
10105   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10106     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10107     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10108     break 2
10109   fi
10110 done
10111   done
10112 IFS=$as_save_IFS
10113 
10114   ;;
10115 esac
10116 fi
10117 TOUCH=$ac_cv_path_TOUCH
10118 if test -n "$TOUCH"; then
10119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10120 $as_echo "$TOUCH" >&6; }
10121 else
10122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10123 $as_echo "no" >&6; }
10124 fi
10125 
10126 
10127         if test "x$TOUCH" = x; then
10128           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10129         fi
10130       else
10131         # Otherwise we believe it is a complete path. Use it as it is.
10132         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10133 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10134         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10135 $as_echo_n "checking for TOUCH... " >&6; }
10136         if test ! -x "$tool_specified"; then
10137           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10138 $as_echo "not found" >&6; }
10139           as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10140         fi
10141         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10142 $as_echo "$tool_specified" >&6; }
10143       fi
10144     fi
10145   fi
10146 
10147 
10148 
10149   if test "x$TOUCH" = x; then
10150     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10151   fi
10152 
10153 
10154 
10155 
10156 
10157   # Publish this variable in the help.
10158 
10159 
10160   if test "x$TR" = x; then
10161     # The variable is not set by user, try to locate tool using the code snippet
10162     for ac_prog in tr
10163 do
10164   # Extract the first word of "$ac_prog", so it can be a program name with args.
10165 set dummy $ac_prog; ac_word=$2
10166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10167 $as_echo_n "checking for $ac_word... " >&6; }
10168 if ${ac_cv_path_TR+:} false; then :
10169   $as_echo_n "(cached) " >&6
10170 else
10171   case $TR in
10172   [\\/]* | ?:[\\/]*)
10173   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10174   ;;
10175   *)
10176   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10177 for as_dir in $PATH
10178 do
10179   IFS=$as_save_IFS
10180   test -z "$as_dir" && as_dir=.
10181     for ac_exec_ext in '' $ac_executable_extensions; do
10182   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10183     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10185     break 2
10186   fi
10187 done
10188   done
10189 IFS=$as_save_IFS
10190 
10191   ;;
10192 esac
10193 fi
10194 TR=$ac_cv_path_TR
10195 if test -n "$TR"; then
10196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10197 $as_echo "$TR" >&6; }
10198 else
10199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10200 $as_echo "no" >&6; }
10201 fi
10202 
10203 
10204   test -n "$TR" && break
10205 done
10206 
10207   else
10208     # The variable is set, but is it from the command line or the environment?
10209 
10210     # Try to remove the string !TR! from our list.
10211     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10212     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10213       # If it failed, the variable was not from the command line. Ignore it,
10214       # but warn the user (except for BASH, which is always set by the calling BASH).
10215       if test "xTR" != xBASH; then
10216         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10217 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10218       fi
10219       # Try to locate tool using the code snippet
10220       for ac_prog in tr
10221 do
10222   # Extract the first word of "$ac_prog", so it can be a program name with args.
10223 set dummy $ac_prog; ac_word=$2
10224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10225 $as_echo_n "checking for $ac_word... " >&6; }
10226 if ${ac_cv_path_TR+:} false; then :
10227   $as_echo_n "(cached) " >&6
10228 else
10229   case $TR in
10230   [\\/]* | ?:[\\/]*)
10231   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10232   ;;
10233   *)
10234   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10235 for as_dir in $PATH
10236 do
10237   IFS=$as_save_IFS
10238   test -z "$as_dir" && as_dir=.
10239     for ac_exec_ext in '' $ac_executable_extensions; do
10240   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10241     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10242     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10243     break 2
10244   fi
10245 done
10246   done
10247 IFS=$as_save_IFS
10248 
10249   ;;
10250 esac
10251 fi
10252 TR=$ac_cv_path_TR
10253 if test -n "$TR"; then
10254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10255 $as_echo "$TR" >&6; }
10256 else
10257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10258 $as_echo "no" >&6; }
10259 fi
10260 
10261 
10262   test -n "$TR" && break
10263 done
10264 
10265     else
10266       # If it succeeded, then it was overridden by the user. We will use it
10267       # for the tool.
10268 
10269       # First remove it from the list of overridden variables, so we can test
10270       # for unknown variables in the end.
10271       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10272 
10273       # Check if the provided tool contains a complete path.
10274       tool_specified="$TR"
10275       tool_basename="${tool_specified##*/}"
10276       if test "x$tool_basename" = "x$tool_specified"; then
10277         # A command without a complete path is provided, search $PATH.
10278         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10279 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10280         # Extract the first word of "$tool_basename", so it can be a program name with args.
10281 set dummy $tool_basename; ac_word=$2
10282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10283 $as_echo_n "checking for $ac_word... " >&6; }
10284 if ${ac_cv_path_TR+:} false; then :
10285   $as_echo_n "(cached) " >&6
10286 else
10287   case $TR in
10288   [\\/]* | ?:[\\/]*)
10289   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10290   ;;
10291   *)
10292   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10293 for as_dir in $PATH
10294 do
10295   IFS=$as_save_IFS
10296   test -z "$as_dir" && as_dir=.
10297     for ac_exec_ext in '' $ac_executable_extensions; do
10298   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10299     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10300     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10301     break 2
10302   fi
10303 done
10304   done
10305 IFS=$as_save_IFS
10306 
10307   ;;
10308 esac
10309 fi
10310 TR=$ac_cv_path_TR
10311 if test -n "$TR"; then
10312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10313 $as_echo "$TR" >&6; }
10314 else
10315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10316 $as_echo "no" >&6; }
10317 fi
10318 
10319 
10320         if test "x$TR" = x; then
10321           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10322         fi
10323       else
10324         # Otherwise we believe it is a complete path. Use it as it is.
10325         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10326 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10327         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10328 $as_echo_n "checking for TR... " >&6; }
10329         if test ! -x "$tool_specified"; then
10330           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10331 $as_echo "not found" >&6; }
10332           as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10333         fi
10334         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10335 $as_echo "$tool_specified" >&6; }
10336       fi
10337     fi
10338   fi
10339 
10340 
10341 
10342   if test "x$TR" = x; then
10343     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10344   fi
10345 
10346 
10347 
10348 
10349 
10350   # Publish this variable in the help.
10351 
10352 
10353   if test "x$UNAME" = x; then
10354     # The variable is not set by user, try to locate tool using the code snippet
10355     for ac_prog in uname
10356 do
10357   # Extract the first word of "$ac_prog", so it can be a program name with args.
10358 set dummy $ac_prog; ac_word=$2
10359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10360 $as_echo_n "checking for $ac_word... " >&6; }
10361 if ${ac_cv_path_UNAME+:} false; then :
10362   $as_echo_n "(cached) " >&6
10363 else
10364   case $UNAME in
10365   [\\/]* | ?:[\\/]*)
10366   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10367   ;;
10368   *)
10369   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10370 for as_dir in $PATH
10371 do
10372   IFS=$as_save_IFS
10373   test -z "$as_dir" && as_dir=.
10374     for ac_exec_ext in '' $ac_executable_extensions; do
10375   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10376     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10377     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10378     break 2
10379   fi
10380 done
10381   done
10382 IFS=$as_save_IFS
10383 
10384   ;;
10385 esac
10386 fi
10387 UNAME=$ac_cv_path_UNAME
10388 if test -n "$UNAME"; then
10389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10390 $as_echo "$UNAME" >&6; }
10391 else
10392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10393 $as_echo "no" >&6; }
10394 fi
10395 
10396 
10397   test -n "$UNAME" && break
10398 done
10399 
10400   else
10401     # The variable is set, but is it from the command line or the environment?
10402 
10403     # Try to remove the string !UNAME! from our list.
10404     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10405     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10406       # If it failed, the variable was not from the command line. Ignore it,
10407       # but warn the user (except for BASH, which is always set by the calling BASH).
10408       if test "xUNAME" != xBASH; then
10409         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10410 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10411       fi
10412       # Try to locate tool using the code snippet
10413       for ac_prog in uname
10414 do
10415   # Extract the first word of "$ac_prog", so it can be a program name with args.
10416 set dummy $ac_prog; ac_word=$2
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10418 $as_echo_n "checking for $ac_word... " >&6; }
10419 if ${ac_cv_path_UNAME+:} false; then :
10420   $as_echo_n "(cached) " >&6
10421 else
10422   case $UNAME in
10423   [\\/]* | ?:[\\/]*)
10424   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10425   ;;
10426   *)
10427   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10428 for as_dir in $PATH
10429 do
10430   IFS=$as_save_IFS
10431   test -z "$as_dir" && as_dir=.
10432     for ac_exec_ext in '' $ac_executable_extensions; do
10433   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10434     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10435     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10436     break 2
10437   fi
10438 done
10439   done
10440 IFS=$as_save_IFS
10441 
10442   ;;
10443 esac
10444 fi
10445 UNAME=$ac_cv_path_UNAME
10446 if test -n "$UNAME"; then
10447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10448 $as_echo "$UNAME" >&6; }
10449 else
10450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10451 $as_echo "no" >&6; }
10452 fi
10453 
10454 
10455   test -n "$UNAME" && break
10456 done
10457 
10458     else
10459       # If it succeeded, then it was overridden by the user. We will use it
10460       # for the tool.
10461 
10462       # First remove it from the list of overridden variables, so we can test
10463       # for unknown variables in the end.
10464       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10465 
10466       # Check if the provided tool contains a complete path.
10467       tool_specified="$UNAME"
10468       tool_basename="${tool_specified##*/}"
10469       if test "x$tool_basename" = "x$tool_specified"; then
10470         # A command without a complete path is provided, search $PATH.
10471         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10472 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10473         # Extract the first word of "$tool_basename", so it can be a program name with args.
10474 set dummy $tool_basename; ac_word=$2
10475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10476 $as_echo_n "checking for $ac_word... " >&6; }
10477 if ${ac_cv_path_UNAME+:} false; then :
10478   $as_echo_n "(cached) " >&6
10479 else
10480   case $UNAME in
10481   [\\/]* | ?:[\\/]*)
10482   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10483   ;;
10484   *)
10485   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10486 for as_dir in $PATH
10487 do
10488   IFS=$as_save_IFS
10489   test -z "$as_dir" && as_dir=.
10490     for ac_exec_ext in '' $ac_executable_extensions; do
10491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10492     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10494     break 2
10495   fi
10496 done
10497   done
10498 IFS=$as_save_IFS
10499 
10500   ;;
10501 esac
10502 fi
10503 UNAME=$ac_cv_path_UNAME
10504 if test -n "$UNAME"; then
10505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10506 $as_echo "$UNAME" >&6; }
10507 else
10508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10509 $as_echo "no" >&6; }
10510 fi
10511 
10512 
10513         if test "x$UNAME" = x; then
10514           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10515         fi
10516       else
10517         # Otherwise we believe it is a complete path. Use it as it is.
10518         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10519 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10520         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10521 $as_echo_n "checking for UNAME... " >&6; }
10522         if test ! -x "$tool_specified"; then
10523           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10524 $as_echo "not found" >&6; }
10525           as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10526         fi
10527         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10528 $as_echo "$tool_specified" >&6; }
10529       fi
10530     fi
10531   fi
10532 
10533 
10534 
10535   if test "x$UNAME" = x; then
10536     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10537   fi
10538 
10539 
10540 
10541 
10542 
10543   # Publish this variable in the help.
10544 
10545 
10546   if test "x$UNIQ" = x; then
10547     # The variable is not set by user, try to locate tool using the code snippet
10548     for ac_prog in uniq
10549 do
10550   # Extract the first word of "$ac_prog", so it can be a program name with args.
10551 set dummy $ac_prog; ac_word=$2
10552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10553 $as_echo_n "checking for $ac_word... " >&6; }
10554 if ${ac_cv_path_UNIQ+:} false; then :
10555   $as_echo_n "(cached) " >&6
10556 else
10557   case $UNIQ in
10558   [\\/]* | ?:[\\/]*)
10559   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10560   ;;
10561   *)
10562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10563 for as_dir in $PATH
10564 do
10565   IFS=$as_save_IFS
10566   test -z "$as_dir" && as_dir=.
10567     for ac_exec_ext in '' $ac_executable_extensions; do
10568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10569     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10571     break 2
10572   fi
10573 done
10574   done
10575 IFS=$as_save_IFS
10576 
10577   ;;
10578 esac
10579 fi
10580 UNIQ=$ac_cv_path_UNIQ
10581 if test -n "$UNIQ"; then
10582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10583 $as_echo "$UNIQ" >&6; }
10584 else
10585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10586 $as_echo "no" >&6; }
10587 fi
10588 
10589 
10590   test -n "$UNIQ" && break
10591 done
10592 
10593   else
10594     # The variable is set, but is it from the command line or the environment?
10595 
10596     # Try to remove the string !UNIQ! from our list.
10597     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10598     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10599       # If it failed, the variable was not from the command line. Ignore it,
10600       # but warn the user (except for BASH, which is always set by the calling BASH).
10601       if test "xUNIQ" != xBASH; then
10602         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10603 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10604       fi
10605       # Try to locate tool using the code snippet
10606       for ac_prog in uniq
10607 do
10608   # Extract the first word of "$ac_prog", so it can be a program name with args.
10609 set dummy $ac_prog; ac_word=$2
10610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10611 $as_echo_n "checking for $ac_word... " >&6; }
10612 if ${ac_cv_path_UNIQ+:} false; then :
10613   $as_echo_n "(cached) " >&6
10614 else
10615   case $UNIQ in
10616   [\\/]* | ?:[\\/]*)
10617   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10618   ;;
10619   *)
10620   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10621 for as_dir in $PATH
10622 do
10623   IFS=$as_save_IFS
10624   test -z "$as_dir" && as_dir=.
10625     for ac_exec_ext in '' $ac_executable_extensions; do
10626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10627     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10629     break 2
10630   fi
10631 done
10632   done
10633 IFS=$as_save_IFS
10634 
10635   ;;
10636 esac
10637 fi
10638 UNIQ=$ac_cv_path_UNIQ
10639 if test -n "$UNIQ"; then
10640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10641 $as_echo "$UNIQ" >&6; }
10642 else
10643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10644 $as_echo "no" >&6; }
10645 fi
10646 
10647 
10648   test -n "$UNIQ" && break
10649 done
10650 
10651     else
10652       # If it succeeded, then it was overridden by the user. We will use it
10653       # for the tool.
10654 
10655       # First remove it from the list of overridden variables, so we can test
10656       # for unknown variables in the end.
10657       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10658 
10659       # Check if the provided tool contains a complete path.
10660       tool_specified="$UNIQ"
10661       tool_basename="${tool_specified##*/}"
10662       if test "x$tool_basename" = "x$tool_specified"; then
10663         # A command without a complete path is provided, search $PATH.
10664         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10665 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10666         # Extract the first word of "$tool_basename", so it can be a program name with args.
10667 set dummy $tool_basename; ac_word=$2
10668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10669 $as_echo_n "checking for $ac_word... " >&6; }
10670 if ${ac_cv_path_UNIQ+:} false; then :
10671   $as_echo_n "(cached) " >&6
10672 else
10673   case $UNIQ in
10674   [\\/]* | ?:[\\/]*)
10675   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10676   ;;
10677   *)
10678   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10679 for as_dir in $PATH
10680 do
10681   IFS=$as_save_IFS
10682   test -z "$as_dir" && as_dir=.
10683     for ac_exec_ext in '' $ac_executable_extensions; do
10684   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10685     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10686     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10687     break 2
10688   fi
10689 done
10690   done
10691 IFS=$as_save_IFS
10692 
10693   ;;
10694 esac
10695 fi
10696 UNIQ=$ac_cv_path_UNIQ
10697 if test -n "$UNIQ"; then
10698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10699 $as_echo "$UNIQ" >&6; }
10700 else
10701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10702 $as_echo "no" >&6; }
10703 fi
10704 
10705 
10706         if test "x$UNIQ" = x; then
10707           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10708         fi
10709       else
10710         # Otherwise we believe it is a complete path. Use it as it is.
10711         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10712 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10713         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10714 $as_echo_n "checking for UNIQ... " >&6; }
10715         if test ! -x "$tool_specified"; then
10716           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10717 $as_echo "not found" >&6; }
10718           as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10719         fi
10720         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10721 $as_echo "$tool_specified" >&6; }
10722       fi
10723     fi
10724   fi
10725 
10726 
10727 
10728   if test "x$UNIQ" = x; then
10729     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10730   fi
10731 
10732 
10733 
10734 
10735 
10736   # Publish this variable in the help.
10737 
10738 
10739   if test "x$WC" = x; then
10740     # The variable is not set by user, try to locate tool using the code snippet
10741     for ac_prog in wc
10742 do
10743   # Extract the first word of "$ac_prog", so it can be a program name with args.
10744 set dummy $ac_prog; ac_word=$2
10745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10746 $as_echo_n "checking for $ac_word... " >&6; }
10747 if ${ac_cv_path_WC+:} false; then :
10748   $as_echo_n "(cached) " >&6
10749 else
10750   case $WC in
10751   [\\/]* | ?:[\\/]*)
10752   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10753   ;;
10754   *)
10755   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10756 for as_dir in $PATH
10757 do
10758   IFS=$as_save_IFS
10759   test -z "$as_dir" && as_dir=.
10760     for ac_exec_ext in '' $ac_executable_extensions; do
10761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10762     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10764     break 2
10765   fi
10766 done
10767   done
10768 IFS=$as_save_IFS
10769 
10770   ;;
10771 esac
10772 fi
10773 WC=$ac_cv_path_WC
10774 if test -n "$WC"; then
10775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10776 $as_echo "$WC" >&6; }
10777 else
10778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10779 $as_echo "no" >&6; }
10780 fi
10781 
10782 
10783   test -n "$WC" && break
10784 done
10785 
10786   else
10787     # The variable is set, but is it from the command line or the environment?
10788 
10789     # Try to remove the string !WC! from our list.
10790     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10791     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10792       # If it failed, the variable was not from the command line. Ignore it,
10793       # but warn the user (except for BASH, which is always set by the calling BASH).
10794       if test "xWC" != xBASH; then
10795         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10796 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10797       fi
10798       # Try to locate tool using the code snippet
10799       for ac_prog in wc
10800 do
10801   # Extract the first word of "$ac_prog", so it can be a program name with args.
10802 set dummy $ac_prog; ac_word=$2
10803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10804 $as_echo_n "checking for $ac_word... " >&6; }
10805 if ${ac_cv_path_WC+:} false; then :
10806   $as_echo_n "(cached) " >&6
10807 else
10808   case $WC in
10809   [\\/]* | ?:[\\/]*)
10810   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10811   ;;
10812   *)
10813   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10814 for as_dir in $PATH
10815 do
10816   IFS=$as_save_IFS
10817   test -z "$as_dir" && as_dir=.
10818     for ac_exec_ext in '' $ac_executable_extensions; do
10819   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10820     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10821     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10822     break 2
10823   fi
10824 done
10825   done
10826 IFS=$as_save_IFS
10827 
10828   ;;
10829 esac
10830 fi
10831 WC=$ac_cv_path_WC
10832 if test -n "$WC"; then
10833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10834 $as_echo "$WC" >&6; }
10835 else
10836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10837 $as_echo "no" >&6; }
10838 fi
10839 
10840 
10841   test -n "$WC" && break
10842 done
10843 
10844     else
10845       # If it succeeded, then it was overridden by the user. We will use it
10846       # for the tool.
10847 
10848       # First remove it from the list of overridden variables, so we can test
10849       # for unknown variables in the end.
10850       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10851 
10852       # Check if the provided tool contains a complete path.
10853       tool_specified="$WC"
10854       tool_basename="${tool_specified##*/}"
10855       if test "x$tool_basename" = "x$tool_specified"; then
10856         # A command without a complete path is provided, search $PATH.
10857         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10858 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10859         # Extract the first word of "$tool_basename", so it can be a program name with args.
10860 set dummy $tool_basename; ac_word=$2
10861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10862 $as_echo_n "checking for $ac_word... " >&6; }
10863 if ${ac_cv_path_WC+:} false; then :
10864   $as_echo_n "(cached) " >&6
10865 else
10866   case $WC in
10867   [\\/]* | ?:[\\/]*)
10868   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10869   ;;
10870   *)
10871   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10872 for as_dir in $PATH
10873 do
10874   IFS=$as_save_IFS
10875   test -z "$as_dir" && as_dir=.
10876     for ac_exec_ext in '' $ac_executable_extensions; do
10877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10878     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10880     break 2
10881   fi
10882 done
10883   done
10884 IFS=$as_save_IFS
10885 
10886   ;;
10887 esac
10888 fi
10889 WC=$ac_cv_path_WC
10890 if test -n "$WC"; then
10891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10892 $as_echo "$WC" >&6; }
10893 else
10894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10895 $as_echo "no" >&6; }
10896 fi
10897 
10898 
10899         if test "x$WC" = x; then
10900           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10901         fi
10902       else
10903         # Otherwise we believe it is a complete path. Use it as it is.
10904         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10905 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10906         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10907 $as_echo_n "checking for WC... " >&6; }
10908         if test ! -x "$tool_specified"; then
10909           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10910 $as_echo "not found" >&6; }
10911           as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10912         fi
10913         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10914 $as_echo "$tool_specified" >&6; }
10915       fi
10916     fi
10917   fi
10918 
10919 
10920 
10921   if test "x$WC" = x; then
10922     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10923   fi
10924 
10925 
10926 
10927 
10928 
10929   # Publish this variable in the help.
10930 
10931 
10932   if test "x$WHICH" = x; then
10933     # The variable is not set by user, try to locate tool using the code snippet
10934     for ac_prog in which
10935 do
10936   # Extract the first word of "$ac_prog", so it can be a program name with args.
10937 set dummy $ac_prog; ac_word=$2
10938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10939 $as_echo_n "checking for $ac_word... " >&6; }
10940 if ${ac_cv_path_WHICH+:} false; then :
10941   $as_echo_n "(cached) " >&6
10942 else
10943   case $WHICH in
10944   [\\/]* | ?:[\\/]*)
10945   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10946   ;;
10947   *)
10948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10949 for as_dir in $PATH
10950 do
10951   IFS=$as_save_IFS
10952   test -z "$as_dir" && as_dir=.
10953     for ac_exec_ext in '' $ac_executable_extensions; do
10954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10955     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10957     break 2
10958   fi
10959 done
10960   done
10961 IFS=$as_save_IFS
10962 
10963   ;;
10964 esac
10965 fi
10966 WHICH=$ac_cv_path_WHICH
10967 if test -n "$WHICH"; then
10968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10969 $as_echo "$WHICH" >&6; }
10970 else
10971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10972 $as_echo "no" >&6; }
10973 fi
10974 
10975 
10976   test -n "$WHICH" && break
10977 done
10978 
10979   else
10980     # The variable is set, but is it from the command line or the environment?
10981 
10982     # Try to remove the string !WHICH! from our list.
10983     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
10984     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10985       # If it failed, the variable was not from the command line. Ignore it,
10986       # but warn the user (except for BASH, which is always set by the calling BASH).
10987       if test "xWHICH" != xBASH; then
10988         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
10989 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
10990       fi
10991       # Try to locate tool using the code snippet
10992       for ac_prog in which
10993 do
10994   # Extract the first word of "$ac_prog", so it can be a program name with args.
10995 set dummy $ac_prog; ac_word=$2
10996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10997 $as_echo_n "checking for $ac_word... " >&6; }
10998 if ${ac_cv_path_WHICH+:} false; then :
10999   $as_echo_n "(cached) " >&6
11000 else
11001   case $WHICH in
11002   [\\/]* | ?:[\\/]*)
11003   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11004   ;;
11005   *)
11006   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11007 for as_dir in $PATH
11008 do
11009   IFS=$as_save_IFS
11010   test -z "$as_dir" && as_dir=.
11011     for ac_exec_ext in '' $ac_executable_extensions; do
11012   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11013     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11015     break 2
11016   fi
11017 done
11018   done
11019 IFS=$as_save_IFS
11020 
11021   ;;
11022 esac
11023 fi
11024 WHICH=$ac_cv_path_WHICH
11025 if test -n "$WHICH"; then
11026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11027 $as_echo "$WHICH" >&6; }
11028 else
11029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11030 $as_echo "no" >&6; }
11031 fi
11032 
11033 
11034   test -n "$WHICH" && break
11035 done
11036 
11037     else
11038       # If it succeeded, then it was overridden by the user. We will use it
11039       # for the tool.
11040 
11041       # First remove it from the list of overridden variables, so we can test
11042       # for unknown variables in the end.
11043       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11044 
11045       # Check if the provided tool contains a complete path.
11046       tool_specified="$WHICH"
11047       tool_basename="${tool_specified##*/}"
11048       if test "x$tool_basename" = "x$tool_specified"; then
11049         # A command without a complete path is provided, search $PATH.
11050         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11051 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11052         # Extract the first word of "$tool_basename", so it can be a program name with args.
11053 set dummy $tool_basename; ac_word=$2
11054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11055 $as_echo_n "checking for $ac_word... " >&6; }
11056 if ${ac_cv_path_WHICH+:} false; then :
11057   $as_echo_n "(cached) " >&6
11058 else
11059   case $WHICH in
11060   [\\/]* | ?:[\\/]*)
11061   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11062   ;;
11063   *)
11064   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11065 for as_dir in $PATH
11066 do
11067   IFS=$as_save_IFS
11068   test -z "$as_dir" && as_dir=.
11069     for ac_exec_ext in '' $ac_executable_extensions; do
11070   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11071     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11072     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11073     break 2
11074   fi
11075 done
11076   done
11077 IFS=$as_save_IFS
11078 
11079   ;;
11080 esac
11081 fi
11082 WHICH=$ac_cv_path_WHICH
11083 if test -n "$WHICH"; then
11084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11085 $as_echo "$WHICH" >&6; }
11086 else
11087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11088 $as_echo "no" >&6; }
11089 fi
11090 
11091 
11092         if test "x$WHICH" = x; then
11093           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11094         fi
11095       else
11096         # Otherwise we believe it is a complete path. Use it as it is.
11097         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11098 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11099         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11100 $as_echo_n "checking for WHICH... " >&6; }
11101         if test ! -x "$tool_specified"; then
11102           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11103 $as_echo "not found" >&6; }
11104           as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11105         fi
11106         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11107 $as_echo "$tool_specified" >&6; }
11108       fi
11109     fi
11110   fi
11111 
11112 
11113 
11114   if test "x$WHICH" = x; then
11115     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11116   fi
11117 
11118 
11119 
11120 
11121 
11122   # Publish this variable in the help.
11123 
11124 
11125   if test "x$XARGS" = x; then
11126     # The variable is not set by user, try to locate tool using the code snippet
11127     for ac_prog in xargs
11128 do
11129   # Extract the first word of "$ac_prog", so it can be a program name with args.
11130 set dummy $ac_prog; ac_word=$2
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11132 $as_echo_n "checking for $ac_word... " >&6; }
11133 if ${ac_cv_path_XARGS+:} false; then :
11134   $as_echo_n "(cached) " >&6
11135 else
11136   case $XARGS in
11137   [\\/]* | ?:[\\/]*)
11138   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11139   ;;
11140   *)
11141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11142 for as_dir in $PATH
11143 do
11144   IFS=$as_save_IFS
11145   test -z "$as_dir" && as_dir=.
11146     for ac_exec_ext in '' $ac_executable_extensions; do
11147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11148     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11150     break 2
11151   fi
11152 done
11153   done
11154 IFS=$as_save_IFS
11155 
11156   ;;
11157 esac
11158 fi
11159 XARGS=$ac_cv_path_XARGS
11160 if test -n "$XARGS"; then
11161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11162 $as_echo "$XARGS" >&6; }
11163 else
11164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11165 $as_echo "no" >&6; }
11166 fi
11167 
11168 
11169   test -n "$XARGS" && break
11170 done
11171 
11172   else
11173     # The variable is set, but is it from the command line or the environment?
11174 
11175     # Try to remove the string !XARGS! from our list.
11176     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11177     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11178       # If it failed, the variable was not from the command line. Ignore it,
11179       # but warn the user (except for BASH, which is always set by the calling BASH).
11180       if test "xXARGS" != xBASH; then
11181         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11182 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11183       fi
11184       # Try to locate tool using the code snippet
11185       for ac_prog in xargs
11186 do
11187   # Extract the first word of "$ac_prog", so it can be a program name with args.
11188 set dummy $ac_prog; ac_word=$2
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11190 $as_echo_n "checking for $ac_word... " >&6; }
11191 if ${ac_cv_path_XARGS+:} false; then :
11192   $as_echo_n "(cached) " >&6
11193 else
11194   case $XARGS in
11195   [\\/]* | ?:[\\/]*)
11196   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11197   ;;
11198   *)
11199   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11200 for as_dir in $PATH
11201 do
11202   IFS=$as_save_IFS
11203   test -z "$as_dir" && as_dir=.
11204     for ac_exec_ext in '' $ac_executable_extensions; do
11205   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11206     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11207     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11208     break 2
11209   fi
11210 done
11211   done
11212 IFS=$as_save_IFS
11213 
11214   ;;
11215 esac
11216 fi
11217 XARGS=$ac_cv_path_XARGS
11218 if test -n "$XARGS"; then
11219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11220 $as_echo "$XARGS" >&6; }
11221 else
11222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11223 $as_echo "no" >&6; }
11224 fi
11225 
11226 
11227   test -n "$XARGS" && break
11228 done
11229 
11230     else
11231       # If it succeeded, then it was overridden by the user. We will use it
11232       # for the tool.
11233 
11234       # First remove it from the list of overridden variables, so we can test
11235       # for unknown variables in the end.
11236       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11237 
11238       # Check if the provided tool contains a complete path.
11239       tool_specified="$XARGS"
11240       tool_basename="${tool_specified##*/}"
11241       if test "x$tool_basename" = "x$tool_specified"; then
11242         # A command without a complete path is provided, search $PATH.
11243         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11244 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11245         # Extract the first word of "$tool_basename", so it can be a program name with args.
11246 set dummy $tool_basename; ac_word=$2
11247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11248 $as_echo_n "checking for $ac_word... " >&6; }
11249 if ${ac_cv_path_XARGS+:} false; then :
11250   $as_echo_n "(cached) " >&6
11251 else
11252   case $XARGS in
11253   [\\/]* | ?:[\\/]*)
11254   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11255   ;;
11256   *)
11257   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11258 for as_dir in $PATH
11259 do
11260   IFS=$as_save_IFS
11261   test -z "$as_dir" && as_dir=.
11262     for ac_exec_ext in '' $ac_executable_extensions; do
11263   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11264     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11265     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11266     break 2
11267   fi
11268 done
11269   done
11270 IFS=$as_save_IFS
11271 
11272   ;;
11273 esac
11274 fi
11275 XARGS=$ac_cv_path_XARGS
11276 if test -n "$XARGS"; then
11277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11278 $as_echo "$XARGS" >&6; }
11279 else
11280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11281 $as_echo "no" >&6; }
11282 fi
11283 
11284 
11285         if test "x$XARGS" = x; then
11286           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11287         fi
11288       else
11289         # Otherwise we believe it is a complete path. Use it as it is.
11290         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11291 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11292         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11293 $as_echo_n "checking for XARGS... " >&6; }
11294         if test ! -x "$tool_specified"; then
11295           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11296 $as_echo "not found" >&6; }
11297           as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11298         fi
11299         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11300 $as_echo "$tool_specified" >&6; }
11301       fi
11302     fi
11303   fi
11304 
11305 
11306 
11307   if test "x$XARGS" = x; then
11308     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11309   fi
11310 
11311 
11312 
11313   # Then required tools that require some special treatment.
11314 
11315 
11316   # Publish this variable in the help.
11317 
11318 
11319   if test "x$AWK" = x; then
11320     # The variable is not set by user, try to locate tool using the code snippet
11321     for ac_prog in gawk mawk nawk awk
11322 do
11323   # Extract the first word of "$ac_prog", so it can be a program name with args.
11324 set dummy $ac_prog; ac_word=$2
11325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11326 $as_echo_n "checking for $ac_word... " >&6; }
11327 if ${ac_cv_prog_AWK+:} false; then :
11328   $as_echo_n "(cached) " >&6
11329 else
11330   if test -n "$AWK"; then
11331   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11332 else
11333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11334 for as_dir in $PATH
11335 do
11336   IFS=$as_save_IFS
11337   test -z "$as_dir" && as_dir=.
11338     for ac_exec_ext in '' $ac_executable_extensions; do
11339   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11340     ac_cv_prog_AWK="$ac_prog"
11341     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11342     break 2
11343   fi
11344 done
11345   done
11346 IFS=$as_save_IFS
11347 
11348 fi
11349 fi
11350 AWK=$ac_cv_prog_AWK
11351 if test -n "$AWK"; then
11352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11353 $as_echo "$AWK" >&6; }
11354 else
11355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11356 $as_echo "no" >&6; }
11357 fi
11358 
11359 
11360   test -n "$AWK" && break
11361 done
11362 
11363   else
11364     # The variable is set, but is it from the command line or the environment?
11365 
11366     # Try to remove the string !AWK! from our list.
11367     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11368     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11369       # If it failed, the variable was not from the command line. Ignore it,
11370       # but warn the user (except for BASH, which is always set by the calling BASH).
11371       if test "xAWK" != xBASH; then
11372         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11373 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11374       fi
11375       # Try to locate tool using the code snippet
11376       for ac_prog in gawk mawk nawk awk
11377 do
11378   # Extract the first word of "$ac_prog", so it can be a program name with args.
11379 set dummy $ac_prog; ac_word=$2
11380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11381 $as_echo_n "checking for $ac_word... " >&6; }
11382 if ${ac_cv_prog_AWK+:} false; then :
11383   $as_echo_n "(cached) " >&6
11384 else
11385   if test -n "$AWK"; then
11386   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11387 else
11388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11389 for as_dir in $PATH
11390 do
11391   IFS=$as_save_IFS
11392   test -z "$as_dir" && as_dir=.
11393     for ac_exec_ext in '' $ac_executable_extensions; do
11394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11395     ac_cv_prog_AWK="$ac_prog"
11396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11397     break 2
11398   fi
11399 done
11400   done
11401 IFS=$as_save_IFS
11402 
11403 fi
11404 fi
11405 AWK=$ac_cv_prog_AWK
11406 if test -n "$AWK"; then
11407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11408 $as_echo "$AWK" >&6; }
11409 else
11410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411 $as_echo "no" >&6; }
11412 fi
11413 
11414 
11415   test -n "$AWK" && break
11416 done
11417 
11418     else
11419       # If it succeeded, then it was overridden by the user. We will use it
11420       # for the tool.
11421 
11422       # First remove it from the list of overridden variables, so we can test
11423       # for unknown variables in the end.
11424       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11425 
11426       # Check if the provided tool contains a complete path.
11427       tool_specified="$AWK"
11428       tool_basename="${tool_specified##*/}"
11429       if test "x$tool_basename" = "x$tool_specified"; then
11430         # A command without a complete path is provided, search $PATH.
11431         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11432 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11433         # Extract the first word of "$tool_basename", so it can be a program name with args.
11434 set dummy $tool_basename; ac_word=$2
11435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11436 $as_echo_n "checking for $ac_word... " >&6; }
11437 if ${ac_cv_path_AWK+:} false; then :
11438   $as_echo_n "(cached) " >&6
11439 else
11440   case $AWK in
11441   [\\/]* | ?:[\\/]*)
11442   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11443   ;;
11444   *)
11445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11446 for as_dir in $PATH
11447 do
11448   IFS=$as_save_IFS
11449   test -z "$as_dir" && as_dir=.
11450     for ac_exec_ext in '' $ac_executable_extensions; do
11451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11452     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11454     break 2
11455   fi
11456 done
11457   done
11458 IFS=$as_save_IFS
11459 
11460   ;;
11461 esac
11462 fi
11463 AWK=$ac_cv_path_AWK
11464 if test -n "$AWK"; then
11465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11466 $as_echo "$AWK" >&6; }
11467 else
11468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469 $as_echo "no" >&6; }
11470 fi
11471 
11472 
11473         if test "x$AWK" = x; then
11474           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11475         fi
11476       else
11477         # Otherwise we believe it is a complete path. Use it as it is.
11478         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11479 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11480         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11481 $as_echo_n "checking for AWK... " >&6; }
11482         if test ! -x "$tool_specified"; then
11483           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11484 $as_echo "not found" >&6; }
11485           as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11486         fi
11487         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11488 $as_echo "$tool_specified" >&6; }
11489       fi
11490     fi
11491   fi
11492 
11493 
11494   if test "x$AWK" = x; then
11495     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11496   fi
11497 
11498 
11499 
11500 
11501   # Publish this variable in the help.
11502 
11503 
11504   if test "x$GREP" = x; then
11505     # The variable is not set by user, try to locate tool using the code snippet
11506     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11507 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11508 if ${ac_cv_path_GREP+:} false; then :
11509   $as_echo_n "(cached) " >&6
11510 else
11511   if test -z "$GREP"; then
11512   ac_path_GREP_found=false
11513   # Loop through the user's path and test for each of PROGNAME-LIST
11514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11515 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11516 do
11517   IFS=$as_save_IFS
11518   test -z "$as_dir" && as_dir=.
11519     for ac_prog in grep ggrep; do
11520     for ac_exec_ext in '' $ac_executable_extensions; do
11521       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11522       as_fn_executable_p "$ac_path_GREP" || continue
11523 # Check for GNU ac_path_GREP and select it if it is found.
11524   # Check for GNU $ac_path_GREP
11525 case `"$ac_path_GREP" --version 2>&1` in
11526 *GNU*)
11527   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11528 *)
11529   ac_count=0
11530   $as_echo_n 0123456789 >"conftest.in"
11531   while :
11532   do
11533     cat "conftest.in" "conftest.in" >"conftest.tmp"
11534     mv "conftest.tmp" "conftest.in"
11535     cp "conftest.in" "conftest.nl"
11536     $as_echo 'GREP' >> "conftest.nl"
11537     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11538     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11539     as_fn_arith $ac_count + 1 && ac_count=$as_val
11540     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11541       # Best one so far, save it but keep looking for a better one
11542       ac_cv_path_GREP="$ac_path_GREP"
11543       ac_path_GREP_max=$ac_count
11544     fi
11545     # 10*(2^10) chars as input seems more than enough
11546     test $ac_count -gt 10 && break
11547   done
11548   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11549 esac
11550 
11551       $ac_path_GREP_found && break 3
11552     done
11553   done
11554   done
11555 IFS=$as_save_IFS
11556   if test -z "$ac_cv_path_GREP"; then
11557     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11558   fi
11559 else
11560   ac_cv_path_GREP=$GREP
11561 fi
11562 
11563 fi
11564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11565 $as_echo "$ac_cv_path_GREP" >&6; }
11566  GREP="$ac_cv_path_GREP"
11567 
11568 
11569   else
11570     # The variable is set, but is it from the command line or the environment?
11571 
11572     # Try to remove the string !GREP! from our list.
11573     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11574     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11575       # If it failed, the variable was not from the command line. Ignore it,
11576       # but warn the user (except for BASH, which is always set by the calling BASH).
11577       if test "xGREP" != xBASH; then
11578         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11579 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11580       fi
11581       # Try to locate tool using the code snippet
11582       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11583 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11584 if ${ac_cv_path_GREP+:} false; then :
11585   $as_echo_n "(cached) " >&6
11586 else
11587   if test -z "$GREP"; then
11588   ac_path_GREP_found=false
11589   # Loop through the user's path and test for each of PROGNAME-LIST
11590   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11591 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11592 do
11593   IFS=$as_save_IFS
11594   test -z "$as_dir" && as_dir=.
11595     for ac_prog in grep ggrep; do
11596     for ac_exec_ext in '' $ac_executable_extensions; do
11597       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11598       as_fn_executable_p "$ac_path_GREP" || continue
11599 # Check for GNU ac_path_GREP and select it if it is found.
11600   # Check for GNU $ac_path_GREP
11601 case `"$ac_path_GREP" --version 2>&1` in
11602 *GNU*)
11603   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11604 *)
11605   ac_count=0
11606   $as_echo_n 0123456789 >"conftest.in"
11607   while :
11608   do
11609     cat "conftest.in" "conftest.in" >"conftest.tmp"
11610     mv "conftest.tmp" "conftest.in"
11611     cp "conftest.in" "conftest.nl"
11612     $as_echo 'GREP' >> "conftest.nl"
11613     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11614     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11615     as_fn_arith $ac_count + 1 && ac_count=$as_val
11616     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11617       # Best one so far, save it but keep looking for a better one
11618       ac_cv_path_GREP="$ac_path_GREP"
11619       ac_path_GREP_max=$ac_count
11620     fi
11621     # 10*(2^10) chars as input seems more than enough
11622     test $ac_count -gt 10 && break
11623   done
11624   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11625 esac
11626 
11627       $ac_path_GREP_found && break 3
11628     done
11629   done
11630   done
11631 IFS=$as_save_IFS
11632   if test -z "$ac_cv_path_GREP"; then
11633     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11634   fi
11635 else
11636   ac_cv_path_GREP=$GREP
11637 fi
11638 
11639 fi
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11641 $as_echo "$ac_cv_path_GREP" >&6; }
11642  GREP="$ac_cv_path_GREP"
11643 
11644 
11645     else
11646       # If it succeeded, then it was overridden by the user. We will use it
11647       # for the tool.
11648 
11649       # First remove it from the list of overridden variables, so we can test
11650       # for unknown variables in the end.
11651       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11652 
11653       # Check if the provided tool contains a complete path.
11654       tool_specified="$GREP"
11655       tool_basename="${tool_specified##*/}"
11656       if test "x$tool_basename" = "x$tool_specified"; then
11657         # A command without a complete path is provided, search $PATH.
11658         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11659 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11660         # Extract the first word of "$tool_basename", so it can be a program name with args.
11661 set dummy $tool_basename; ac_word=$2
11662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11663 $as_echo_n "checking for $ac_word... " >&6; }
11664 if ${ac_cv_path_GREP+:} false; then :
11665   $as_echo_n "(cached) " >&6
11666 else
11667   case $GREP in
11668   [\\/]* | ?:[\\/]*)
11669   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11670   ;;
11671   *)
11672   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11673 for as_dir in $PATH
11674 do
11675   IFS=$as_save_IFS
11676   test -z "$as_dir" && as_dir=.
11677     for ac_exec_ext in '' $ac_executable_extensions; do
11678   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11679     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11680     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11681     break 2
11682   fi
11683 done
11684   done
11685 IFS=$as_save_IFS
11686 
11687   ;;
11688 esac
11689 fi
11690 GREP=$ac_cv_path_GREP
11691 if test -n "$GREP"; then
11692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11693 $as_echo "$GREP" >&6; }
11694 else
11695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11696 $as_echo "no" >&6; }
11697 fi
11698 
11699 
11700         if test "x$GREP" = x; then
11701           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11702         fi
11703       else
11704         # Otherwise we believe it is a complete path. Use it as it is.
11705         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11706 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11707         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11708 $as_echo_n "checking for GREP... " >&6; }
11709         if test ! -x "$tool_specified"; then
11710           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11711 $as_echo "not found" >&6; }
11712           as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11713         fi
11714         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11715 $as_echo "$tool_specified" >&6; }
11716       fi
11717     fi
11718   fi
11719 
11720 
11721   if test "x$GREP" = x; then
11722     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11723   fi
11724 
11725 
11726 
11727 
11728   # Publish this variable in the help.
11729 
11730 
11731   if test "x$EGREP" = x; then
11732     # The variable is not set by user, try to locate tool using the code snippet
11733     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11734 $as_echo_n "checking for egrep... " >&6; }
11735 if ${ac_cv_path_EGREP+:} false; then :
11736   $as_echo_n "(cached) " >&6
11737 else
11738   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11739    then ac_cv_path_EGREP="$GREP -E"
11740    else
11741      if test -z "$EGREP"; then
11742   ac_path_EGREP_found=false
11743   # Loop through the user's path and test for each of PROGNAME-LIST
11744   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11745 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11746 do
11747   IFS=$as_save_IFS
11748   test -z "$as_dir" && as_dir=.
11749     for ac_prog in egrep; do
11750     for ac_exec_ext in '' $ac_executable_extensions; do
11751       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11752       as_fn_executable_p "$ac_path_EGREP" || continue
11753 # Check for GNU ac_path_EGREP and select it if it is found.
11754   # Check for GNU $ac_path_EGREP
11755 case `"$ac_path_EGREP" --version 2>&1` in
11756 *GNU*)
11757   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11758 *)
11759   ac_count=0
11760   $as_echo_n 0123456789 >"conftest.in"
11761   while :
11762   do
11763     cat "conftest.in" "conftest.in" >"conftest.tmp"
11764     mv "conftest.tmp" "conftest.in"
11765     cp "conftest.in" "conftest.nl"
11766     $as_echo 'EGREP' >> "conftest.nl"
11767     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11768     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11769     as_fn_arith $ac_count + 1 && ac_count=$as_val
11770     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11771       # Best one so far, save it but keep looking for a better one
11772       ac_cv_path_EGREP="$ac_path_EGREP"
11773       ac_path_EGREP_max=$ac_count
11774     fi
11775     # 10*(2^10) chars as input seems more than enough
11776     test $ac_count -gt 10 && break
11777   done
11778   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11779 esac
11780 
11781       $ac_path_EGREP_found && break 3
11782     done
11783   done
11784   done
11785 IFS=$as_save_IFS
11786   if test -z "$ac_cv_path_EGREP"; then
11787     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11788   fi
11789 else
11790   ac_cv_path_EGREP=$EGREP
11791 fi
11792 
11793    fi
11794 fi
11795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11796 $as_echo "$ac_cv_path_EGREP" >&6; }
11797  EGREP="$ac_cv_path_EGREP"
11798 
11799 
11800   else
11801     # The variable is set, but is it from the command line or the environment?
11802 
11803     # Try to remove the string !EGREP! from our list.
11804     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11805     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11806       # If it failed, the variable was not from the command line. Ignore it,
11807       # but warn the user (except for BASH, which is always set by the calling BASH).
11808       if test "xEGREP" != xBASH; then
11809         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11810 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11811       fi
11812       # Try to locate tool using the code snippet
11813       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11814 $as_echo_n "checking for egrep... " >&6; }
11815 if ${ac_cv_path_EGREP+:} false; then :
11816   $as_echo_n "(cached) " >&6
11817 else
11818   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11819    then ac_cv_path_EGREP="$GREP -E"
11820    else
11821      if test -z "$EGREP"; then
11822   ac_path_EGREP_found=false
11823   # Loop through the user's path and test for each of PROGNAME-LIST
11824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11825 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11826 do
11827   IFS=$as_save_IFS
11828   test -z "$as_dir" && as_dir=.
11829     for ac_prog in egrep; do
11830     for ac_exec_ext in '' $ac_executable_extensions; do
11831       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11832       as_fn_executable_p "$ac_path_EGREP" || continue
11833 # Check for GNU ac_path_EGREP and select it if it is found.
11834   # Check for GNU $ac_path_EGREP
11835 case `"$ac_path_EGREP" --version 2>&1` in
11836 *GNU*)
11837   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11838 *)
11839   ac_count=0
11840   $as_echo_n 0123456789 >"conftest.in"
11841   while :
11842   do
11843     cat "conftest.in" "conftest.in" >"conftest.tmp"
11844     mv "conftest.tmp" "conftest.in"
11845     cp "conftest.in" "conftest.nl"
11846     $as_echo 'EGREP' >> "conftest.nl"
11847     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11848     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11849     as_fn_arith $ac_count + 1 && ac_count=$as_val
11850     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11851       # Best one so far, save it but keep looking for a better one
11852       ac_cv_path_EGREP="$ac_path_EGREP"
11853       ac_path_EGREP_max=$ac_count
11854     fi
11855     # 10*(2^10) chars as input seems more than enough
11856     test $ac_count -gt 10 && break
11857   done
11858   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11859 esac
11860 
11861       $ac_path_EGREP_found && break 3
11862     done
11863   done
11864   done
11865 IFS=$as_save_IFS
11866   if test -z "$ac_cv_path_EGREP"; then
11867     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11868   fi
11869 else
11870   ac_cv_path_EGREP=$EGREP
11871 fi
11872 
11873    fi
11874 fi
11875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11876 $as_echo "$ac_cv_path_EGREP" >&6; }
11877  EGREP="$ac_cv_path_EGREP"
11878 
11879 
11880     else
11881       # If it succeeded, then it was overridden by the user. We will use it
11882       # for the tool.
11883 
11884       # First remove it from the list of overridden variables, so we can test
11885       # for unknown variables in the end.
11886       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11887 
11888       # Check if the provided tool contains a complete path.
11889       tool_specified="$EGREP"
11890       tool_basename="${tool_specified##*/}"
11891       if test "x$tool_basename" = "x$tool_specified"; then
11892         # A command without a complete path is provided, search $PATH.
11893         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11894 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11895         # Extract the first word of "$tool_basename", so it can be a program name with args.
11896 set dummy $tool_basename; ac_word=$2
11897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11898 $as_echo_n "checking for $ac_word... " >&6; }
11899 if ${ac_cv_path_EGREP+:} false; then :
11900   $as_echo_n "(cached) " >&6
11901 else
11902   case $EGREP in
11903   [\\/]* | ?:[\\/]*)
11904   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11905   ;;
11906   *)
11907   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11908 for as_dir in $PATH
11909 do
11910   IFS=$as_save_IFS
11911   test -z "$as_dir" && as_dir=.
11912     for ac_exec_ext in '' $ac_executable_extensions; do
11913   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11914     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11915     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11916     break 2
11917   fi
11918 done
11919   done
11920 IFS=$as_save_IFS
11921 
11922   ;;
11923 esac
11924 fi
11925 EGREP=$ac_cv_path_EGREP
11926 if test -n "$EGREP"; then
11927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11928 $as_echo "$EGREP" >&6; }
11929 else
11930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11931 $as_echo "no" >&6; }
11932 fi
11933 
11934 
11935         if test "x$EGREP" = x; then
11936           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11937         fi
11938       else
11939         # Otherwise we believe it is a complete path. Use it as it is.
11940         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11941 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11942         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11943 $as_echo_n "checking for EGREP... " >&6; }
11944         if test ! -x "$tool_specified"; then
11945           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11946 $as_echo "not found" >&6; }
11947           as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11948         fi
11949         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11950 $as_echo "$tool_specified" >&6; }
11951       fi
11952     fi
11953   fi
11954 
11955 
11956   if test "x$EGREP" = x; then
11957     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11958   fi
11959 
11960 
11961 
11962 
11963   # Publish this variable in the help.
11964 
11965 
11966   if test "x$FGREP" = x; then
11967     # The variable is not set by user, try to locate tool using the code snippet
11968     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11969 $as_echo_n "checking for fgrep... " >&6; }
11970 if ${ac_cv_path_FGREP+:} false; then :
11971   $as_echo_n "(cached) " >&6
11972 else
11973   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11974    then ac_cv_path_FGREP="$GREP -F"
11975    else
11976      if test -z "$FGREP"; then
11977   ac_path_FGREP_found=false
11978   # Loop through the user's path and test for each of PROGNAME-LIST
11979   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11980 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11981 do
11982   IFS=$as_save_IFS
11983   test -z "$as_dir" && as_dir=.
11984     for ac_prog in fgrep; do
11985     for ac_exec_ext in '' $ac_executable_extensions; do
11986       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
11987       as_fn_executable_p "$ac_path_FGREP" || continue
11988 # Check for GNU ac_path_FGREP and select it if it is found.
11989   # Check for GNU $ac_path_FGREP
11990 case `"$ac_path_FGREP" --version 2>&1` in
11991 *GNU*)
11992   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
11993 *)
11994   ac_count=0
11995   $as_echo_n 0123456789 >"conftest.in"
11996   while :
11997   do
11998     cat "conftest.in" "conftest.in" >"conftest.tmp"
11999     mv "conftest.tmp" "conftest.in"
12000     cp "conftest.in" "conftest.nl"
12001     $as_echo 'FGREP' >> "conftest.nl"
12002     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12003     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12004     as_fn_arith $ac_count + 1 && ac_count=$as_val
12005     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12006       # Best one so far, save it but keep looking for a better one
12007       ac_cv_path_FGREP="$ac_path_FGREP"
12008       ac_path_FGREP_max=$ac_count
12009     fi
12010     # 10*(2^10) chars as input seems more than enough
12011     test $ac_count -gt 10 && break
12012   done
12013   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12014 esac
12015 
12016       $ac_path_FGREP_found && break 3
12017     done
12018   done
12019   done
12020 IFS=$as_save_IFS
12021   if test -z "$ac_cv_path_FGREP"; then
12022     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12023   fi
12024 else
12025   ac_cv_path_FGREP=$FGREP
12026 fi
12027 
12028    fi
12029 fi
12030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12031 $as_echo "$ac_cv_path_FGREP" >&6; }
12032  FGREP="$ac_cv_path_FGREP"
12033 
12034 
12035   else
12036     # The variable is set, but is it from the command line or the environment?
12037 
12038     # Try to remove the string !FGREP! from our list.
12039     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12040     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12041       # If it failed, the variable was not from the command line. Ignore it,
12042       # but warn the user (except for BASH, which is always set by the calling BASH).
12043       if test "xFGREP" != xBASH; then
12044         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12045 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12046       fi
12047       # Try to locate tool using the code snippet
12048       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12049 $as_echo_n "checking for fgrep... " >&6; }
12050 if ${ac_cv_path_FGREP+:} false; then :
12051   $as_echo_n "(cached) " >&6
12052 else
12053   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12054    then ac_cv_path_FGREP="$GREP -F"
12055    else
12056      if test -z "$FGREP"; then
12057   ac_path_FGREP_found=false
12058   # Loop through the user's path and test for each of PROGNAME-LIST
12059   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12060 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12061 do
12062   IFS=$as_save_IFS
12063   test -z "$as_dir" && as_dir=.
12064     for ac_prog in fgrep; do
12065     for ac_exec_ext in '' $ac_executable_extensions; do
12066       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12067       as_fn_executable_p "$ac_path_FGREP" || continue
12068 # Check for GNU ac_path_FGREP and select it if it is found.
12069   # Check for GNU $ac_path_FGREP
12070 case `"$ac_path_FGREP" --version 2>&1` in
12071 *GNU*)
12072   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12073 *)
12074   ac_count=0
12075   $as_echo_n 0123456789 >"conftest.in"
12076   while :
12077   do
12078     cat "conftest.in" "conftest.in" >"conftest.tmp"
12079     mv "conftest.tmp" "conftest.in"
12080     cp "conftest.in" "conftest.nl"
12081     $as_echo 'FGREP' >> "conftest.nl"
12082     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12083     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12084     as_fn_arith $ac_count + 1 && ac_count=$as_val
12085     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12086       # Best one so far, save it but keep looking for a better one
12087       ac_cv_path_FGREP="$ac_path_FGREP"
12088       ac_path_FGREP_max=$ac_count
12089     fi
12090     # 10*(2^10) chars as input seems more than enough
12091     test $ac_count -gt 10 && break
12092   done
12093   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12094 esac
12095 
12096       $ac_path_FGREP_found && break 3
12097     done
12098   done
12099   done
12100 IFS=$as_save_IFS
12101   if test -z "$ac_cv_path_FGREP"; then
12102     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12103   fi
12104 else
12105   ac_cv_path_FGREP=$FGREP
12106 fi
12107 
12108    fi
12109 fi
12110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12111 $as_echo "$ac_cv_path_FGREP" >&6; }
12112  FGREP="$ac_cv_path_FGREP"
12113 
12114 
12115     else
12116       # If it succeeded, then it was overridden by the user. We will use it
12117       # for the tool.
12118 
12119       # First remove it from the list of overridden variables, so we can test
12120       # for unknown variables in the end.
12121       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12122 
12123       # Check if the provided tool contains a complete path.
12124       tool_specified="$FGREP"
12125       tool_basename="${tool_specified##*/}"
12126       if test "x$tool_basename" = "x$tool_specified"; then
12127         # A command without a complete path is provided, search $PATH.
12128         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12129 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12130         # Extract the first word of "$tool_basename", so it can be a program name with args.
12131 set dummy $tool_basename; ac_word=$2
12132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12133 $as_echo_n "checking for $ac_word... " >&6; }
12134 if ${ac_cv_path_FGREP+:} false; then :
12135   $as_echo_n "(cached) " >&6
12136 else
12137   case $FGREP in
12138   [\\/]* | ?:[\\/]*)
12139   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12140   ;;
12141   *)
12142   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12143 for as_dir in $PATH
12144 do
12145   IFS=$as_save_IFS
12146   test -z "$as_dir" && as_dir=.
12147     for ac_exec_ext in '' $ac_executable_extensions; do
12148   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12149     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12150     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12151     break 2
12152   fi
12153 done
12154   done
12155 IFS=$as_save_IFS
12156 
12157   ;;
12158 esac
12159 fi
12160 FGREP=$ac_cv_path_FGREP
12161 if test -n "$FGREP"; then
12162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12163 $as_echo "$FGREP" >&6; }
12164 else
12165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12166 $as_echo "no" >&6; }
12167 fi
12168 
12169 
12170         if test "x$FGREP" = x; then
12171           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12172         fi
12173       else
12174         # Otherwise we believe it is a complete path. Use it as it is.
12175         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12176 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12177         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12178 $as_echo_n "checking for FGREP... " >&6; }
12179         if test ! -x "$tool_specified"; then
12180           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12181 $as_echo "not found" >&6; }
12182           as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12183         fi
12184         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12185 $as_echo "$tool_specified" >&6; }
12186       fi
12187     fi
12188   fi
12189 
12190 
12191   if test "x$FGREP" = x; then
12192     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12193   fi
12194 
12195 
12196 
12197 
12198   # Publish this variable in the help.
12199 
12200 
12201   if test "x$SED" = x; then
12202     # The variable is not set by user, try to locate tool using the code snippet
12203     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12204 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12205 if ${ac_cv_path_SED+:} false; then :
12206   $as_echo_n "(cached) " >&6
12207 else
12208             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12209      for ac_i in 1 2 3 4 5 6 7; do
12210        ac_script="$ac_script$as_nl$ac_script"
12211      done
12212      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12213      { ac_script=; unset ac_script;}
12214      if test -z "$SED"; then
12215   ac_path_SED_found=false
12216   # Loop through the user's path and test for each of PROGNAME-LIST
12217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12218 for as_dir in $PATH
12219 do
12220   IFS=$as_save_IFS
12221   test -z "$as_dir" && as_dir=.
12222     for ac_prog in sed gsed; do
12223     for ac_exec_ext in '' $ac_executable_extensions; do
12224       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12225       as_fn_executable_p "$ac_path_SED" || continue
12226 # Check for GNU ac_path_SED and select it if it is found.
12227   # Check for GNU $ac_path_SED
12228 case `"$ac_path_SED" --version 2>&1` in
12229 *GNU*)
12230   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12231 *)
12232   ac_count=0
12233   $as_echo_n 0123456789 >"conftest.in"
12234   while :
12235   do
12236     cat "conftest.in" "conftest.in" >"conftest.tmp"
12237     mv "conftest.tmp" "conftest.in"
12238     cp "conftest.in" "conftest.nl"
12239     $as_echo '' >> "conftest.nl"
12240     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12241     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12242     as_fn_arith $ac_count + 1 && ac_count=$as_val
12243     if test $ac_count -gt ${ac_path_SED_max-0}; then
12244       # Best one so far, save it but keep looking for a better one
12245       ac_cv_path_SED="$ac_path_SED"
12246       ac_path_SED_max=$ac_count
12247     fi
12248     # 10*(2^10) chars as input seems more than enough
12249     test $ac_count -gt 10 && break
12250   done
12251   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12252 esac
12253 
12254       $ac_path_SED_found && break 3
12255     done
12256   done
12257   done
12258 IFS=$as_save_IFS
12259   if test -z "$ac_cv_path_SED"; then
12260     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12261   fi
12262 else
12263   ac_cv_path_SED=$SED
12264 fi
12265 
12266 fi
12267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12268 $as_echo "$ac_cv_path_SED" >&6; }
12269  SED="$ac_cv_path_SED"
12270   rm -f conftest.sed
12271 
12272   else
12273     # The variable is set, but is it from the command line or the environment?
12274 
12275     # Try to remove the string !SED! from our list.
12276     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12277     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12278       # If it failed, the variable was not from the command line. Ignore it,
12279       # but warn the user (except for BASH, which is always set by the calling BASH).
12280       if test "xSED" != xBASH; then
12281         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12282 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12283       fi
12284       # Try to locate tool using the code snippet
12285       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12286 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12287 if ${ac_cv_path_SED+:} false; then :
12288   $as_echo_n "(cached) " >&6
12289 else
12290             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12291      for ac_i in 1 2 3 4 5 6 7; do
12292        ac_script="$ac_script$as_nl$ac_script"
12293      done
12294      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12295      { ac_script=; unset ac_script;}
12296      if test -z "$SED"; then
12297   ac_path_SED_found=false
12298   # Loop through the user's path and test for each of PROGNAME-LIST
12299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12300 for as_dir in $PATH
12301 do
12302   IFS=$as_save_IFS
12303   test -z "$as_dir" && as_dir=.
12304     for ac_prog in sed gsed; do
12305     for ac_exec_ext in '' $ac_executable_extensions; do
12306       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12307       as_fn_executable_p "$ac_path_SED" || continue
12308 # Check for GNU ac_path_SED and select it if it is found.
12309   # Check for GNU $ac_path_SED
12310 case `"$ac_path_SED" --version 2>&1` in
12311 *GNU*)
12312   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12313 *)
12314   ac_count=0
12315   $as_echo_n 0123456789 >"conftest.in"
12316   while :
12317   do
12318     cat "conftest.in" "conftest.in" >"conftest.tmp"
12319     mv "conftest.tmp" "conftest.in"
12320     cp "conftest.in" "conftest.nl"
12321     $as_echo '' >> "conftest.nl"
12322     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12323     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12324     as_fn_arith $ac_count + 1 && ac_count=$as_val
12325     if test $ac_count -gt ${ac_path_SED_max-0}; then
12326       # Best one so far, save it but keep looking for a better one
12327       ac_cv_path_SED="$ac_path_SED"
12328       ac_path_SED_max=$ac_count
12329     fi
12330     # 10*(2^10) chars as input seems more than enough
12331     test $ac_count -gt 10 && break
12332   done
12333   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12334 esac
12335 
12336       $ac_path_SED_found && break 3
12337     done
12338   done
12339   done
12340 IFS=$as_save_IFS
12341   if test -z "$ac_cv_path_SED"; then
12342     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12343   fi
12344 else
12345   ac_cv_path_SED=$SED
12346 fi
12347 
12348 fi
12349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12350 $as_echo "$ac_cv_path_SED" >&6; }
12351  SED="$ac_cv_path_SED"
12352   rm -f conftest.sed
12353 
12354     else
12355       # If it succeeded, then it was overridden by the user. We will use it
12356       # for the tool.
12357 
12358       # First remove it from the list of overridden variables, so we can test
12359       # for unknown variables in the end.
12360       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12361 
12362       # Check if the provided tool contains a complete path.
12363       tool_specified="$SED"
12364       tool_basename="${tool_specified##*/}"
12365       if test "x$tool_basename" = "x$tool_specified"; then
12366         # A command without a complete path is provided, search $PATH.
12367         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12368 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12369         # Extract the first word of "$tool_basename", so it can be a program name with args.
12370 set dummy $tool_basename; ac_word=$2
12371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12372 $as_echo_n "checking for $ac_word... " >&6; }
12373 if ${ac_cv_path_SED+:} false; then :
12374   $as_echo_n "(cached) " >&6
12375 else
12376   case $SED in
12377   [\\/]* | ?:[\\/]*)
12378   ac_cv_path_SED="$SED" # Let the user override the test with a path.
12379   ;;
12380   *)
12381   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12382 for as_dir in $PATH
12383 do
12384   IFS=$as_save_IFS
12385   test -z "$as_dir" && as_dir=.
12386     for ac_exec_ext in '' $ac_executable_extensions; do
12387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12388     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12390     break 2
12391   fi
12392 done
12393   done
12394 IFS=$as_save_IFS
12395 
12396   ;;
12397 esac
12398 fi
12399 SED=$ac_cv_path_SED
12400 if test -n "$SED"; then
12401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12402 $as_echo "$SED" >&6; }
12403 else
12404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12405 $as_echo "no" >&6; }
12406 fi
12407 
12408 
12409         if test "x$SED" = x; then
12410           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12411         fi
12412       else
12413         # Otherwise we believe it is a complete path. Use it as it is.
12414         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12415 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12416         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12417 $as_echo_n "checking for SED... " >&6; }
12418         if test ! -x "$tool_specified"; then
12419           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12420 $as_echo "not found" >&6; }
12421           as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12422         fi
12423         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12424 $as_echo "$tool_specified" >&6; }
12425       fi
12426     fi
12427   fi
12428 
12429 
12430   if test "x$SED" = x; then
12431     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12432   fi
12433 
12434 
12435 
12436   # Always force rm.
12437   RM="$RM -f"
12438 
12439   # pwd behaves differently on various platforms and some don't support the -L flag.
12440   # Always use the bash builtin pwd to get uniform behavior.
12441   THEPWDCMD=pwd
12442 
12443   # These are not required on all platforms
12444 
12445 
12446   # Publish this variable in the help.
12447 
12448 
12449   if test "x$CYGPATH" = x; then
12450     # The variable is not set by user, try to locate tool using the code snippet
12451     for ac_prog in cygpath
12452 do
12453   # Extract the first word of "$ac_prog", so it can be a program name with args.
12454 set dummy $ac_prog; ac_word=$2
12455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12456 $as_echo_n "checking for $ac_word... " >&6; }
12457 if ${ac_cv_path_CYGPATH+:} false; then :
12458   $as_echo_n "(cached) " >&6
12459 else
12460   case $CYGPATH in
12461   [\\/]* | ?:[\\/]*)
12462   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12463   ;;
12464   *)
12465   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12466 for as_dir in $PATH
12467 do
12468   IFS=$as_save_IFS
12469   test -z "$as_dir" && as_dir=.
12470     for ac_exec_ext in '' $ac_executable_extensions; do
12471   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12472     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12473     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12474     break 2
12475   fi
12476 done
12477   done
12478 IFS=$as_save_IFS
12479 
12480   ;;
12481 esac
12482 fi
12483 CYGPATH=$ac_cv_path_CYGPATH
12484 if test -n "$CYGPATH"; then
12485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12486 $as_echo "$CYGPATH" >&6; }
12487 else
12488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12489 $as_echo "no" >&6; }
12490 fi
12491 
12492 
12493   test -n "$CYGPATH" && break
12494 done
12495 
12496   else
12497     # The variable is set, but is it from the command line or the environment?
12498 
12499     # Try to remove the string !CYGPATH! from our list.
12500     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12501     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12502       # If it failed, the variable was not from the command line. Ignore it,
12503       # but warn the user (except for BASH, which is always set by the calling BASH).
12504       if test "xCYGPATH" != xBASH; then
12505         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12506 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12507       fi
12508       # Try to locate tool using the code snippet
12509       for ac_prog in cygpath
12510 do
12511   # Extract the first word of "$ac_prog", so it can be a program name with args.
12512 set dummy $ac_prog; ac_word=$2
12513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12514 $as_echo_n "checking for $ac_word... " >&6; }
12515 if ${ac_cv_path_CYGPATH+:} false; then :
12516   $as_echo_n "(cached) " >&6
12517 else
12518   case $CYGPATH in
12519   [\\/]* | ?:[\\/]*)
12520   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12521   ;;
12522   *)
12523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12524 for as_dir in $PATH
12525 do
12526   IFS=$as_save_IFS
12527   test -z "$as_dir" && as_dir=.
12528     for ac_exec_ext in '' $ac_executable_extensions; do
12529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12530     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12532     break 2
12533   fi
12534 done
12535   done
12536 IFS=$as_save_IFS
12537 
12538   ;;
12539 esac
12540 fi
12541 CYGPATH=$ac_cv_path_CYGPATH
12542 if test -n "$CYGPATH"; then
12543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12544 $as_echo "$CYGPATH" >&6; }
12545 else
12546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12547 $as_echo "no" >&6; }
12548 fi
12549 
12550 
12551   test -n "$CYGPATH" && break
12552 done
12553 
12554     else
12555       # If it succeeded, then it was overridden by the user. We will use it
12556       # for the tool.
12557 
12558       # First remove it from the list of overridden variables, so we can test
12559       # for unknown variables in the end.
12560       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12561 
12562       # Check if the provided tool contains a complete path.
12563       tool_specified="$CYGPATH"
12564       tool_basename="${tool_specified##*/}"
12565       if test "x$tool_basename" = "x$tool_specified"; then
12566         # A command without a complete path is provided, search $PATH.
12567         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12568 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12569         # Extract the first word of "$tool_basename", so it can be a program name with args.
12570 set dummy $tool_basename; ac_word=$2
12571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12572 $as_echo_n "checking for $ac_word... " >&6; }
12573 if ${ac_cv_path_CYGPATH+:} false; then :
12574   $as_echo_n "(cached) " >&6
12575 else
12576   case $CYGPATH in
12577   [\\/]* | ?:[\\/]*)
12578   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12579   ;;
12580   *)
12581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12582 for as_dir in $PATH
12583 do
12584   IFS=$as_save_IFS
12585   test -z "$as_dir" && as_dir=.
12586     for ac_exec_ext in '' $ac_executable_extensions; do
12587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12588     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12590     break 2
12591   fi
12592 done
12593   done
12594 IFS=$as_save_IFS
12595 
12596   ;;
12597 esac
12598 fi
12599 CYGPATH=$ac_cv_path_CYGPATH
12600 if test -n "$CYGPATH"; then
12601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12602 $as_echo "$CYGPATH" >&6; }
12603 else
12604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12605 $as_echo "no" >&6; }
12606 fi
12607 
12608 
12609         if test "x$CYGPATH" = x; then
12610           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12611         fi
12612       else
12613         # Otherwise we believe it is a complete path. Use it as it is.
12614         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12615 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12616         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12617 $as_echo_n "checking for CYGPATH... " >&6; }
12618         if test ! -x "$tool_specified"; then
12619           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12620 $as_echo "not found" >&6; }
12621           as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12622         fi
12623         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12624 $as_echo "$tool_specified" >&6; }
12625       fi
12626     fi
12627   fi
12628 
12629 
12630 
12631 
12632   # Publish this variable in the help.
12633 
12634 
12635   if test "x$READLINK" = x; then
12636     # The variable is not set by user, try to locate tool using the code snippet
12637     for ac_prog in greadlink readlink
12638 do
12639   # Extract the first word of "$ac_prog", so it can be a program name with args.
12640 set dummy $ac_prog; ac_word=$2
12641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12642 $as_echo_n "checking for $ac_word... " >&6; }
12643 if ${ac_cv_path_READLINK+:} false; then :
12644   $as_echo_n "(cached) " >&6
12645 else
12646   case $READLINK in
12647   [\\/]* | ?:[\\/]*)
12648   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12649   ;;
12650   *)
12651   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12652 for as_dir in $PATH
12653 do
12654   IFS=$as_save_IFS
12655   test -z "$as_dir" && as_dir=.
12656     for ac_exec_ext in '' $ac_executable_extensions; do
12657   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12658     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12659     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12660     break 2
12661   fi
12662 done
12663   done
12664 IFS=$as_save_IFS
12665 
12666   ;;
12667 esac
12668 fi
12669 READLINK=$ac_cv_path_READLINK
12670 if test -n "$READLINK"; then
12671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12672 $as_echo "$READLINK" >&6; }
12673 else
12674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12675 $as_echo "no" >&6; }
12676 fi
12677 
12678 
12679   test -n "$READLINK" && break
12680 done
12681 
12682   else
12683     # The variable is set, but is it from the command line or the environment?
12684 
12685     # Try to remove the string !READLINK! from our list.
12686     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12687     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12688       # If it failed, the variable was not from the command line. Ignore it,
12689       # but warn the user (except for BASH, which is always set by the calling BASH).
12690       if test "xREADLINK" != xBASH; then
12691         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12692 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12693       fi
12694       # Try to locate tool using the code snippet
12695       for ac_prog in greadlink readlink
12696 do
12697   # Extract the first word of "$ac_prog", so it can be a program name with args.
12698 set dummy $ac_prog; ac_word=$2
12699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12700 $as_echo_n "checking for $ac_word... " >&6; }
12701 if ${ac_cv_path_READLINK+:} false; then :
12702   $as_echo_n "(cached) " >&6
12703 else
12704   case $READLINK in
12705   [\\/]* | ?:[\\/]*)
12706   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12707   ;;
12708   *)
12709   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12710 for as_dir in $PATH
12711 do
12712   IFS=$as_save_IFS
12713   test -z "$as_dir" && as_dir=.
12714     for ac_exec_ext in '' $ac_executable_extensions; do
12715   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12716     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12717     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12718     break 2
12719   fi
12720 done
12721   done
12722 IFS=$as_save_IFS
12723 
12724   ;;
12725 esac
12726 fi
12727 READLINK=$ac_cv_path_READLINK
12728 if test -n "$READLINK"; then
12729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12730 $as_echo "$READLINK" >&6; }
12731 else
12732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12733 $as_echo "no" >&6; }
12734 fi
12735 
12736 
12737   test -n "$READLINK" && break
12738 done
12739 
12740     else
12741       # If it succeeded, then it was overridden by the user. We will use it
12742       # for the tool.
12743 
12744       # First remove it from the list of overridden variables, so we can test
12745       # for unknown variables in the end.
12746       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12747 
12748       # Check if the provided tool contains a complete path.
12749       tool_specified="$READLINK"
12750       tool_basename="${tool_specified##*/}"
12751       if test "x$tool_basename" = "x$tool_specified"; then
12752         # A command without a complete path is provided, search $PATH.
12753         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12754 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12755         # Extract the first word of "$tool_basename", so it can be a program name with args.
12756 set dummy $tool_basename; ac_word=$2
12757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12758 $as_echo_n "checking for $ac_word... " >&6; }
12759 if ${ac_cv_path_READLINK+:} false; then :
12760   $as_echo_n "(cached) " >&6
12761 else
12762   case $READLINK in
12763   [\\/]* | ?:[\\/]*)
12764   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12765   ;;
12766   *)
12767   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12768 for as_dir in $PATH
12769 do
12770   IFS=$as_save_IFS
12771   test -z "$as_dir" && as_dir=.
12772     for ac_exec_ext in '' $ac_executable_extensions; do
12773   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12774     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12775     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12776     break 2
12777   fi
12778 done
12779   done
12780 IFS=$as_save_IFS
12781 
12782   ;;
12783 esac
12784 fi
12785 READLINK=$ac_cv_path_READLINK
12786 if test -n "$READLINK"; then
12787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12788 $as_echo "$READLINK" >&6; }
12789 else
12790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12791 $as_echo "no" >&6; }
12792 fi
12793 
12794 
12795         if test "x$READLINK" = x; then
12796           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12797         fi
12798       else
12799         # Otherwise we believe it is a complete path. Use it as it is.
12800         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12801 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12802         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12803 $as_echo_n "checking for READLINK... " >&6; }
12804         if test ! -x "$tool_specified"; then
12805           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12806 $as_echo "not found" >&6; }
12807           as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12808         fi
12809         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12810 $as_echo "$tool_specified" >&6; }
12811       fi
12812     fi
12813   fi
12814 
12815 
12816 
12817 
12818   # Publish this variable in the help.
12819 
12820 
12821   if test "x$DF" = x; then
12822     # The variable is not set by user, try to locate tool using the code snippet
12823     for ac_prog in df
12824 do
12825   # Extract the first word of "$ac_prog", so it can be a program name with args.
12826 set dummy $ac_prog; ac_word=$2
12827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12828 $as_echo_n "checking for $ac_word... " >&6; }
12829 if ${ac_cv_path_DF+:} false; then :
12830   $as_echo_n "(cached) " >&6
12831 else
12832   case $DF in
12833   [\\/]* | ?:[\\/]*)
12834   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12835   ;;
12836   *)
12837   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12838 for as_dir in $PATH
12839 do
12840   IFS=$as_save_IFS
12841   test -z "$as_dir" && as_dir=.
12842     for ac_exec_ext in '' $ac_executable_extensions; do
12843   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12844     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12846     break 2
12847   fi
12848 done
12849   done
12850 IFS=$as_save_IFS
12851 
12852   ;;
12853 esac
12854 fi
12855 DF=$ac_cv_path_DF
12856 if test -n "$DF"; then
12857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12858 $as_echo "$DF" >&6; }
12859 else
12860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12861 $as_echo "no" >&6; }
12862 fi
12863 
12864 
12865   test -n "$DF" && break
12866 done
12867 
12868   else
12869     # The variable is set, but is it from the command line or the environment?
12870 
12871     # Try to remove the string !DF! from our list.
12872     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12873     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12874       # If it failed, the variable was not from the command line. Ignore it,
12875       # but warn the user (except for BASH, which is always set by the calling BASH).
12876       if test "xDF" != xBASH; then
12877         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12878 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12879       fi
12880       # Try to locate tool using the code snippet
12881       for ac_prog in df
12882 do
12883   # Extract the first word of "$ac_prog", so it can be a program name with args.
12884 set dummy $ac_prog; ac_word=$2
12885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12886 $as_echo_n "checking for $ac_word... " >&6; }
12887 if ${ac_cv_path_DF+:} false; then :
12888   $as_echo_n "(cached) " >&6
12889 else
12890   case $DF in
12891   [\\/]* | ?:[\\/]*)
12892   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12893   ;;
12894   *)
12895   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12896 for as_dir in $PATH
12897 do
12898   IFS=$as_save_IFS
12899   test -z "$as_dir" && as_dir=.
12900     for ac_exec_ext in '' $ac_executable_extensions; do
12901   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12902     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12903     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12904     break 2
12905   fi
12906 done
12907   done
12908 IFS=$as_save_IFS
12909 
12910   ;;
12911 esac
12912 fi
12913 DF=$ac_cv_path_DF
12914 if test -n "$DF"; then
12915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12916 $as_echo "$DF" >&6; }
12917 else
12918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12919 $as_echo "no" >&6; }
12920 fi
12921 
12922 
12923   test -n "$DF" && break
12924 done
12925 
12926     else
12927       # If it succeeded, then it was overridden by the user. We will use it
12928       # for the tool.
12929 
12930       # First remove it from the list of overridden variables, so we can test
12931       # for unknown variables in the end.
12932       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12933 
12934       # Check if the provided tool contains a complete path.
12935       tool_specified="$DF"
12936       tool_basename="${tool_specified##*/}"
12937       if test "x$tool_basename" = "x$tool_specified"; then
12938         # A command without a complete path is provided, search $PATH.
12939         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12940 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12941         # Extract the first word of "$tool_basename", so it can be a program name with args.
12942 set dummy $tool_basename; ac_word=$2
12943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12944 $as_echo_n "checking for $ac_word... " >&6; }
12945 if ${ac_cv_path_DF+:} false; then :
12946   $as_echo_n "(cached) " >&6
12947 else
12948   case $DF in
12949   [\\/]* | ?:[\\/]*)
12950   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12951   ;;
12952   *)
12953   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12954 for as_dir in $PATH
12955 do
12956   IFS=$as_save_IFS
12957   test -z "$as_dir" && as_dir=.
12958     for ac_exec_ext in '' $ac_executable_extensions; do
12959   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12960     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12961     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12962     break 2
12963   fi
12964 done
12965   done
12966 IFS=$as_save_IFS
12967 
12968   ;;
12969 esac
12970 fi
12971 DF=$ac_cv_path_DF
12972 if test -n "$DF"; then
12973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12974 $as_echo "$DF" >&6; }
12975 else
12976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12977 $as_echo "no" >&6; }
12978 fi
12979 
12980 
12981         if test "x$DF" = x; then
12982           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12983         fi
12984       else
12985         # Otherwise we believe it is a complete path. Use it as it is.
12986         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
12987 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
12988         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
12989 $as_echo_n "checking for DF... " >&6; }
12990         if test ! -x "$tool_specified"; then
12991           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12992 $as_echo "not found" >&6; }
12993           as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
12994         fi
12995         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12996 $as_echo "$tool_specified" >&6; }
12997       fi
12998     fi
12999   fi
13000 
13001 
13002 
13003 
13004   # Publish this variable in the help.
13005 
13006 
13007   if test "x$SETFILE" = x; then
13008     # The variable is not set by user, try to locate tool using the code snippet
13009     for ac_prog in SetFile
13010 do
13011   # Extract the first word of "$ac_prog", so it can be a program name with args.
13012 set dummy $ac_prog; ac_word=$2
13013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13014 $as_echo_n "checking for $ac_word... " >&6; }
13015 if ${ac_cv_path_SETFILE+:} false; then :
13016   $as_echo_n "(cached) " >&6
13017 else
13018   case $SETFILE in
13019   [\\/]* | ?:[\\/]*)
13020   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13021   ;;
13022   *)
13023   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13024 for as_dir in $PATH
13025 do
13026   IFS=$as_save_IFS
13027   test -z "$as_dir" && as_dir=.
13028     for ac_exec_ext in '' $ac_executable_extensions; do
13029   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13030     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13032     break 2
13033   fi
13034 done
13035   done
13036 IFS=$as_save_IFS
13037 
13038   ;;
13039 esac
13040 fi
13041 SETFILE=$ac_cv_path_SETFILE
13042 if test -n "$SETFILE"; then
13043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13044 $as_echo "$SETFILE" >&6; }
13045 else
13046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13047 $as_echo "no" >&6; }
13048 fi
13049 
13050 
13051   test -n "$SETFILE" && break
13052 done
13053 
13054   else
13055     # The variable is set, but is it from the command line or the environment?
13056 
13057     # Try to remove the string !SETFILE! from our list.
13058     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13059     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13060       # If it failed, the variable was not from the command line. Ignore it,
13061       # but warn the user (except for BASH, which is always set by the calling BASH).
13062       if test "xSETFILE" != xBASH; then
13063         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13064 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13065       fi
13066       # Try to locate tool using the code snippet
13067       for ac_prog in SetFile
13068 do
13069   # Extract the first word of "$ac_prog", so it can be a program name with args.
13070 set dummy $ac_prog; ac_word=$2
13071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13072 $as_echo_n "checking for $ac_word... " >&6; }
13073 if ${ac_cv_path_SETFILE+:} false; then :
13074   $as_echo_n "(cached) " >&6
13075 else
13076   case $SETFILE in
13077   [\\/]* | ?:[\\/]*)
13078   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13079   ;;
13080   *)
13081   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13082 for as_dir in $PATH
13083 do
13084   IFS=$as_save_IFS
13085   test -z "$as_dir" && as_dir=.
13086     for ac_exec_ext in '' $ac_executable_extensions; do
13087   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13088     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13090     break 2
13091   fi
13092 done
13093   done
13094 IFS=$as_save_IFS
13095 
13096   ;;
13097 esac
13098 fi
13099 SETFILE=$ac_cv_path_SETFILE
13100 if test -n "$SETFILE"; then
13101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13102 $as_echo "$SETFILE" >&6; }
13103 else
13104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13105 $as_echo "no" >&6; }
13106 fi
13107 
13108 
13109   test -n "$SETFILE" && break
13110 done
13111 
13112     else
13113       # If it succeeded, then it was overridden by the user. We will use it
13114       # for the tool.
13115 
13116       # First remove it from the list of overridden variables, so we can test
13117       # for unknown variables in the end.
13118       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13119 
13120       # Check if the provided tool contains a complete path.
13121       tool_specified="$SETFILE"
13122       tool_basename="${tool_specified##*/}"
13123       if test "x$tool_basename" = "x$tool_specified"; then
13124         # A command without a complete path is provided, search $PATH.
13125         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13126 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13127         # Extract the first word of "$tool_basename", so it can be a program name with args.
13128 set dummy $tool_basename; ac_word=$2
13129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13130 $as_echo_n "checking for $ac_word... " >&6; }
13131 if ${ac_cv_path_SETFILE+:} false; then :
13132   $as_echo_n "(cached) " >&6
13133 else
13134   case $SETFILE in
13135   [\\/]* | ?:[\\/]*)
13136   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13137   ;;
13138   *)
13139   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13140 for as_dir in $PATH
13141 do
13142   IFS=$as_save_IFS
13143   test -z "$as_dir" && as_dir=.
13144     for ac_exec_ext in '' $ac_executable_extensions; do
13145   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13146     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13147     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13148     break 2
13149   fi
13150 done
13151   done
13152 IFS=$as_save_IFS
13153 
13154   ;;
13155 esac
13156 fi
13157 SETFILE=$ac_cv_path_SETFILE
13158 if test -n "$SETFILE"; then
13159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13160 $as_echo "$SETFILE" >&6; }
13161 else
13162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13163 $as_echo "no" >&6; }
13164 fi
13165 
13166 
13167         if test "x$SETFILE" = x; then
13168           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13169         fi
13170       else
13171         # Otherwise we believe it is a complete path. Use it as it is.
13172         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13173 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13174         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13175 $as_echo_n "checking for SETFILE... " >&6; }
13176         if test ! -x "$tool_specified"; then
13177           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13178 $as_echo "not found" >&6; }
13179           as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13180         fi
13181         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13182 $as_echo "$tool_specified" >&6; }
13183       fi
13184     fi
13185   fi
13186 
13187 
13188 
13189 
13190   # Publish this variable in the help.
13191 
13192 
13193   if test "x$CPIO" = x; then
13194     # The variable is not set by user, try to locate tool using the code snippet
13195     for ac_prog in cpio bsdcpio
13196 do
13197   # Extract the first word of "$ac_prog", so it can be a program name with args.
13198 set dummy $ac_prog; ac_word=$2
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13200 $as_echo_n "checking for $ac_word... " >&6; }
13201 if ${ac_cv_path_CPIO+:} false; then :
13202   $as_echo_n "(cached) " >&6
13203 else
13204   case $CPIO in
13205   [\\/]* | ?:[\\/]*)
13206   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13207   ;;
13208   *)
13209   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13210 for as_dir in $PATH
13211 do
13212   IFS=$as_save_IFS
13213   test -z "$as_dir" && as_dir=.
13214     for ac_exec_ext in '' $ac_executable_extensions; do
13215   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13216     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13218     break 2
13219   fi
13220 done
13221   done
13222 IFS=$as_save_IFS
13223 
13224   ;;
13225 esac
13226 fi
13227 CPIO=$ac_cv_path_CPIO
13228 if test -n "$CPIO"; then
13229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13230 $as_echo "$CPIO" >&6; }
13231 else
13232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13233 $as_echo "no" >&6; }
13234 fi
13235 
13236 
13237   test -n "$CPIO" && break
13238 done
13239 
13240   else
13241     # The variable is set, but is it from the command line or the environment?
13242 
13243     # Try to remove the string !CPIO! from our list.
13244     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13245     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13246       # If it failed, the variable was not from the command line. Ignore it,
13247       # but warn the user (except for BASH, which is always set by the calling BASH).
13248       if test "xCPIO" != xBASH; then
13249         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13250 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13251       fi
13252       # Try to locate tool using the code snippet
13253       for ac_prog in cpio bsdcpio
13254 do
13255   # Extract the first word of "$ac_prog", so it can be a program name with args.
13256 set dummy $ac_prog; ac_word=$2
13257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13258 $as_echo_n "checking for $ac_word... " >&6; }
13259 if ${ac_cv_path_CPIO+:} false; then :
13260   $as_echo_n "(cached) " >&6
13261 else
13262   case $CPIO in
13263   [\\/]* | ?:[\\/]*)
13264   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13265   ;;
13266   *)
13267   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13268 for as_dir in $PATH
13269 do
13270   IFS=$as_save_IFS
13271   test -z "$as_dir" && as_dir=.
13272     for ac_exec_ext in '' $ac_executable_extensions; do
13273   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13274     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13275     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13276     break 2
13277   fi
13278 done
13279   done
13280 IFS=$as_save_IFS
13281 
13282   ;;
13283 esac
13284 fi
13285 CPIO=$ac_cv_path_CPIO
13286 if test -n "$CPIO"; then
13287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13288 $as_echo "$CPIO" >&6; }
13289 else
13290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13291 $as_echo "no" >&6; }
13292 fi
13293 
13294 
13295   test -n "$CPIO" && break
13296 done
13297 
13298     else
13299       # If it succeeded, then it was overridden by the user. We will use it
13300       # for the tool.
13301 
13302       # First remove it from the list of overridden variables, so we can test
13303       # for unknown variables in the end.
13304       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13305 
13306       # Check if the provided tool contains a complete path.
13307       tool_specified="$CPIO"
13308       tool_basename="${tool_specified##*/}"
13309       if test "x$tool_basename" = "x$tool_specified"; then
13310         # A command without a complete path is provided, search $PATH.
13311         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13312 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13313         # Extract the first word of "$tool_basename", so it can be a program name with args.
13314 set dummy $tool_basename; ac_word=$2
13315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13316 $as_echo_n "checking for $ac_word... " >&6; }
13317 if ${ac_cv_path_CPIO+:} false; then :
13318   $as_echo_n "(cached) " >&6
13319 else
13320   case $CPIO in
13321   [\\/]* | ?:[\\/]*)
13322   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13323   ;;
13324   *)
13325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13326 for as_dir in $PATH
13327 do
13328   IFS=$as_save_IFS
13329   test -z "$as_dir" && as_dir=.
13330     for ac_exec_ext in '' $ac_executable_extensions; do
13331   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13332     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13334     break 2
13335   fi
13336 done
13337   done
13338 IFS=$as_save_IFS
13339 
13340   ;;
13341 esac
13342 fi
13343 CPIO=$ac_cv_path_CPIO
13344 if test -n "$CPIO"; then
13345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13346 $as_echo "$CPIO" >&6; }
13347 else
13348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13349 $as_echo "no" >&6; }
13350 fi
13351 
13352 
13353         if test "x$CPIO" = x; then
13354           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13355         fi
13356       else
13357         # Otherwise we believe it is a complete path. Use it as it is.
13358         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13359 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13360         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13361 $as_echo_n "checking for CPIO... " >&6; }
13362         if test ! -x "$tool_specified"; then
13363           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13364 $as_echo "not found" >&6; }
13365           as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13366         fi
13367         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13368 $as_echo "$tool_specified" >&6; }
13369       fi
13370     fi
13371   fi
13372 
13373 
13374 
13375 
13376 # Now we can determine OpenJDK build and target platforms. This is required to
13377 # have early on.
13378 # Make sure we can run config.sub.
13379 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13380   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13381 
13382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13383 $as_echo_n "checking build system type... " >&6; }
13384 if ${ac_cv_build+:} false; then :
13385   $as_echo_n "(cached) " >&6
13386 else
13387   ac_build_alias=$build_alias
13388 test "x$ac_build_alias" = x &&
13389   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13390 test "x$ac_build_alias" = x &&
13391   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13392 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13393   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13394 
13395 fi
13396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13397 $as_echo "$ac_cv_build" >&6; }
13398 case $ac_cv_build in
13399 *-*-*) ;;
13400 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13401 esac
13402 build=$ac_cv_build
13403 ac_save_IFS=$IFS; IFS='-'
13404 set x $ac_cv_build
13405 shift
13406 build_cpu=$1
13407 build_vendor=$2
13408 shift; shift
13409 # Remember, the first character of IFS is used to create $*,
13410 # except with old shells:
13411 build_os=$*
13412 IFS=$ac_save_IFS
13413 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13414 
13415 
13416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13417 $as_echo_n "checking host system type... " >&6; }
13418 if ${ac_cv_host+:} false; then :
13419   $as_echo_n "(cached) " >&6
13420 else
13421   if test "x$host_alias" = x; then
13422   ac_cv_host=$ac_cv_build
13423 else
13424   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13425     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13426 fi
13427 
13428 fi
13429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13430 $as_echo "$ac_cv_host" >&6; }
13431 case $ac_cv_host in
13432 *-*-*) ;;
13433 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13434 esac
13435 host=$ac_cv_host
13436 ac_save_IFS=$IFS; IFS='-'
13437 set x $ac_cv_host
13438 shift
13439 host_cpu=$1
13440 host_vendor=$2
13441 shift; shift
13442 # Remember, the first character of IFS is used to create $*,
13443 # except with old shells:
13444 host_os=$*
13445 IFS=$ac_save_IFS
13446 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13447 
13448 
13449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13450 $as_echo_n "checking target system type... " >&6; }
13451 if ${ac_cv_target+:} false; then :
13452   $as_echo_n "(cached) " >&6
13453 else
13454   if test "x$target_alias" = x; then
13455   ac_cv_target=$ac_cv_host
13456 else
13457   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13458     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13459 fi
13460 
13461 fi
13462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13463 $as_echo "$ac_cv_target" >&6; }
13464 case $ac_cv_target in
13465 *-*-*) ;;
13466 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13467 esac
13468 target=$ac_cv_target
13469 ac_save_IFS=$IFS; IFS='-'
13470 set x $ac_cv_target
13471 shift
13472 target_cpu=$1
13473 target_vendor=$2
13474 shift; shift
13475 # Remember, the first character of IFS is used to create $*,
13476 # except with old shells:
13477 target_os=$*
13478 IFS=$ac_save_IFS
13479 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13480 
13481 
13482 # The aliases save the names the user supplied, while $host etc.
13483 # will get canonicalized.
13484 test -n "$target_alias" &&
13485   test "$program_prefix$program_suffix$program_transform_name" = \
13486     NONENONEs,x,x, &&
13487   program_prefix=${target_alias}-
13488 
13489   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13490   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13491   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13492   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13493   # to use the configure naming style.
13494 
13495 
13496 
13497 
13498 
13499   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13500   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13501   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13502   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13503   OPENJDK_TARGET_AUTOCONF_NAME="$host"
13504   OPENJDK_BUILD_AUTOCONF_NAME="$build"
13505 
13506 
13507 
13508   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13509 
13510   case "$build_os" in
13511     *linux*)
13512       VAR_OS=linux
13513       VAR_OS_API=posix
13514       VAR_OS_ENV=linux
13515       ;;
13516     *solaris*)
13517       VAR_OS=solaris
13518       VAR_OS_API=posix
13519       VAR_OS_ENV=solaris
13520       ;;
13521     *darwin*)
13522       VAR_OS=macosx
13523       VAR_OS_API=posix
13524       VAR_OS_ENV=macosx
13525       ;;
13526     *bsd*)
13527       VAR_OS=bsd
13528       VAR_OS_API=posix
13529       VAR_OS_ENV=bsd
13530       ;;
13531     *cygwin*)
13532       VAR_OS=windows
13533       VAR_OS_API=winapi
13534       VAR_OS_ENV=windows.cygwin
13535       ;;
13536     *mingw*)
13537       VAR_OS=windows
13538       VAR_OS_API=winapi
13539       VAR_OS_ENV=windows.msys
13540       ;;
13541     *aix*)
13542       VAR_OS=aix
13543       VAR_OS_API=posix
13544       VAR_OS_ENV=aix
13545       ;;
13546     *)
13547       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13548       ;;
13549   esac
13550 
13551 
13552   # First argument is the cpu name from the trip/quad
13553   case "$build_cpu" in
13554     x86_64)
13555       VAR_CPU=x86_64
13556       VAR_CPU_ARCH=x86
13557       VAR_CPU_BITS=64
13558       VAR_CPU_ENDIAN=little
13559       ;;
13560     i?86)
13561       VAR_CPU=x86
13562       VAR_CPU_ARCH=x86
13563       VAR_CPU_BITS=32
13564       VAR_CPU_ENDIAN=little
13565       ;;
13566     arm*)
13567       VAR_CPU=arm
13568       VAR_CPU_ARCH=arm
13569       VAR_CPU_BITS=32
13570       VAR_CPU_ENDIAN=little
13571       ;;
13572     powerpc)
13573       VAR_CPU=ppc
13574       VAR_CPU_ARCH=ppc
13575       VAR_CPU_BITS=32
13576       VAR_CPU_ENDIAN=big
13577       ;;
13578     powerpc64)
13579       VAR_CPU=ppc64
13580       VAR_CPU_ARCH=ppc
13581       VAR_CPU_BITS=64
13582       VAR_CPU_ENDIAN=big
13583       ;;
13584     powerpc64le)
13585       VAR_CPU=ppc64
13586       VAR_CPU_ARCH=ppc
13587       VAR_CPU_BITS=64
13588       VAR_CPU_ENDIAN=little
13589       ;;
13590     s390)
13591       VAR_CPU=s390
13592       VAR_CPU_ARCH=s390
13593       VAR_CPU_BITS=32
13594       VAR_CPU_ENDIAN=big
13595       ;;
13596     s390x)
13597       VAR_CPU=s390x
13598       VAR_CPU_ARCH=s390
13599       VAR_CPU_BITS=64
13600       VAR_CPU_ENDIAN=big
13601       ;;
13602     sparc)
13603       VAR_CPU=sparc
13604       VAR_CPU_ARCH=sparc
13605       VAR_CPU_BITS=32
13606       VAR_CPU_ENDIAN=big
13607       ;;
13608     sparcv9|sparc64)
13609       VAR_CPU=sparcv9
13610       VAR_CPU_ARCH=sparc
13611       VAR_CPU_BITS=64
13612       VAR_CPU_ENDIAN=big
13613       ;;
13614     *)
13615       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13616       ;;
13617   esac
13618 
13619   # ..and setup our own variables. (Do this explicitely to facilitate searching)
13620   OPENJDK_BUILD_OS="$VAR_OS"
13621   OPENJDK_BUILD_OS_API="$VAR_OS_API"
13622   OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13623   OPENJDK_BUILD_CPU="$VAR_CPU"
13624   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13625   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13626   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13627 
13628 
13629 
13630 
13631 
13632 
13633 
13634 
13635   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13636 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
13637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13638 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13639 
13640   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13641 
13642   case "$host_os" in
13643     *linux*)
13644       VAR_OS=linux
13645       VAR_OS_API=posix
13646       VAR_OS_ENV=linux
13647       ;;
13648     *solaris*)
13649       VAR_OS=solaris
13650       VAR_OS_API=posix
13651       VAR_OS_ENV=solaris
13652       ;;
13653     *darwin*)
13654       VAR_OS=macosx
13655       VAR_OS_API=posix
13656       VAR_OS_ENV=macosx
13657       ;;
13658     *bsd*)
13659       VAR_OS=bsd
13660       VAR_OS_API=posix
13661       VAR_OS_ENV=bsd
13662       ;;
13663     *cygwin*)
13664       VAR_OS=windows
13665       VAR_OS_API=winapi
13666       VAR_OS_ENV=windows.cygwin
13667       ;;
13668     *mingw*)
13669       VAR_OS=windows
13670       VAR_OS_API=winapi
13671       VAR_OS_ENV=windows.msys
13672       ;;
13673     *aix*)
13674       VAR_OS=aix
13675       VAR_OS_API=posix
13676       VAR_OS_ENV=aix
13677       ;;
13678     *)
13679       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13680       ;;
13681   esac
13682 
13683 
13684   # First argument is the cpu name from the trip/quad
13685   case "$host_cpu" in
13686     x86_64)
13687       VAR_CPU=x86_64
13688       VAR_CPU_ARCH=x86
13689       VAR_CPU_BITS=64
13690       VAR_CPU_ENDIAN=little
13691       ;;
13692     i?86)
13693       VAR_CPU=x86
13694       VAR_CPU_ARCH=x86
13695       VAR_CPU_BITS=32
13696       VAR_CPU_ENDIAN=little
13697       ;;
13698     arm*)
13699       VAR_CPU=arm
13700       VAR_CPU_ARCH=arm
13701       VAR_CPU_BITS=32
13702       VAR_CPU_ENDIAN=little
13703       ;;
13704     powerpc)
13705       VAR_CPU=ppc
13706       VAR_CPU_ARCH=ppc
13707       VAR_CPU_BITS=32
13708       VAR_CPU_ENDIAN=big
13709       ;;
13710     powerpc64)
13711       VAR_CPU=ppc64
13712       VAR_CPU_ARCH=ppc
13713       VAR_CPU_BITS=64
13714       VAR_CPU_ENDIAN=big
13715       ;;
13716     powerpc64le)
13717       VAR_CPU=ppc64
13718       VAR_CPU_ARCH=ppc
13719       VAR_CPU_BITS=64
13720       VAR_CPU_ENDIAN=little
13721       ;;
13722     s390)
13723       VAR_CPU=s390
13724       VAR_CPU_ARCH=s390
13725       VAR_CPU_BITS=32
13726       VAR_CPU_ENDIAN=big
13727       ;;
13728     s390x)
13729       VAR_CPU=s390x
13730       VAR_CPU_ARCH=s390
13731       VAR_CPU_BITS=64
13732       VAR_CPU_ENDIAN=big
13733       ;;
13734     sparc)
13735       VAR_CPU=sparc
13736       VAR_CPU_ARCH=sparc
13737       VAR_CPU_BITS=32
13738       VAR_CPU_ENDIAN=big
13739       ;;
13740     sparcv9|sparc64)
13741       VAR_CPU=sparcv9
13742       VAR_CPU_ARCH=sparc
13743       VAR_CPU_BITS=64
13744       VAR_CPU_ENDIAN=big
13745       ;;
13746     *)
13747       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13748       ;;
13749   esac
13750 
13751   # ... and setup our own variables. (Do this explicitely to facilitate searching)
13752   OPENJDK_TARGET_OS="$VAR_OS"
13753   OPENJDK_TARGET_OS_API="$VAR_OS_API"
13754   OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13755   OPENJDK_TARGET_CPU="$VAR_CPU"
13756   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13757   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13758   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13759 
13760 
13761 
13762 
13763 
13764 
13765 
13766 
13767   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13768 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
13769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13770 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13771 
13772 
13773 
13774 # Check whether --with-target-bits was given.
13775 if test "${with_target_bits+set}" = set; then :
13776   withval=$with_target_bits;
13777 fi
13778 
13779 
13780   # We have three types of compiles:
13781   # native  == normal compilation, target system == build system
13782   # cross   == traditional cross compilation, target system != build system; special toolchain needed
13783   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13784   #
13785   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13786     # We're doing a proper cross-compilation
13787     COMPILE_TYPE="cross"
13788   else
13789     COMPILE_TYPE="native"
13790   fi
13791 
13792   if test "x$with_target_bits" != x; then
13793     if test "x$COMPILE_TYPE" = "xcross"; then
13794       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13795     fi
13796 
13797     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13798       # A reduced build is requested
13799       COMPILE_TYPE="reduced"
13800       OPENJDK_TARGET_CPU_BITS=32
13801       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13802         OPENJDK_TARGET_CPU=x86
13803       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13804         OPENJDK_TARGET_CPU=sparc
13805       else
13806         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13807       fi
13808     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13809       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
13810     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13811       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13812 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13813     else
13814       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13815     fi
13816   fi
13817 
13818 
13819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13820 $as_echo_n "checking compilation type... " >&6; }
13821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13822 $as_echo "$COMPILE_TYPE" >&6; }
13823 
13824 
13825   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13826     REQUIRED_OS_NAME=SunOS
13827     REQUIRED_OS_VERSION=5.10
13828   fi
13829   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13830     REQUIRED_OS_NAME=Linux
13831     REQUIRED_OS_VERSION=2.6
13832   fi
13833   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13834     REQUIRED_OS_NAME=Windows
13835     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13836       REQUIRED_OS_VERSION=5.2
13837     else
13838       REQUIRED_OS_VERSION=5.1
13839     fi
13840   fi
13841   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13842     REQUIRED_OS_NAME=Darwin
13843     REQUIRED_OS_VERSION=11.2
13844   fi
13845 
13846 
13847 
13848 
13849 
13850   # Also store the legacy naming of the cpu.
13851   # Ie i586 and amd64 instead of x86 and x86_64
13852   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13853   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13854     OPENJDK_TARGET_CPU_LEGACY="i586"
13855   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13856     # On all platforms except MacOSX replace x86_64 with amd64.
13857     OPENJDK_TARGET_CPU_LEGACY="amd64"
13858   fi
13859 
13860 
13861   # And the second legacy naming of the cpu.
13862   # Ie i386 and amd64 instead of x86 and x86_64.
13863   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13864   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13865     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13866   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13867     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13868   fi
13869 
13870 
13871   # This is the name of the cpu (but using i386 and amd64 instead of
13872   # x86 and x86_64, respectively), preceeded by a /, to be used when
13873   # locating libraries. On macosx, it's empty, though.
13874   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13875   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13876     OPENJDK_TARGET_CPU_LIBDIR=""
13877   fi
13878 
13879 
13880   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13881   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13882   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13883   OPENJDK_TARGET_CPU_ISADIR=""
13884   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13885     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13886       OPENJDK_TARGET_CPU_ISADIR="/amd64"
13887     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13888       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13889     fi
13890   fi
13891 
13892 
13893   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13894   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13895   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13896     # On linux only, we replace x86 with i386.
13897     OPENJDK_TARGET_CPU_OSARCH="i386"
13898   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13899     # On all platforms except macosx, we replace x86_64 with amd64.
13900     OPENJDK_TARGET_CPU_OSARCH="amd64"
13901   fi
13902 
13903 
13904   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13905   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13906     OPENJDK_TARGET_CPU_JLI="i386"
13907   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13908     # On all platforms except macosx, we replace x86_64 with amd64.
13909     OPENJDK_TARGET_CPU_JLI="amd64"
13910   fi
13911   # Now setup the -D flags for building libjli.
13912   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13913   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13914     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13915       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13916     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13917       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13918     fi
13919   fi
13920 
13921 
13922   # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13923   if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13924     OPENJDK_TARGET_OS_API_DIR="solaris"
13925   fi
13926   if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13927     OPENJDK_TARGET_OS_API_DIR="windows"
13928   fi
13929 
13930 
13931   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13932       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13933   else
13934       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13935   fi
13936 
13937 
13938   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13939     A_LP64="LP64:="
13940     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13941     # unpack200.exe
13942     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13943       ADD_LP64="-D_LP64=1"
13944     fi
13945   fi
13946   LP64=$A_LP64
13947 
13948 
13949   if test "x$COMPILE_TYPE" = "xcross"; then
13950     # FIXME: ... or should this include reduced builds..?
13951     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13952   else
13953     DEFINE_CROSS_COMPILE_ARCH=""
13954   fi
13955 
13956 
13957   # ZERO_ARCHDEF is used to enable architecture-specific code
13958   case "${OPENJDK_TARGET_CPU}" in
13959     ppc*)    ZERO_ARCHDEF=PPC   ;;
13960     s390*)   ZERO_ARCHDEF=S390  ;;
13961     sparc*)  ZERO_ARCHDEF=SPARC ;;
13962     x86_64*) ZERO_ARCHDEF=AMD64 ;;
13963     x86)     ZERO_ARCHDEF=IA32  ;;
13964     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13965   esac
13966 
13967 
13968 
13969 
13970 # Continue setting up basic stuff. Most remaining code require fundamental tools.
13971 
13972   # Save the current directory this script was started from
13973   CURDIR="$PWD"
13974 
13975   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13976     PATH_SEP=";"
13977 
13978   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13979   if test $SRC_ROOT_LENGTH -gt 100; then
13980     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13981   fi
13982 
13983   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13984     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13985 $as_echo_n "checking cygwin release... " >&6; }
13986     CYGWIN_VERSION=`$UNAME -r`
13987     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13988 $as_echo "$CYGWIN_VERSION" >&6; }
13989     WINDOWS_ENV_VENDOR='cygwin'
13990     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13991 
13992     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13993     if test "x$CYGWIN_VERSION_OK" = x; then
13994       { $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
13995 $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;}
13996       as_fn_error $? "Cannot continue" "$LINENO" 5
13997     fi
13998     if test "x$CYGPATH" = x; then
13999       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14000     fi
14001     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14002 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14003     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14004     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14005     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14006     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14007     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14008 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
14009     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14010     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14011     if test "x$test_cygdrive_prefix" = x; then
14012       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14013     fi
14014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14015     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14016 $as_echo_n "checking msys release... " >&6; }
14017     MSYS_VERSION=`$UNAME -r`
14018     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14019 $as_echo "$MSYS_VERSION" >&6; }
14020 
14021     WINDOWS_ENV_VENDOR='msys'
14022     WINDOWS_ENV_VERSION="$MSYS_VERSION"
14023 
14024     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14025 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
14026     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14027     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14028 
14029   windows_path="$MSYS_ROOT_PATH"
14030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14031     unix_path=`$CYGPATH -u "$windows_path"`
14032     MSYS_ROOT_PATH="$unix_path"
14033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14034     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14035     MSYS_ROOT_PATH="$unix_path"
14036   fi
14037 
14038     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14039 $as_echo "$MSYS_ROOT_PATH" >&6; }
14040     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14041   else
14042     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14043   fi
14044 
14045   # Test if windows or unix (cygwin/msys) find is first in path.
14046   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14047 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14048   FIND_BINARY_OUTPUT=`find --version 2>&1`
14049   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14050     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14051 $as_echo "unix style" >&6; }
14052   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14053     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14054 $as_echo "Windows" >&6; }
14055     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14056 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14057     { $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
14058 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14059     as_fn_error $? "Cannot continue" "$LINENO" 5
14060   else
14061     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14062 $as_echo "unknown" >&6; }
14063     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14064 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14065   fi
14066 
14067   else
14068     PATH_SEP=":"
14069   fi
14070 
14071 
14072   # We get the top-level directory from the supporting wrappers.
14073   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14074 $as_echo_n "checking for top-level directory... " >&6; }
14075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14076 $as_echo "$TOPDIR" >&6; }
14077 
14078 
14079   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14080 
14081   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14082 
14083   # Input might be given as Windows format, start by converting to
14084   # unix format.
14085   path="$CURDIR"
14086   new_path=`$CYGPATH -u "$path"`
14087 
14088   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14089   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14090   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14091   # "foo.exe" is OK but "foo" is an error.
14092   #
14093   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14094   # It is also a way to make sure we got the proper file name for the real test later on.
14095   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14096   if test "x$test_shortpath" = x; then
14097     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14098 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14099     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14100   fi
14101 
14102   # Call helper function which possibly converts this using DOS-style short mode.
14103   # If so, the updated path is stored in $new_path.
14104 
14105   input_path="$new_path"
14106   # Check if we need to convert this using DOS-style short mode. If the path
14107   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14108   # take no chances and rewrite it.
14109   # Note: m4 eats our [], so we need to use [ and ] instead.
14110   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14111   if test "x$has_forbidden_chars" != x; then
14112     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14113     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14114     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14115     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14116       # Going to short mode and back again did indeed matter. Since short mode is
14117       # case insensitive, let's make it lowercase to improve readability.
14118       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14119       # Now convert it back to Unix-stile (cygpath)
14120       input_path=`$CYGPATH -u "$shortmode_path"`
14121       new_path="$input_path"
14122     fi
14123   fi
14124 
14125   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14126   if test "x$test_cygdrive_prefix" = x; then
14127     # As a simple fix, exclude /usr/bin since it's not a real path.
14128     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14129       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14130       # a path prefixed by /cygdrive for fixpath to work.
14131       new_path="$CYGWIN_ROOT_PATH$input_path"
14132     fi
14133   fi
14134 
14135 
14136   if test "x$path" != "x$new_path"; then
14137     CURDIR="$new_path"
14138     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14139 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14140   fi
14141 
14142   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14143 
14144   path="$CURDIR"
14145   has_colon=`$ECHO $path | $GREP ^.:`
14146   new_path="$path"
14147   if test "x$has_colon" = x; then
14148     # Not in mixed or Windows style, start by that.
14149     new_path=`cmd //c echo $path`
14150   fi
14151 
14152 
14153   input_path="$new_path"
14154   # Check if we need to convert this using DOS-style short mode. If the path
14155   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14156   # take no chances and rewrite it.
14157   # Note: m4 eats our [], so we need to use [ and ] instead.
14158   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14159   if test "x$has_forbidden_chars" != x; then
14160     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14161     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14162   fi
14163 
14164 
14165   windows_path="$new_path"
14166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14167     unix_path=`$CYGPATH -u "$windows_path"`
14168     new_path="$unix_path"
14169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14170     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14171     new_path="$unix_path"
14172   fi
14173 
14174   if test "x$path" != "x$new_path"; then
14175     CURDIR="$new_path"
14176     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14177 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14178   fi
14179 
14180   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14181   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14182 
14183   else
14184     # We're on a posix platform. Hooray! :)
14185     path="$CURDIR"
14186     has_space=`$ECHO "$path" | $GREP " "`
14187     if test "x$has_space" != x; then
14188       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14189 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14190       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14191     fi
14192 
14193     # Use eval to expand a potential ~
14194     eval path="$path"
14195     if test ! -f "$path" && test ! -d "$path"; then
14196       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14197     fi
14198 
14199     CURDIR="`cd "$path"; $THEPWDCMD -L`"
14200   fi
14201 
14202 
14203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14204 
14205   # Input might be given as Windows format, start by converting to
14206   # unix format.
14207   path="$TOPDIR"
14208   new_path=`$CYGPATH -u "$path"`
14209 
14210   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14211   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14212   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14213   # "foo.exe" is OK but "foo" is an error.
14214   #
14215   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14216   # It is also a way to make sure we got the proper file name for the real test later on.
14217   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14218   if test "x$test_shortpath" = x; then
14219     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14220 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14221     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14222   fi
14223 
14224   # Call helper function which possibly converts this using DOS-style short mode.
14225   # If so, the updated path is stored in $new_path.
14226 
14227   input_path="$new_path"
14228   # Check if we need to convert this using DOS-style short mode. If the path
14229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14230   # take no chances and rewrite it.
14231   # Note: m4 eats our [], so we need to use [ and ] instead.
14232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14233   if test "x$has_forbidden_chars" != x; then
14234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14235     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14236     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14237     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14238       # Going to short mode and back again did indeed matter. Since short mode is
14239       # case insensitive, let's make it lowercase to improve readability.
14240       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14241       # Now convert it back to Unix-stile (cygpath)
14242       input_path=`$CYGPATH -u "$shortmode_path"`
14243       new_path="$input_path"
14244     fi
14245   fi
14246 
14247   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14248   if test "x$test_cygdrive_prefix" = x; then
14249     # As a simple fix, exclude /usr/bin since it's not a real path.
14250     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14251       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14252       # a path prefixed by /cygdrive for fixpath to work.
14253       new_path="$CYGWIN_ROOT_PATH$input_path"
14254     fi
14255   fi
14256 
14257 
14258   if test "x$path" != "x$new_path"; then
14259     TOPDIR="$new_path"
14260     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14261 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14262   fi
14263 
14264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14265 
14266   path="$TOPDIR"
14267   has_colon=`$ECHO $path | $GREP ^.:`
14268   new_path="$path"
14269   if test "x$has_colon" = x; then
14270     # Not in mixed or Windows style, start by that.
14271     new_path=`cmd //c echo $path`
14272   fi
14273 
14274 
14275   input_path="$new_path"
14276   # Check if we need to convert this using DOS-style short mode. If the path
14277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14278   # take no chances and rewrite it.
14279   # Note: m4 eats our [], so we need to use [ and ] instead.
14280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14281   if test "x$has_forbidden_chars" != x; then
14282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14283     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14284   fi
14285 
14286 
14287   windows_path="$new_path"
14288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14289     unix_path=`$CYGPATH -u "$windows_path"`
14290     new_path="$unix_path"
14291   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14292     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14293     new_path="$unix_path"
14294   fi
14295 
14296   if test "x$path" != "x$new_path"; then
14297     TOPDIR="$new_path"
14298     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14299 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14300   fi
14301 
14302   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14303   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14304 
14305   else
14306     # We're on a posix platform. Hooray! :)
14307     path="$TOPDIR"
14308     has_space=`$ECHO "$path" | $GREP " "`
14309     if test "x$has_space" != x; then
14310       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14311 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14312       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14313     fi
14314 
14315     # Use eval to expand a potential ~
14316     eval path="$path"
14317     if test ! -f "$path" && test ! -d "$path"; then
14318       as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14319     fi
14320 
14321     TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14322   fi
14323 
14324   # SRC_ROOT is a traditional alias for TOPDIR.
14325   SRC_ROOT=$TOPDIR
14326 
14327   # Locate the directory of this script.
14328   AUTOCONF_DIR=$TOPDIR/common/autoconf
14329 
14330 
14331   # Setup default logging of stdout and stderr to build.log in the output root.
14332   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14333   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14334   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14335 
14336 
14337 
14338 
14339 
14340 # Check if it's a pure open build or if custom sources are to be used.
14341 
14342   # Check whether --enable-openjdk-only was given.
14343 if test "${enable_openjdk_only+set}" = set; then :
14344   enableval=$enable_openjdk_only;
14345 else
14346   enable_openjdk_only="no"
14347 fi
14348 
14349 
14350   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14351 $as_echo_n "checking for presence of closed sources... " >&6; }
14352   if test -d "$SRC_ROOT/jdk/src/closed"; then
14353     CLOSED_SOURCE_PRESENT=yes
14354   else
14355     CLOSED_SOURCE_PRESENT=no
14356   fi
14357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14358 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14359 
14360   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14361 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14362   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14364 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14365 
14366   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14367     OPENJDK=true
14368     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14369       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14370 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14371     fi
14372   else
14373     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14374       OPENJDK=true
14375     else
14376       OPENJDK=false
14377     fi
14378   fi
14379 
14380   if test "x$OPENJDK" = "xtrue"; then
14381     SET_OPENJDK="OPENJDK=true"
14382   fi
14383 
14384 
14385 
14386   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14387   # the IncludeCustomExtension macro.
14388 
14389 
14390 # Check whether --with-custom-make-dir was given.
14391 if test "${with_custom_make_dir+set}" = set; then :
14392   withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
14393 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14394 fi
14395 
14396 
14397 
14398 
14399 # These are needed to be able to create a configuration name (and thus the output directory)
14400 
14401   ###############################################################################
14402   #
14403   # Check which variant of the JDK that we want to build.
14404   # Currently we have:
14405   #    normal:   standard edition
14406   # but the custom make system may add other variants
14407   #
14408   # Effectively the JDK variant gives a name to a specific set of
14409   # modules to compile into the JDK. In the future, these modules
14410   # might even be Jigsaw modules.
14411   #
14412   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14413 $as_echo_n "checking which variant of the JDK to build... " >&6; }
14414 
14415 # Check whether --with-jdk-variant was given.
14416 if test "${with_jdk_variant+set}" = set; then :
14417   withval=$with_jdk_variant;
14418 fi
14419 
14420 
14421   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14422     JDK_VARIANT="normal"
14423   else
14424     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14425   fi
14426 
14427 
14428 
14429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14430 $as_echo "$JDK_VARIANT" >&6; }
14431 
14432 
14433 ###############################################################################
14434 #
14435 # Check which interpreter of the JVM we want to build.
14436 # Currently we have:
14437 #    template: Template interpreter (the default)
14438 #    cpp     : C++ interpreter
14439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14440 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14441 
14442 # Check whether --with-jvm-interpreter was given.
14443 if test "${with_jvm_interpreter+set}" = set; then :
14444   withval=$with_jvm_interpreter;
14445 fi
14446 
14447 
14448 if test "x$with_jvm_interpreter" = x; then
14449      with_jvm_interpreter="template"
14450 fi
14451 
14452 JVM_INTERPRETER="$with_jvm_interpreter"
14453 
14454 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14455    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14456 fi
14457 
14458 
14459 
14460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14461 $as_echo "$with_jvm_interpreter" >&6; }
14462 
14463 
14464 
14465   ###############################################################################
14466   #
14467   # Check which variants of the JVM that we want to build.
14468   # Currently we have:
14469   #    server: normal interpreter and a tiered C1/C2 compiler
14470   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14471   #    minimal1: reduced form of client with optional VM services and features stripped out
14472   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14473   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14474   #    zero: no machine code interpreter, no compiler
14475   #    zeroshark: zero interpreter and shark/llvm compiler backend
14476 #    core: interpreter only, no compiler (only works on some platforms)
14477   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14478 $as_echo_n "checking which variants of the JVM to build... " >&6; }
14479 
14480 # Check whether --with-jvm-variants was given.
14481 if test "${with_jvm_variants+set}" = set; then :
14482   withval=$with_jvm_variants;
14483 fi
14484 
14485 
14486   if test "x$with_jvm_variants" = x; then
14487     with_jvm_variants="server"
14488   fi
14489 
14490   JVM_VARIANTS=",$with_jvm_variants,"
14491   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,//'`
14492 
14493   if test "x$TEST_VARIANTS" != "x,"; then
14494      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14495   fi
14496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14497 $as_echo "$with_jvm_variants" >&6; }
14498 
14499   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14500   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14501   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14502   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14503   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14504   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14505   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14506 
14507   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14508     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14509       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14510     fi
14511   fi
14512   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14513     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14514       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14515     fi
14516   fi
14517   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14518     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14519       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14520     fi
14521   fi
14522 
14523   # Replace the commas with AND for use in the build directory name.
14524   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14525   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/'`
14526   if test "x$COUNT_VARIANTS" != "x,1"; then
14527     BUILDING_MULTIPLE_JVM_VARIANTS=yes
14528   else
14529     BUILDING_MULTIPLE_JVM_VARIANTS=no
14530   fi
14531 
14532 
14533 
14534 
14535 
14536 
14537 
14538 
14539 
14540 
14541   INCLUDE_SA=true
14542   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14543     INCLUDE_SA=false
14544   fi
14545   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14546     INCLUDE_SA=false
14547   fi
14548   if test "x$OPENJDK_TARGET_OS" = xaix ; then
14549     INCLUDE_SA=false
14550   fi
14551 
14552 
14553   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14554     MACOSX_UNIVERSAL="true"
14555   fi
14556 
14557 
14558 
14559 
14560   ###############################################################################
14561   #
14562   # Set the debug level
14563   #    release: no debug information, all optimizations, no asserts.
14564   #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14565   #    fastdebug: debug information (-g), all optimizations, all asserts
14566   #    slowdebug: debug information (-g), no optimizations, all asserts
14567   #
14568   DEBUG_LEVEL="release"
14569   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14570 $as_echo_n "checking which debug level to use... " >&6; }
14571   # Check whether --enable-debug was given.
14572 if test "${enable_debug+set}" = set; then :
14573   enableval=$enable_debug;
14574         ENABLE_DEBUG="${enableval}"
14575         DEBUG_LEVEL="fastdebug"
14576 
14577 else
14578   ENABLE_DEBUG="no"
14579 fi
14580 
14581 
14582 
14583 # Check whether --with-debug-level was given.
14584 if test "${with_debug_level+set}" = set; then :
14585   withval=$with_debug_level;
14586         DEBUG_LEVEL="${withval}"
14587         if test "x$ENABLE_DEBUG" = xyes; then
14588           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14589         fi
14590 
14591 fi
14592 
14593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14594 $as_echo "$DEBUG_LEVEL" >&6; }
14595 
14596   if test "x$DEBUG_LEVEL" != xrelease && \
14597       test "x$DEBUG_LEVEL" != xoptimized && \
14598       test "x$DEBUG_LEVEL" != xfastdebug && \
14599       test "x$DEBUG_LEVEL" != xslowdebug; then
14600     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14601   fi
14602 
14603 
14604   ###############################################################################
14605   #
14606   # Setup legacy vars/targets and new vars to deal with different debug levels.
14607   #
14608 
14609   case $DEBUG_LEVEL in
14610     release )
14611       VARIANT="OPT"
14612       FASTDEBUG="false"
14613       DEBUG_CLASSFILES="false"
14614       BUILD_VARIANT_RELEASE=""
14615       HOTSPOT_DEBUG_LEVEL="product"
14616       HOTSPOT_EXPORT="product"
14617       ;;
14618     fastdebug )
14619       VARIANT="DBG"
14620       FASTDEBUG="true"
14621       DEBUG_CLASSFILES="true"
14622       BUILD_VARIANT_RELEASE="-fastdebug"
14623       HOTSPOT_DEBUG_LEVEL="fastdebug"
14624       HOTSPOT_EXPORT="fastdebug"
14625       ;;
14626     slowdebug )
14627       VARIANT="DBG"
14628       FASTDEBUG="false"
14629       DEBUG_CLASSFILES="true"
14630       BUILD_VARIANT_RELEASE="-debug"
14631       HOTSPOT_DEBUG_LEVEL="jvmg"
14632       HOTSPOT_EXPORT="debug"
14633       ;;
14634     optimized )
14635       VARIANT="OPT"
14636       FASTDEBUG="false"
14637       DEBUG_CLASSFILES="false"
14638       BUILD_VARIANT_RELEASE="-optimized"
14639       HOTSPOT_DEBUG_LEVEL="optimized"
14640       HOTSPOT_EXPORT="optimized"
14641       ;;
14642   esac
14643 
14644   # The debug level 'optimized' is a little special because it is currently only
14645   # applicable to the HotSpot build where it means to build a completely
14646   # optimized version of the VM without any debugging code (like for the
14647   # 'release' debug level which is called 'product' in the HotSpot build) but
14648   # with the exception that it can contain additional code which is otherwise
14649   # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14650   # test new and/or experimental features which are not intended for customer
14651   # shipment. Because these new features need to be tested and benchmarked in
14652   # real world scenarios, we want to build the containing JDK at the 'release'
14653   # debug level.
14654   if test "x$DEBUG_LEVEL" = xoptimized; then
14655     DEBUG_LEVEL="release"
14656   fi
14657 
14658   #####
14659   # Generate the legacy makefile targets for hotspot.
14660   # The hotspot api for selecting the build artifacts, really, needs to be improved.
14661   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14662   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14663   # But until then ...
14664   HOTSPOT_TARGET=""
14665 
14666   if test "x$JVM_VARIANT_SERVER" = xtrue; then
14667     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14668   fi
14669 
14670   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14671     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14672   fi
14673 
14674   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14675     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14676   fi
14677 
14678   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14679     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14680   fi
14681 
14682   if test "x$JVM_VARIANT_ZERO" = xtrue; then
14683     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14684   fi
14685 
14686   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14687     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14688   fi
14689 
14690   if test "x$JVM_VARIANT_CORE" = xtrue; then
14691     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14692   fi
14693 
14694   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14695 
14696   # On Macosx universal binaries are produced, but they only contain
14697   # 64 bit intel. This invalidates control of which jvms are built
14698   # from configure, but only server is valid anyway. Fix this
14699   # when hotspot makefiles are rewritten.
14700   if test "x$MACOSX_UNIVERSAL" = xtrue; then
14701     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14702   fi
14703 
14704   #####
14705 
14706 
14707 
14708 
14709 
14710 
14711 
14712 
14713 # With basic setup done, call the custom early hook.
14714 
14715 
14716 # Check if we have devkits, extra paths or sysroot set.
14717 
14718 
14719 # Check whether --with-devkit was given.
14720 if test "${with_devkit+set}" = set; then :
14721   withval=$with_devkit;
14722 
14723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14724 
14725   # Input might be given as Windows format, start by converting to
14726   # unix format.
14727   path="$with_devkit"
14728   new_path=`$CYGPATH -u "$path"`
14729 
14730   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14731   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14732   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14733   # "foo.exe" is OK but "foo" is an error.
14734   #
14735   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14736   # It is also a way to make sure we got the proper file name for the real test later on.
14737   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14738   if test "x$test_shortpath" = x; then
14739     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14740 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14741     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14742   fi
14743 
14744   # Call helper function which possibly converts this using DOS-style short mode.
14745   # If so, the updated path is stored in $new_path.
14746 
14747   input_path="$new_path"
14748   # Check if we need to convert this using DOS-style short mode. If the path
14749   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14750   # take no chances and rewrite it.
14751   # Note: m4 eats our [], so we need to use [ and ] instead.
14752   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14753   if test "x$has_forbidden_chars" != x; then
14754     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14755     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14756     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14757     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14758       # Going to short mode and back again did indeed matter. Since short mode is
14759       # case insensitive, let's make it lowercase to improve readability.
14760       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14761       # Now convert it back to Unix-stile (cygpath)
14762       input_path=`$CYGPATH -u "$shortmode_path"`
14763       new_path="$input_path"
14764     fi
14765   fi
14766 
14767   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14768   if test "x$test_cygdrive_prefix" = x; then
14769     # As a simple fix, exclude /usr/bin since it's not a real path.
14770     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14771       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14772       # a path prefixed by /cygdrive for fixpath to work.
14773       new_path="$CYGWIN_ROOT_PATH$input_path"
14774     fi
14775   fi
14776 
14777 
14778   if test "x$path" != "x$new_path"; then
14779     with_devkit="$new_path"
14780     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14781 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14782   fi
14783 
14784   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14785 
14786   path="$with_devkit"
14787   has_colon=`$ECHO $path | $GREP ^.:`
14788   new_path="$path"
14789   if test "x$has_colon" = x; then
14790     # Not in mixed or Windows style, start by that.
14791     new_path=`cmd //c echo $path`
14792   fi
14793 
14794 
14795   input_path="$new_path"
14796   # Check if we need to convert this using DOS-style short mode. If the path
14797   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14798   # take no chances and rewrite it.
14799   # Note: m4 eats our [], so we need to use [ and ] instead.
14800   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14801   if test "x$has_forbidden_chars" != x; then
14802     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14803     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14804   fi
14805 
14806 
14807   windows_path="$new_path"
14808   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14809     unix_path=`$CYGPATH -u "$windows_path"`
14810     new_path="$unix_path"
14811   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14812     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14813     new_path="$unix_path"
14814   fi
14815 
14816   if test "x$path" != "x$new_path"; then
14817     with_devkit="$new_path"
14818     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14819 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14820   fi
14821 
14822   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14823   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14824 
14825   else
14826     # We're on a posix platform. Hooray! :)
14827     path="$with_devkit"
14828     has_space=`$ECHO "$path" | $GREP " "`
14829     if test "x$has_space" != x; then
14830       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14831 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14832       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14833     fi
14834 
14835     # Use eval to expand a potential ~
14836     eval path="$path"
14837     if test ! -f "$path" && test ! -d "$path"; then
14838       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14839     fi
14840 
14841     with_devkit="`cd "$path"; $THEPWDCMD -L`"
14842   fi
14843 
14844         DEVKIT_ROOT="$with_devkit"
14845         # Check for a meta data info file in the root of the devkit
14846         if test -f "$DEVKIT_ROOT/devkit.info"; then
14847           # This potentially sets the following:
14848           # DEVKIT_NAME: A descriptive name of the devkit
14849           # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14850           # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14851           # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14852           . $DEVKIT_ROOT/devkit.info
14853         fi
14854 
14855         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14856 $as_echo_n "checking for devkit... " >&6; }
14857         if test "x$DEVKIT_NAME" != x; then
14858           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14859 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14860         else
14861           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14862 $as_echo "$DEVKIT_ROOT" >&6; }
14863         fi
14864 
14865         if test "x$DEVKIT_EXTRA_PATH" != x; then
14866 
14867   if test "x$DEVKIT_EXTRA_PATH" != x; then
14868     if test "x$EXTRA_PATH" = x; then
14869       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14870     else
14871       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14872     fi
14873   fi
14874 
14875         fi
14876 
14877         # Fallback default of just /bin if DEVKIT_PATH is not defined
14878         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14879           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14880         fi
14881 
14882   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14883     if test "x$TOOLCHAIN_PATH" = x; then
14884       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14885     else
14886       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14887     fi
14888   fi
14889 
14890 
14891         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14892         # places for backwards compatiblity.
14893         if test "x$DEVKIT_SYSROOT" != x; then
14894           SYSROOT="$DEVKIT_SYSROOT"
14895         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14896           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14897         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14898           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14899         fi
14900 
14901 
14902 fi
14903 
14904 
14905   # You can force the sysroot if the sysroot encoded into the compiler tools
14906   # is not correct.
14907 
14908 # Check whether --with-sys-root was given.
14909 if test "${with_sys_root+set}" = set; then :
14910   withval=$with_sys_root; SYSROOT=$with_sys_root
14911 
14912 fi
14913 
14914 
14915 
14916 # Check whether --with-sysroot was given.
14917 if test "${with_sysroot+set}" = set; then :
14918   withval=$with_sysroot; SYSROOT=$with_sysroot
14919 
14920 fi
14921 
14922 
14923 
14924 # Check whether --with-tools-dir was given.
14925 if test "${with_tools_dir+set}" = set; then :
14926   withval=$with_tools_dir;
14927   if test "x$with_tools_dir" != x; then
14928     if test "x$TOOLCHAIN_PATH" = x; then
14929       TOOLCHAIN_PATH="$with_tools_dir"
14930     else
14931       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14932     fi
14933   fi
14934 
14935 
14936 fi
14937 
14938 
14939 
14940 # Check whether --with-toolchain-path was given.
14941 if test "${with_toolchain_path+set}" = set; then :
14942   withval=$with_toolchain_path;
14943   if test "x$with_toolchain_path" != x; then
14944     if test "x$TOOLCHAIN_PATH" = x; then
14945       TOOLCHAIN_PATH="$with_toolchain_path"
14946     else
14947       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14948     fi
14949   fi
14950 
14951 
14952 fi
14953 
14954 
14955 
14956 # Check whether --with-extra-path was given.
14957 if test "${with_extra_path+set}" = set; then :
14958   withval=$with_extra_path;
14959   if test "x$with_extra_path" != x; then
14960     if test "x$EXTRA_PATH" = x; then
14961       EXTRA_PATH="$with_extra_path"
14962     else
14963       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14964     fi
14965   fi
14966 
14967 
14968 fi
14969 
14970 
14971   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14972     # detect if Xcode is installed by running xcodebuild -version
14973     # if no Xcode installed, xcodebuild exits with 1
14974     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14975     if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14976       # We need to use xcodebuild in the toolchain dir provided by the user, this will
14977       # fall back on the stub binary in /usr/bin/xcodebuild
14978       # Extract the first word of "xcodebuild", so it can be a program name with args.
14979 set dummy xcodebuild; ac_word=$2
14980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14981 $as_echo_n "checking for $ac_word... " >&6; }
14982 if ${ac_cv_path_XCODEBUILD+:} false; then :
14983   $as_echo_n "(cached) " >&6
14984 else
14985   case $XCODEBUILD in
14986   [\\/]* | ?:[\\/]*)
14987   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14988   ;;
14989   *)
14990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14991 for as_dir in $TOOLCHAIN_PATH
14992 do
14993   IFS=$as_save_IFS
14994   test -z "$as_dir" && as_dir=.
14995     for ac_exec_ext in '' $ac_executable_extensions; do
14996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14997     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
14998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14999     break 2
15000   fi
15001 done
15002   done
15003 IFS=$as_save_IFS
15004 
15005   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15006   ;;
15007 esac
15008 fi
15009 XCODEBUILD=$ac_cv_path_XCODEBUILD
15010 if test -n "$XCODEBUILD"; then
15011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15012 $as_echo "$XCODEBUILD" >&6; }
15013 else
15014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15015 $as_echo "no" >&6; }
15016 fi
15017 
15018 
15019     else
15020       # this should result in SYSROOT being empty, unless --with-sysroot is provided
15021       # when only the command line tools are installed there are no SDKs, so headers
15022       # are copied into the system frameworks
15023       XCODEBUILD=
15024 
15025     fi
15026 
15027     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15028 $as_echo_n "checking for sdk name... " >&6; }
15029 
15030 # Check whether --with-sdk-name was given.
15031 if test "${with_sdk_name+set}" = set; then :
15032   withval=$with_sdk_name; SDKNAME=$with_sdk_name
15033 
15034 fi
15035 
15036     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15037 $as_echo "$SDKNAME" >&6; }
15038 
15039     # if toolchain path is specified then don't rely on system headers, they may not compile
15040     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15041     test -z "$TOOLCHAIN_PATH" && \
15042       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15043 
15044     if test -z "$SYSROOT"; then
15045       if test -n "$XCODEBUILD"; then
15046         # if we don't have system headers, use default SDK name (last resort)
15047         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15048           SDKNAME=${SDKNAME:-macosx}
15049         fi
15050 
15051         if test -n "$SDKNAME"; then
15052           # Call xcodebuild to determine SYSROOT
15053           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15054         fi
15055       else
15056         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15057           as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
15058         fi
15059       fi
15060     else
15061       # warn user if --with-sdk-name was also set
15062       if test -n "$with_sdk_name"; then
15063         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15064 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15065       fi
15066     fi
15067 
15068     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15069       # If no system framework headers, then SYSROOT must be set, or we won't build
15070       as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
15071     fi
15072 
15073     # Perform a basic sanity test
15074     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15075       if test -z "$SYSROOT"; then
15076         as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
15077       else
15078         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15079       fi
15080     fi
15081 
15082     # set SDKROOT too, Xcode tools will pick it up
15083     SDKROOT=$SYSROOT
15084 
15085   fi
15086 
15087   # Prepend the extra path to the global path
15088 
15089   if test "x$EXTRA_PATH" != x; then
15090     if test "x$PATH" = x; then
15091       PATH="$EXTRA_PATH"
15092     else
15093       PATH="$EXTRA_PATH:$PATH"
15094     fi
15095   fi
15096 
15097 
15098   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15099     # Add extra search paths on solaris for utilities like ar and as etc...
15100     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15101   fi
15102 
15103   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15104 $as_echo_n "checking for sysroot... " >&6; }
15105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15106 $as_echo "$SYSROOT" >&6; }
15107   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15108 $as_echo_n "checking for toolchain path... " >&6; }
15109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15110 $as_echo "$TOOLCHAIN_PATH" >&6; }
15111   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15112 $as_echo_n "checking for extra path... " >&6; }
15113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15114 $as_echo "$EXTRA_PATH" >&6; }
15115 
15116 
15117 # To properly create a configuration name, we need to have the OpenJDK target
15118 # and options (variants and debug level) parsed.
15119 
15120 
15121 
15122 # Check whether --with-conf-name was given.
15123 if test "${with_conf_name+set}" = set; then :
15124   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15125 fi
15126 
15127 
15128   # Test from where we are running configure, in or outside of src root.
15129   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15130 $as_echo_n "checking where to store configuration... " >&6; }
15131   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15132       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15133       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15134     # We are running configure from the src root.
15135     # Create a default ./build/target-variant-debuglevel output root.
15136     if test "x${CONF_NAME}" = x; then
15137       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15138 $as_echo "in default location" >&6; }
15139       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15140     else
15141       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15142 $as_echo "in build directory with custom name" >&6; }
15143     fi
15144     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15145     $MKDIR -p "$OUTPUT_ROOT"
15146     if test ! -d "$OUTPUT_ROOT"; then
15147       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15148     fi
15149   else
15150     # We are running configure from outside of the src dir.
15151     # Then use the current directory as output dir!
15152     # If configuration is situated in normal build directory, just use the build
15153     # directory name as configuration name, otherwise use the complete path.
15154     if test "x${CONF_NAME}" = x; then
15155       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15156     fi
15157     OUTPUT_ROOT="$CURDIR"
15158     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15159 $as_echo "in current directory" >&6; }
15160 
15161     # WARNING: This might be a bad thing to do. You need to be sure you want to
15162     # have a configuration in this directory. Do some sanity checks!
15163 
15164     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15165       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15166       # other files
15167       files_present=`$LS $OUTPUT_ROOT`
15168       # Configure has already touched config.log and confdefs.h in the current dir when this check
15169       # is performed.
15170       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15171       | $TR -d '\n'`
15172       if test "x$filtered_files" != x; then
15173         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15174 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
15175         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15176 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15177         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15178 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15179         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15180 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15181         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15182 $as_echo "$as_me: seriously mess up just about everything." >&6;}
15183         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15184 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15185         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15186 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15187         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15188       fi
15189     fi
15190   fi
15191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15192 $as_echo_n "checking what configuration name to use... " >&6; }
15193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15194 $as_echo "$CONF_NAME" >&6; }
15195 
15196 
15197   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15198 
15199   # Input might be given as Windows format, start by converting to
15200   # unix format.
15201   path="$OUTPUT_ROOT"
15202   new_path=`$CYGPATH -u "$path"`
15203 
15204   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15205   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15206   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15207   # "foo.exe" is OK but "foo" is an error.
15208   #
15209   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15210   # It is also a way to make sure we got the proper file name for the real test later on.
15211   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15212   if test "x$test_shortpath" = x; then
15213     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15214 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15215     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15216   fi
15217 
15218   # Call helper function which possibly converts this using DOS-style short mode.
15219   # If so, the updated path is stored in $new_path.
15220 
15221   input_path="$new_path"
15222   # Check if we need to convert this using DOS-style short mode. If the path
15223   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15224   # take no chances and rewrite it.
15225   # Note: m4 eats our [], so we need to use [ and ] instead.
15226   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15227   if test "x$has_forbidden_chars" != x; then
15228     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15229     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15230     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15231     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15232       # Going to short mode and back again did indeed matter. Since short mode is
15233       # case insensitive, let's make it lowercase to improve readability.
15234       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15235       # Now convert it back to Unix-stile (cygpath)
15236       input_path=`$CYGPATH -u "$shortmode_path"`
15237       new_path="$input_path"
15238     fi
15239   fi
15240 
15241   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15242   if test "x$test_cygdrive_prefix" = x; then
15243     # As a simple fix, exclude /usr/bin since it's not a real path.
15244     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15245       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15246       # a path prefixed by /cygdrive for fixpath to work.
15247       new_path="$CYGWIN_ROOT_PATH$input_path"
15248     fi
15249   fi
15250 
15251 
15252   if test "x$path" != "x$new_path"; then
15253     OUTPUT_ROOT="$new_path"
15254     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15255 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15256   fi
15257 
15258   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15259 
15260   path="$OUTPUT_ROOT"
15261   has_colon=`$ECHO $path | $GREP ^.:`
15262   new_path="$path"
15263   if test "x$has_colon" = x; then
15264     # Not in mixed or Windows style, start by that.
15265     new_path=`cmd //c echo $path`
15266   fi
15267 
15268 
15269   input_path="$new_path"
15270   # Check if we need to convert this using DOS-style short mode. If the path
15271   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15272   # take no chances and rewrite it.
15273   # Note: m4 eats our [], so we need to use [ and ] instead.
15274   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15275   if test "x$has_forbidden_chars" != x; then
15276     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15277     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15278   fi
15279 
15280 
15281   windows_path="$new_path"
15282   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15283     unix_path=`$CYGPATH -u "$windows_path"`
15284     new_path="$unix_path"
15285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15286     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15287     new_path="$unix_path"
15288   fi
15289 
15290   if test "x$path" != "x$new_path"; then
15291     OUTPUT_ROOT="$new_path"
15292     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15293 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15294   fi
15295 
15296   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15297   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15298 
15299   else
15300     # We're on a posix platform. Hooray! :)
15301     path="$OUTPUT_ROOT"
15302     has_space=`$ECHO "$path" | $GREP " "`
15303     if test "x$has_space" != x; then
15304       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15305 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15306       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15307     fi
15308 
15309     # Use eval to expand a potential ~
15310     eval path="$path"
15311     if test ! -f "$path" && test ! -d "$path"; then
15312       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15313     fi
15314 
15315     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15316   fi
15317 
15318 
15319   SPEC=$OUTPUT_ROOT/spec.gmk
15320 
15321   CONF_NAME=$CONF_NAME
15322 
15323   OUTPUT_ROOT=$OUTPUT_ROOT
15324 
15325 
15326   # Most of the probed defines are put into config.h
15327   ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15328 
15329   # The spec.gmk file contains all variables for the make system.
15330   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15331 
15332   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15333   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15334 
15335   # The bootcycle-spec.gmk file contains support for boot cycle builds.
15336   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15337 
15338   # The compare.sh is used to compare the build output to other builds.
15339   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15340 
15341   # Spec.sh is currently used by compare-objects.sh
15342   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15343 
15344   # The generated Makefile knows where the spec.gmk is and where the source is.
15345   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15346   # which will look for generated configurations
15347   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15348 
15349 
15350 
15351 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15352 
15353   for ac_prog in apt-get yum port pkgutil pkgadd
15354 do
15355   # Extract the first word of "$ac_prog", so it can be a program name with args.
15356 set dummy $ac_prog; ac_word=$2
15357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15358 $as_echo_n "checking for $ac_word... " >&6; }
15359 if ${ac_cv_prog_PKGHANDLER+:} false; then :
15360   $as_echo_n "(cached) " >&6
15361 else
15362   if test -n "$PKGHANDLER"; then
15363   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15364 else
15365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15366 for as_dir in $PATH
15367 do
15368   IFS=$as_save_IFS
15369   test -z "$as_dir" && as_dir=.
15370     for ac_exec_ext in '' $ac_executable_extensions; do
15371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15372     ac_cv_prog_PKGHANDLER="$ac_prog"
15373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15374     break 2
15375   fi
15376 done
15377   done
15378 IFS=$as_save_IFS
15379 
15380 fi
15381 fi
15382 PKGHANDLER=$ac_cv_prog_PKGHANDLER
15383 if test -n "$PKGHANDLER"; then
15384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15385 $as_echo "$PKGHANDLER" >&6; }
15386 else
15387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15388 $as_echo "no" >&6; }
15389 fi
15390 
15391 
15392   test -n "$PKGHANDLER" && break
15393 done
15394 
15395 
15396 
15397 # Setup tools that requires more complex handling, or that is not needed by the configure script.
15398 
15399 
15400   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15401   if test "x$MAKE" != x; then
15402     # User has supplied a make, test it.
15403     if test ! -f "$MAKE"; then
15404       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15405     fi
15406 
15407   MAKE_CANDIDATE=""$MAKE""
15408   DESCRIPTION="user supplied MAKE=$MAKE"
15409   if test "x$MAKE_CANDIDATE" != x; then
15410     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15411 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15412     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15413     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15414     if test "x$IS_GNU_MAKE" = x; then
15415       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15416 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15417     else
15418       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15419       if test "x$IS_MODERN_MAKE" = x; then
15420         { $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
15421 $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;}
15422       else
15423         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15424           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15425             MAKE_EXPECTED_ENV='cygwin'
15426           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15427             MAKE_EXPECTED_ENV='msys'
15428           else
15429             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15430           fi
15431           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15432           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15433         else
15434           # Not relevant for non-Windows
15435           IS_MAKE_CORRECT_ENV=true
15436         fi
15437         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15438           { $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
15439 $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;}
15440         else
15441           FOUND_MAKE=$MAKE_CANDIDATE
15442 
15443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15444 
15445   # First separate the path from the arguments. This will split at the first
15446   # space.
15447   complete="$FOUND_MAKE"
15448   path="${complete%% *}"
15449   tmp="$complete EOL"
15450   arguments="${tmp#* }"
15451 
15452   # Input might be given as Windows format, start by converting to
15453   # unix format.
15454   new_path=`$CYGPATH -u "$path"`
15455 
15456   # Now try to locate executable using which
15457   new_path=`$WHICH "$new_path" 2> /dev/null`
15458   # bat and cmd files are not always considered executable in cygwin causing which
15459   # to not find them
15460   if test "x$new_path" = x \
15461       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15462       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15463     new_path=`$CYGPATH -u "$path"`
15464   fi
15465   if test "x$new_path" = x; then
15466     # Oops. Which didn't find the executable.
15467     # The splitting of arguments from the executable at a space might have been incorrect,
15468     # since paths with space are more likely in Windows. Give it another try with the whole
15469     # argument.
15470     path="$complete"
15471     arguments="EOL"
15472     new_path=`$CYGPATH -u "$path"`
15473     new_path=`$WHICH "$new_path" 2> /dev/null`
15474     # bat and cmd files are not always considered executable in cygwin causing which
15475     # to not find them
15476     if test "x$new_path" = x \
15477         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15478         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15479       new_path=`$CYGPATH -u "$path"`
15480     fi
15481     if test "x$new_path" = x; then
15482       # It's still not found. Now this is an unrecoverable error.
15483       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15484 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15485       has_space=`$ECHO "$complete" | $GREP " "`
15486       if test "x$has_space" != x; then
15487         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15488 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15489       fi
15490       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15491     fi
15492   fi
15493 
15494   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15495   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15496   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15497   # "foo.exe" is OK but "foo" is an error.
15498   #
15499   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15500   # It is also a way to make sure we got the proper file name for the real test later on.
15501   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15502   if test "x$test_shortpath" = x; then
15503     # Short path failed, file does not exist as specified.
15504     # Try adding .exe or .cmd
15505     if test -f "${new_path}.exe"; then
15506       input_to_shortpath="${new_path}.exe"
15507     elif test -f "${new_path}.cmd"; then
15508       input_to_shortpath="${new_path}.cmd"
15509     else
15510       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15511 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15512       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15513 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15514       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15515     fi
15516   else
15517     input_to_shortpath="$new_path"
15518   fi
15519 
15520   # Call helper function which possibly converts this using DOS-style short mode.
15521   # If so, the updated path is stored in $new_path.
15522   new_path="$input_to_shortpath"
15523 
15524   input_path="$input_to_shortpath"
15525   # Check if we need to convert this using DOS-style short mode. If the path
15526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15527   # take no chances and rewrite it.
15528   # Note: m4 eats our [], so we need to use [ and ] instead.
15529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15530   if test "x$has_forbidden_chars" != x; then
15531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15532     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15533     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15534     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15535       # Going to short mode and back again did indeed matter. Since short mode is
15536       # case insensitive, let's make it lowercase to improve readability.
15537       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15538       # Now convert it back to Unix-stile (cygpath)
15539       input_path=`$CYGPATH -u "$shortmode_path"`
15540       new_path="$input_path"
15541     fi
15542   fi
15543 
15544   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15545   if test "x$test_cygdrive_prefix" = x; then
15546     # As a simple fix, exclude /usr/bin since it's not a real path.
15547     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15548       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15549       # a path prefixed by /cygdrive for fixpath to work.
15550       new_path="$CYGWIN_ROOT_PATH$input_path"
15551     fi
15552   fi
15553 
15554   # remove trailing .exe if any
15555   new_path="${new_path/%.exe/}"
15556 
15557   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15558 
15559   # First separate the path from the arguments. This will split at the first
15560   # space.
15561   complete="$FOUND_MAKE"
15562   path="${complete%% *}"
15563   tmp="$complete EOL"
15564   arguments="${tmp#* }"
15565 
15566   # Input might be given as Windows format, start by converting to
15567   # unix format.
15568   new_path="$path"
15569 
15570   windows_path="$new_path"
15571   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15572     unix_path=`$CYGPATH -u "$windows_path"`
15573     new_path="$unix_path"
15574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15575     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15576     new_path="$unix_path"
15577   fi
15578 
15579 
15580   # Now try to locate executable using which
15581   new_path=`$WHICH "$new_path" 2> /dev/null`
15582 
15583   if test "x$new_path" = x; then
15584     # Oops. Which didn't find the executable.
15585     # The splitting of arguments from the executable at a space might have been incorrect,
15586     # since paths with space are more likely in Windows. Give it another try with the whole
15587     # argument.
15588     path="$complete"
15589     arguments="EOL"
15590     new_path="$path"
15591 
15592   windows_path="$new_path"
15593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15594     unix_path=`$CYGPATH -u "$windows_path"`
15595     new_path="$unix_path"
15596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15597     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15598     new_path="$unix_path"
15599   fi
15600 
15601 
15602     new_path=`$WHICH "$new_path" 2> /dev/null`
15603     # bat and cmd files are not always considered executable in MSYS causing which
15604     # to not find them
15605     if test "x$new_path" = x \
15606         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15607         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15608       new_path="$path"
15609 
15610   windows_path="$new_path"
15611   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15612     unix_path=`$CYGPATH -u "$windows_path"`
15613     new_path="$unix_path"
15614   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15615     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15616     new_path="$unix_path"
15617   fi
15618 
15619     fi
15620 
15621     if test "x$new_path" = x; then
15622       # It's still not found. Now this is an unrecoverable error.
15623       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15624 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15625       has_space=`$ECHO "$complete" | $GREP " "`
15626       if test "x$has_space" != x; then
15627         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15628 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15629       fi
15630       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15631     fi
15632   fi
15633 
15634   # Now new_path has a complete unix path to the binary
15635   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15636     # Keep paths in /bin as-is, but remove trailing .exe if any
15637     new_path="${new_path/%.exe/}"
15638     # Do not save /bin paths to all_fixpath_prefixes!
15639   else
15640     # Not in mixed or Windows style, start by that.
15641     new_path=`cmd //c echo $new_path`
15642 
15643   input_path="$new_path"
15644   # Check if we need to convert this using DOS-style short mode. If the path
15645   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15646   # take no chances and rewrite it.
15647   # Note: m4 eats our [], so we need to use [ and ] instead.
15648   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15649   if test "x$has_forbidden_chars" != x; then
15650     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15651     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15652   fi
15653 
15654     # Output is in $new_path
15655 
15656   windows_path="$new_path"
15657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15658     unix_path=`$CYGPATH -u "$windows_path"`
15659     new_path="$unix_path"
15660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15661     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15662     new_path="$unix_path"
15663   fi
15664 
15665     # remove trailing .exe if any
15666     new_path="${new_path/%.exe/}"
15667 
15668     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15669     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15670   fi
15671 
15672   else
15673     # We're on a posix platform. Hooray! :)
15674     # First separate the path from the arguments. This will split at the first
15675     # space.
15676     complete="$FOUND_MAKE"
15677     path="${complete%% *}"
15678     tmp="$complete EOL"
15679     arguments="${tmp#* }"
15680 
15681     # Cannot rely on the command "which" here since it doesn't always work.
15682     is_absolute_path=`$ECHO "$path" | $GREP ^/`
15683     if test -z "$is_absolute_path"; then
15684       # Path to executable is not absolute. Find it.
15685       IFS_save="$IFS"
15686       IFS=:
15687       for p in $PATH; do
15688         if test -f "$p/$path" && test -x "$p/$path"; then
15689           new_path="$p/$path"
15690           break
15691         fi
15692       done
15693       IFS="$IFS_save"
15694     else
15695       # This is an absolute path, we can use it without further modifications.
15696       new_path="$path"
15697     fi
15698 
15699     if test "x$new_path" = x; then
15700       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15701 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15702       has_space=`$ECHO "$complete" | $GREP " "`
15703       if test "x$has_space" != x; then
15704         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15705 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15706       fi
15707       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15708     fi
15709   fi
15710 
15711   # Now join together the path and the arguments once again
15712   if test "x$arguments" != xEOL; then
15713     new_complete="$new_path ${arguments% *}"
15714   else
15715     new_complete="$new_path"
15716   fi
15717 
15718   if test "x$complete" != "x$new_complete"; then
15719     FOUND_MAKE="$new_complete"
15720     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15721 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15722   fi
15723 
15724         fi
15725       fi
15726     fi
15727   fi
15728 
15729     if test "x$FOUND_MAKE" = x; then
15730       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15731     fi
15732   else
15733     # Try our hardest to locate a correct version of GNU make
15734     for ac_prog in gmake
15735 do
15736   # Extract the first word of "$ac_prog", so it can be a program name with args.
15737 set dummy $ac_prog; ac_word=$2
15738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15739 $as_echo_n "checking for $ac_word... " >&6; }
15740 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15741   $as_echo_n "(cached) " >&6
15742 else
15743   case $CHECK_GMAKE in
15744   [\\/]* | ?:[\\/]*)
15745   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15746   ;;
15747   *)
15748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15749 for as_dir in $PATH
15750 do
15751   IFS=$as_save_IFS
15752   test -z "$as_dir" && as_dir=.
15753     for ac_exec_ext in '' $ac_executable_extensions; do
15754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15755     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15757     break 2
15758   fi
15759 done
15760   done
15761 IFS=$as_save_IFS
15762 
15763   ;;
15764 esac
15765 fi
15766 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15767 if test -n "$CHECK_GMAKE"; then
15768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15769 $as_echo "$CHECK_GMAKE" >&6; }
15770 else
15771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15772 $as_echo "no" >&6; }
15773 fi
15774 
15775 
15776   test -n "$CHECK_GMAKE" && break
15777 done
15778 
15779 
15780   MAKE_CANDIDATE=""$CHECK_GMAKE""
15781   DESCRIPTION="gmake in PATH"
15782   if test "x$MAKE_CANDIDATE" != x; then
15783     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15784 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15785     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15786     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15787     if test "x$IS_GNU_MAKE" = x; then
15788       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15789 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15790     else
15791       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15792       if test "x$IS_MODERN_MAKE" = x; then
15793         { $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
15794 $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;}
15795       else
15796         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15797           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15798             MAKE_EXPECTED_ENV='cygwin'
15799           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15800             MAKE_EXPECTED_ENV='msys'
15801           else
15802             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15803           fi
15804           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15805           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15806         else
15807           # Not relevant for non-Windows
15808           IS_MAKE_CORRECT_ENV=true
15809         fi
15810         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15811           { $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
15812 $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;}
15813         else
15814           FOUND_MAKE=$MAKE_CANDIDATE
15815 
15816   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15817 
15818   # First separate the path from the arguments. This will split at the first
15819   # space.
15820   complete="$FOUND_MAKE"
15821   path="${complete%% *}"
15822   tmp="$complete EOL"
15823   arguments="${tmp#* }"
15824 
15825   # Input might be given as Windows format, start by converting to
15826   # unix format.
15827   new_path=`$CYGPATH -u "$path"`
15828 
15829   # Now try to locate executable using which
15830   new_path=`$WHICH "$new_path" 2> /dev/null`
15831   # bat and cmd files are not always considered executable in cygwin causing which
15832   # to not find them
15833   if test "x$new_path" = x \
15834       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15835       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15836     new_path=`$CYGPATH -u "$path"`
15837   fi
15838   if test "x$new_path" = x; then
15839     # Oops. Which didn't find the executable.
15840     # The splitting of arguments from the executable at a space might have been incorrect,
15841     # since paths with space are more likely in Windows. Give it another try with the whole
15842     # argument.
15843     path="$complete"
15844     arguments="EOL"
15845     new_path=`$CYGPATH -u "$path"`
15846     new_path=`$WHICH "$new_path" 2> /dev/null`
15847     # bat and cmd files are not always considered executable in cygwin causing which
15848     # to not find them
15849     if test "x$new_path" = x \
15850         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15851         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15852       new_path=`$CYGPATH -u "$path"`
15853     fi
15854     if test "x$new_path" = x; then
15855       # It's still not found. Now this is an unrecoverable error.
15856       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15857 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15858       has_space=`$ECHO "$complete" | $GREP " "`
15859       if test "x$has_space" != x; then
15860         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15861 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15862       fi
15863       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15864     fi
15865   fi
15866 
15867   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15868   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15869   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15870   # "foo.exe" is OK but "foo" is an error.
15871   #
15872   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15873   # It is also a way to make sure we got the proper file name for the real test later on.
15874   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15875   if test "x$test_shortpath" = x; then
15876     # Short path failed, file does not exist as specified.
15877     # Try adding .exe or .cmd
15878     if test -f "${new_path}.exe"; then
15879       input_to_shortpath="${new_path}.exe"
15880     elif test -f "${new_path}.cmd"; then
15881       input_to_shortpath="${new_path}.cmd"
15882     else
15883       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15884 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15885       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15886 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15887       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15888     fi
15889   else
15890     input_to_shortpath="$new_path"
15891   fi
15892 
15893   # Call helper function which possibly converts this using DOS-style short mode.
15894   # If so, the updated path is stored in $new_path.
15895   new_path="$input_to_shortpath"
15896 
15897   input_path="$input_to_shortpath"
15898   # Check if we need to convert this using DOS-style short mode. If the path
15899   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15900   # take no chances and rewrite it.
15901   # Note: m4 eats our [], so we need to use [ and ] instead.
15902   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15903   if test "x$has_forbidden_chars" != x; then
15904     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15905     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15906     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15907     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15908       # Going to short mode and back again did indeed matter. Since short mode is
15909       # case insensitive, let's make it lowercase to improve readability.
15910       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15911       # Now convert it back to Unix-stile (cygpath)
15912       input_path=`$CYGPATH -u "$shortmode_path"`
15913       new_path="$input_path"
15914     fi
15915   fi
15916 
15917   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15918   if test "x$test_cygdrive_prefix" = x; then
15919     # As a simple fix, exclude /usr/bin since it's not a real path.
15920     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15921       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15922       # a path prefixed by /cygdrive for fixpath to work.
15923       new_path="$CYGWIN_ROOT_PATH$input_path"
15924     fi
15925   fi
15926 
15927   # remove trailing .exe if any
15928   new_path="${new_path/%.exe/}"
15929 
15930   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15931 
15932   # First separate the path from the arguments. This will split at the first
15933   # space.
15934   complete="$FOUND_MAKE"
15935   path="${complete%% *}"
15936   tmp="$complete EOL"
15937   arguments="${tmp#* }"
15938 
15939   # Input might be given as Windows format, start by converting to
15940   # unix format.
15941   new_path="$path"
15942 
15943   windows_path="$new_path"
15944   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15945     unix_path=`$CYGPATH -u "$windows_path"`
15946     new_path="$unix_path"
15947   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15948     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15949     new_path="$unix_path"
15950   fi
15951 
15952 
15953   # Now try to locate executable using which
15954   new_path=`$WHICH "$new_path" 2> /dev/null`
15955 
15956   if test "x$new_path" = x; then
15957     # Oops. Which didn't find the executable.
15958     # The splitting of arguments from the executable at a space might have been incorrect,
15959     # since paths with space are more likely in Windows. Give it another try with the whole
15960     # argument.
15961     path="$complete"
15962     arguments="EOL"
15963     new_path="$path"
15964 
15965   windows_path="$new_path"
15966   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15967     unix_path=`$CYGPATH -u "$windows_path"`
15968     new_path="$unix_path"
15969   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15970     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15971     new_path="$unix_path"
15972   fi
15973 
15974 
15975     new_path=`$WHICH "$new_path" 2> /dev/null`
15976     # bat and cmd files are not always considered executable in MSYS causing which
15977     # to not find them
15978     if test "x$new_path" = x \
15979         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15980         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15981       new_path="$path"
15982 
15983   windows_path="$new_path"
15984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15985     unix_path=`$CYGPATH -u "$windows_path"`
15986     new_path="$unix_path"
15987   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15988     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15989     new_path="$unix_path"
15990   fi
15991 
15992     fi
15993 
15994     if test "x$new_path" = x; then
15995       # It's still not found. Now this is an unrecoverable error.
15996       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15997 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15998       has_space=`$ECHO "$complete" | $GREP " "`
15999       if test "x$has_space" != x; then
16000         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16001 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16002       fi
16003       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16004     fi
16005   fi
16006 
16007   # Now new_path has a complete unix path to the binary
16008   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16009     # Keep paths in /bin as-is, but remove trailing .exe if any
16010     new_path="${new_path/%.exe/}"
16011     # Do not save /bin paths to all_fixpath_prefixes!
16012   else
16013     # Not in mixed or Windows style, start by that.
16014     new_path=`cmd //c echo $new_path`
16015 
16016   input_path="$new_path"
16017   # Check if we need to convert this using DOS-style short mode. If the path
16018   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16019   # take no chances and rewrite it.
16020   # Note: m4 eats our [], so we need to use [ and ] instead.
16021   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16022   if test "x$has_forbidden_chars" != x; then
16023     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16024     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16025   fi
16026 
16027     # Output is in $new_path
16028 
16029   windows_path="$new_path"
16030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16031     unix_path=`$CYGPATH -u "$windows_path"`
16032     new_path="$unix_path"
16033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16034     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16035     new_path="$unix_path"
16036   fi
16037 
16038     # remove trailing .exe if any
16039     new_path="${new_path/%.exe/}"
16040 
16041     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16042     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16043   fi
16044 
16045   else
16046     # We're on a posix platform. Hooray! :)
16047     # First separate the path from the arguments. This will split at the first
16048     # space.
16049     complete="$FOUND_MAKE"
16050     path="${complete%% *}"
16051     tmp="$complete EOL"
16052     arguments="${tmp#* }"
16053 
16054     # Cannot rely on the command "which" here since it doesn't always work.
16055     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16056     if test -z "$is_absolute_path"; then
16057       # Path to executable is not absolute. Find it.
16058       IFS_save="$IFS"
16059       IFS=:
16060       for p in $PATH; do
16061         if test -f "$p/$path" && test -x "$p/$path"; then
16062           new_path="$p/$path"
16063           break
16064         fi
16065       done
16066       IFS="$IFS_save"
16067     else
16068       # This is an absolute path, we can use it without further modifications.
16069       new_path="$path"
16070     fi
16071 
16072     if test "x$new_path" = x; then
16073       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16074 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16075       has_space=`$ECHO "$complete" | $GREP " "`
16076       if test "x$has_space" != x; then
16077         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16078 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16079       fi
16080       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16081     fi
16082   fi
16083 
16084   # Now join together the path and the arguments once again
16085   if test "x$arguments" != xEOL; then
16086     new_complete="$new_path ${arguments% *}"
16087   else
16088     new_complete="$new_path"
16089   fi
16090 
16091   if test "x$complete" != "x$new_complete"; then
16092     FOUND_MAKE="$new_complete"
16093     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16094 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16095   fi
16096 
16097         fi
16098       fi
16099     fi
16100   fi
16101 
16102 
16103     if test "x$FOUND_MAKE" = x; then
16104       for ac_prog in make
16105 do
16106   # Extract the first word of "$ac_prog", so it can be a program name with args.
16107 set dummy $ac_prog; ac_word=$2
16108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16109 $as_echo_n "checking for $ac_word... " >&6; }
16110 if ${ac_cv_path_CHECK_MAKE+:} false; then :
16111   $as_echo_n "(cached) " >&6
16112 else
16113   case $CHECK_MAKE in
16114   [\\/]* | ?:[\\/]*)
16115   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16116   ;;
16117   *)
16118   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16119 for as_dir in $PATH
16120 do
16121   IFS=$as_save_IFS
16122   test -z "$as_dir" && as_dir=.
16123     for ac_exec_ext in '' $ac_executable_extensions; do
16124   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16125     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16126     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16127     break 2
16128   fi
16129 done
16130   done
16131 IFS=$as_save_IFS
16132 
16133   ;;
16134 esac
16135 fi
16136 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16137 if test -n "$CHECK_MAKE"; then
16138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16139 $as_echo "$CHECK_MAKE" >&6; }
16140 else
16141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16142 $as_echo "no" >&6; }
16143 fi
16144 
16145 
16146   test -n "$CHECK_MAKE" && break
16147 done
16148 
16149 
16150   MAKE_CANDIDATE=""$CHECK_MAKE""
16151   DESCRIPTION="make in PATH"
16152   if test "x$MAKE_CANDIDATE" != x; then
16153     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16154 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16155     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16156     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16157     if test "x$IS_GNU_MAKE" = x; then
16158       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16159 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16160     else
16161       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16162       if test "x$IS_MODERN_MAKE" = x; then
16163         { $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
16164 $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;}
16165       else
16166         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16167           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16168             MAKE_EXPECTED_ENV='cygwin'
16169           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16170             MAKE_EXPECTED_ENV='msys'
16171           else
16172             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16173           fi
16174           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16175           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16176         else
16177           # Not relevant for non-Windows
16178           IS_MAKE_CORRECT_ENV=true
16179         fi
16180         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16181           { $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
16182 $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;}
16183         else
16184           FOUND_MAKE=$MAKE_CANDIDATE
16185 
16186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16187 
16188   # First separate the path from the arguments. This will split at the first
16189   # space.
16190   complete="$FOUND_MAKE"
16191   path="${complete%% *}"
16192   tmp="$complete EOL"
16193   arguments="${tmp#* }"
16194 
16195   # Input might be given as Windows format, start by converting to
16196   # unix format.
16197   new_path=`$CYGPATH -u "$path"`
16198 
16199   # Now try to locate executable using which
16200   new_path=`$WHICH "$new_path" 2> /dev/null`
16201   # bat and cmd files are not always considered executable in cygwin causing which
16202   # to not find them
16203   if test "x$new_path" = x \
16204       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16205       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16206     new_path=`$CYGPATH -u "$path"`
16207   fi
16208   if test "x$new_path" = x; then
16209     # Oops. Which didn't find the executable.
16210     # The splitting of arguments from the executable at a space might have been incorrect,
16211     # since paths with space are more likely in Windows. Give it another try with the whole
16212     # argument.
16213     path="$complete"
16214     arguments="EOL"
16215     new_path=`$CYGPATH -u "$path"`
16216     new_path=`$WHICH "$new_path" 2> /dev/null`
16217     # bat and cmd files are not always considered executable in cygwin causing which
16218     # to not find them
16219     if test "x$new_path" = x \
16220         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16221         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16222       new_path=`$CYGPATH -u "$path"`
16223     fi
16224     if test "x$new_path" = x; then
16225       # It's still not found. Now this is an unrecoverable error.
16226       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16227 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16228       has_space=`$ECHO "$complete" | $GREP " "`
16229       if test "x$has_space" != x; then
16230         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16231 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16232       fi
16233       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16234     fi
16235   fi
16236 
16237   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16238   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16239   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16240   # "foo.exe" is OK but "foo" is an error.
16241   #
16242   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16243   # It is also a way to make sure we got the proper file name for the real test later on.
16244   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16245   if test "x$test_shortpath" = x; then
16246     # Short path failed, file does not exist as specified.
16247     # Try adding .exe or .cmd
16248     if test -f "${new_path}.exe"; then
16249       input_to_shortpath="${new_path}.exe"
16250     elif test -f "${new_path}.cmd"; then
16251       input_to_shortpath="${new_path}.cmd"
16252     else
16253       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16254 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16255       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16256 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16257       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16258     fi
16259   else
16260     input_to_shortpath="$new_path"
16261   fi
16262 
16263   # Call helper function which possibly converts this using DOS-style short mode.
16264   # If so, the updated path is stored in $new_path.
16265   new_path="$input_to_shortpath"
16266 
16267   input_path="$input_to_shortpath"
16268   # Check if we need to convert this using DOS-style short mode. If the path
16269   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16270   # take no chances and rewrite it.
16271   # Note: m4 eats our [], so we need to use [ and ] instead.
16272   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16273   if test "x$has_forbidden_chars" != x; then
16274     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16275     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16276     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16277     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16278       # Going to short mode and back again did indeed matter. Since short mode is
16279       # case insensitive, let's make it lowercase to improve readability.
16280       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16281       # Now convert it back to Unix-stile (cygpath)
16282       input_path=`$CYGPATH -u "$shortmode_path"`
16283       new_path="$input_path"
16284     fi
16285   fi
16286 
16287   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16288   if test "x$test_cygdrive_prefix" = x; then
16289     # As a simple fix, exclude /usr/bin since it's not a real path.
16290     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16291       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16292       # a path prefixed by /cygdrive for fixpath to work.
16293       new_path="$CYGWIN_ROOT_PATH$input_path"
16294     fi
16295   fi
16296 
16297   # remove trailing .exe if any
16298   new_path="${new_path/%.exe/}"
16299 
16300   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16301 
16302   # First separate the path from the arguments. This will split at the first
16303   # space.
16304   complete="$FOUND_MAKE"
16305   path="${complete%% *}"
16306   tmp="$complete EOL"
16307   arguments="${tmp#* }"
16308 
16309   # Input might be given as Windows format, start by converting to
16310   # unix format.
16311   new_path="$path"
16312 
16313   windows_path="$new_path"
16314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16315     unix_path=`$CYGPATH -u "$windows_path"`
16316     new_path="$unix_path"
16317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16318     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16319     new_path="$unix_path"
16320   fi
16321 
16322 
16323   # Now try to locate executable using which
16324   new_path=`$WHICH "$new_path" 2> /dev/null`
16325 
16326   if test "x$new_path" = x; then
16327     # Oops. Which didn't find the executable.
16328     # The splitting of arguments from the executable at a space might have been incorrect,
16329     # since paths with space are more likely in Windows. Give it another try with the whole
16330     # argument.
16331     path="$complete"
16332     arguments="EOL"
16333     new_path="$path"
16334 
16335   windows_path="$new_path"
16336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16337     unix_path=`$CYGPATH -u "$windows_path"`
16338     new_path="$unix_path"
16339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16341     new_path="$unix_path"
16342   fi
16343 
16344 
16345     new_path=`$WHICH "$new_path" 2> /dev/null`
16346     # bat and cmd files are not always considered executable in MSYS causing which
16347     # to not find them
16348     if test "x$new_path" = x \
16349         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16350         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16351       new_path="$path"
16352 
16353   windows_path="$new_path"
16354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16355     unix_path=`$CYGPATH -u "$windows_path"`
16356     new_path="$unix_path"
16357   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16358     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16359     new_path="$unix_path"
16360   fi
16361 
16362     fi
16363 
16364     if test "x$new_path" = x; then
16365       # It's still not found. Now this is an unrecoverable error.
16366       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16367 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16368       has_space=`$ECHO "$complete" | $GREP " "`
16369       if test "x$has_space" != x; then
16370         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16371 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16372       fi
16373       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16374     fi
16375   fi
16376 
16377   # Now new_path has a complete unix path to the binary
16378   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16379     # Keep paths in /bin as-is, but remove trailing .exe if any
16380     new_path="${new_path/%.exe/}"
16381     # Do not save /bin paths to all_fixpath_prefixes!
16382   else
16383     # Not in mixed or Windows style, start by that.
16384     new_path=`cmd //c echo $new_path`
16385 
16386   input_path="$new_path"
16387   # Check if we need to convert this using DOS-style short mode. If the path
16388   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16389   # take no chances and rewrite it.
16390   # Note: m4 eats our [], so we need to use [ and ] instead.
16391   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16392   if test "x$has_forbidden_chars" != x; then
16393     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16394     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16395   fi
16396 
16397     # Output is in $new_path
16398 
16399   windows_path="$new_path"
16400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16401     unix_path=`$CYGPATH -u "$windows_path"`
16402     new_path="$unix_path"
16403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16405     new_path="$unix_path"
16406   fi
16407 
16408     # remove trailing .exe if any
16409     new_path="${new_path/%.exe/}"
16410 
16411     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16412     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16413   fi
16414 
16415   else
16416     # We're on a posix platform. Hooray! :)
16417     # First separate the path from the arguments. This will split at the first
16418     # space.
16419     complete="$FOUND_MAKE"
16420     path="${complete%% *}"
16421     tmp="$complete EOL"
16422     arguments="${tmp#* }"
16423 
16424     # Cannot rely on the command "which" here since it doesn't always work.
16425     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16426     if test -z "$is_absolute_path"; then
16427       # Path to executable is not absolute. Find it.
16428       IFS_save="$IFS"
16429       IFS=:
16430       for p in $PATH; do
16431         if test -f "$p/$path" && test -x "$p/$path"; then
16432           new_path="$p/$path"
16433           break
16434         fi
16435       done
16436       IFS="$IFS_save"
16437     else
16438       # This is an absolute path, we can use it without further modifications.
16439       new_path="$path"
16440     fi
16441 
16442     if test "x$new_path" = x; then
16443       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16444 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16445       has_space=`$ECHO "$complete" | $GREP " "`
16446       if test "x$has_space" != x; then
16447         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16448 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16449       fi
16450       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16451     fi
16452   fi
16453 
16454   # Now join together the path and the arguments once again
16455   if test "x$arguments" != xEOL; then
16456     new_complete="$new_path ${arguments% *}"
16457   else
16458     new_complete="$new_path"
16459   fi
16460 
16461   if test "x$complete" != "x$new_complete"; then
16462     FOUND_MAKE="$new_complete"
16463     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16464 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16465   fi
16466 
16467         fi
16468       fi
16469     fi
16470   fi
16471 
16472     fi
16473 
16474     if test "x$FOUND_MAKE" = x; then
16475       if test "x$TOOLCHAIN_PATH" != x; then
16476         # We have a toolchain path, check that as well before giving up.
16477         OLD_PATH=$PATH
16478         PATH=$TOOLCHAIN_PATH:$PATH
16479         for ac_prog in gmake
16480 do
16481   # Extract the first word of "$ac_prog", so it can be a program name with args.
16482 set dummy $ac_prog; ac_word=$2
16483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16484 $as_echo_n "checking for $ac_word... " >&6; }
16485 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16486   $as_echo_n "(cached) " >&6
16487 else
16488   case $CHECK_TOOLSDIR_GMAKE in
16489   [\\/]* | ?:[\\/]*)
16490   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16491   ;;
16492   *)
16493   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16494 for as_dir in $PATH
16495 do
16496   IFS=$as_save_IFS
16497   test -z "$as_dir" && as_dir=.
16498     for ac_exec_ext in '' $ac_executable_extensions; do
16499   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16500     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16501     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16502     break 2
16503   fi
16504 done
16505   done
16506 IFS=$as_save_IFS
16507 
16508   ;;
16509 esac
16510 fi
16511 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16512 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16514 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16515 else
16516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16517 $as_echo "no" >&6; }
16518 fi
16519 
16520 
16521   test -n "$CHECK_TOOLSDIR_GMAKE" && break
16522 done
16523 
16524 
16525   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16526   DESCRIPTION="gmake in tools-dir"
16527   if test "x$MAKE_CANDIDATE" != x; then
16528     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16529 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16530     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16531     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16532     if test "x$IS_GNU_MAKE" = x; then
16533       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16534 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16535     else
16536       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16537       if test "x$IS_MODERN_MAKE" = x; then
16538         { $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
16539 $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;}
16540       else
16541         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16542           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16543             MAKE_EXPECTED_ENV='cygwin'
16544           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16545             MAKE_EXPECTED_ENV='msys'
16546           else
16547             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16548           fi
16549           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16550           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16551         else
16552           # Not relevant for non-Windows
16553           IS_MAKE_CORRECT_ENV=true
16554         fi
16555         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16556           { $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
16557 $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;}
16558         else
16559           FOUND_MAKE=$MAKE_CANDIDATE
16560 
16561   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16562 
16563   # First separate the path from the arguments. This will split at the first
16564   # space.
16565   complete="$FOUND_MAKE"
16566   path="${complete%% *}"
16567   tmp="$complete EOL"
16568   arguments="${tmp#* }"
16569 
16570   # Input might be given as Windows format, start by converting to
16571   # unix format.
16572   new_path=`$CYGPATH -u "$path"`
16573 
16574   # Now try to locate executable using which
16575   new_path=`$WHICH "$new_path" 2> /dev/null`
16576   # bat and cmd files are not always considered executable in cygwin causing which
16577   # to not find them
16578   if test "x$new_path" = x \
16579       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16580       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16581     new_path=`$CYGPATH -u "$path"`
16582   fi
16583   if test "x$new_path" = x; then
16584     # Oops. Which didn't find the executable.
16585     # The splitting of arguments from the executable at a space might have been incorrect,
16586     # since paths with space are more likely in Windows. Give it another try with the whole
16587     # argument.
16588     path="$complete"
16589     arguments="EOL"
16590     new_path=`$CYGPATH -u "$path"`
16591     new_path=`$WHICH "$new_path" 2> /dev/null`
16592     # bat and cmd files are not always considered executable in cygwin causing which
16593     # to not find them
16594     if test "x$new_path" = x \
16595         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16596         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16597       new_path=`$CYGPATH -u "$path"`
16598     fi
16599     if test "x$new_path" = x; then
16600       # It's still not found. Now this is an unrecoverable error.
16601       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16602 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16603       has_space=`$ECHO "$complete" | $GREP " "`
16604       if test "x$has_space" != x; then
16605         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16606 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16607       fi
16608       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16609     fi
16610   fi
16611 
16612   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16613   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16614   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16615   # "foo.exe" is OK but "foo" is an error.
16616   #
16617   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16618   # It is also a way to make sure we got the proper file name for the real test later on.
16619   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16620   if test "x$test_shortpath" = x; then
16621     # Short path failed, file does not exist as specified.
16622     # Try adding .exe or .cmd
16623     if test -f "${new_path}.exe"; then
16624       input_to_shortpath="${new_path}.exe"
16625     elif test -f "${new_path}.cmd"; then
16626       input_to_shortpath="${new_path}.cmd"
16627     else
16628       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16629 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16630       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16631 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16632       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16633     fi
16634   else
16635     input_to_shortpath="$new_path"
16636   fi
16637 
16638   # Call helper function which possibly converts this using DOS-style short mode.
16639   # If so, the updated path is stored in $new_path.
16640   new_path="$input_to_shortpath"
16641 
16642   input_path="$input_to_shortpath"
16643   # Check if we need to convert this using DOS-style short mode. If the path
16644   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16645   # take no chances and rewrite it.
16646   # Note: m4 eats our [], so we need to use [ and ] instead.
16647   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16648   if test "x$has_forbidden_chars" != x; then
16649     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16650     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16651     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16652     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16653       # Going to short mode and back again did indeed matter. Since short mode is
16654       # case insensitive, let's make it lowercase to improve readability.
16655       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16656       # Now convert it back to Unix-stile (cygpath)
16657       input_path=`$CYGPATH -u "$shortmode_path"`
16658       new_path="$input_path"
16659     fi
16660   fi
16661 
16662   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16663   if test "x$test_cygdrive_prefix" = x; then
16664     # As a simple fix, exclude /usr/bin since it's not a real path.
16665     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16666       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16667       # a path prefixed by /cygdrive for fixpath to work.
16668       new_path="$CYGWIN_ROOT_PATH$input_path"
16669     fi
16670   fi
16671 
16672   # remove trailing .exe if any
16673   new_path="${new_path/%.exe/}"
16674 
16675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16676 
16677   # First separate the path from the arguments. This will split at the first
16678   # space.
16679   complete="$FOUND_MAKE"
16680   path="${complete%% *}"
16681   tmp="$complete EOL"
16682   arguments="${tmp#* }"
16683 
16684   # Input might be given as Windows format, start by converting to
16685   # unix format.
16686   new_path="$path"
16687 
16688   windows_path="$new_path"
16689   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16690     unix_path=`$CYGPATH -u "$windows_path"`
16691     new_path="$unix_path"
16692   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16693     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16694     new_path="$unix_path"
16695   fi
16696 
16697 
16698   # Now try to locate executable using which
16699   new_path=`$WHICH "$new_path" 2> /dev/null`
16700 
16701   if test "x$new_path" = x; then
16702     # Oops. Which didn't find the executable.
16703     # The splitting of arguments from the executable at a space might have been incorrect,
16704     # since paths with space are more likely in Windows. Give it another try with the whole
16705     # argument.
16706     path="$complete"
16707     arguments="EOL"
16708     new_path="$path"
16709 
16710   windows_path="$new_path"
16711   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16712     unix_path=`$CYGPATH -u "$windows_path"`
16713     new_path="$unix_path"
16714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16715     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16716     new_path="$unix_path"
16717   fi
16718 
16719 
16720     new_path=`$WHICH "$new_path" 2> /dev/null`
16721     # bat and cmd files are not always considered executable in MSYS causing which
16722     # to not find them
16723     if test "x$new_path" = x \
16724         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16725         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16726       new_path="$path"
16727 
16728   windows_path="$new_path"
16729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16730     unix_path=`$CYGPATH -u "$windows_path"`
16731     new_path="$unix_path"
16732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16733     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16734     new_path="$unix_path"
16735   fi
16736 
16737     fi
16738 
16739     if test "x$new_path" = x; then
16740       # It's still not found. Now this is an unrecoverable error.
16741       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16742 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16743       has_space=`$ECHO "$complete" | $GREP " "`
16744       if test "x$has_space" != x; then
16745         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16746 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16747       fi
16748       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16749     fi
16750   fi
16751 
16752   # Now new_path has a complete unix path to the binary
16753   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16754     # Keep paths in /bin as-is, but remove trailing .exe if any
16755     new_path="${new_path/%.exe/}"
16756     # Do not save /bin paths to all_fixpath_prefixes!
16757   else
16758     # Not in mixed or Windows style, start by that.
16759     new_path=`cmd //c echo $new_path`
16760 
16761   input_path="$new_path"
16762   # Check if we need to convert this using DOS-style short mode. If the path
16763   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16764   # take no chances and rewrite it.
16765   # Note: m4 eats our [], so we need to use [ and ] instead.
16766   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16767   if test "x$has_forbidden_chars" != x; then
16768     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16769     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16770   fi
16771 
16772     # Output is in $new_path
16773 
16774   windows_path="$new_path"
16775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16776     unix_path=`$CYGPATH -u "$windows_path"`
16777     new_path="$unix_path"
16778   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16779     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16780     new_path="$unix_path"
16781   fi
16782 
16783     # remove trailing .exe if any
16784     new_path="${new_path/%.exe/}"
16785 
16786     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16787     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16788   fi
16789 
16790   else
16791     # We're on a posix platform. Hooray! :)
16792     # First separate the path from the arguments. This will split at the first
16793     # space.
16794     complete="$FOUND_MAKE"
16795     path="${complete%% *}"
16796     tmp="$complete EOL"
16797     arguments="${tmp#* }"
16798 
16799     # Cannot rely on the command "which" here since it doesn't always work.
16800     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16801     if test -z "$is_absolute_path"; then
16802       # Path to executable is not absolute. Find it.
16803       IFS_save="$IFS"
16804       IFS=:
16805       for p in $PATH; do
16806         if test -f "$p/$path" && test -x "$p/$path"; then
16807           new_path="$p/$path"
16808           break
16809         fi
16810       done
16811       IFS="$IFS_save"
16812     else
16813       # This is an absolute path, we can use it without further modifications.
16814       new_path="$path"
16815     fi
16816 
16817     if test "x$new_path" = x; then
16818       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16819 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16820       has_space=`$ECHO "$complete" | $GREP " "`
16821       if test "x$has_space" != x; then
16822         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16823 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16824       fi
16825       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16826     fi
16827   fi
16828 
16829   # Now join together the path and the arguments once again
16830   if test "x$arguments" != xEOL; then
16831     new_complete="$new_path ${arguments% *}"
16832   else
16833     new_complete="$new_path"
16834   fi
16835 
16836   if test "x$complete" != "x$new_complete"; then
16837     FOUND_MAKE="$new_complete"
16838     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16839 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16840   fi
16841 
16842         fi
16843       fi
16844     fi
16845   fi
16846 
16847         if test "x$FOUND_MAKE" = x; then
16848           for ac_prog in make
16849 do
16850   # Extract the first word of "$ac_prog", so it can be a program name with args.
16851 set dummy $ac_prog; ac_word=$2
16852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16853 $as_echo_n "checking for $ac_word... " >&6; }
16854 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16855   $as_echo_n "(cached) " >&6
16856 else
16857   case $CHECK_TOOLSDIR_MAKE in
16858   [\\/]* | ?:[\\/]*)
16859   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16860   ;;
16861   *)
16862   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16863 for as_dir in $PATH
16864 do
16865   IFS=$as_save_IFS
16866   test -z "$as_dir" && as_dir=.
16867     for ac_exec_ext in '' $ac_executable_extensions; do
16868   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16869     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16870     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16871     break 2
16872   fi
16873 done
16874   done
16875 IFS=$as_save_IFS
16876 
16877   ;;
16878 esac
16879 fi
16880 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16881 if test -n "$CHECK_TOOLSDIR_MAKE"; then
16882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16883 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16884 else
16885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16886 $as_echo "no" >&6; }
16887 fi
16888 
16889 
16890   test -n "$CHECK_TOOLSDIR_MAKE" && break
16891 done
16892 
16893 
16894   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16895   DESCRIPTION="make in tools-dir"
16896   if test "x$MAKE_CANDIDATE" != x; then
16897     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16898 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16899     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16900     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16901     if test "x$IS_GNU_MAKE" = x; then
16902       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16903 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16904     else
16905       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16906       if test "x$IS_MODERN_MAKE" = x; then
16907         { $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
16908 $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;}
16909       else
16910         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16911           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16912             MAKE_EXPECTED_ENV='cygwin'
16913           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16914             MAKE_EXPECTED_ENV='msys'
16915           else
16916             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16917           fi
16918           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16919           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16920         else
16921           # Not relevant for non-Windows
16922           IS_MAKE_CORRECT_ENV=true
16923         fi
16924         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16925           { $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
16926 $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;}
16927         else
16928           FOUND_MAKE=$MAKE_CANDIDATE
16929 
16930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16931 
16932   # First separate the path from the arguments. This will split at the first
16933   # space.
16934   complete="$FOUND_MAKE"
16935   path="${complete%% *}"
16936   tmp="$complete EOL"
16937   arguments="${tmp#* }"
16938 
16939   # Input might be given as Windows format, start by converting to
16940   # unix format.
16941   new_path=`$CYGPATH -u "$path"`
16942 
16943   # Now try to locate executable using which
16944   new_path=`$WHICH "$new_path" 2> /dev/null`
16945   # bat and cmd files are not always considered executable in cygwin causing which
16946   # to not find them
16947   if test "x$new_path" = x \
16948       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16949       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16950     new_path=`$CYGPATH -u "$path"`
16951   fi
16952   if test "x$new_path" = x; then
16953     # Oops. Which didn't find the executable.
16954     # The splitting of arguments from the executable at a space might have been incorrect,
16955     # since paths with space are more likely in Windows. Give it another try with the whole
16956     # argument.
16957     path="$complete"
16958     arguments="EOL"
16959     new_path=`$CYGPATH -u "$path"`
16960     new_path=`$WHICH "$new_path" 2> /dev/null`
16961     # bat and cmd files are not always considered executable in cygwin causing which
16962     # to not find them
16963     if test "x$new_path" = x \
16964         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16965         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16966       new_path=`$CYGPATH -u "$path"`
16967     fi
16968     if test "x$new_path" = x; then
16969       # It's still not found. Now this is an unrecoverable error.
16970       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16971 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16972       has_space=`$ECHO "$complete" | $GREP " "`
16973       if test "x$has_space" != x; then
16974         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16975 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16976       fi
16977       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16978     fi
16979   fi
16980 
16981   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16982   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16983   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16984   # "foo.exe" is OK but "foo" is an error.
16985   #
16986   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16987   # It is also a way to make sure we got the proper file name for the real test later on.
16988   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16989   if test "x$test_shortpath" = x; then
16990     # Short path failed, file does not exist as specified.
16991     # Try adding .exe or .cmd
16992     if test -f "${new_path}.exe"; then
16993       input_to_shortpath="${new_path}.exe"
16994     elif test -f "${new_path}.cmd"; then
16995       input_to_shortpath="${new_path}.cmd"
16996     else
16997       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16998 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16999       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17000 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17001       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17002     fi
17003   else
17004     input_to_shortpath="$new_path"
17005   fi
17006 
17007   # Call helper function which possibly converts this using DOS-style short mode.
17008   # If so, the updated path is stored in $new_path.
17009   new_path="$input_to_shortpath"
17010 
17011   input_path="$input_to_shortpath"
17012   # Check if we need to convert this using DOS-style short mode. If the path
17013   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17014   # take no chances and rewrite it.
17015   # Note: m4 eats our [], so we need to use [ and ] instead.
17016   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17017   if test "x$has_forbidden_chars" != x; then
17018     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17019     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17020     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17021     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17022       # Going to short mode and back again did indeed matter. Since short mode is
17023       # case insensitive, let's make it lowercase to improve readability.
17024       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17025       # Now convert it back to Unix-stile (cygpath)
17026       input_path=`$CYGPATH -u "$shortmode_path"`
17027       new_path="$input_path"
17028     fi
17029   fi
17030 
17031   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17032   if test "x$test_cygdrive_prefix" = x; then
17033     # As a simple fix, exclude /usr/bin since it's not a real path.
17034     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17035       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17036       # a path prefixed by /cygdrive for fixpath to work.
17037       new_path="$CYGWIN_ROOT_PATH$input_path"
17038     fi
17039   fi
17040 
17041   # remove trailing .exe if any
17042   new_path="${new_path/%.exe/}"
17043 
17044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17045 
17046   # First separate the path from the arguments. This will split at the first
17047   # space.
17048   complete="$FOUND_MAKE"
17049   path="${complete%% *}"
17050   tmp="$complete EOL"
17051   arguments="${tmp#* }"
17052 
17053   # Input might be given as Windows format, start by converting to
17054   # unix format.
17055   new_path="$path"
17056 
17057   windows_path="$new_path"
17058   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17059     unix_path=`$CYGPATH -u "$windows_path"`
17060     new_path="$unix_path"
17061   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17062     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17063     new_path="$unix_path"
17064   fi
17065 
17066 
17067   # Now try to locate executable using which
17068   new_path=`$WHICH "$new_path" 2> /dev/null`
17069 
17070   if test "x$new_path" = x; then
17071     # Oops. Which didn't find the executable.
17072     # The splitting of arguments from the executable at a space might have been incorrect,
17073     # since paths with space are more likely in Windows. Give it another try with the whole
17074     # argument.
17075     path="$complete"
17076     arguments="EOL"
17077     new_path="$path"
17078 
17079   windows_path="$new_path"
17080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17081     unix_path=`$CYGPATH -u "$windows_path"`
17082     new_path="$unix_path"
17083   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17084     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17085     new_path="$unix_path"
17086   fi
17087 
17088 
17089     new_path=`$WHICH "$new_path" 2> /dev/null`
17090     # bat and cmd files are not always considered executable in MSYS causing which
17091     # to not find them
17092     if test "x$new_path" = x \
17093         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17094         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17095       new_path="$path"
17096 
17097   windows_path="$new_path"
17098   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17099     unix_path=`$CYGPATH -u "$windows_path"`
17100     new_path="$unix_path"
17101   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17102     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17103     new_path="$unix_path"
17104   fi
17105 
17106     fi
17107 
17108     if test "x$new_path" = x; then
17109       # It's still not found. Now this is an unrecoverable error.
17110       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17111 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17112       has_space=`$ECHO "$complete" | $GREP " "`
17113       if test "x$has_space" != x; then
17114         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17115 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17116       fi
17117       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17118     fi
17119   fi
17120 
17121   # Now new_path has a complete unix path to the binary
17122   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17123     # Keep paths in /bin as-is, but remove trailing .exe if any
17124     new_path="${new_path/%.exe/}"
17125     # Do not save /bin paths to all_fixpath_prefixes!
17126   else
17127     # Not in mixed or Windows style, start by that.
17128     new_path=`cmd //c echo $new_path`
17129 
17130   input_path="$new_path"
17131   # Check if we need to convert this using DOS-style short mode. If the path
17132   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17133   # take no chances and rewrite it.
17134   # Note: m4 eats our [], so we need to use [ and ] instead.
17135   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17136   if test "x$has_forbidden_chars" != x; then
17137     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17138     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17139   fi
17140 
17141     # Output is in $new_path
17142 
17143   windows_path="$new_path"
17144   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17145     unix_path=`$CYGPATH -u "$windows_path"`
17146     new_path="$unix_path"
17147   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17148     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17149     new_path="$unix_path"
17150   fi
17151 
17152     # remove trailing .exe if any
17153     new_path="${new_path/%.exe/}"
17154 
17155     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17156     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17157   fi
17158 
17159   else
17160     # We're on a posix platform. Hooray! :)
17161     # First separate the path from the arguments. This will split at the first
17162     # space.
17163     complete="$FOUND_MAKE"
17164     path="${complete%% *}"
17165     tmp="$complete EOL"
17166     arguments="${tmp#* }"
17167 
17168     # Cannot rely on the command "which" here since it doesn't always work.
17169     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17170     if test -z "$is_absolute_path"; then
17171       # Path to executable is not absolute. Find it.
17172       IFS_save="$IFS"
17173       IFS=:
17174       for p in $PATH; do
17175         if test -f "$p/$path" && test -x "$p/$path"; then
17176           new_path="$p/$path"
17177           break
17178         fi
17179       done
17180       IFS="$IFS_save"
17181     else
17182       # This is an absolute path, we can use it without further modifications.
17183       new_path="$path"
17184     fi
17185 
17186     if test "x$new_path" = x; then
17187       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17188 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17189       has_space=`$ECHO "$complete" | $GREP " "`
17190       if test "x$has_space" != x; then
17191         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17192 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17193       fi
17194       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17195     fi
17196   fi
17197 
17198   # Now join together the path and the arguments once again
17199   if test "x$arguments" != xEOL; then
17200     new_complete="$new_path ${arguments% *}"
17201   else
17202     new_complete="$new_path"
17203   fi
17204 
17205   if test "x$complete" != "x$new_complete"; then
17206     FOUND_MAKE="$new_complete"
17207     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17208 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17209   fi
17210 
17211         fi
17212       fi
17213     fi
17214   fi
17215 
17216         fi
17217         PATH=$OLD_PATH
17218       fi
17219     fi
17220 
17221     if test "x$FOUND_MAKE" = x; then
17222       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
17223     fi
17224   fi
17225 
17226   MAKE=$FOUND_MAKE
17227 
17228   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17229 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17230 
17231 
17232 
17233   # Test if find supports -delete
17234   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17235 $as_echo_n "checking if find supports -delete... " >&6; }
17236   FIND_DELETE="-delete"
17237 
17238   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17239 
17240   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17241 
17242   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17243   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17244     # No, it does not.
17245     rm $DELETEDIR/TestIfFindSupportsDelete
17246     FIND_DELETE="-exec rm \{\} \+"
17247     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17248 $as_echo "no" >&6; }
17249   else
17250     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17251 $as_echo "yes" >&6; }
17252   fi
17253   rmdir $DELETEDIR
17254 
17255 
17256 
17257   # These tools might not be installed by default,
17258   # need hint on how to install them.
17259 
17260 
17261 
17262   # Publish this variable in the help.
17263 
17264 
17265   if test "x$UNZIP" = x; then
17266     # The variable is not set by user, try to locate tool using the code snippet
17267     for ac_prog in unzip
17268 do
17269   # Extract the first word of "$ac_prog", so it can be a program name with args.
17270 set dummy $ac_prog; ac_word=$2
17271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17272 $as_echo_n "checking for $ac_word... " >&6; }
17273 if ${ac_cv_path_UNZIP+:} false; then :
17274   $as_echo_n "(cached) " >&6
17275 else
17276   case $UNZIP in
17277   [\\/]* | ?:[\\/]*)
17278   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17279   ;;
17280   *)
17281   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17282 for as_dir in $PATH
17283 do
17284   IFS=$as_save_IFS
17285   test -z "$as_dir" && as_dir=.
17286     for ac_exec_ext in '' $ac_executable_extensions; do
17287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17288     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17290     break 2
17291   fi
17292 done
17293   done
17294 IFS=$as_save_IFS
17295 
17296   ;;
17297 esac
17298 fi
17299 UNZIP=$ac_cv_path_UNZIP
17300 if test -n "$UNZIP"; then
17301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17302 $as_echo "$UNZIP" >&6; }
17303 else
17304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17305 $as_echo "no" >&6; }
17306 fi
17307 
17308 
17309   test -n "$UNZIP" && break
17310 done
17311 
17312   else
17313     # The variable is set, but is it from the command line or the environment?
17314 
17315     # Try to remove the string !UNZIP! from our list.
17316     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17317     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17318       # If it failed, the variable was not from the command line. Ignore it,
17319       # but warn the user (except for BASH, which is always set by the calling BASH).
17320       if test "xUNZIP" != xBASH; then
17321         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17322 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17323       fi
17324       # Try to locate tool using the code snippet
17325       for ac_prog in unzip
17326 do
17327   # Extract the first word of "$ac_prog", so it can be a program name with args.
17328 set dummy $ac_prog; ac_word=$2
17329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17330 $as_echo_n "checking for $ac_word... " >&6; }
17331 if ${ac_cv_path_UNZIP+:} false; then :
17332   $as_echo_n "(cached) " >&6
17333 else
17334   case $UNZIP in
17335   [\\/]* | ?:[\\/]*)
17336   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17337   ;;
17338   *)
17339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17340 for as_dir in $PATH
17341 do
17342   IFS=$as_save_IFS
17343   test -z "$as_dir" && as_dir=.
17344     for ac_exec_ext in '' $ac_executable_extensions; do
17345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17346     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17348     break 2
17349   fi
17350 done
17351   done
17352 IFS=$as_save_IFS
17353 
17354   ;;
17355 esac
17356 fi
17357 UNZIP=$ac_cv_path_UNZIP
17358 if test -n "$UNZIP"; then
17359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17360 $as_echo "$UNZIP" >&6; }
17361 else
17362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17363 $as_echo "no" >&6; }
17364 fi
17365 
17366 
17367   test -n "$UNZIP" && break
17368 done
17369 
17370     else
17371       # If it succeeded, then it was overridden by the user. We will use it
17372       # for the tool.
17373 
17374       # First remove it from the list of overridden variables, so we can test
17375       # for unknown variables in the end.
17376       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17377 
17378       # Check if the provided tool contains a complete path.
17379       tool_specified="$UNZIP"
17380       tool_basename="${tool_specified##*/}"
17381       if test "x$tool_basename" = "x$tool_specified"; then
17382         # A command without a complete path is provided, search $PATH.
17383         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17384 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17385         # Extract the first word of "$tool_basename", so it can be a program name with args.
17386 set dummy $tool_basename; ac_word=$2
17387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17388 $as_echo_n "checking for $ac_word... " >&6; }
17389 if ${ac_cv_path_UNZIP+:} false; then :
17390   $as_echo_n "(cached) " >&6
17391 else
17392   case $UNZIP in
17393   [\\/]* | ?:[\\/]*)
17394   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17395   ;;
17396   *)
17397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17398 for as_dir in $PATH
17399 do
17400   IFS=$as_save_IFS
17401   test -z "$as_dir" && as_dir=.
17402     for ac_exec_ext in '' $ac_executable_extensions; do
17403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17404     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17406     break 2
17407   fi
17408 done
17409   done
17410 IFS=$as_save_IFS
17411 
17412   ;;
17413 esac
17414 fi
17415 UNZIP=$ac_cv_path_UNZIP
17416 if test -n "$UNZIP"; then
17417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17418 $as_echo "$UNZIP" >&6; }
17419 else
17420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17421 $as_echo "no" >&6; }
17422 fi
17423 
17424 
17425         if test "x$UNZIP" = x; then
17426           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17427         fi
17428       else
17429         # Otherwise we believe it is a complete path. Use it as it is.
17430         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17431 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17432         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17433 $as_echo_n "checking for UNZIP... " >&6; }
17434         if test ! -x "$tool_specified"; then
17435           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17436 $as_echo "not found" >&6; }
17437           as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17438         fi
17439         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17440 $as_echo "$tool_specified" >&6; }
17441       fi
17442     fi
17443   fi
17444 
17445 
17446 
17447   if test "x$UNZIP" = x; then
17448     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17449   fi
17450 
17451 
17452 
17453 
17454 
17455   # Publish this variable in the help.
17456 
17457 
17458   if test "x$ZIP" = x; then
17459     # The variable is not set by user, try to locate tool using the code snippet
17460     for ac_prog in zip
17461 do
17462   # Extract the first word of "$ac_prog", so it can be a program name with args.
17463 set dummy $ac_prog; ac_word=$2
17464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17465 $as_echo_n "checking for $ac_word... " >&6; }
17466 if ${ac_cv_path_ZIP+:} false; then :
17467   $as_echo_n "(cached) " >&6
17468 else
17469   case $ZIP in
17470   [\\/]* | ?:[\\/]*)
17471   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17472   ;;
17473   *)
17474   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17475 for as_dir in $PATH
17476 do
17477   IFS=$as_save_IFS
17478   test -z "$as_dir" && as_dir=.
17479     for ac_exec_ext in '' $ac_executable_extensions; do
17480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17481     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17483     break 2
17484   fi
17485 done
17486   done
17487 IFS=$as_save_IFS
17488 
17489   ;;
17490 esac
17491 fi
17492 ZIP=$ac_cv_path_ZIP
17493 if test -n "$ZIP"; then
17494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17495 $as_echo "$ZIP" >&6; }
17496 else
17497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17498 $as_echo "no" >&6; }
17499 fi
17500 
17501 
17502   test -n "$ZIP" && break
17503 done
17504 
17505   else
17506     # The variable is set, but is it from the command line or the environment?
17507 
17508     # Try to remove the string !ZIP! from our list.
17509     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17510     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17511       # If it failed, the variable was not from the command line. Ignore it,
17512       # but warn the user (except for BASH, which is always set by the calling BASH).
17513       if test "xZIP" != xBASH; then
17514         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17515 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17516       fi
17517       # Try to locate tool using the code snippet
17518       for ac_prog in zip
17519 do
17520   # Extract the first word of "$ac_prog", so it can be a program name with args.
17521 set dummy $ac_prog; ac_word=$2
17522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17523 $as_echo_n "checking for $ac_word... " >&6; }
17524 if ${ac_cv_path_ZIP+:} false; then :
17525   $as_echo_n "(cached) " >&6
17526 else
17527   case $ZIP in
17528   [\\/]* | ?:[\\/]*)
17529   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17530   ;;
17531   *)
17532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17533 for as_dir in $PATH
17534 do
17535   IFS=$as_save_IFS
17536   test -z "$as_dir" && as_dir=.
17537     for ac_exec_ext in '' $ac_executable_extensions; do
17538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17539     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17541     break 2
17542   fi
17543 done
17544   done
17545 IFS=$as_save_IFS
17546 
17547   ;;
17548 esac
17549 fi
17550 ZIP=$ac_cv_path_ZIP
17551 if test -n "$ZIP"; then
17552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17553 $as_echo "$ZIP" >&6; }
17554 else
17555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17556 $as_echo "no" >&6; }
17557 fi
17558 
17559 
17560   test -n "$ZIP" && break
17561 done
17562 
17563     else
17564       # If it succeeded, then it was overridden by the user. We will use it
17565       # for the tool.
17566 
17567       # First remove it from the list of overridden variables, so we can test
17568       # for unknown variables in the end.
17569       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17570 
17571       # Check if the provided tool contains a complete path.
17572       tool_specified="$ZIP"
17573       tool_basename="${tool_specified##*/}"
17574       if test "x$tool_basename" = "x$tool_specified"; then
17575         # A command without a complete path is provided, search $PATH.
17576         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17577 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17578         # Extract the first word of "$tool_basename", so it can be a program name with args.
17579 set dummy $tool_basename; ac_word=$2
17580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17581 $as_echo_n "checking for $ac_word... " >&6; }
17582 if ${ac_cv_path_ZIP+:} false; then :
17583   $as_echo_n "(cached) " >&6
17584 else
17585   case $ZIP in
17586   [\\/]* | ?:[\\/]*)
17587   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17588   ;;
17589   *)
17590   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17591 for as_dir in $PATH
17592 do
17593   IFS=$as_save_IFS
17594   test -z "$as_dir" && as_dir=.
17595     for ac_exec_ext in '' $ac_executable_extensions; do
17596   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17597     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17599     break 2
17600   fi
17601 done
17602   done
17603 IFS=$as_save_IFS
17604 
17605   ;;
17606 esac
17607 fi
17608 ZIP=$ac_cv_path_ZIP
17609 if test -n "$ZIP"; then
17610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17611 $as_echo "$ZIP" >&6; }
17612 else
17613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17614 $as_echo "no" >&6; }
17615 fi
17616 
17617 
17618         if test "x$ZIP" = x; then
17619           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17620         fi
17621       else
17622         # Otherwise we believe it is a complete path. Use it as it is.
17623         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17624 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17625         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17626 $as_echo_n "checking for ZIP... " >&6; }
17627         if test ! -x "$tool_specified"; then
17628           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17629 $as_echo "not found" >&6; }
17630           as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17631         fi
17632         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17633 $as_echo "$tool_specified" >&6; }
17634       fi
17635     fi
17636   fi
17637 
17638 
17639 
17640   if test "x$ZIP" = x; then
17641     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17642   fi
17643 
17644 
17645 
17646   # Non-required basic tools
17647 
17648 
17649 
17650   # Publish this variable in the help.
17651 
17652 
17653   if test "x$LDD" = x; then
17654     # The variable is not set by user, try to locate tool using the code snippet
17655     for ac_prog in ldd
17656 do
17657   # Extract the first word of "$ac_prog", so it can be a program name with args.
17658 set dummy $ac_prog; ac_word=$2
17659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17660 $as_echo_n "checking for $ac_word... " >&6; }
17661 if ${ac_cv_path_LDD+:} false; then :
17662   $as_echo_n "(cached) " >&6
17663 else
17664   case $LDD in
17665   [\\/]* | ?:[\\/]*)
17666   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17667   ;;
17668   *)
17669   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17670 for as_dir in $PATH
17671 do
17672   IFS=$as_save_IFS
17673   test -z "$as_dir" && as_dir=.
17674     for ac_exec_ext in '' $ac_executable_extensions; do
17675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17676     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17678     break 2
17679   fi
17680 done
17681   done
17682 IFS=$as_save_IFS
17683 
17684   ;;
17685 esac
17686 fi
17687 LDD=$ac_cv_path_LDD
17688 if test -n "$LDD"; then
17689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17690 $as_echo "$LDD" >&6; }
17691 else
17692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17693 $as_echo "no" >&6; }
17694 fi
17695 
17696 
17697   test -n "$LDD" && break
17698 done
17699 
17700   else
17701     # The variable is set, but is it from the command line or the environment?
17702 
17703     # Try to remove the string !LDD! from our list.
17704     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17705     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17706       # If it failed, the variable was not from the command line. Ignore it,
17707       # but warn the user (except for BASH, which is always set by the calling BASH).
17708       if test "xLDD" != xBASH; then
17709         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17710 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17711       fi
17712       # Try to locate tool using the code snippet
17713       for ac_prog in ldd
17714 do
17715   # Extract the first word of "$ac_prog", so it can be a program name with args.
17716 set dummy $ac_prog; ac_word=$2
17717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17718 $as_echo_n "checking for $ac_word... " >&6; }
17719 if ${ac_cv_path_LDD+:} false; then :
17720   $as_echo_n "(cached) " >&6
17721 else
17722   case $LDD in
17723   [\\/]* | ?:[\\/]*)
17724   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17725   ;;
17726   *)
17727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17728 for as_dir in $PATH
17729 do
17730   IFS=$as_save_IFS
17731   test -z "$as_dir" && as_dir=.
17732     for ac_exec_ext in '' $ac_executable_extensions; do
17733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17734     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17736     break 2
17737   fi
17738 done
17739   done
17740 IFS=$as_save_IFS
17741 
17742   ;;
17743 esac
17744 fi
17745 LDD=$ac_cv_path_LDD
17746 if test -n "$LDD"; then
17747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17748 $as_echo "$LDD" >&6; }
17749 else
17750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17751 $as_echo "no" >&6; }
17752 fi
17753 
17754 
17755   test -n "$LDD" && break
17756 done
17757 
17758     else
17759       # If it succeeded, then it was overridden by the user. We will use it
17760       # for the tool.
17761 
17762       # First remove it from the list of overridden variables, so we can test
17763       # for unknown variables in the end.
17764       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17765 
17766       # Check if the provided tool contains a complete path.
17767       tool_specified="$LDD"
17768       tool_basename="${tool_specified##*/}"
17769       if test "x$tool_basename" = "x$tool_specified"; then
17770         # A command without a complete path is provided, search $PATH.
17771         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17772 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17773         # Extract the first word of "$tool_basename", so it can be a program name with args.
17774 set dummy $tool_basename; ac_word=$2
17775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17776 $as_echo_n "checking for $ac_word... " >&6; }
17777 if ${ac_cv_path_LDD+:} false; then :
17778   $as_echo_n "(cached) " >&6
17779 else
17780   case $LDD in
17781   [\\/]* | ?:[\\/]*)
17782   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17783   ;;
17784   *)
17785   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17786 for as_dir in $PATH
17787 do
17788   IFS=$as_save_IFS
17789   test -z "$as_dir" && as_dir=.
17790     for ac_exec_ext in '' $ac_executable_extensions; do
17791   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17792     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17793     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17794     break 2
17795   fi
17796 done
17797   done
17798 IFS=$as_save_IFS
17799 
17800   ;;
17801 esac
17802 fi
17803 LDD=$ac_cv_path_LDD
17804 if test -n "$LDD"; then
17805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17806 $as_echo "$LDD" >&6; }
17807 else
17808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17809 $as_echo "no" >&6; }
17810 fi
17811 
17812 
17813         if test "x$LDD" = x; then
17814           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17815         fi
17816       else
17817         # Otherwise we believe it is a complete path. Use it as it is.
17818         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17819 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17820         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17821 $as_echo_n "checking for LDD... " >&6; }
17822         if test ! -x "$tool_specified"; then
17823           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17824 $as_echo "not found" >&6; }
17825           as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17826         fi
17827         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17828 $as_echo "$tool_specified" >&6; }
17829       fi
17830     fi
17831   fi
17832 
17833 
17834   if test "x$LDD" = "x"; then
17835     # List shared lib dependencies is used for
17836     # debug output and checking for forbidden dependencies.
17837     # We can build without it.
17838     LDD="true"
17839   fi
17840 
17841 
17842   # Publish this variable in the help.
17843 
17844 
17845   if test "x$OTOOL" = x; then
17846     # The variable is not set by user, try to locate tool using the code snippet
17847     for ac_prog in otool
17848 do
17849   # Extract the first word of "$ac_prog", so it can be a program name with args.
17850 set dummy $ac_prog; ac_word=$2
17851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17852 $as_echo_n "checking for $ac_word... " >&6; }
17853 if ${ac_cv_path_OTOOL+:} false; then :
17854   $as_echo_n "(cached) " >&6
17855 else
17856   case $OTOOL in
17857   [\\/]* | ?:[\\/]*)
17858   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17859   ;;
17860   *)
17861   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17862 for as_dir in $PATH
17863 do
17864   IFS=$as_save_IFS
17865   test -z "$as_dir" && as_dir=.
17866     for ac_exec_ext in '' $ac_executable_extensions; do
17867   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17868     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17869     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17870     break 2
17871   fi
17872 done
17873   done
17874 IFS=$as_save_IFS
17875 
17876   ;;
17877 esac
17878 fi
17879 OTOOL=$ac_cv_path_OTOOL
17880 if test -n "$OTOOL"; then
17881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17882 $as_echo "$OTOOL" >&6; }
17883 else
17884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17885 $as_echo "no" >&6; }
17886 fi
17887 
17888 
17889   test -n "$OTOOL" && break
17890 done
17891 
17892   else
17893     # The variable is set, but is it from the command line or the environment?
17894 
17895     # Try to remove the string !OTOOL! from our list.
17896     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17897     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17898       # If it failed, the variable was not from the command line. Ignore it,
17899       # but warn the user (except for BASH, which is always set by the calling BASH).
17900       if test "xOTOOL" != xBASH; then
17901         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17902 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17903       fi
17904       # Try to locate tool using the code snippet
17905       for ac_prog in otool
17906 do
17907   # Extract the first word of "$ac_prog", so it can be a program name with args.
17908 set dummy $ac_prog; ac_word=$2
17909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17910 $as_echo_n "checking for $ac_word... " >&6; }
17911 if ${ac_cv_path_OTOOL+:} false; then :
17912   $as_echo_n "(cached) " >&6
17913 else
17914   case $OTOOL in
17915   [\\/]* | ?:[\\/]*)
17916   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17917   ;;
17918   *)
17919   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17920 for as_dir in $PATH
17921 do
17922   IFS=$as_save_IFS
17923   test -z "$as_dir" && as_dir=.
17924     for ac_exec_ext in '' $ac_executable_extensions; do
17925   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17926     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17927     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17928     break 2
17929   fi
17930 done
17931   done
17932 IFS=$as_save_IFS
17933 
17934   ;;
17935 esac
17936 fi
17937 OTOOL=$ac_cv_path_OTOOL
17938 if test -n "$OTOOL"; then
17939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17940 $as_echo "$OTOOL" >&6; }
17941 else
17942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17943 $as_echo "no" >&6; }
17944 fi
17945 
17946 
17947   test -n "$OTOOL" && break
17948 done
17949 
17950     else
17951       # If it succeeded, then it was overridden by the user. We will use it
17952       # for the tool.
17953 
17954       # First remove it from the list of overridden variables, so we can test
17955       # for unknown variables in the end.
17956       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17957 
17958       # Check if the provided tool contains a complete path.
17959       tool_specified="$OTOOL"
17960       tool_basename="${tool_specified##*/}"
17961       if test "x$tool_basename" = "x$tool_specified"; then
17962         # A command without a complete path is provided, search $PATH.
17963         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17964 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17965         # Extract the first word of "$tool_basename", so it can be a program name with args.
17966 set dummy $tool_basename; ac_word=$2
17967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17968 $as_echo_n "checking for $ac_word... " >&6; }
17969 if ${ac_cv_path_OTOOL+:} false; then :
17970   $as_echo_n "(cached) " >&6
17971 else
17972   case $OTOOL in
17973   [\\/]* | ?:[\\/]*)
17974   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17975   ;;
17976   *)
17977   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17978 for as_dir in $PATH
17979 do
17980   IFS=$as_save_IFS
17981   test -z "$as_dir" && as_dir=.
17982     for ac_exec_ext in '' $ac_executable_extensions; do
17983   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17984     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17986     break 2
17987   fi
17988 done
17989   done
17990 IFS=$as_save_IFS
17991 
17992   ;;
17993 esac
17994 fi
17995 OTOOL=$ac_cv_path_OTOOL
17996 if test -n "$OTOOL"; then
17997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17998 $as_echo "$OTOOL" >&6; }
17999 else
18000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18001 $as_echo "no" >&6; }
18002 fi
18003 
18004 
18005         if test "x$OTOOL" = x; then
18006           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18007         fi
18008       else
18009         # Otherwise we believe it is a complete path. Use it as it is.
18010         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18011 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18012         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18013 $as_echo_n "checking for OTOOL... " >&6; }
18014         if test ! -x "$tool_specified"; then
18015           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18016 $as_echo "not found" >&6; }
18017           as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18018         fi
18019         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18020 $as_echo "$tool_specified" >&6; }
18021       fi
18022     fi
18023   fi
18024 
18025 
18026   if test "x$OTOOL" = "x"; then
18027     OTOOL="true"
18028   fi
18029 
18030 
18031   # Publish this variable in the help.
18032 
18033 
18034   if test "x$READELF" = x; then
18035     # The variable is not set by user, try to locate tool using the code snippet
18036     for ac_prog in greadelf readelf
18037 do
18038   # Extract the first word of "$ac_prog", so it can be a program name with args.
18039 set dummy $ac_prog; ac_word=$2
18040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18041 $as_echo_n "checking for $ac_word... " >&6; }
18042 if ${ac_cv_path_READELF+:} false; then :
18043   $as_echo_n "(cached) " >&6
18044 else
18045   case $READELF in
18046   [\\/]* | ?:[\\/]*)
18047   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18048   ;;
18049   *)
18050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18051 for as_dir in $PATH
18052 do
18053   IFS=$as_save_IFS
18054   test -z "$as_dir" && as_dir=.
18055     for ac_exec_ext in '' $ac_executable_extensions; do
18056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18057     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18059     break 2
18060   fi
18061 done
18062   done
18063 IFS=$as_save_IFS
18064 
18065   ;;
18066 esac
18067 fi
18068 READELF=$ac_cv_path_READELF
18069 if test -n "$READELF"; then
18070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18071 $as_echo "$READELF" >&6; }
18072 else
18073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18074 $as_echo "no" >&6; }
18075 fi
18076 
18077 
18078   test -n "$READELF" && break
18079 done
18080 
18081   else
18082     # The variable is set, but is it from the command line or the environment?
18083 
18084     # Try to remove the string !READELF! from our list.
18085     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18086     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18087       # If it failed, the variable was not from the command line. Ignore it,
18088       # but warn the user (except for BASH, which is always set by the calling BASH).
18089       if test "xREADELF" != xBASH; then
18090         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18091 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18092       fi
18093       # Try to locate tool using the code snippet
18094       for ac_prog in greadelf readelf
18095 do
18096   # Extract the first word of "$ac_prog", so it can be a program name with args.
18097 set dummy $ac_prog; ac_word=$2
18098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18099 $as_echo_n "checking for $ac_word... " >&6; }
18100 if ${ac_cv_path_READELF+:} false; then :
18101   $as_echo_n "(cached) " >&6
18102 else
18103   case $READELF in
18104   [\\/]* | ?:[\\/]*)
18105   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18106   ;;
18107   *)
18108   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18109 for as_dir in $PATH
18110 do
18111   IFS=$as_save_IFS
18112   test -z "$as_dir" && as_dir=.
18113     for ac_exec_ext in '' $ac_executable_extensions; do
18114   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18115     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18116     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18117     break 2
18118   fi
18119 done
18120   done
18121 IFS=$as_save_IFS
18122 
18123   ;;
18124 esac
18125 fi
18126 READELF=$ac_cv_path_READELF
18127 if test -n "$READELF"; then
18128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18129 $as_echo "$READELF" >&6; }
18130 else
18131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18132 $as_echo "no" >&6; }
18133 fi
18134 
18135 
18136   test -n "$READELF" && break
18137 done
18138 
18139     else
18140       # If it succeeded, then it was overridden by the user. We will use it
18141       # for the tool.
18142 
18143       # First remove it from the list of overridden variables, so we can test
18144       # for unknown variables in the end.
18145       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18146 
18147       # Check if the provided tool contains a complete path.
18148       tool_specified="$READELF"
18149       tool_basename="${tool_specified##*/}"
18150       if test "x$tool_basename" = "x$tool_specified"; then
18151         # A command without a complete path is provided, search $PATH.
18152         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18153 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18154         # Extract the first word of "$tool_basename", so it can be a program name with args.
18155 set dummy $tool_basename; ac_word=$2
18156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18157 $as_echo_n "checking for $ac_word... " >&6; }
18158 if ${ac_cv_path_READELF+:} false; then :
18159   $as_echo_n "(cached) " >&6
18160 else
18161   case $READELF in
18162   [\\/]* | ?:[\\/]*)
18163   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18164   ;;
18165   *)
18166   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18167 for as_dir in $PATH
18168 do
18169   IFS=$as_save_IFS
18170   test -z "$as_dir" && as_dir=.
18171     for ac_exec_ext in '' $ac_executable_extensions; do
18172   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18173     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18175     break 2
18176   fi
18177 done
18178   done
18179 IFS=$as_save_IFS
18180 
18181   ;;
18182 esac
18183 fi
18184 READELF=$ac_cv_path_READELF
18185 if test -n "$READELF"; then
18186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18187 $as_echo "$READELF" >&6; }
18188 else
18189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18190 $as_echo "no" >&6; }
18191 fi
18192 
18193 
18194         if test "x$READELF" = x; then
18195           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18196         fi
18197       else
18198         # Otherwise we believe it is a complete path. Use it as it is.
18199         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18200 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18201         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18202 $as_echo_n "checking for READELF... " >&6; }
18203         if test ! -x "$tool_specified"; then
18204           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18205 $as_echo "not found" >&6; }
18206           as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18207         fi
18208         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18209 $as_echo "$tool_specified" >&6; }
18210       fi
18211     fi
18212   fi
18213 
18214 
18215 
18216 
18217   # Publish this variable in the help.
18218 
18219 
18220   if test "x$HG" = x; then
18221     # The variable is not set by user, try to locate tool using the code snippet
18222     for ac_prog in hg
18223 do
18224   # Extract the first word of "$ac_prog", so it can be a program name with args.
18225 set dummy $ac_prog; ac_word=$2
18226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18227 $as_echo_n "checking for $ac_word... " >&6; }
18228 if ${ac_cv_path_HG+:} false; then :
18229   $as_echo_n "(cached) " >&6
18230 else
18231   case $HG in
18232   [\\/]* | ?:[\\/]*)
18233   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18234   ;;
18235   *)
18236   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18237 for as_dir in $PATH
18238 do
18239   IFS=$as_save_IFS
18240   test -z "$as_dir" && as_dir=.
18241     for ac_exec_ext in '' $ac_executable_extensions; do
18242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18243     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18245     break 2
18246   fi
18247 done
18248   done
18249 IFS=$as_save_IFS
18250 
18251   ;;
18252 esac
18253 fi
18254 HG=$ac_cv_path_HG
18255 if test -n "$HG"; then
18256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18257 $as_echo "$HG" >&6; }
18258 else
18259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18260 $as_echo "no" >&6; }
18261 fi
18262 
18263 
18264   test -n "$HG" && break
18265 done
18266 
18267   else
18268     # The variable is set, but is it from the command line or the environment?
18269 
18270     # Try to remove the string !HG! from our list.
18271     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18272     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18273       # If it failed, the variable was not from the command line. Ignore it,
18274       # but warn the user (except for BASH, which is always set by the calling BASH).
18275       if test "xHG" != xBASH; then
18276         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18277 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18278       fi
18279       # Try to locate tool using the code snippet
18280       for ac_prog in hg
18281 do
18282   # Extract the first word of "$ac_prog", so it can be a program name with args.
18283 set dummy $ac_prog; ac_word=$2
18284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18285 $as_echo_n "checking for $ac_word... " >&6; }
18286 if ${ac_cv_path_HG+:} false; then :
18287   $as_echo_n "(cached) " >&6
18288 else
18289   case $HG in
18290   [\\/]* | ?:[\\/]*)
18291   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18292   ;;
18293   *)
18294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18295 for as_dir in $PATH
18296 do
18297   IFS=$as_save_IFS
18298   test -z "$as_dir" && as_dir=.
18299     for ac_exec_ext in '' $ac_executable_extensions; do
18300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18301     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18303     break 2
18304   fi
18305 done
18306   done
18307 IFS=$as_save_IFS
18308 
18309   ;;
18310 esac
18311 fi
18312 HG=$ac_cv_path_HG
18313 if test -n "$HG"; then
18314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18315 $as_echo "$HG" >&6; }
18316 else
18317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18318 $as_echo "no" >&6; }
18319 fi
18320 
18321 
18322   test -n "$HG" && break
18323 done
18324 
18325     else
18326       # If it succeeded, then it was overridden by the user. We will use it
18327       # for the tool.
18328 
18329       # First remove it from the list of overridden variables, so we can test
18330       # for unknown variables in the end.
18331       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18332 
18333       # Check if the provided tool contains a complete path.
18334       tool_specified="$HG"
18335       tool_basename="${tool_specified##*/}"
18336       if test "x$tool_basename" = "x$tool_specified"; then
18337         # A command without a complete path is provided, search $PATH.
18338         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18339 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18340         # Extract the first word of "$tool_basename", so it can be a program name with args.
18341 set dummy $tool_basename; ac_word=$2
18342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18343 $as_echo_n "checking for $ac_word... " >&6; }
18344 if ${ac_cv_path_HG+:} false; then :
18345   $as_echo_n "(cached) " >&6
18346 else
18347   case $HG in
18348   [\\/]* | ?:[\\/]*)
18349   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18350   ;;
18351   *)
18352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18353 for as_dir in $PATH
18354 do
18355   IFS=$as_save_IFS
18356   test -z "$as_dir" && as_dir=.
18357     for ac_exec_ext in '' $ac_executable_extensions; do
18358   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18359     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18361     break 2
18362   fi
18363 done
18364   done
18365 IFS=$as_save_IFS
18366 
18367   ;;
18368 esac
18369 fi
18370 HG=$ac_cv_path_HG
18371 if test -n "$HG"; then
18372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18373 $as_echo "$HG" >&6; }
18374 else
18375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18376 $as_echo "no" >&6; }
18377 fi
18378 
18379 
18380         if test "x$HG" = x; then
18381           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18382         fi
18383       else
18384         # Otherwise we believe it is a complete path. Use it as it is.
18385         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18386 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18387         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18388 $as_echo_n "checking for HG... " >&6; }
18389         if test ! -x "$tool_specified"; then
18390           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18391 $as_echo "not found" >&6; }
18392           as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18393         fi
18394         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18395 $as_echo "$tool_specified" >&6; }
18396       fi
18397     fi
18398   fi
18399 
18400 
18401 
18402 
18403   # Publish this variable in the help.
18404 
18405 
18406   if test "x$STAT" = x; then
18407     # The variable is not set by user, try to locate tool using the code snippet
18408     for ac_prog in stat
18409 do
18410   # Extract the first word of "$ac_prog", so it can be a program name with args.
18411 set dummy $ac_prog; ac_word=$2
18412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18413 $as_echo_n "checking for $ac_word... " >&6; }
18414 if ${ac_cv_path_STAT+:} false; then :
18415   $as_echo_n "(cached) " >&6
18416 else
18417   case $STAT in
18418   [\\/]* | ?:[\\/]*)
18419   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18420   ;;
18421   *)
18422   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18423 for as_dir in $PATH
18424 do
18425   IFS=$as_save_IFS
18426   test -z "$as_dir" && as_dir=.
18427     for ac_exec_ext in '' $ac_executable_extensions; do
18428   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18429     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18431     break 2
18432   fi
18433 done
18434   done
18435 IFS=$as_save_IFS
18436 
18437   ;;
18438 esac
18439 fi
18440 STAT=$ac_cv_path_STAT
18441 if test -n "$STAT"; then
18442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18443 $as_echo "$STAT" >&6; }
18444 else
18445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18446 $as_echo "no" >&6; }
18447 fi
18448 
18449 
18450   test -n "$STAT" && break
18451 done
18452 
18453   else
18454     # The variable is set, but is it from the command line or the environment?
18455 
18456     # Try to remove the string !STAT! from our list.
18457     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18458     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18459       # If it failed, the variable was not from the command line. Ignore it,
18460       # but warn the user (except for BASH, which is always set by the calling BASH).
18461       if test "xSTAT" != xBASH; then
18462         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18463 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18464       fi
18465       # Try to locate tool using the code snippet
18466       for ac_prog in stat
18467 do
18468   # Extract the first word of "$ac_prog", so it can be a program name with args.
18469 set dummy $ac_prog; ac_word=$2
18470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18471 $as_echo_n "checking for $ac_word... " >&6; }
18472 if ${ac_cv_path_STAT+:} false; then :
18473   $as_echo_n "(cached) " >&6
18474 else
18475   case $STAT in
18476   [\\/]* | ?:[\\/]*)
18477   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18478   ;;
18479   *)
18480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18481 for as_dir in $PATH
18482 do
18483   IFS=$as_save_IFS
18484   test -z "$as_dir" && as_dir=.
18485     for ac_exec_ext in '' $ac_executable_extensions; do
18486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18487     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18489     break 2
18490   fi
18491 done
18492   done
18493 IFS=$as_save_IFS
18494 
18495   ;;
18496 esac
18497 fi
18498 STAT=$ac_cv_path_STAT
18499 if test -n "$STAT"; then
18500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18501 $as_echo "$STAT" >&6; }
18502 else
18503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18504 $as_echo "no" >&6; }
18505 fi
18506 
18507 
18508   test -n "$STAT" && break
18509 done
18510 
18511     else
18512       # If it succeeded, then it was overridden by the user. We will use it
18513       # for the tool.
18514 
18515       # First remove it from the list of overridden variables, so we can test
18516       # for unknown variables in the end.
18517       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18518 
18519       # Check if the provided tool contains a complete path.
18520       tool_specified="$STAT"
18521       tool_basename="${tool_specified##*/}"
18522       if test "x$tool_basename" = "x$tool_specified"; then
18523         # A command without a complete path is provided, search $PATH.
18524         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18525 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18526         # Extract the first word of "$tool_basename", so it can be a program name with args.
18527 set dummy $tool_basename; ac_word=$2
18528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18529 $as_echo_n "checking for $ac_word... " >&6; }
18530 if ${ac_cv_path_STAT+:} false; then :
18531   $as_echo_n "(cached) " >&6
18532 else
18533   case $STAT in
18534   [\\/]* | ?:[\\/]*)
18535   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18536   ;;
18537   *)
18538   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18539 for as_dir in $PATH
18540 do
18541   IFS=$as_save_IFS
18542   test -z "$as_dir" && as_dir=.
18543     for ac_exec_ext in '' $ac_executable_extensions; do
18544   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18545     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18547     break 2
18548   fi
18549 done
18550   done
18551 IFS=$as_save_IFS
18552 
18553   ;;
18554 esac
18555 fi
18556 STAT=$ac_cv_path_STAT
18557 if test -n "$STAT"; then
18558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18559 $as_echo "$STAT" >&6; }
18560 else
18561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18562 $as_echo "no" >&6; }
18563 fi
18564 
18565 
18566         if test "x$STAT" = x; then
18567           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18568         fi
18569       else
18570         # Otherwise we believe it is a complete path. Use it as it is.
18571         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18572 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18573         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18574 $as_echo_n "checking for STAT... " >&6; }
18575         if test ! -x "$tool_specified"; then
18576           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18577 $as_echo "not found" >&6; }
18578           as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18579         fi
18580         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18581 $as_echo "$tool_specified" >&6; }
18582       fi
18583     fi
18584   fi
18585 
18586 
18587 
18588 
18589   # Publish this variable in the help.
18590 
18591 
18592   if test "x$TIME" = x; then
18593     # The variable is not set by user, try to locate tool using the code snippet
18594     for ac_prog in time
18595 do
18596   # Extract the first word of "$ac_prog", so it can be a program name with args.
18597 set dummy $ac_prog; ac_word=$2
18598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18599 $as_echo_n "checking for $ac_word... " >&6; }
18600 if ${ac_cv_path_TIME+:} false; then :
18601   $as_echo_n "(cached) " >&6
18602 else
18603   case $TIME in
18604   [\\/]* | ?:[\\/]*)
18605   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18606   ;;
18607   *)
18608   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18609 for as_dir in $PATH
18610 do
18611   IFS=$as_save_IFS
18612   test -z "$as_dir" && as_dir=.
18613     for ac_exec_ext in '' $ac_executable_extensions; do
18614   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18615     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18617     break 2
18618   fi
18619 done
18620   done
18621 IFS=$as_save_IFS
18622 
18623   ;;
18624 esac
18625 fi
18626 TIME=$ac_cv_path_TIME
18627 if test -n "$TIME"; then
18628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18629 $as_echo "$TIME" >&6; }
18630 else
18631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18632 $as_echo "no" >&6; }
18633 fi
18634 
18635 
18636   test -n "$TIME" && break
18637 done
18638 
18639   else
18640     # The variable is set, but is it from the command line or the environment?
18641 
18642     # Try to remove the string !TIME! from our list.
18643     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18644     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18645       # If it failed, the variable was not from the command line. Ignore it,
18646       # but warn the user (except for BASH, which is always set by the calling BASH).
18647       if test "xTIME" != xBASH; then
18648         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18649 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18650       fi
18651       # Try to locate tool using the code snippet
18652       for ac_prog in time
18653 do
18654   # Extract the first word of "$ac_prog", so it can be a program name with args.
18655 set dummy $ac_prog; ac_word=$2
18656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18657 $as_echo_n "checking for $ac_word... " >&6; }
18658 if ${ac_cv_path_TIME+:} false; then :
18659   $as_echo_n "(cached) " >&6
18660 else
18661   case $TIME in
18662   [\\/]* | ?:[\\/]*)
18663   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18664   ;;
18665   *)
18666   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18667 for as_dir in $PATH
18668 do
18669   IFS=$as_save_IFS
18670   test -z "$as_dir" && as_dir=.
18671     for ac_exec_ext in '' $ac_executable_extensions; do
18672   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18673     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18674     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18675     break 2
18676   fi
18677 done
18678   done
18679 IFS=$as_save_IFS
18680 
18681   ;;
18682 esac
18683 fi
18684 TIME=$ac_cv_path_TIME
18685 if test -n "$TIME"; then
18686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18687 $as_echo "$TIME" >&6; }
18688 else
18689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18690 $as_echo "no" >&6; }
18691 fi
18692 
18693 
18694   test -n "$TIME" && break
18695 done
18696 
18697     else
18698       # If it succeeded, then it was overridden by the user. We will use it
18699       # for the tool.
18700 
18701       # First remove it from the list of overridden variables, so we can test
18702       # for unknown variables in the end.
18703       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18704 
18705       # Check if the provided tool contains a complete path.
18706       tool_specified="$TIME"
18707       tool_basename="${tool_specified##*/}"
18708       if test "x$tool_basename" = "x$tool_specified"; then
18709         # A command without a complete path is provided, search $PATH.
18710         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18711 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18712         # Extract the first word of "$tool_basename", so it can be a program name with args.
18713 set dummy $tool_basename; ac_word=$2
18714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18715 $as_echo_n "checking for $ac_word... " >&6; }
18716 if ${ac_cv_path_TIME+:} false; then :
18717   $as_echo_n "(cached) " >&6
18718 else
18719   case $TIME in
18720   [\\/]* | ?:[\\/]*)
18721   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18722   ;;
18723   *)
18724   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18725 for as_dir in $PATH
18726 do
18727   IFS=$as_save_IFS
18728   test -z "$as_dir" && as_dir=.
18729     for ac_exec_ext in '' $ac_executable_extensions; do
18730   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18731     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18732     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18733     break 2
18734   fi
18735 done
18736   done
18737 IFS=$as_save_IFS
18738 
18739   ;;
18740 esac
18741 fi
18742 TIME=$ac_cv_path_TIME
18743 if test -n "$TIME"; then
18744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18745 $as_echo "$TIME" >&6; }
18746 else
18747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18748 $as_echo "no" >&6; }
18749 fi
18750 
18751 
18752         if test "x$TIME" = x; then
18753           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18754         fi
18755       else
18756         # Otherwise we believe it is a complete path. Use it as it is.
18757         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18758 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18759         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18760 $as_echo_n "checking for TIME... " >&6; }
18761         if test ! -x "$tool_specified"; then
18762           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18763 $as_echo "not found" >&6; }
18764           as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18765         fi
18766         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18767 $as_echo "$tool_specified" >&6; }
18768       fi
18769     fi
18770   fi
18771 
18772 
18773   # Check if it's GNU time
18774   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18775   if test "x$IS_GNU_TIME" != x; then
18776     IS_GNU_TIME=yes
18777   else
18778     IS_GNU_TIME=no
18779   fi
18780 
18781 
18782   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18783 
18784 
18785 
18786   # Publish this variable in the help.
18787 
18788 
18789   if test "x$COMM" = x; then
18790     # The variable is not set by user, try to locate tool using the code snippet
18791     for ac_prog in comm
18792 do
18793   # Extract the first word of "$ac_prog", so it can be a program name with args.
18794 set dummy $ac_prog; ac_word=$2
18795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18796 $as_echo_n "checking for $ac_word... " >&6; }
18797 if ${ac_cv_path_COMM+:} false; then :
18798   $as_echo_n "(cached) " >&6
18799 else
18800   case $COMM in
18801   [\\/]* | ?:[\\/]*)
18802   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18803   ;;
18804   *)
18805   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18806 for as_dir in $PATH
18807 do
18808   IFS=$as_save_IFS
18809   test -z "$as_dir" && as_dir=.
18810     for ac_exec_ext in '' $ac_executable_extensions; do
18811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18812     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18814     break 2
18815   fi
18816 done
18817   done
18818 IFS=$as_save_IFS
18819 
18820   ;;
18821 esac
18822 fi
18823 COMM=$ac_cv_path_COMM
18824 if test -n "$COMM"; then
18825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18826 $as_echo "$COMM" >&6; }
18827 else
18828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18829 $as_echo "no" >&6; }
18830 fi
18831 
18832 
18833   test -n "$COMM" && break
18834 done
18835 
18836   else
18837     # The variable is set, but is it from the command line or the environment?
18838 
18839     # Try to remove the string !COMM! from our list.
18840     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18841     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18842       # If it failed, the variable was not from the command line. Ignore it,
18843       # but warn the user (except for BASH, which is always set by the calling BASH).
18844       if test "xCOMM" != xBASH; then
18845         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18846 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18847       fi
18848       # Try to locate tool using the code snippet
18849       for ac_prog in comm
18850 do
18851   # Extract the first word of "$ac_prog", so it can be a program name with args.
18852 set dummy $ac_prog; ac_word=$2
18853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18854 $as_echo_n "checking for $ac_word... " >&6; }
18855 if ${ac_cv_path_COMM+:} false; then :
18856   $as_echo_n "(cached) " >&6
18857 else
18858   case $COMM in
18859   [\\/]* | ?:[\\/]*)
18860   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18861   ;;
18862   *)
18863   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18864 for as_dir in $PATH
18865 do
18866   IFS=$as_save_IFS
18867   test -z "$as_dir" && as_dir=.
18868     for ac_exec_ext in '' $ac_executable_extensions; do
18869   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18870     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18872     break 2
18873   fi
18874 done
18875   done
18876 IFS=$as_save_IFS
18877 
18878   ;;
18879 esac
18880 fi
18881 COMM=$ac_cv_path_COMM
18882 if test -n "$COMM"; then
18883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18884 $as_echo "$COMM" >&6; }
18885 else
18886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18887 $as_echo "no" >&6; }
18888 fi
18889 
18890 
18891   test -n "$COMM" && break
18892 done
18893 
18894     else
18895       # If it succeeded, then it was overridden by the user. We will use it
18896       # for the tool.
18897 
18898       # First remove it from the list of overridden variables, so we can test
18899       # for unknown variables in the end.
18900       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18901 
18902       # Check if the provided tool contains a complete path.
18903       tool_specified="$COMM"
18904       tool_basename="${tool_specified##*/}"
18905       if test "x$tool_basename" = "x$tool_specified"; then
18906         # A command without a complete path is provided, search $PATH.
18907         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18908 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18909         # Extract the first word of "$tool_basename", so it can be a program name with args.
18910 set dummy $tool_basename; ac_word=$2
18911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18912 $as_echo_n "checking for $ac_word... " >&6; }
18913 if ${ac_cv_path_COMM+:} false; then :
18914   $as_echo_n "(cached) " >&6
18915 else
18916   case $COMM in
18917   [\\/]* | ?:[\\/]*)
18918   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18919   ;;
18920   *)
18921   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18922 for as_dir in $PATH
18923 do
18924   IFS=$as_save_IFS
18925   test -z "$as_dir" && as_dir=.
18926     for ac_exec_ext in '' $ac_executable_extensions; do
18927   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18928     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18930     break 2
18931   fi
18932 done
18933   done
18934 IFS=$as_save_IFS
18935 
18936   ;;
18937 esac
18938 fi
18939 COMM=$ac_cv_path_COMM
18940 if test -n "$COMM"; then
18941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18942 $as_echo "$COMM" >&6; }
18943 else
18944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18945 $as_echo "no" >&6; }
18946 fi
18947 
18948 
18949         if test "x$COMM" = x; then
18950           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18951         fi
18952       else
18953         # Otherwise we believe it is a complete path. Use it as it is.
18954         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18955 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18956         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18957 $as_echo_n "checking for COMM... " >&6; }
18958         if test ! -x "$tool_specified"; then
18959           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18960 $as_echo "not found" >&6; }
18961           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18962         fi
18963         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18964 $as_echo "$tool_specified" >&6; }
18965       fi
18966     fi
18967   fi
18968 
18969 
18970 
18971   if test "x$COMM" = x; then
18972     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18973   fi
18974 
18975 
18976   fi
18977 
18978   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18979 
18980 
18981 
18982   # Publish this variable in the help.
18983 
18984 
18985   if test "x$DSYMUTIL" = x; then
18986     # The variable is not set by user, try to locate tool using the code snippet
18987     for ac_prog in dsymutil
18988 do
18989   # Extract the first word of "$ac_prog", so it can be a program name with args.
18990 set dummy $ac_prog; ac_word=$2
18991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18992 $as_echo_n "checking for $ac_word... " >&6; }
18993 if ${ac_cv_path_DSYMUTIL+:} false; then :
18994   $as_echo_n "(cached) " >&6
18995 else
18996   case $DSYMUTIL in
18997   [\\/]* | ?:[\\/]*)
18998   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18999   ;;
19000   *)
19001   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19002 for as_dir in $PATH
19003 do
19004   IFS=$as_save_IFS
19005   test -z "$as_dir" && as_dir=.
19006     for ac_exec_ext in '' $ac_executable_extensions; do
19007   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19008     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19009     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19010     break 2
19011   fi
19012 done
19013   done
19014 IFS=$as_save_IFS
19015 
19016   ;;
19017 esac
19018 fi
19019 DSYMUTIL=$ac_cv_path_DSYMUTIL
19020 if test -n "$DSYMUTIL"; then
19021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19022 $as_echo "$DSYMUTIL" >&6; }
19023 else
19024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19025 $as_echo "no" >&6; }
19026 fi
19027 
19028 
19029   test -n "$DSYMUTIL" && break
19030 done
19031 
19032   else
19033     # The variable is set, but is it from the command line or the environment?
19034 
19035     # Try to remove the string !DSYMUTIL! from our list.
19036     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19037     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19038       # If it failed, the variable was not from the command line. Ignore it,
19039       # but warn the user (except for BASH, which is always set by the calling BASH).
19040       if test "xDSYMUTIL" != xBASH; then
19041         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19042 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19043       fi
19044       # Try to locate tool using the code snippet
19045       for ac_prog in dsymutil
19046 do
19047   # Extract the first word of "$ac_prog", so it can be a program name with args.
19048 set dummy $ac_prog; ac_word=$2
19049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19050 $as_echo_n "checking for $ac_word... " >&6; }
19051 if ${ac_cv_path_DSYMUTIL+:} false; then :
19052   $as_echo_n "(cached) " >&6
19053 else
19054   case $DSYMUTIL in
19055   [\\/]* | ?:[\\/]*)
19056   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19057   ;;
19058   *)
19059   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19060 for as_dir in $PATH
19061 do
19062   IFS=$as_save_IFS
19063   test -z "$as_dir" && as_dir=.
19064     for ac_exec_ext in '' $ac_executable_extensions; do
19065   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19066     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19067     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19068     break 2
19069   fi
19070 done
19071   done
19072 IFS=$as_save_IFS
19073 
19074   ;;
19075 esac
19076 fi
19077 DSYMUTIL=$ac_cv_path_DSYMUTIL
19078 if test -n "$DSYMUTIL"; then
19079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19080 $as_echo "$DSYMUTIL" >&6; }
19081 else
19082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19083 $as_echo "no" >&6; }
19084 fi
19085 
19086 
19087   test -n "$DSYMUTIL" && break
19088 done
19089 
19090     else
19091       # If it succeeded, then it was overridden by the user. We will use it
19092       # for the tool.
19093 
19094       # First remove it from the list of overridden variables, so we can test
19095       # for unknown variables in the end.
19096       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19097 
19098       # Check if the provided tool contains a complete path.
19099       tool_specified="$DSYMUTIL"
19100       tool_basename="${tool_specified##*/}"
19101       if test "x$tool_basename" = "x$tool_specified"; then
19102         # A command without a complete path is provided, search $PATH.
19103         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19104 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19105         # Extract the first word of "$tool_basename", so it can be a program name with args.
19106 set dummy $tool_basename; ac_word=$2
19107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19108 $as_echo_n "checking for $ac_word... " >&6; }
19109 if ${ac_cv_path_DSYMUTIL+:} false; then :
19110   $as_echo_n "(cached) " >&6
19111 else
19112   case $DSYMUTIL in
19113   [\\/]* | ?:[\\/]*)
19114   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19115   ;;
19116   *)
19117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19118 for as_dir in $PATH
19119 do
19120   IFS=$as_save_IFS
19121   test -z "$as_dir" && as_dir=.
19122     for ac_exec_ext in '' $ac_executable_extensions; do
19123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19124     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19126     break 2
19127   fi
19128 done
19129   done
19130 IFS=$as_save_IFS
19131 
19132   ;;
19133 esac
19134 fi
19135 DSYMUTIL=$ac_cv_path_DSYMUTIL
19136 if test -n "$DSYMUTIL"; then
19137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19138 $as_echo "$DSYMUTIL" >&6; }
19139 else
19140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19141 $as_echo "no" >&6; }
19142 fi
19143 
19144 
19145         if test "x$DSYMUTIL" = x; then
19146           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19147         fi
19148       else
19149         # Otherwise we believe it is a complete path. Use it as it is.
19150         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19151 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19152         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19153 $as_echo_n "checking for DSYMUTIL... " >&6; }
19154         if test ! -x "$tool_specified"; then
19155           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19156 $as_echo "not found" >&6; }
19157           as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19158         fi
19159         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19160 $as_echo "$tool_specified" >&6; }
19161       fi
19162     fi
19163   fi
19164 
19165 
19166 
19167   if test "x$DSYMUTIL" = x; then
19168     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19169   fi
19170 
19171 
19172 
19173 
19174 
19175   # Publish this variable in the help.
19176 
19177 
19178   if test "x$XATTR" = x; then
19179     # The variable is not set by user, try to locate tool using the code snippet
19180     for ac_prog in xattr
19181 do
19182   # Extract the first word of "$ac_prog", so it can be a program name with args.
19183 set dummy $ac_prog; ac_word=$2
19184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19185 $as_echo_n "checking for $ac_word... " >&6; }
19186 if ${ac_cv_path_XATTR+:} false; then :
19187   $as_echo_n "(cached) " >&6
19188 else
19189   case $XATTR in
19190   [\\/]* | ?:[\\/]*)
19191   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19192   ;;
19193   *)
19194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19195 for as_dir in $PATH
19196 do
19197   IFS=$as_save_IFS
19198   test -z "$as_dir" && as_dir=.
19199     for ac_exec_ext in '' $ac_executable_extensions; do
19200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19201     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19203     break 2
19204   fi
19205 done
19206   done
19207 IFS=$as_save_IFS
19208 
19209   ;;
19210 esac
19211 fi
19212 XATTR=$ac_cv_path_XATTR
19213 if test -n "$XATTR"; then
19214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19215 $as_echo "$XATTR" >&6; }
19216 else
19217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19218 $as_echo "no" >&6; }
19219 fi
19220 
19221 
19222   test -n "$XATTR" && break
19223 done
19224 
19225   else
19226     # The variable is set, but is it from the command line or the environment?
19227 
19228     # Try to remove the string !XATTR! from our list.
19229     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19230     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19231       # If it failed, the variable was not from the command line. Ignore it,
19232       # but warn the user (except for BASH, which is always set by the calling BASH).
19233       if test "xXATTR" != xBASH; then
19234         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19235 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19236       fi
19237       # Try to locate tool using the code snippet
19238       for ac_prog in xattr
19239 do
19240   # Extract the first word of "$ac_prog", so it can be a program name with args.
19241 set dummy $ac_prog; ac_word=$2
19242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19243 $as_echo_n "checking for $ac_word... " >&6; }
19244 if ${ac_cv_path_XATTR+:} false; then :
19245   $as_echo_n "(cached) " >&6
19246 else
19247   case $XATTR in
19248   [\\/]* | ?:[\\/]*)
19249   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19250   ;;
19251   *)
19252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19253 for as_dir in $PATH
19254 do
19255   IFS=$as_save_IFS
19256   test -z "$as_dir" && as_dir=.
19257     for ac_exec_ext in '' $ac_executable_extensions; do
19258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19259     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19261     break 2
19262   fi
19263 done
19264   done
19265 IFS=$as_save_IFS
19266 
19267   ;;
19268 esac
19269 fi
19270 XATTR=$ac_cv_path_XATTR
19271 if test -n "$XATTR"; then
19272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19273 $as_echo "$XATTR" >&6; }
19274 else
19275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19276 $as_echo "no" >&6; }
19277 fi
19278 
19279 
19280   test -n "$XATTR" && break
19281 done
19282 
19283     else
19284       # If it succeeded, then it was overridden by the user. We will use it
19285       # for the tool.
19286 
19287       # First remove it from the list of overridden variables, so we can test
19288       # for unknown variables in the end.
19289       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19290 
19291       # Check if the provided tool contains a complete path.
19292       tool_specified="$XATTR"
19293       tool_basename="${tool_specified##*/}"
19294       if test "x$tool_basename" = "x$tool_specified"; then
19295         # A command without a complete path is provided, search $PATH.
19296         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19297 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19298         # Extract the first word of "$tool_basename", so it can be a program name with args.
19299 set dummy $tool_basename; ac_word=$2
19300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19301 $as_echo_n "checking for $ac_word... " >&6; }
19302 if ${ac_cv_path_XATTR+:} false; then :
19303   $as_echo_n "(cached) " >&6
19304 else
19305   case $XATTR in
19306   [\\/]* | ?:[\\/]*)
19307   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19308   ;;
19309   *)
19310   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19311 for as_dir in $PATH
19312 do
19313   IFS=$as_save_IFS
19314   test -z "$as_dir" && as_dir=.
19315     for ac_exec_ext in '' $ac_executable_extensions; do
19316   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19317     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19318     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19319     break 2
19320   fi
19321 done
19322   done
19323 IFS=$as_save_IFS
19324 
19325   ;;
19326 esac
19327 fi
19328 XATTR=$ac_cv_path_XATTR
19329 if test -n "$XATTR"; then
19330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19331 $as_echo "$XATTR" >&6; }
19332 else
19333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19334 $as_echo "no" >&6; }
19335 fi
19336 
19337 
19338         if test "x$XATTR" = x; then
19339           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19340         fi
19341       else
19342         # Otherwise we believe it is a complete path. Use it as it is.
19343         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19344 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19345         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19346 $as_echo_n "checking for XATTR... " >&6; }
19347         if test ! -x "$tool_specified"; then
19348           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19349 $as_echo "not found" >&6; }
19350           as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19351         fi
19352         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19353 $as_echo "$tool_specified" >&6; }
19354       fi
19355     fi
19356   fi
19357 
19358 
19359 
19360   if test "x$XATTR" = x; then
19361     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19362   fi
19363 
19364 
19365 
19366 
19367   # Publish this variable in the help.
19368 
19369 
19370   if test "x$CODESIGN" = x; then
19371     # The variable is not set by user, try to locate tool using the code snippet
19372     for ac_prog in codesign
19373 do
19374   # Extract the first word of "$ac_prog", so it can be a program name with args.
19375 set dummy $ac_prog; ac_word=$2
19376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19377 $as_echo_n "checking for $ac_word... " >&6; }
19378 if ${ac_cv_path_CODESIGN+:} false; then :
19379   $as_echo_n "(cached) " >&6
19380 else
19381   case $CODESIGN in
19382   [\\/]* | ?:[\\/]*)
19383   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19384   ;;
19385   *)
19386   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19387 for as_dir in $PATH
19388 do
19389   IFS=$as_save_IFS
19390   test -z "$as_dir" && as_dir=.
19391     for ac_exec_ext in '' $ac_executable_extensions; do
19392   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19393     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19394     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19395     break 2
19396   fi
19397 done
19398   done
19399 IFS=$as_save_IFS
19400 
19401   ;;
19402 esac
19403 fi
19404 CODESIGN=$ac_cv_path_CODESIGN
19405 if test -n "$CODESIGN"; then
19406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19407 $as_echo "$CODESIGN" >&6; }
19408 else
19409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19410 $as_echo "no" >&6; }
19411 fi
19412 
19413 
19414   test -n "$CODESIGN" && break
19415 done
19416 
19417   else
19418     # The variable is set, but is it from the command line or the environment?
19419 
19420     # Try to remove the string !CODESIGN! from our list.
19421     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19422     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19423       # If it failed, the variable was not from the command line. Ignore it,
19424       # but warn the user (except for BASH, which is always set by the calling BASH).
19425       if test "xCODESIGN" != xBASH; then
19426         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19427 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19428       fi
19429       # Try to locate tool using the code snippet
19430       for ac_prog in codesign
19431 do
19432   # Extract the first word of "$ac_prog", so it can be a program name with args.
19433 set dummy $ac_prog; ac_word=$2
19434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19435 $as_echo_n "checking for $ac_word... " >&6; }
19436 if ${ac_cv_path_CODESIGN+:} false; then :
19437   $as_echo_n "(cached) " >&6
19438 else
19439   case $CODESIGN in
19440   [\\/]* | ?:[\\/]*)
19441   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19442   ;;
19443   *)
19444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19445 for as_dir in $PATH
19446 do
19447   IFS=$as_save_IFS
19448   test -z "$as_dir" && as_dir=.
19449     for ac_exec_ext in '' $ac_executable_extensions; do
19450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19451     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19453     break 2
19454   fi
19455 done
19456   done
19457 IFS=$as_save_IFS
19458 
19459   ;;
19460 esac
19461 fi
19462 CODESIGN=$ac_cv_path_CODESIGN
19463 if test -n "$CODESIGN"; then
19464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19465 $as_echo "$CODESIGN" >&6; }
19466 else
19467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19468 $as_echo "no" >&6; }
19469 fi
19470 
19471 
19472   test -n "$CODESIGN" && break
19473 done
19474 
19475     else
19476       # If it succeeded, then it was overridden by the user. We will use it
19477       # for the tool.
19478 
19479       # First remove it from the list of overridden variables, so we can test
19480       # for unknown variables in the end.
19481       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19482 
19483       # Check if the provided tool contains a complete path.
19484       tool_specified="$CODESIGN"
19485       tool_basename="${tool_specified##*/}"
19486       if test "x$tool_basename" = "x$tool_specified"; then
19487         # A command without a complete path is provided, search $PATH.
19488         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19489 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19490         # Extract the first word of "$tool_basename", so it can be a program name with args.
19491 set dummy $tool_basename; ac_word=$2
19492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19493 $as_echo_n "checking for $ac_word... " >&6; }
19494 if ${ac_cv_path_CODESIGN+:} false; then :
19495   $as_echo_n "(cached) " >&6
19496 else
19497   case $CODESIGN in
19498   [\\/]* | ?:[\\/]*)
19499   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19500   ;;
19501   *)
19502   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19503 for as_dir in $PATH
19504 do
19505   IFS=$as_save_IFS
19506   test -z "$as_dir" && as_dir=.
19507     for ac_exec_ext in '' $ac_executable_extensions; do
19508   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19509     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19510     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19511     break 2
19512   fi
19513 done
19514   done
19515 IFS=$as_save_IFS
19516 
19517   ;;
19518 esac
19519 fi
19520 CODESIGN=$ac_cv_path_CODESIGN
19521 if test -n "$CODESIGN"; then
19522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19523 $as_echo "$CODESIGN" >&6; }
19524 else
19525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19526 $as_echo "no" >&6; }
19527 fi
19528 
19529 
19530         if test "x$CODESIGN" = x; then
19531           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19532         fi
19533       else
19534         # Otherwise we believe it is a complete path. Use it as it is.
19535         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19536 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19537         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19538 $as_echo_n "checking for CODESIGN... " >&6; }
19539         if test ! -x "$tool_specified"; then
19540           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19541 $as_echo "not found" >&6; }
19542           as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19543         fi
19544         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19545 $as_echo "$tool_specified" >&6; }
19546       fi
19547     fi
19548   fi
19549 
19550 
19551     if test "x$CODESIGN" != "x"; then
19552       # Verify that the openjdk_codesign certificate is present
19553       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19554 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19555       rm -f codesign-testfile
19556       touch codesign-testfile
19557       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19558       rm -f codesign-testfile
19559       if test "x$CODESIGN" = x; then
19560         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19561 $as_echo "no" >&6; }
19562       else
19563         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19564 $as_echo "yes" >&6; }
19565       fi
19566     fi
19567   fi
19568 
19569 
19570 # Check if pkg-config is available.
19571 
19572 
19573 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19574         if test -n "$ac_tool_prefix"; then
19575   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19576 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19578 $as_echo_n "checking for $ac_word... " >&6; }
19579 if ${ac_cv_path_PKG_CONFIG+:} false; then :
19580   $as_echo_n "(cached) " >&6
19581 else
19582   case $PKG_CONFIG in
19583   [\\/]* | ?:[\\/]*)
19584   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19585   ;;
19586   *)
19587   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19588 for as_dir in $PATH
19589 do
19590   IFS=$as_save_IFS
19591   test -z "$as_dir" && as_dir=.
19592     for ac_exec_ext in '' $ac_executable_extensions; do
19593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19594     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19596     break 2
19597   fi
19598 done
19599   done
19600 IFS=$as_save_IFS
19601 
19602   ;;
19603 esac
19604 fi
19605 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19606 if test -n "$PKG_CONFIG"; then
19607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19608 $as_echo "$PKG_CONFIG" >&6; }
19609 else
19610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19611 $as_echo "no" >&6; }
19612 fi
19613 
19614 
19615 fi
19616 if test -z "$ac_cv_path_PKG_CONFIG"; then
19617   ac_pt_PKG_CONFIG=$PKG_CONFIG
19618   # Extract the first word of "pkg-config", so it can be a program name with args.
19619 set dummy pkg-config; ac_word=$2
19620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19621 $as_echo_n "checking for $ac_word... " >&6; }
19622 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19623   $as_echo_n "(cached) " >&6
19624 else
19625   case $ac_pt_PKG_CONFIG in
19626   [\\/]* | ?:[\\/]*)
19627   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19628   ;;
19629   *)
19630   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19631 for as_dir in $PATH
19632 do
19633   IFS=$as_save_IFS
19634   test -z "$as_dir" && as_dir=.
19635     for ac_exec_ext in '' $ac_executable_extensions; do
19636   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19637     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19638     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19639     break 2
19640   fi
19641 done
19642   done
19643 IFS=$as_save_IFS
19644 
19645   ;;
19646 esac
19647 fi
19648 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19649 if test -n "$ac_pt_PKG_CONFIG"; then
19650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19651 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19652 else
19653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19654 $as_echo "no" >&6; }
19655 fi
19656 
19657   if test "x$ac_pt_PKG_CONFIG" = x; then
19658     PKG_CONFIG=""
19659   else
19660     case $cross_compiling:$ac_tool_warned in
19661 yes:)
19662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19663 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19664 ac_tool_warned=yes ;;
19665 esac
19666     PKG_CONFIG=$ac_pt_PKG_CONFIG
19667   fi
19668 else
19669   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19670 fi
19671 
19672 fi
19673 if test -n "$PKG_CONFIG"; then
19674         _pkg_min_version=0.9.0
19675         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19676 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19677         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19678                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19679 $as_echo "yes" >&6; }
19680         else
19681                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19682 $as_echo "no" >&6; }
19683                 PKG_CONFIG=""
19684         fi
19685 
19686 fi
19687 
19688 # After basic tools have been setup, we can check build os specific details.
19689 
19690   ###############################################################################
19691 
19692   # Note that this is the build platform OS version!
19693 
19694   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19695   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19696   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19697   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19698 
19699 
19700 
19701 
19702 
19703 # Setup builddeps, for automatic downloading of tools we need.
19704 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19705 # boot-jdk setup, but we need to have basic tools setup first.
19706 
19707 
19708 # Check whether --with-builddeps-conf was given.
19709 if test "${with_builddeps_conf+set}" = set; then :
19710   withval=$with_builddeps_conf;
19711 fi
19712 
19713 
19714 
19715 # Check whether --with-builddeps-server was given.
19716 if test "${with_builddeps_server+set}" = set; then :
19717   withval=$with_builddeps_server;
19718 fi
19719 
19720 
19721 
19722 # Check whether --with-builddeps-dir was given.
19723 if test "${with_builddeps_dir+set}" = set; then :
19724   withval=$with_builddeps_dir;
19725 else
19726   with_builddeps_dir=/localhome/builddeps
19727 fi
19728 
19729 
19730 
19731 # Check whether --with-builddeps-group was given.
19732 if test "${with_builddeps_group+set}" = set; then :
19733   withval=$with_builddeps_group;
19734 fi
19735 
19736 
19737 
19738 
19739   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19740     if test "x$with_builddeps_conf" != x; then
19741       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19742 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19743       builddepsfile=$with_builddeps_conf
19744       if test -s $builddepsfile; then
19745         . $builddepsfile
19746         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19747 $as_echo "loaded!" >&6; }
19748       else
19749         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19750       fi
19751     else
19752       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19753 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19754       builddepsfile=`mktemp`
19755       touch $builddepsfile
19756       # Put all found confs into a single file.
19757       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19758       # Source the file to acquire the variables
19759       if test -s $builddepsfile; then
19760         . $builddepsfile
19761         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19762 $as_echo "found at least one!" >&6; }
19763       else
19764         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19765       fi
19766     fi
19767     # Create build and target names that use _ instead of "-" and ".".
19768     # This is necessary to use them in variable names.
19769     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19770     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19771     # Extract rewrite information for build and target
19772     eval rewritten_build=\${REWRITE_${build_var}}
19773     if test "x$rewritten_build" = x; then
19774       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19775       echo Build stays the same $rewritten_build
19776     else
19777       echo Rewriting build for builddeps into $rewritten_build
19778     fi
19779     eval rewritten_target=\${REWRITE_${target_var}}
19780     if test "x$rewritten_target" = x; then
19781       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19782       echo Target stays the same $rewritten_target
19783     else
19784       echo Rewriting target for builddeps into $rewritten_target
19785     fi
19786     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19787     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19788   fi
19789   for ac_prog in 7z unzip
19790 do
19791   # Extract the first word of "$ac_prog", so it can be a program name with args.
19792 set dummy $ac_prog; ac_word=$2
19793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19794 $as_echo_n "checking for $ac_word... " >&6; }
19795 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19796   $as_echo_n "(cached) " >&6
19797 else
19798   if test -n "$BDEPS_UNZIP"; then
19799   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19800 else
19801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19802 for as_dir in $PATH
19803 do
19804   IFS=$as_save_IFS
19805   test -z "$as_dir" && as_dir=.
19806     for ac_exec_ext in '' $ac_executable_extensions; do
19807   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19808     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19809     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19810     break 2
19811   fi
19812 done
19813   done
19814 IFS=$as_save_IFS
19815 
19816 fi
19817 fi
19818 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19819 if test -n "$BDEPS_UNZIP"; then
19820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19821 $as_echo "$BDEPS_UNZIP" >&6; }
19822 else
19823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19824 $as_echo "no" >&6; }
19825 fi
19826 
19827 
19828   test -n "$BDEPS_UNZIP" && break
19829 done
19830 
19831   if test "x$BDEPS_UNZIP" = x7z; then
19832     BDEPS_UNZIP="7z x"
19833   fi
19834 
19835   for ac_prog in wget lftp ftp
19836 do
19837   # Extract the first word of "$ac_prog", so it can be a program name with args.
19838 set dummy $ac_prog; ac_word=$2
19839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19840 $as_echo_n "checking for $ac_word... " >&6; }
19841 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19842   $as_echo_n "(cached) " >&6
19843 else
19844   if test -n "$BDEPS_FTP"; then
19845   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19846 else
19847 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19848 for as_dir in $PATH
19849 do
19850   IFS=$as_save_IFS
19851   test -z "$as_dir" && as_dir=.
19852     for ac_exec_ext in '' $ac_executable_extensions; do
19853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19854     ac_cv_prog_BDEPS_FTP="$ac_prog"
19855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19856     break 2
19857   fi
19858 done
19859   done
19860 IFS=$as_save_IFS
19861 
19862 fi
19863 fi
19864 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19865 if test -n "$BDEPS_FTP"; then
19866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19867 $as_echo "$BDEPS_FTP" >&6; }
19868 else
19869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19870 $as_echo "no" >&6; }
19871 fi
19872 
19873 
19874   test -n "$BDEPS_FTP" && break
19875 done
19876 
19877 
19878 
19879 ###############################################################################
19880 #
19881 # Determine OpenJDK variants, options and version numbers.
19882 #
19883 ###############################################################################
19884 
19885 # We need build & target for this.
19886 
19887 
19888   ###############################################################################
19889   #
19890   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19891   # We always build headless support.
19892   #
19893   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19894 $as_echo_n "checking headful support... " >&6; }
19895   # Check whether --enable-headful was given.
19896 if test "${enable_headful+set}" = set; then :
19897   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19898 else
19899   SUPPORT_HEADFUL=yes
19900 fi
19901 
19902 
19903   SUPPORT_HEADLESS=yes
19904   BUILD_HEADLESS="BUILD_HEADLESS:=true"
19905 
19906   if test "x$SUPPORT_HEADFUL" = xyes; then
19907     # We are building both headful and headless.
19908     headful_msg="include support for both headful and headless"
19909   fi
19910 
19911   if test "x$SUPPORT_HEADFUL" = xno; then
19912     # Thus we are building headless only.
19913     BUILD_HEADLESS="BUILD_HEADLESS:=true"
19914     headful_msg="headless only"
19915   fi
19916 
19917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19918 $as_echo "$headful_msg" >&6; }
19919 
19920 
19921 
19922 
19923 
19924   # Control wether Hotspot runs Queens test after build.
19925   # Check whether --enable-hotspot-test-in-build was given.
19926 if test "${enable_hotspot_test_in_build+set}" = set; then :
19927   enableval=$enable_hotspot_test_in_build;
19928 else
19929   enable_hotspot_test_in_build=no
19930 fi
19931 
19932   if test "x$enable_hotspot_test_in_build" = "xyes"; then
19933     TEST_IN_BUILD=true
19934   else
19935     TEST_IN_BUILD=false
19936   fi
19937 
19938 
19939   ###############################################################################
19940   #
19941   # Choose cacerts source file
19942   #
19943 
19944 # Check whether --with-cacerts-file was given.
19945 if test "${with_cacerts_file+set}" = set; then :
19946   withval=$with_cacerts_file;
19947 fi
19948 
19949   if test "x$with_cacerts_file" != x; then
19950     CACERTS_FILE=$with_cacerts_file
19951   else
19952     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19953   fi
19954 
19955 
19956   ###############################################################################
19957   #
19958   # Enable or disable unlimited crypto
19959   #
19960   # Check whether --enable-unlimited-crypto was given.
19961 if test "${enable_unlimited_crypto+set}" = set; then :
19962   enableval=$enable_unlimited_crypto;
19963 else
19964   enable_unlimited_crypto=no
19965 fi
19966 
19967   if test "x$enable_unlimited_crypto" = "xyes"; then
19968     UNLIMITED_CRYPTO=true
19969   else
19970     UNLIMITED_CRYPTO=false
19971   fi
19972 
19973 
19974   ###############################################################################
19975   #
19976   # Enable or disable the elliptic curve crypto implementation
19977   #
19978 
19979 
19980   ###############################################################################
19981   #
19982   # --enable-rmiconnector-iiop
19983   #
19984   # Check whether --enable-rmiconnector-iiop was given.
19985 if test "${enable_rmiconnector_iiop+set}" = set; then :
19986   enableval=$enable_rmiconnector_iiop;
19987 fi
19988 
19989   if test "x$enable_rmiconnector_iiop" = "xyes"; then
19990     RMICONNECTOR_IIOP=true
19991   else
19992     RMICONNECTOR_IIOP=false
19993   fi
19994 
19995 
19996   ###############################################################################
19997   #
19998   # Compress jars
19999   #
20000   COMPRESS_JARS=false
20001 
20002 
20003 
20004 
20005   # Source the version numbers
20006   . $AUTOCONF_DIR/version-numbers
20007 
20008   # Get the settings from parameters
20009 
20010 # Check whether --with-milestone was given.
20011 if test "${with_milestone+set}" = set; then :
20012   withval=$with_milestone;
20013 fi
20014 
20015   if test "x$with_milestone" = xyes; then
20016     as_fn_error $? "Milestone must have a value" "$LINENO" 5
20017   elif test "x$with_milestone" != x; then
20018     MILESTONE="$with_milestone"
20019   fi
20020   if test "x$MILESTONE" = x; then
20021     MILESTONE=internal
20022   fi
20023 
20024 
20025 # Check whether --with-update-version was given.
20026 if test "${with_update_version+set}" = set; then :
20027   withval=$with_update_version;
20028 fi
20029 
20030   if test "x$with_update_version" = xyes; then
20031     as_fn_error $? "Update version must have a value" "$LINENO" 5
20032   elif test "x$with_update_version" != x; then
20033     JDK_UPDATE_VERSION="$with_update_version"
20034     # On macosx 10.7, it's not possible to set --with-update-version=0X due
20035     # to a bug in expr (which reduces it to just X). To work around this, we
20036     # always add a 0 to one digit update versions.
20037     if test "${#JDK_UPDATE_VERSION}" = "1"; then
20038       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20039     fi
20040   fi
20041 
20042 
20043 # Check whether --with-user-release-suffix was given.
20044 if test "${with_user_release_suffix+set}" = set; then :
20045   withval=$with_user_release_suffix;
20046 fi
20047 
20048   if test "x$with_user_release_suffix" = xyes; then
20049     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20050   elif test "x$with_user_release_suffix" != x; then
20051     USER_RELEASE_SUFFIX="$with_user_release_suffix"
20052   fi
20053 
20054 
20055 # Check whether --with-build-number was given.
20056 if test "${with_build_number+set}" = set; then :
20057   withval=$with_build_number;
20058 fi
20059 
20060   if test "x$with_build_number" = xyes; then
20061     as_fn_error $? "Build number must have a value" "$LINENO" 5
20062   elif test "x$with_build_number" != x; then
20063     JDK_BUILD_NUMBER="$with_build_number"
20064   fi
20065   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20066   if test "x$JDK_BUILD_NUMBER" = x; then
20067     JDK_BUILD_NUMBER=b00
20068     if test "x$USER_RELEASE_SUFFIX" = x; then
20069       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20070       # Avoid [:alnum:] since it depends on the locale.
20071       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20072       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20073     fi
20074   fi
20075 
20076   # Now set the JDK version, milestone, build number etc.
20077 
20078 
20079 
20080 
20081 
20082 
20083 
20084 
20085 
20086 
20087 
20088 
20089 
20090 
20091 
20092   COPYRIGHT_YEAR=`date +'%Y'`
20093 
20094 
20095   if test "x$JDK_UPDATE_VERSION" != x; then
20096     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20097   else
20098     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20099   fi
20100 
20101 
20102   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20103 
20104 
20105 
20106 ###############################################################################
20107 #
20108 # Setup BootJDK, used to bootstrap the build.
20109 #
20110 ###############################################################################
20111 
20112 
20113   BOOT_JDK_FOUND=no
20114 
20115 # Check whether --with-boot-jdk was given.
20116 if test "${with_boot_jdk+set}" = set; then :
20117   withval=$with_boot_jdk;
20118 fi
20119 
20120 
20121   # We look for the Boot JDK through various means, going from more certain to
20122   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20123   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20124   # must check if this is indeed valid; otherwise we'll continue looking.
20125 
20126   # Test: Is bootjdk explicitely set by command line arguments?
20127 
20128   if test "x$BOOT_JDK_FOUND" = xno; then
20129     # Now execute the test
20130 
20131   if test "x$with_boot_jdk" != x; then
20132     BOOT_JDK=$with_boot_jdk
20133     BOOT_JDK_FOUND=maybe
20134     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20135 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20136   fi
20137 
20138 
20139     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20140     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20141       # Do we have a bin/java?
20142       if test ! -x "$BOOT_JDK/bin/java"; then
20143         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20144 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20145         BOOT_JDK_FOUND=no
20146       else
20147         # Do we have a bin/javac?
20148         if test ! -x "$BOOT_JDK/bin/javac"; then
20149           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20150 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20151           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20152 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20153           BOOT_JDK_FOUND=no
20154         else
20155           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20156           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20157             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20158 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20159             BOOT_JDK_FOUND=no
20160           else
20161             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20162             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20163 
20164             # Extra M4 quote needed to protect [] in grep expression.
20165             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20166             if test "x$FOUND_CORRECT_VERSION" = x; then
20167               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20168 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20169               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20170 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20171               BOOT_JDK_FOUND=no
20172             else
20173               # We're done! :-)
20174               BOOT_JDK_FOUND=yes
20175 
20176   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20177 
20178   # Input might be given as Windows format, start by converting to
20179   # unix format.
20180   path="$BOOT_JDK"
20181   new_path=`$CYGPATH -u "$path"`
20182 
20183   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20184   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20185   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20186   # "foo.exe" is OK but "foo" is an error.
20187   #
20188   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20189   # It is also a way to make sure we got the proper file name for the real test later on.
20190   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20191   if test "x$test_shortpath" = x; then
20192     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20193 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20194     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20195   fi
20196 
20197   # Call helper function which possibly converts this using DOS-style short mode.
20198   # If so, the updated path is stored in $new_path.
20199 
20200   input_path="$new_path"
20201   # Check if we need to convert this using DOS-style short mode. If the path
20202   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20203   # take no chances and rewrite it.
20204   # Note: m4 eats our [], so we need to use [ and ] instead.
20205   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20206   if test "x$has_forbidden_chars" != x; then
20207     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20208     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20209     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20210     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20211       # Going to short mode and back again did indeed matter. Since short mode is
20212       # case insensitive, let's make it lowercase to improve readability.
20213       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20214       # Now convert it back to Unix-stile (cygpath)
20215       input_path=`$CYGPATH -u "$shortmode_path"`
20216       new_path="$input_path"
20217     fi
20218   fi
20219 
20220   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20221   if test "x$test_cygdrive_prefix" = x; then
20222     # As a simple fix, exclude /usr/bin since it's not a real path.
20223     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20224       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20225       # a path prefixed by /cygdrive for fixpath to work.
20226       new_path="$CYGWIN_ROOT_PATH$input_path"
20227     fi
20228   fi
20229 
20230 
20231   if test "x$path" != "x$new_path"; then
20232     BOOT_JDK="$new_path"
20233     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20234 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20235   fi
20236 
20237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20238 
20239   path="$BOOT_JDK"
20240   has_colon=`$ECHO $path | $GREP ^.:`
20241   new_path="$path"
20242   if test "x$has_colon" = x; then
20243     # Not in mixed or Windows style, start by that.
20244     new_path=`cmd //c echo $path`
20245   fi
20246 
20247 
20248   input_path="$new_path"
20249   # Check if we need to convert this using DOS-style short mode. If the path
20250   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20251   # take no chances and rewrite it.
20252   # Note: m4 eats our [], so we need to use [ and ] instead.
20253   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20254   if test "x$has_forbidden_chars" != x; then
20255     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20256     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20257   fi
20258 
20259 
20260   windows_path="$new_path"
20261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20262     unix_path=`$CYGPATH -u "$windows_path"`
20263     new_path="$unix_path"
20264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20265     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20266     new_path="$unix_path"
20267   fi
20268 
20269   if test "x$path" != "x$new_path"; then
20270     BOOT_JDK="$new_path"
20271     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20272 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20273   fi
20274 
20275   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20276   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20277 
20278   else
20279     # We're on a posix platform. Hooray! :)
20280     path="$BOOT_JDK"
20281     has_space=`$ECHO "$path" | $GREP " "`
20282     if test "x$has_space" != x; then
20283       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20284 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20285       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20286     fi
20287 
20288     # Use eval to expand a potential ~
20289     eval path="$path"
20290     if test ! -f "$path" && test ! -d "$path"; then
20291       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20292     fi
20293 
20294     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20295   fi
20296 
20297               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20298 $as_echo_n "checking for Boot JDK... " >&6; }
20299               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20300 $as_echo "$BOOT_JDK" >&6; }
20301               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20302 $as_echo_n "checking Boot JDK version... " >&6; }
20303               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20304               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20305 $as_echo "$BOOT_JDK_VERSION" >&6; }
20306             fi # end check jdk version
20307           fi # end check rt.jar
20308         fi # end check javac
20309       fi # end check java
20310     fi # end check boot jdk found
20311   fi
20312 
20313   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20314     # Having specified an argument which is incorrect will produce an instant failure;
20315     # we should not go on looking
20316     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20317   fi
20318 
20319   # Test: Is bootjdk available from builddeps?
20320 
20321   if test "x$BOOT_JDK_FOUND" = xno; then
20322     # Now execute the test
20323 
20324 
20325 
20326   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20327     # Source the builddeps file again, to make sure it uses the latest variables!
20328     . $builddepsfile
20329     # Look for a target and build machine specific resource!
20330     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20331     if test "x$resource" = x; then
20332       # Ok, lets instead look for a target specific resource
20333       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20334     fi
20335     if test "x$resource" = x; then
20336       # Ok, lets instead look for a build specific resource
20337       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20338     fi
20339     if test "x$resource" = x; then
20340       # Ok, lets instead look for a generic resource
20341       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20342       resource=${builddep_bootjdk}
20343     fi
20344     if test "x$resource" != x; then
20345       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20346 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20347       # If the resource in the builddeps.conf file is an existing directory,
20348       # for example /java/linux/cups
20349       if test -d ${resource}; then
20350         depdir=${resource}
20351       else
20352 
20353   # bootjdk is for example mymodule
20354   # $resource is for example libs/general/libmymod_1_2_3.zip
20355   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20356   # $with_builddeps_dir is for example /localhome/builddeps
20357   # depdir is the name of the variable into which we store the depdir, eg MYMOD
20358   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20359   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20360   filename=`basename $resource`
20361   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20362   filebase=${filename%%.*}
20363   extension=${filename#*.}
20364   installdir=$with_builddeps_dir/$filebase
20365   if test ! -f $installdir/$filename.unpacked; then
20366     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20367 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20368     if test ! -d $installdir; then
20369       mkdir -p $installdir
20370     fi
20371     if test ! -d $installdir; then
20372       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20373     fi
20374     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20375     touch $tmpfile
20376     if test ! -f $tmpfile; then
20377       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20378     fi
20379 
20380   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20381   # $tmpfile is the local file name for the downloaded file.
20382   VALID_TOOL=no
20383   if test "x$BDEPS_FTP" = xwget; then
20384     VALID_TOOL=yes
20385     wget -O $tmpfile $with_builddeps_server/$resource
20386   fi
20387   if test "x$BDEPS_FTP" = xlftp; then
20388     VALID_TOOL=yes
20389     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20390   fi
20391   if test "x$BDEPS_FTP" = xftp; then
20392     VALID_TOOL=yes
20393     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20394     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20395     FTPUSERPWD=${FTPSERVER%%@*}
20396     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20397       FTPUSER=${userpwd%%:*}
20398       FTPPWD=${userpwd#*@}
20399       FTPSERVER=${FTPSERVER#*@}
20400     else
20401       FTPUSER=ftp
20402       FTPPWD=ftp
20403     fi
20404     # the "pass" command does not work on some
20405     # ftp clients (read ftp.exe) but if it works,
20406     # passive mode is better!
20407     ( \
20408         echo "user $FTPUSER $FTPPWD"        ; \
20409         echo "pass"                         ; \
20410         echo "bin"                          ; \
20411         echo "get $FTPPATH $tmpfile"              ; \
20412     ) | ftp -in $FTPSERVER
20413   fi
20414   if test "x$VALID_TOOL" != xyes; then
20415     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20416   fi
20417 
20418     mv $tmpfile $installdir/$filename
20419     if test ! -s $installdir/$filename; then
20420       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20421     fi
20422     case "$extension" in
20423       zip)  echo "Unzipping $installdir/$filename..."
20424         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20425         ;;
20426       tar.gz) echo "Untaring $installdir/$filename..."
20427         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20428         ;;
20429       tgz) echo "Untaring $installdir/$filename..."
20430         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20431         ;;
20432       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20433         ;;
20434     esac
20435   fi
20436   if test -f $installdir/$filename.unpacked; then
20437     depdir=$installdir
20438   fi
20439 
20440       fi
20441       # Source the builddeps file again, because in the previous command, the depdir
20442       # was updated to point at the current build dependency install directory.
20443       . $builddepsfile
20444       # Now extract variables from the builddeps.conf files.
20445       theroot=${builddep_bootjdk_ROOT}
20446       thecflags=${builddep_bootjdk_CFLAGS}
20447       thelibs=${builddep_bootjdk_LIBS}
20448       if test "x$depdir" = x; then
20449         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20450       fi
20451       BOOT_JDK=$depdir
20452       if test "x$theroot" != x; then
20453         BOOT_JDK="$theroot"
20454       fi
20455       if test "x$thecflags" != x; then
20456         BOOT_JDK_CFLAGS="$thecflags"
20457       fi
20458       if test "x$thelibs" != x; then
20459         BOOT_JDK_LIBS="$thelibs"
20460       fi
20461       BOOT_JDK_FOUND=maybe
20462       else BOOT_JDK_FOUND=no
20463 
20464     fi
20465     else BOOT_JDK_FOUND=no
20466 
20467   fi
20468 
20469 
20470 
20471     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20472     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20473       # Do we have a bin/java?
20474       if test ! -x "$BOOT_JDK/bin/java"; then
20475         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20476 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20477         BOOT_JDK_FOUND=no
20478       else
20479         # Do we have a bin/javac?
20480         if test ! -x "$BOOT_JDK/bin/javac"; then
20481           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20482 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20483           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20484 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20485           BOOT_JDK_FOUND=no
20486         else
20487           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20488           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20489             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20490 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20491             BOOT_JDK_FOUND=no
20492           else
20493             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20494             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20495 
20496             # Extra M4 quote needed to protect [] in grep expression.
20497             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20498             if test "x$FOUND_CORRECT_VERSION" = x; then
20499               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20500 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20501               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20502 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20503               BOOT_JDK_FOUND=no
20504             else
20505               # We're done! :-)
20506               BOOT_JDK_FOUND=yes
20507 
20508   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20509 
20510   # Input might be given as Windows format, start by converting to
20511   # unix format.
20512   path="$BOOT_JDK"
20513   new_path=`$CYGPATH -u "$path"`
20514 
20515   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20516   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20517   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20518   # "foo.exe" is OK but "foo" is an error.
20519   #
20520   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20521   # It is also a way to make sure we got the proper file name for the real test later on.
20522   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20523   if test "x$test_shortpath" = x; then
20524     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20525 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20526     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20527   fi
20528 
20529   # Call helper function which possibly converts this using DOS-style short mode.
20530   # If so, the updated path is stored in $new_path.
20531 
20532   input_path="$new_path"
20533   # Check if we need to convert this using DOS-style short mode. If the path
20534   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20535   # take no chances and rewrite it.
20536   # Note: m4 eats our [], so we need to use [ and ] instead.
20537   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20538   if test "x$has_forbidden_chars" != x; then
20539     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20540     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20541     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20542     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20543       # Going to short mode and back again did indeed matter. Since short mode is
20544       # case insensitive, let's make it lowercase to improve readability.
20545       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20546       # Now convert it back to Unix-stile (cygpath)
20547       input_path=`$CYGPATH -u "$shortmode_path"`
20548       new_path="$input_path"
20549     fi
20550   fi
20551 
20552   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20553   if test "x$test_cygdrive_prefix" = x; then
20554     # As a simple fix, exclude /usr/bin since it's not a real path.
20555     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20556       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20557       # a path prefixed by /cygdrive for fixpath to work.
20558       new_path="$CYGWIN_ROOT_PATH$input_path"
20559     fi
20560   fi
20561 
20562 
20563   if test "x$path" != "x$new_path"; then
20564     BOOT_JDK="$new_path"
20565     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20566 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20567   fi
20568 
20569   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20570 
20571   path="$BOOT_JDK"
20572   has_colon=`$ECHO $path | $GREP ^.:`
20573   new_path="$path"
20574   if test "x$has_colon" = x; then
20575     # Not in mixed or Windows style, start by that.
20576     new_path=`cmd //c echo $path`
20577   fi
20578 
20579 
20580   input_path="$new_path"
20581   # Check if we need to convert this using DOS-style short mode. If the path
20582   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20583   # take no chances and rewrite it.
20584   # Note: m4 eats our [], so we need to use [ and ] instead.
20585   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20586   if test "x$has_forbidden_chars" != x; then
20587     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20588     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20589   fi
20590 
20591 
20592   windows_path="$new_path"
20593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20594     unix_path=`$CYGPATH -u "$windows_path"`
20595     new_path="$unix_path"
20596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20597     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20598     new_path="$unix_path"
20599   fi
20600 
20601   if test "x$path" != "x$new_path"; then
20602     BOOT_JDK="$new_path"
20603     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20604 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20605   fi
20606 
20607   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20608   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20609 
20610   else
20611     # We're on a posix platform. Hooray! :)
20612     path="$BOOT_JDK"
20613     has_space=`$ECHO "$path" | $GREP " "`
20614     if test "x$has_space" != x; then
20615       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20616 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20617       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20618     fi
20619 
20620     # Use eval to expand a potential ~
20621     eval path="$path"
20622     if test ! -f "$path" && test ! -d "$path"; then
20623       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20624     fi
20625 
20626     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20627   fi
20628 
20629               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20630 $as_echo_n "checking for Boot JDK... " >&6; }
20631               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20632 $as_echo "$BOOT_JDK" >&6; }
20633               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20634 $as_echo_n "checking Boot JDK version... " >&6; }
20635               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20636               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20637 $as_echo "$BOOT_JDK_VERSION" >&6; }
20638             fi # end check jdk version
20639           fi # end check rt.jar
20640         fi # end check javac
20641       fi # end check java
20642     fi # end check boot jdk found
20643   fi
20644 
20645 
20646   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20647 
20648   if test "x$BOOT_JDK_FOUND" = xno; then
20649     # Now execute the test
20650 
20651   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20652     # First check at user selected default
20653 
20654   if test "x$BOOT_JDK_FOUND" = xno; then
20655     # Now execute the test
20656 
20657   if test -x /usr/libexec/java_home; then
20658     BOOT_JDK=`/usr/libexec/java_home `
20659     BOOT_JDK_FOUND=maybe
20660     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20661 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20662   fi
20663 
20664 
20665     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20666     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20667       # Do we have a bin/java?
20668       if test ! -x "$BOOT_JDK/bin/java"; then
20669         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20670 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20671         BOOT_JDK_FOUND=no
20672       else
20673         # Do we have a bin/javac?
20674         if test ! -x "$BOOT_JDK/bin/javac"; then
20675           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20676 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20677           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20678 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20679           BOOT_JDK_FOUND=no
20680         else
20681           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20682           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20683             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20684 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20685             BOOT_JDK_FOUND=no
20686           else
20687             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20688             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20689 
20690             # Extra M4 quote needed to protect [] in grep expression.
20691             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20692             if test "x$FOUND_CORRECT_VERSION" = x; then
20693               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20694 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20695               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20696 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20697               BOOT_JDK_FOUND=no
20698             else
20699               # We're done! :-)
20700               BOOT_JDK_FOUND=yes
20701 
20702   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20703 
20704   # Input might be given as Windows format, start by converting to
20705   # unix format.
20706   path="$BOOT_JDK"
20707   new_path=`$CYGPATH -u "$path"`
20708 
20709   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20710   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20711   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20712   # "foo.exe" is OK but "foo" is an error.
20713   #
20714   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20715   # It is also a way to make sure we got the proper file name for the real test later on.
20716   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20717   if test "x$test_shortpath" = x; then
20718     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20719 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20720     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20721   fi
20722 
20723   # Call helper function which possibly converts this using DOS-style short mode.
20724   # If so, the updated path is stored in $new_path.
20725 
20726   input_path="$new_path"
20727   # Check if we need to convert this using DOS-style short mode. If the path
20728   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20729   # take no chances and rewrite it.
20730   # Note: m4 eats our [], so we need to use [ and ] instead.
20731   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20732   if test "x$has_forbidden_chars" != x; then
20733     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20734     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20735     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20736     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20737       # Going to short mode and back again did indeed matter. Since short mode is
20738       # case insensitive, let's make it lowercase to improve readability.
20739       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20740       # Now convert it back to Unix-stile (cygpath)
20741       input_path=`$CYGPATH -u "$shortmode_path"`
20742       new_path="$input_path"
20743     fi
20744   fi
20745 
20746   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20747   if test "x$test_cygdrive_prefix" = x; then
20748     # As a simple fix, exclude /usr/bin since it's not a real path.
20749     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20750       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20751       # a path prefixed by /cygdrive for fixpath to work.
20752       new_path="$CYGWIN_ROOT_PATH$input_path"
20753     fi
20754   fi
20755 
20756 
20757   if test "x$path" != "x$new_path"; then
20758     BOOT_JDK="$new_path"
20759     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20760 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20761   fi
20762 
20763   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20764 
20765   path="$BOOT_JDK"
20766   has_colon=`$ECHO $path | $GREP ^.:`
20767   new_path="$path"
20768   if test "x$has_colon" = x; then
20769     # Not in mixed or Windows style, start by that.
20770     new_path=`cmd //c echo $path`
20771   fi
20772 
20773 
20774   input_path="$new_path"
20775   # Check if we need to convert this using DOS-style short mode. If the path
20776   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20777   # take no chances and rewrite it.
20778   # Note: m4 eats our [], so we need to use [ and ] instead.
20779   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20780   if test "x$has_forbidden_chars" != x; then
20781     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20782     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20783   fi
20784 
20785 
20786   windows_path="$new_path"
20787   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20788     unix_path=`$CYGPATH -u "$windows_path"`
20789     new_path="$unix_path"
20790   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20791     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20792     new_path="$unix_path"
20793   fi
20794 
20795   if test "x$path" != "x$new_path"; then
20796     BOOT_JDK="$new_path"
20797     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20798 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20799   fi
20800 
20801   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20802   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20803 
20804   else
20805     # We're on a posix platform. Hooray! :)
20806     path="$BOOT_JDK"
20807     has_space=`$ECHO "$path" | $GREP " "`
20808     if test "x$has_space" != x; then
20809       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20810 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20811       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20812     fi
20813 
20814     # Use eval to expand a potential ~
20815     eval path="$path"
20816     if test ! -f "$path" && test ! -d "$path"; then
20817       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20818     fi
20819 
20820     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20821   fi
20822 
20823               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20824 $as_echo_n "checking for Boot JDK... " >&6; }
20825               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20826 $as_echo "$BOOT_JDK" >&6; }
20827               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20828 $as_echo_n "checking Boot JDK version... " >&6; }
20829               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20830               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20831 $as_echo "$BOOT_JDK_VERSION" >&6; }
20832             fi # end check jdk version
20833           fi # end check rt.jar
20834         fi # end check javac
20835       fi # end check java
20836     fi # end check boot jdk found
20837   fi
20838 
20839     # If that did not work out (e.g. too old), try explicit versions instead
20840 
20841   if test "x$BOOT_JDK_FOUND" = xno; then
20842     # Now execute the test
20843 
20844   if test -x /usr/libexec/java_home; then
20845     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20846     BOOT_JDK_FOUND=maybe
20847     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20848 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20849   fi
20850 
20851 
20852     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20853     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20854       # Do we have a bin/java?
20855       if test ! -x "$BOOT_JDK/bin/java"; then
20856         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20857 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20858         BOOT_JDK_FOUND=no
20859       else
20860         # Do we have a bin/javac?
20861         if test ! -x "$BOOT_JDK/bin/javac"; then
20862           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20863 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20864           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20865 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20866           BOOT_JDK_FOUND=no
20867         else
20868           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20869           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20870             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20871 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20872             BOOT_JDK_FOUND=no
20873           else
20874             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20875             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20876 
20877             # Extra M4 quote needed to protect [] in grep expression.
20878             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20879             if test "x$FOUND_CORRECT_VERSION" = x; then
20880               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20881 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20882               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20883 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20884               BOOT_JDK_FOUND=no
20885             else
20886               # We're done! :-)
20887               BOOT_JDK_FOUND=yes
20888 
20889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20890 
20891   # Input might be given as Windows format, start by converting to
20892   # unix format.
20893   path="$BOOT_JDK"
20894   new_path=`$CYGPATH -u "$path"`
20895 
20896   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20897   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20898   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20899   # "foo.exe" is OK but "foo" is an error.
20900   #
20901   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20902   # It is also a way to make sure we got the proper file name for the real test later on.
20903   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20904   if test "x$test_shortpath" = x; then
20905     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20906 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20907     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20908   fi
20909 
20910   # Call helper function which possibly converts this using DOS-style short mode.
20911   # If so, the updated path is stored in $new_path.
20912 
20913   input_path="$new_path"
20914   # Check if we need to convert this using DOS-style short mode. If the path
20915   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20916   # take no chances and rewrite it.
20917   # Note: m4 eats our [], so we need to use [ and ] instead.
20918   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20919   if test "x$has_forbidden_chars" != x; then
20920     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20921     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20922     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20923     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20924       # Going to short mode and back again did indeed matter. Since short mode is
20925       # case insensitive, let's make it lowercase to improve readability.
20926       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20927       # Now convert it back to Unix-stile (cygpath)
20928       input_path=`$CYGPATH -u "$shortmode_path"`
20929       new_path="$input_path"
20930     fi
20931   fi
20932 
20933   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20934   if test "x$test_cygdrive_prefix" = x; then
20935     # As a simple fix, exclude /usr/bin since it's not a real path.
20936     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20937       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20938       # a path prefixed by /cygdrive for fixpath to work.
20939       new_path="$CYGWIN_ROOT_PATH$input_path"
20940     fi
20941   fi
20942 
20943 
20944   if test "x$path" != "x$new_path"; then
20945     BOOT_JDK="$new_path"
20946     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20947 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20948   fi
20949 
20950   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20951 
20952   path="$BOOT_JDK"
20953   has_colon=`$ECHO $path | $GREP ^.:`
20954   new_path="$path"
20955   if test "x$has_colon" = x; then
20956     # Not in mixed or Windows style, start by that.
20957     new_path=`cmd //c echo $path`
20958   fi
20959 
20960 
20961   input_path="$new_path"
20962   # Check if we need to convert this using DOS-style short mode. If the path
20963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20964   # take no chances and rewrite it.
20965   # Note: m4 eats our [], so we need to use [ and ] instead.
20966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20967   if test "x$has_forbidden_chars" != x; then
20968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20969     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20970   fi
20971 
20972 
20973   windows_path="$new_path"
20974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20975     unix_path=`$CYGPATH -u "$windows_path"`
20976     new_path="$unix_path"
20977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20979     new_path="$unix_path"
20980   fi
20981 
20982   if test "x$path" != "x$new_path"; then
20983     BOOT_JDK="$new_path"
20984     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20985 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20986   fi
20987 
20988   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20989   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20990 
20991   else
20992     # We're on a posix platform. Hooray! :)
20993     path="$BOOT_JDK"
20994     has_space=`$ECHO "$path" | $GREP " "`
20995     if test "x$has_space" != x; then
20996       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20997 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20998       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20999     fi
21000 
21001     # Use eval to expand a potential ~
21002     eval path="$path"
21003     if test ! -f "$path" && test ! -d "$path"; then
21004       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21005     fi
21006 
21007     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21008   fi
21009 
21010               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21011 $as_echo_n "checking for Boot JDK... " >&6; }
21012               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21013 $as_echo "$BOOT_JDK" >&6; }
21014               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21015 $as_echo_n "checking Boot JDK version... " >&6; }
21016               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21017               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21018 $as_echo "$BOOT_JDK_VERSION" >&6; }
21019             fi # end check jdk version
21020           fi # end check rt.jar
21021         fi # end check javac
21022       fi # end check java
21023     fi # end check boot jdk found
21024   fi
21025 
21026 
21027   if test "x$BOOT_JDK_FOUND" = xno; then
21028     # Now execute the test
21029 
21030   if test -x /usr/libexec/java_home; then
21031     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21032     BOOT_JDK_FOUND=maybe
21033     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21034 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21035   fi
21036 
21037 
21038     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21039     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21040       # Do we have a bin/java?
21041       if test ! -x "$BOOT_JDK/bin/java"; then
21042         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21043 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21044         BOOT_JDK_FOUND=no
21045       else
21046         # Do we have a bin/javac?
21047         if test ! -x "$BOOT_JDK/bin/javac"; then
21048           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21049 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21050           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21051 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21052           BOOT_JDK_FOUND=no
21053         else
21054           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21055           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21056             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21057 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21058             BOOT_JDK_FOUND=no
21059           else
21060             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21061             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21062 
21063             # Extra M4 quote needed to protect [] in grep expression.
21064             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21065             if test "x$FOUND_CORRECT_VERSION" = x; then
21066               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21067 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21068               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21069 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21070               BOOT_JDK_FOUND=no
21071             else
21072               # We're done! :-)
21073               BOOT_JDK_FOUND=yes
21074 
21075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21076 
21077   # Input might be given as Windows format, start by converting to
21078   # unix format.
21079   path="$BOOT_JDK"
21080   new_path=`$CYGPATH -u "$path"`
21081 
21082   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21083   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21084   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21085   # "foo.exe" is OK but "foo" is an error.
21086   #
21087   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21088   # It is also a way to make sure we got the proper file name for the real test later on.
21089   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21090   if test "x$test_shortpath" = x; then
21091     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21092 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21093     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21094   fi
21095 
21096   # Call helper function which possibly converts this using DOS-style short mode.
21097   # If so, the updated path is stored in $new_path.
21098 
21099   input_path="$new_path"
21100   # Check if we need to convert this using DOS-style short mode. If the path
21101   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21102   # take no chances and rewrite it.
21103   # Note: m4 eats our [], so we need to use [ and ] instead.
21104   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21105   if test "x$has_forbidden_chars" != x; then
21106     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21107     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21108     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21109     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21110       # Going to short mode and back again did indeed matter. Since short mode is
21111       # case insensitive, let's make it lowercase to improve readability.
21112       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21113       # Now convert it back to Unix-stile (cygpath)
21114       input_path=`$CYGPATH -u "$shortmode_path"`
21115       new_path="$input_path"
21116     fi
21117   fi
21118 
21119   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21120   if test "x$test_cygdrive_prefix" = x; then
21121     # As a simple fix, exclude /usr/bin since it's not a real path.
21122     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21123       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21124       # a path prefixed by /cygdrive for fixpath to work.
21125       new_path="$CYGWIN_ROOT_PATH$input_path"
21126     fi
21127   fi
21128 
21129 
21130   if test "x$path" != "x$new_path"; then
21131     BOOT_JDK="$new_path"
21132     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21133 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21134   fi
21135 
21136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21137 
21138   path="$BOOT_JDK"
21139   has_colon=`$ECHO $path | $GREP ^.:`
21140   new_path="$path"
21141   if test "x$has_colon" = x; then
21142     # Not in mixed or Windows style, start by that.
21143     new_path=`cmd //c echo $path`
21144   fi
21145 
21146 
21147   input_path="$new_path"
21148   # Check if we need to convert this using DOS-style short mode. If the path
21149   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21150   # take no chances and rewrite it.
21151   # Note: m4 eats our [], so we need to use [ and ] instead.
21152   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21153   if test "x$has_forbidden_chars" != x; then
21154     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21155     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21156   fi
21157 
21158 
21159   windows_path="$new_path"
21160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21161     unix_path=`$CYGPATH -u "$windows_path"`
21162     new_path="$unix_path"
21163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21164     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21165     new_path="$unix_path"
21166   fi
21167 
21168   if test "x$path" != "x$new_path"; then
21169     BOOT_JDK="$new_path"
21170     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21171 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21172   fi
21173 
21174   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21175   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21176 
21177   else
21178     # We're on a posix platform. Hooray! :)
21179     path="$BOOT_JDK"
21180     has_space=`$ECHO "$path" | $GREP " "`
21181     if test "x$has_space" != x; then
21182       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21183 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21184       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21185     fi
21186 
21187     # Use eval to expand a potential ~
21188     eval path="$path"
21189     if test ! -f "$path" && test ! -d "$path"; then
21190       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21191     fi
21192 
21193     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21194   fi
21195 
21196               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21197 $as_echo_n "checking for Boot JDK... " >&6; }
21198               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21199 $as_echo "$BOOT_JDK" >&6; }
21200               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21201 $as_echo_n "checking Boot JDK version... " >&6; }
21202               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21203               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21204 $as_echo "$BOOT_JDK_VERSION" >&6; }
21205             fi # end check jdk version
21206           fi # end check rt.jar
21207         fi # end check javac
21208       fi # end check java
21209     fi # end check boot jdk found
21210   fi
21211 
21212 
21213   if test "x$BOOT_JDK_FOUND" = xno; then
21214     # Now execute the test
21215 
21216   if test -x /usr/libexec/java_home; then
21217     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21218     BOOT_JDK_FOUND=maybe
21219     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21220 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21221   fi
21222 
21223 
21224     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21225     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21226       # Do we have a bin/java?
21227       if test ! -x "$BOOT_JDK/bin/java"; then
21228         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21229 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21230         BOOT_JDK_FOUND=no
21231       else
21232         # Do we have a bin/javac?
21233         if test ! -x "$BOOT_JDK/bin/javac"; then
21234           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21235 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21236           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21237 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21238           BOOT_JDK_FOUND=no
21239         else
21240           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21241           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21242             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21243 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21244             BOOT_JDK_FOUND=no
21245           else
21246             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21247             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21248 
21249             # Extra M4 quote needed to protect [] in grep expression.
21250             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21251             if test "x$FOUND_CORRECT_VERSION" = x; then
21252               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21253 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21254               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21255 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21256               BOOT_JDK_FOUND=no
21257             else
21258               # We're done! :-)
21259               BOOT_JDK_FOUND=yes
21260 
21261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21262 
21263   # Input might be given as Windows format, start by converting to
21264   # unix format.
21265   path="$BOOT_JDK"
21266   new_path=`$CYGPATH -u "$path"`
21267 
21268   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21269   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21270   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21271   # "foo.exe" is OK but "foo" is an error.
21272   #
21273   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21274   # It is also a way to make sure we got the proper file name for the real test later on.
21275   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21276   if test "x$test_shortpath" = x; then
21277     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21278 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21279     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21280   fi
21281 
21282   # Call helper function which possibly converts this using DOS-style short mode.
21283   # If so, the updated path is stored in $new_path.
21284 
21285   input_path="$new_path"
21286   # Check if we need to convert this using DOS-style short mode. If the path
21287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21288   # take no chances and rewrite it.
21289   # Note: m4 eats our [], so we need to use [ and ] instead.
21290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21291   if test "x$has_forbidden_chars" != x; then
21292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21293     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21294     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21295     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21296       # Going to short mode and back again did indeed matter. Since short mode is
21297       # case insensitive, let's make it lowercase to improve readability.
21298       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21299       # Now convert it back to Unix-stile (cygpath)
21300       input_path=`$CYGPATH -u "$shortmode_path"`
21301       new_path="$input_path"
21302     fi
21303   fi
21304 
21305   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21306   if test "x$test_cygdrive_prefix" = x; then
21307     # As a simple fix, exclude /usr/bin since it's not a real path.
21308     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21309       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21310       # a path prefixed by /cygdrive for fixpath to work.
21311       new_path="$CYGWIN_ROOT_PATH$input_path"
21312     fi
21313   fi
21314 
21315 
21316   if test "x$path" != "x$new_path"; then
21317     BOOT_JDK="$new_path"
21318     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21319 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21320   fi
21321 
21322   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21323 
21324   path="$BOOT_JDK"
21325   has_colon=`$ECHO $path | $GREP ^.:`
21326   new_path="$path"
21327   if test "x$has_colon" = x; then
21328     # Not in mixed or Windows style, start by that.
21329     new_path=`cmd //c echo $path`
21330   fi
21331 
21332 
21333   input_path="$new_path"
21334   # Check if we need to convert this using DOS-style short mode. If the path
21335   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21336   # take no chances and rewrite it.
21337   # Note: m4 eats our [], so we need to use [ and ] instead.
21338   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21339   if test "x$has_forbidden_chars" != x; then
21340     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21341     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21342   fi
21343 
21344 
21345   windows_path="$new_path"
21346   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21347     unix_path=`$CYGPATH -u "$windows_path"`
21348     new_path="$unix_path"
21349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21350     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21351     new_path="$unix_path"
21352   fi
21353 
21354   if test "x$path" != "x$new_path"; then
21355     BOOT_JDK="$new_path"
21356     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21357 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21358   fi
21359 
21360   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21361   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21362 
21363   else
21364     # We're on a posix platform. Hooray! :)
21365     path="$BOOT_JDK"
21366     has_space=`$ECHO "$path" | $GREP " "`
21367     if test "x$has_space" != x; then
21368       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21369 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21370       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21371     fi
21372 
21373     # Use eval to expand a potential ~
21374     eval path="$path"
21375     if test ! -f "$path" && test ! -d "$path"; then
21376       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21377     fi
21378 
21379     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21380   fi
21381 
21382               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21383 $as_echo_n "checking for Boot JDK... " >&6; }
21384               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21385 $as_echo "$BOOT_JDK" >&6; }
21386               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21387 $as_echo_n "checking Boot JDK version... " >&6; }
21388               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21389               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21390 $as_echo "$BOOT_JDK_VERSION" >&6; }
21391             fi # end check jdk version
21392           fi # end check rt.jar
21393         fi # end check javac
21394       fi # end check java
21395     fi # end check boot jdk found
21396   fi
21397 
21398   fi
21399 
21400 
21401     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21402     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21403       # Do we have a bin/java?
21404       if test ! -x "$BOOT_JDK/bin/java"; then
21405         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21406 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21407         BOOT_JDK_FOUND=no
21408       else
21409         # Do we have a bin/javac?
21410         if test ! -x "$BOOT_JDK/bin/javac"; then
21411           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21412 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21413           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21414 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21415           BOOT_JDK_FOUND=no
21416         else
21417           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21418           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21419             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21420 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21421             BOOT_JDK_FOUND=no
21422           else
21423             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21424             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21425 
21426             # Extra M4 quote needed to protect [] in grep expression.
21427             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21428             if test "x$FOUND_CORRECT_VERSION" = x; then
21429               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21430 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21431               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21432 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21433               BOOT_JDK_FOUND=no
21434             else
21435               # We're done! :-)
21436               BOOT_JDK_FOUND=yes
21437 
21438   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21439 
21440   # Input might be given as Windows format, start by converting to
21441   # unix format.
21442   path="$BOOT_JDK"
21443   new_path=`$CYGPATH -u "$path"`
21444 
21445   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21446   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21447   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21448   # "foo.exe" is OK but "foo" is an error.
21449   #
21450   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21451   # It is also a way to make sure we got the proper file name for the real test later on.
21452   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21453   if test "x$test_shortpath" = x; then
21454     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21455 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21456     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21457   fi
21458 
21459   # Call helper function which possibly converts this using DOS-style short mode.
21460   # If so, the updated path is stored in $new_path.
21461 
21462   input_path="$new_path"
21463   # Check if we need to convert this using DOS-style short mode. If the path
21464   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21465   # take no chances and rewrite it.
21466   # Note: m4 eats our [], so we need to use [ and ] instead.
21467   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21468   if test "x$has_forbidden_chars" != x; then
21469     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21470     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21471     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21472     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21473       # Going to short mode and back again did indeed matter. Since short mode is
21474       # case insensitive, let's make it lowercase to improve readability.
21475       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21476       # Now convert it back to Unix-stile (cygpath)
21477       input_path=`$CYGPATH -u "$shortmode_path"`
21478       new_path="$input_path"
21479     fi
21480   fi
21481 
21482   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21483   if test "x$test_cygdrive_prefix" = x; then
21484     # As a simple fix, exclude /usr/bin since it's not a real path.
21485     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21486       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21487       # a path prefixed by /cygdrive for fixpath to work.
21488       new_path="$CYGWIN_ROOT_PATH$input_path"
21489     fi
21490   fi
21491 
21492 
21493   if test "x$path" != "x$new_path"; then
21494     BOOT_JDK="$new_path"
21495     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21496 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21497   fi
21498 
21499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21500 
21501   path="$BOOT_JDK"
21502   has_colon=`$ECHO $path | $GREP ^.:`
21503   new_path="$path"
21504   if test "x$has_colon" = x; then
21505     # Not in mixed or Windows style, start by that.
21506     new_path=`cmd //c echo $path`
21507   fi
21508 
21509 
21510   input_path="$new_path"
21511   # Check if we need to convert this using DOS-style short mode. If the path
21512   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21513   # take no chances and rewrite it.
21514   # Note: m4 eats our [], so we need to use [ and ] instead.
21515   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21516   if test "x$has_forbidden_chars" != x; then
21517     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21518     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21519   fi
21520 
21521 
21522   windows_path="$new_path"
21523   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21524     unix_path=`$CYGPATH -u "$windows_path"`
21525     new_path="$unix_path"
21526   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21527     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21528     new_path="$unix_path"
21529   fi
21530 
21531   if test "x$path" != "x$new_path"; then
21532     BOOT_JDK="$new_path"
21533     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21534 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21535   fi
21536 
21537   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21538   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21539 
21540   else
21541     # We're on a posix platform. Hooray! :)
21542     path="$BOOT_JDK"
21543     has_space=`$ECHO "$path" | $GREP " "`
21544     if test "x$has_space" != x; then
21545       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21546 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21547       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21548     fi
21549 
21550     # Use eval to expand a potential ~
21551     eval path="$path"
21552     if test ! -f "$path" && test ! -d "$path"; then
21553       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21554     fi
21555 
21556     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21557   fi
21558 
21559               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21560 $as_echo_n "checking for Boot JDK... " >&6; }
21561               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21562 $as_echo "$BOOT_JDK" >&6; }
21563               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21564 $as_echo_n "checking Boot JDK version... " >&6; }
21565               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21566               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21567 $as_echo "$BOOT_JDK_VERSION" >&6; }
21568             fi # end check jdk version
21569           fi # end check rt.jar
21570         fi # end check javac
21571       fi # end check java
21572     fi # end check boot jdk found
21573   fi
21574 
21575 
21576   # Test: Is $JAVA_HOME set?
21577 
21578   if test "x$BOOT_JDK_FOUND" = xno; then
21579     # Now execute the test
21580 
21581   if test "x$JAVA_HOME" != x; then
21582     JAVA_HOME_PROCESSED="$JAVA_HOME"
21583 
21584   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21585 
21586   # Input might be given as Windows format, start by converting to
21587   # unix format.
21588   path="$JAVA_HOME_PROCESSED"
21589   new_path=`$CYGPATH -u "$path"`
21590 
21591   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21592   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21593   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21594   # "foo.exe" is OK but "foo" is an error.
21595   #
21596   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21597   # It is also a way to make sure we got the proper file name for the real test later on.
21598   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21599   if test "x$test_shortpath" = x; then
21600     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21601 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21602     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21603   fi
21604 
21605   # Call helper function which possibly converts this using DOS-style short mode.
21606   # If so, the updated path is stored in $new_path.
21607 
21608   input_path="$new_path"
21609   # Check if we need to convert this using DOS-style short mode. If the path
21610   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21611   # take no chances and rewrite it.
21612   # Note: m4 eats our [], so we need to use [ and ] instead.
21613   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21614   if test "x$has_forbidden_chars" != x; then
21615     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21616     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21617     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21618     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21619       # Going to short mode and back again did indeed matter. Since short mode is
21620       # case insensitive, let's make it lowercase to improve readability.
21621       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21622       # Now convert it back to Unix-stile (cygpath)
21623       input_path=`$CYGPATH -u "$shortmode_path"`
21624       new_path="$input_path"
21625     fi
21626   fi
21627 
21628   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21629   if test "x$test_cygdrive_prefix" = x; then
21630     # As a simple fix, exclude /usr/bin since it's not a real path.
21631     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21632       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21633       # a path prefixed by /cygdrive for fixpath to work.
21634       new_path="$CYGWIN_ROOT_PATH$input_path"
21635     fi
21636   fi
21637 
21638 
21639   if test "x$path" != "x$new_path"; then
21640     JAVA_HOME_PROCESSED="$new_path"
21641     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21642 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21643   fi
21644 
21645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21646 
21647   path="$JAVA_HOME_PROCESSED"
21648   has_colon=`$ECHO $path | $GREP ^.:`
21649   new_path="$path"
21650   if test "x$has_colon" = x; then
21651     # Not in mixed or Windows style, start by that.
21652     new_path=`cmd //c echo $path`
21653   fi
21654 
21655 
21656   input_path="$new_path"
21657   # Check if we need to convert this using DOS-style short mode. If the path
21658   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21659   # take no chances and rewrite it.
21660   # Note: m4 eats our [], so we need to use [ and ] instead.
21661   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21662   if test "x$has_forbidden_chars" != x; then
21663     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21664     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21665   fi
21666 
21667 
21668   windows_path="$new_path"
21669   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21670     unix_path=`$CYGPATH -u "$windows_path"`
21671     new_path="$unix_path"
21672   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21673     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21674     new_path="$unix_path"
21675   fi
21676 
21677   if test "x$path" != "x$new_path"; then
21678     JAVA_HOME_PROCESSED="$new_path"
21679     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21680 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21681   fi
21682 
21683   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21684   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21685 
21686   else
21687     # We're on a posix platform. Hooray! :)
21688     path="$JAVA_HOME_PROCESSED"
21689     has_space=`$ECHO "$path" | $GREP " "`
21690     if test "x$has_space" != x; then
21691       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21692 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21693       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21694     fi
21695 
21696     # Use eval to expand a potential ~
21697     eval path="$path"
21698     if test ! -f "$path" && test ! -d "$path"; then
21699       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21700     fi
21701 
21702     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21703   fi
21704 
21705     if test ! -d "$JAVA_HOME_PROCESSED"; then
21706       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21707 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21708     else
21709       # Aha, the user has set a JAVA_HOME
21710       # let us use that as the Boot JDK.
21711       BOOT_JDK="$JAVA_HOME_PROCESSED"
21712       BOOT_JDK_FOUND=maybe
21713       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21714 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21715     fi
21716   fi
21717 
21718 
21719     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21720     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21721       # Do we have a bin/java?
21722       if test ! -x "$BOOT_JDK/bin/java"; then
21723         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21724 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21725         BOOT_JDK_FOUND=no
21726       else
21727         # Do we have a bin/javac?
21728         if test ! -x "$BOOT_JDK/bin/javac"; then
21729           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21730 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21731           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21732 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21733           BOOT_JDK_FOUND=no
21734         else
21735           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21736           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21737             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21738 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21739             BOOT_JDK_FOUND=no
21740           else
21741             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21742             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21743 
21744             # Extra M4 quote needed to protect [] in grep expression.
21745             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21746             if test "x$FOUND_CORRECT_VERSION" = x; then
21747               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21748 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21749               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21750 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21751               BOOT_JDK_FOUND=no
21752             else
21753               # We're done! :-)
21754               BOOT_JDK_FOUND=yes
21755 
21756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21757 
21758   # Input might be given as Windows format, start by converting to
21759   # unix format.
21760   path="$BOOT_JDK"
21761   new_path=`$CYGPATH -u "$path"`
21762 
21763   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21764   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21765   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21766   # "foo.exe" is OK but "foo" is an error.
21767   #
21768   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21769   # It is also a way to make sure we got the proper file name for the real test later on.
21770   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21771   if test "x$test_shortpath" = x; then
21772     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21773 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21774     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21775   fi
21776 
21777   # Call helper function which possibly converts this using DOS-style short mode.
21778   # If so, the updated path is stored in $new_path.
21779 
21780   input_path="$new_path"
21781   # Check if we need to convert this using DOS-style short mode. If the path
21782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21783   # take no chances and rewrite it.
21784   # Note: m4 eats our [], so we need to use [ and ] instead.
21785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21786   if test "x$has_forbidden_chars" != x; then
21787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21788     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21789     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21790     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21791       # Going to short mode and back again did indeed matter. Since short mode is
21792       # case insensitive, let's make it lowercase to improve readability.
21793       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21794       # Now convert it back to Unix-stile (cygpath)
21795       input_path=`$CYGPATH -u "$shortmode_path"`
21796       new_path="$input_path"
21797     fi
21798   fi
21799 
21800   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21801   if test "x$test_cygdrive_prefix" = x; then
21802     # As a simple fix, exclude /usr/bin since it's not a real path.
21803     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21804       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21805       # a path prefixed by /cygdrive for fixpath to work.
21806       new_path="$CYGWIN_ROOT_PATH$input_path"
21807     fi
21808   fi
21809 
21810 
21811   if test "x$path" != "x$new_path"; then
21812     BOOT_JDK="$new_path"
21813     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21814 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21815   fi
21816 
21817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21818 
21819   path="$BOOT_JDK"
21820   has_colon=`$ECHO $path | $GREP ^.:`
21821   new_path="$path"
21822   if test "x$has_colon" = x; then
21823     # Not in mixed or Windows style, start by that.
21824     new_path=`cmd //c echo $path`
21825   fi
21826 
21827 
21828   input_path="$new_path"
21829   # Check if we need to convert this using DOS-style short mode. If the path
21830   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21831   # take no chances and rewrite it.
21832   # Note: m4 eats our [], so we need to use [ and ] instead.
21833   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21834   if test "x$has_forbidden_chars" != x; then
21835     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21836     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21837   fi
21838 
21839 
21840   windows_path="$new_path"
21841   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21842     unix_path=`$CYGPATH -u "$windows_path"`
21843     new_path="$unix_path"
21844   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21845     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21846     new_path="$unix_path"
21847   fi
21848 
21849   if test "x$path" != "x$new_path"; then
21850     BOOT_JDK="$new_path"
21851     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21852 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21853   fi
21854 
21855   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21856   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21857 
21858   else
21859     # We're on a posix platform. Hooray! :)
21860     path="$BOOT_JDK"
21861     has_space=`$ECHO "$path" | $GREP " "`
21862     if test "x$has_space" != x; then
21863       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21864 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21865       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21866     fi
21867 
21868     # Use eval to expand a potential ~
21869     eval path="$path"
21870     if test ! -f "$path" && test ! -d "$path"; then
21871       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21872     fi
21873 
21874     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21875   fi
21876 
21877               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21878 $as_echo_n "checking for Boot JDK... " >&6; }
21879               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21880 $as_echo "$BOOT_JDK" >&6; }
21881               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21882 $as_echo_n "checking Boot JDK version... " >&6; }
21883               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21884               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21885 $as_echo "$BOOT_JDK_VERSION" >&6; }
21886             fi # end check jdk version
21887           fi # end check rt.jar
21888         fi # end check javac
21889       fi # end check java
21890     fi # end check boot jdk found
21891   fi
21892 
21893 
21894   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21895 
21896   if test "x$BOOT_JDK_FOUND" = xno; then
21897     # Now execute the test
21898 
21899   # Extract the first word of "javac", so it can be a program name with args.
21900 set dummy javac; ac_word=$2
21901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21902 $as_echo_n "checking for $ac_word... " >&6; }
21903 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21904   $as_echo_n "(cached) " >&6
21905 else
21906   case $JAVAC_CHECK in
21907   [\\/]* | ?:[\\/]*)
21908   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21909   ;;
21910   *)
21911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21912 for as_dir in $PATH
21913 do
21914   IFS=$as_save_IFS
21915   test -z "$as_dir" && as_dir=.
21916     for ac_exec_ext in '' $ac_executable_extensions; do
21917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21918     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21920     break 2
21921   fi
21922 done
21923   done
21924 IFS=$as_save_IFS
21925 
21926   ;;
21927 esac
21928 fi
21929 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21930 if test -n "$JAVAC_CHECK"; then
21931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21932 $as_echo "$JAVAC_CHECK" >&6; }
21933 else
21934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21935 $as_echo "no" >&6; }
21936 fi
21937 
21938 
21939   # Extract the first word of "java", so it can be a program name with args.
21940 set dummy java; ac_word=$2
21941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21942 $as_echo_n "checking for $ac_word... " >&6; }
21943 if ${ac_cv_path_JAVA_CHECK+:} false; then :
21944   $as_echo_n "(cached) " >&6
21945 else
21946   case $JAVA_CHECK in
21947   [\\/]* | ?:[\\/]*)
21948   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21949   ;;
21950   *)
21951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21952 for as_dir in $PATH
21953 do
21954   IFS=$as_save_IFS
21955   test -z "$as_dir" && as_dir=.
21956     for ac_exec_ext in '' $ac_executable_extensions; do
21957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21958     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21960     break 2
21961   fi
21962 done
21963   done
21964 IFS=$as_save_IFS
21965 
21966   ;;
21967 esac
21968 fi
21969 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21970 if test -n "$JAVA_CHECK"; then
21971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21972 $as_echo "$JAVA_CHECK" >&6; }
21973 else
21974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21975 $as_echo "no" >&6; }
21976 fi
21977 
21978 
21979   BINARY="$JAVAC_CHECK"
21980   if test "x$JAVAC_CHECK" = x; then
21981     BINARY="$JAVA_CHECK"
21982   fi
21983   if test "x$BINARY" != x; then
21984     # So there is a java(c) binary, it might be part of a JDK.
21985     # Lets find the JDK/JRE directory by following symbolic links.
21986     # Linux/GNU systems often have links from /usr/bin/java to
21987     # /etc/alternatives/java to the real JDK binary.
21988 
21989   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21990     # Follow a chain of symbolic links. Use readlink
21991     # where it exists, else fall back to horribly
21992     # complicated shell code.
21993     if test "x$READLINK_TESTED" != yes; then
21994       # On MacOSX there is a readlink tool with a different
21995       # purpose than the GNU readlink tool. Check the found readlink.
21996       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21997       if test "x$ISGNU" = x; then
21998         # A readlink that we do not know how to use.
21999         # Are there other non-GNU readlinks out there?
22000         READLINK_TESTED=yes
22001         READLINK=
22002       fi
22003     fi
22004 
22005     if test "x$READLINK" != x; then
22006       BINARY=`$READLINK -f $BINARY`
22007     else
22008       # Save the current directory for restoring afterwards
22009       STARTDIR=$PWD
22010       COUNTER=0
22011       sym_link_dir=`$DIRNAME $BINARY`
22012       sym_link_file=`$BASENAME $BINARY`
22013       cd $sym_link_dir
22014       # Use -P flag to resolve symlinks in directories.
22015       cd `$THEPWDCMD -P`
22016       sym_link_dir=`$THEPWDCMD -P`
22017       # Resolve file symlinks
22018       while test $COUNTER -lt 20; do
22019         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22020         if test "x$ISLINK" == x; then
22021           # This is not a symbolic link! We are done!
22022           break
22023         fi
22024         # Again resolve directory symlinks since the target of the just found
22025         # link could be in a different directory
22026         cd `$DIRNAME $ISLINK`
22027         sym_link_dir=`$THEPWDCMD -P`
22028         sym_link_file=`$BASENAME $ISLINK`
22029         let COUNTER=COUNTER+1
22030       done
22031       cd $STARTDIR
22032       BINARY=$sym_link_dir/$sym_link_file
22033     fi
22034   fi
22035 
22036     BOOT_JDK=`dirname "$BINARY"`
22037     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22038     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22039       # Looks like we found ourselves an JDK
22040       BOOT_JDK_FOUND=maybe
22041       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22042 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22043     fi
22044   fi
22045 
22046 
22047     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22048     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22049       # Do we have a bin/java?
22050       if test ! -x "$BOOT_JDK/bin/java"; then
22051         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22052 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22053         BOOT_JDK_FOUND=no
22054       else
22055         # Do we have a bin/javac?
22056         if test ! -x "$BOOT_JDK/bin/javac"; then
22057           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22058 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22059           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22060 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22061           BOOT_JDK_FOUND=no
22062         else
22063           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22064           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22065             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22066 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22067             BOOT_JDK_FOUND=no
22068           else
22069             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22070             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22071 
22072             # Extra M4 quote needed to protect [] in grep expression.
22073             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22074             if test "x$FOUND_CORRECT_VERSION" = x; then
22075               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22076 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22077               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22078 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22079               BOOT_JDK_FOUND=no
22080             else
22081               # We're done! :-)
22082               BOOT_JDK_FOUND=yes
22083 
22084   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22085 
22086   # Input might be given as Windows format, start by converting to
22087   # unix format.
22088   path="$BOOT_JDK"
22089   new_path=`$CYGPATH -u "$path"`
22090 
22091   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22092   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22093   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22094   # "foo.exe" is OK but "foo" is an error.
22095   #
22096   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22097   # It is also a way to make sure we got the proper file name for the real test later on.
22098   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22099   if test "x$test_shortpath" = x; then
22100     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22101 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22102     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22103   fi
22104 
22105   # Call helper function which possibly converts this using DOS-style short mode.
22106   # If so, the updated path is stored in $new_path.
22107 
22108   input_path="$new_path"
22109   # Check if we need to convert this using DOS-style short mode. If the path
22110   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22111   # take no chances and rewrite it.
22112   # Note: m4 eats our [], so we need to use [ and ] instead.
22113   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22114   if test "x$has_forbidden_chars" != x; then
22115     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22116     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22117     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22118     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22119       # Going to short mode and back again did indeed matter. Since short mode is
22120       # case insensitive, let's make it lowercase to improve readability.
22121       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22122       # Now convert it back to Unix-stile (cygpath)
22123       input_path=`$CYGPATH -u "$shortmode_path"`
22124       new_path="$input_path"
22125     fi
22126   fi
22127 
22128   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22129   if test "x$test_cygdrive_prefix" = x; then
22130     # As a simple fix, exclude /usr/bin since it's not a real path.
22131     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22132       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22133       # a path prefixed by /cygdrive for fixpath to work.
22134       new_path="$CYGWIN_ROOT_PATH$input_path"
22135     fi
22136   fi
22137 
22138 
22139   if test "x$path" != "x$new_path"; then
22140     BOOT_JDK="$new_path"
22141     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22142 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22143   fi
22144 
22145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22146 
22147   path="$BOOT_JDK"
22148   has_colon=`$ECHO $path | $GREP ^.:`
22149   new_path="$path"
22150   if test "x$has_colon" = x; then
22151     # Not in mixed or Windows style, start by that.
22152     new_path=`cmd //c echo $path`
22153   fi
22154 
22155 
22156   input_path="$new_path"
22157   # Check if we need to convert this using DOS-style short mode. If the path
22158   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22159   # take no chances and rewrite it.
22160   # Note: m4 eats our [], so we need to use [ and ] instead.
22161   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22162   if test "x$has_forbidden_chars" != x; then
22163     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22164     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22165   fi
22166 
22167 
22168   windows_path="$new_path"
22169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22170     unix_path=`$CYGPATH -u "$windows_path"`
22171     new_path="$unix_path"
22172   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22173     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22174     new_path="$unix_path"
22175   fi
22176 
22177   if test "x$path" != "x$new_path"; then
22178     BOOT_JDK="$new_path"
22179     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22180 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22181   fi
22182 
22183   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22184   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22185 
22186   else
22187     # We're on a posix platform. Hooray! :)
22188     path="$BOOT_JDK"
22189     has_space=`$ECHO "$path" | $GREP " "`
22190     if test "x$has_space" != x; then
22191       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22192 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22193       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22194     fi
22195 
22196     # Use eval to expand a potential ~
22197     eval path="$path"
22198     if test ! -f "$path" && test ! -d "$path"; then
22199       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22200     fi
22201 
22202     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22203   fi
22204 
22205               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22206 $as_echo_n "checking for Boot JDK... " >&6; }
22207               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22208 $as_echo "$BOOT_JDK" >&6; }
22209               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22210 $as_echo_n "checking Boot JDK version... " >&6; }
22211               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22212               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22213 $as_echo "$BOOT_JDK_VERSION" >&6; }
22214             fi # end check jdk version
22215           fi # end check rt.jar
22216         fi # end check javac
22217       fi # end check java
22218     fi # end check boot jdk found
22219   fi
22220 
22221 
22222   # Test: Is there a JDK installed in default, well-known locations?
22223 
22224   if test "x$BOOT_JDK_FOUND" = xno; then
22225     # Now execute the test
22226 
22227   if test "x$OPENJDK_TARGET_OS" = xwindows; then
22228 
22229   if test "x$BOOT_JDK_FOUND" = xno; then
22230     # Now execute the test
22231 
22232   if test "x$ProgramW6432" != x; then
22233     VIRTUAL_DIR="$ProgramW6432/Java"
22234 
22235   windows_path="$VIRTUAL_DIR"
22236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22237     unix_path=`$CYGPATH -u "$windows_path"`
22238     VIRTUAL_DIR="$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     VIRTUAL_DIR="$unix_path"
22242   fi
22243 
22244 
22245   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22246   BOOT_JDK_SUFFIX=""
22247   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22248   if test "x$ALL_JDKS_FOUND" != x; then
22249     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22250 
22251   if test "x$BOOT_JDK_FOUND" = xno; then
22252     # Now execute the test
22253 
22254         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22255         if test -d "$BOOT_JDK"; then
22256           BOOT_JDK_FOUND=maybe
22257           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22258 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22259         fi
22260 
22261 
22262     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22263     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22264       # Do we have a bin/java?
22265       if test ! -x "$BOOT_JDK/bin/java"; then
22266         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22267 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22268         BOOT_JDK_FOUND=no
22269       else
22270         # Do we have a bin/javac?
22271         if test ! -x "$BOOT_JDK/bin/javac"; then
22272           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22273 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22274           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22275 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22276           BOOT_JDK_FOUND=no
22277         else
22278           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22279           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22280             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22281 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22282             BOOT_JDK_FOUND=no
22283           else
22284             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22285             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22286 
22287             # Extra M4 quote needed to protect [] in grep expression.
22288             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22289             if test "x$FOUND_CORRECT_VERSION" = x; then
22290               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22291 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22292               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22293 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22294               BOOT_JDK_FOUND=no
22295             else
22296               # We're done! :-)
22297               BOOT_JDK_FOUND=yes
22298 
22299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22300 
22301   # Input might be given as Windows format, start by converting to
22302   # unix format.
22303   path="$BOOT_JDK"
22304   new_path=`$CYGPATH -u "$path"`
22305 
22306   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22307   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22308   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22309   # "foo.exe" is OK but "foo" is an error.
22310   #
22311   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22312   # It is also a way to make sure we got the proper file name for the real test later on.
22313   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22314   if test "x$test_shortpath" = x; then
22315     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22316 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22317     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22318   fi
22319 
22320   # Call helper function which possibly converts this using DOS-style short mode.
22321   # If so, the updated path is stored in $new_path.
22322 
22323   input_path="$new_path"
22324   # Check if we need to convert this using DOS-style short mode. If the path
22325   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22326   # take no chances and rewrite it.
22327   # Note: m4 eats our [], so we need to use [ and ] instead.
22328   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22329   if test "x$has_forbidden_chars" != x; then
22330     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22331     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22332     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22333     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22334       # Going to short mode and back again did indeed matter. Since short mode is
22335       # case insensitive, let's make it lowercase to improve readability.
22336       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22337       # Now convert it back to Unix-stile (cygpath)
22338       input_path=`$CYGPATH -u "$shortmode_path"`
22339       new_path="$input_path"
22340     fi
22341   fi
22342 
22343   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22344   if test "x$test_cygdrive_prefix" = x; then
22345     # As a simple fix, exclude /usr/bin since it's not a real path.
22346     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22347       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22348       # a path prefixed by /cygdrive for fixpath to work.
22349       new_path="$CYGWIN_ROOT_PATH$input_path"
22350     fi
22351   fi
22352 
22353 
22354   if test "x$path" != "x$new_path"; then
22355     BOOT_JDK="$new_path"
22356     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22357 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22358   fi
22359 
22360   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22361 
22362   path="$BOOT_JDK"
22363   has_colon=`$ECHO $path | $GREP ^.:`
22364   new_path="$path"
22365   if test "x$has_colon" = x; then
22366     # Not in mixed or Windows style, start by that.
22367     new_path=`cmd //c echo $path`
22368   fi
22369 
22370 
22371   input_path="$new_path"
22372   # Check if we need to convert this using DOS-style short mode. If the path
22373   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22374   # take no chances and rewrite it.
22375   # Note: m4 eats our [], so we need to use [ and ] instead.
22376   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22377   if test "x$has_forbidden_chars" != x; then
22378     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22379     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22380   fi
22381 
22382 
22383   windows_path="$new_path"
22384   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22385     unix_path=`$CYGPATH -u "$windows_path"`
22386     new_path="$unix_path"
22387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22388     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22389     new_path="$unix_path"
22390   fi
22391 
22392   if test "x$path" != "x$new_path"; then
22393     BOOT_JDK="$new_path"
22394     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22395 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22396   fi
22397 
22398   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22399   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22400 
22401   else
22402     # We're on a posix platform. Hooray! :)
22403     path="$BOOT_JDK"
22404     has_space=`$ECHO "$path" | $GREP " "`
22405     if test "x$has_space" != x; then
22406       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22407 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22408       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22409     fi
22410 
22411     # Use eval to expand a potential ~
22412     eval path="$path"
22413     if test ! -f "$path" && test ! -d "$path"; then
22414       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22415     fi
22416 
22417     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22418   fi
22419 
22420               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22421 $as_echo_n "checking for Boot JDK... " >&6; }
22422               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22423 $as_echo "$BOOT_JDK" >&6; }
22424               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22425 $as_echo_n "checking Boot JDK version... " >&6; }
22426               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22427               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22428 $as_echo "$BOOT_JDK_VERSION" >&6; }
22429             fi # end check jdk version
22430           fi # end check rt.jar
22431         fi # end check javac
22432       fi # end check java
22433     fi # end check boot jdk found
22434   fi
22435 
22436     done
22437   fi
22438 
22439   fi
22440 
22441 
22442     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22443     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22444       # Do we have a bin/java?
22445       if test ! -x "$BOOT_JDK/bin/java"; then
22446         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22447 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22448         BOOT_JDK_FOUND=no
22449       else
22450         # Do we have a bin/javac?
22451         if test ! -x "$BOOT_JDK/bin/javac"; then
22452           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22453 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22454           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22455 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22456           BOOT_JDK_FOUND=no
22457         else
22458           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22459           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22460             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22461 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22462             BOOT_JDK_FOUND=no
22463           else
22464             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22465             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22466 
22467             # Extra M4 quote needed to protect [] in grep expression.
22468             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22469             if test "x$FOUND_CORRECT_VERSION" = x; then
22470               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22471 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22472               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22473 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22474               BOOT_JDK_FOUND=no
22475             else
22476               # We're done! :-)
22477               BOOT_JDK_FOUND=yes
22478 
22479   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22480 
22481   # Input might be given as Windows format, start by converting to
22482   # unix format.
22483   path="$BOOT_JDK"
22484   new_path=`$CYGPATH -u "$path"`
22485 
22486   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22487   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22488   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22489   # "foo.exe" is OK but "foo" is an error.
22490   #
22491   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22492   # It is also a way to make sure we got the proper file name for the real test later on.
22493   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22494   if test "x$test_shortpath" = x; then
22495     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22496 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22497     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22498   fi
22499 
22500   # Call helper function which possibly converts this using DOS-style short mode.
22501   # If so, the updated path is stored in $new_path.
22502 
22503   input_path="$new_path"
22504   # Check if we need to convert this using DOS-style short mode. If the path
22505   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22506   # take no chances and rewrite it.
22507   # Note: m4 eats our [], so we need to use [ and ] instead.
22508   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22509   if test "x$has_forbidden_chars" != x; then
22510     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22511     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22512     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22513     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22514       # Going to short mode and back again did indeed matter. Since short mode is
22515       # case insensitive, let's make it lowercase to improve readability.
22516       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22517       # Now convert it back to Unix-stile (cygpath)
22518       input_path=`$CYGPATH -u "$shortmode_path"`
22519       new_path="$input_path"
22520     fi
22521   fi
22522 
22523   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22524   if test "x$test_cygdrive_prefix" = x; then
22525     # As a simple fix, exclude /usr/bin since it's not a real path.
22526     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22527       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22528       # a path prefixed by /cygdrive for fixpath to work.
22529       new_path="$CYGWIN_ROOT_PATH$input_path"
22530     fi
22531   fi
22532 
22533 
22534   if test "x$path" != "x$new_path"; then
22535     BOOT_JDK="$new_path"
22536     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22537 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22538   fi
22539 
22540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22541 
22542   path="$BOOT_JDK"
22543   has_colon=`$ECHO $path | $GREP ^.:`
22544   new_path="$path"
22545   if test "x$has_colon" = x; then
22546     # Not in mixed or Windows style, start by that.
22547     new_path=`cmd //c echo $path`
22548   fi
22549 
22550 
22551   input_path="$new_path"
22552   # Check if we need to convert this using DOS-style short mode. If the path
22553   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22554   # take no chances and rewrite it.
22555   # Note: m4 eats our [], so we need to use [ and ] instead.
22556   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22557   if test "x$has_forbidden_chars" != x; then
22558     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22559     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22560   fi
22561 
22562 
22563   windows_path="$new_path"
22564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22565     unix_path=`$CYGPATH -u "$windows_path"`
22566     new_path="$unix_path"
22567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22568     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22569     new_path="$unix_path"
22570   fi
22571 
22572   if test "x$path" != "x$new_path"; then
22573     BOOT_JDK="$new_path"
22574     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22575 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22576   fi
22577 
22578   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22579   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22580 
22581   else
22582     # We're on a posix platform. Hooray! :)
22583     path="$BOOT_JDK"
22584     has_space=`$ECHO "$path" | $GREP " "`
22585     if test "x$has_space" != x; then
22586       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22587 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22588       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22589     fi
22590 
22591     # Use eval to expand a potential ~
22592     eval path="$path"
22593     if test ! -f "$path" && test ! -d "$path"; then
22594       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22595     fi
22596 
22597     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22598   fi
22599 
22600               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22601 $as_echo_n "checking for Boot JDK... " >&6; }
22602               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22603 $as_echo "$BOOT_JDK" >&6; }
22604               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22605 $as_echo_n "checking Boot JDK version... " >&6; }
22606               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22607               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22608 $as_echo "$BOOT_JDK_VERSION" >&6; }
22609             fi # end check jdk version
22610           fi # end check rt.jar
22611         fi # end check javac
22612       fi # end check java
22613     fi # end check boot jdk found
22614   fi
22615 
22616 
22617   if test "x$BOOT_JDK_FOUND" = xno; then
22618     # Now execute the test
22619 
22620   if test "x$PROGRAMW6432" != x; then
22621     VIRTUAL_DIR="$PROGRAMW6432/Java"
22622 
22623   windows_path="$VIRTUAL_DIR"
22624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22625     unix_path=`$CYGPATH -u "$windows_path"`
22626     VIRTUAL_DIR="$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     VIRTUAL_DIR="$unix_path"
22630   fi
22631 
22632 
22633   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22634   BOOT_JDK_SUFFIX=""
22635   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22636   if test "x$ALL_JDKS_FOUND" != x; then
22637     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22638 
22639   if test "x$BOOT_JDK_FOUND" = xno; then
22640     # Now execute the test
22641 
22642         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22643         if test -d "$BOOT_JDK"; then
22644           BOOT_JDK_FOUND=maybe
22645           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22646 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22647         fi
22648 
22649 
22650     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22651     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22652       # Do we have a bin/java?
22653       if test ! -x "$BOOT_JDK/bin/java"; then
22654         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22655 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22656         BOOT_JDK_FOUND=no
22657       else
22658         # Do we have a bin/javac?
22659         if test ! -x "$BOOT_JDK/bin/javac"; then
22660           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22661 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22662           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22663 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22664           BOOT_JDK_FOUND=no
22665         else
22666           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22667           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22668             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22669 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22670             BOOT_JDK_FOUND=no
22671           else
22672             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22673             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22674 
22675             # Extra M4 quote needed to protect [] in grep expression.
22676             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22677             if test "x$FOUND_CORRECT_VERSION" = x; then
22678               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22679 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22680               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22681 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22682               BOOT_JDK_FOUND=no
22683             else
22684               # We're done! :-)
22685               BOOT_JDK_FOUND=yes
22686 
22687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22688 
22689   # Input might be given as Windows format, start by converting to
22690   # unix format.
22691   path="$BOOT_JDK"
22692   new_path=`$CYGPATH -u "$path"`
22693 
22694   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22695   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22696   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22697   # "foo.exe" is OK but "foo" is an error.
22698   #
22699   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22700   # It is also a way to make sure we got the proper file name for the real test later on.
22701   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22702   if test "x$test_shortpath" = x; then
22703     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22704 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22705     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22706   fi
22707 
22708   # Call helper function which possibly converts this using DOS-style short mode.
22709   # If so, the updated path is stored in $new_path.
22710 
22711   input_path="$new_path"
22712   # Check if we need to convert this using DOS-style short mode. If the path
22713   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22714   # take no chances and rewrite it.
22715   # Note: m4 eats our [], so we need to use [ and ] instead.
22716   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22717   if test "x$has_forbidden_chars" != x; then
22718     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22719     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22720     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22721     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22722       # Going to short mode and back again did indeed matter. Since short mode is
22723       # case insensitive, let's make it lowercase to improve readability.
22724       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22725       # Now convert it back to Unix-stile (cygpath)
22726       input_path=`$CYGPATH -u "$shortmode_path"`
22727       new_path="$input_path"
22728     fi
22729   fi
22730 
22731   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22732   if test "x$test_cygdrive_prefix" = x; then
22733     # As a simple fix, exclude /usr/bin since it's not a real path.
22734     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22735       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22736       # a path prefixed by /cygdrive for fixpath to work.
22737       new_path="$CYGWIN_ROOT_PATH$input_path"
22738     fi
22739   fi
22740 
22741 
22742   if test "x$path" != "x$new_path"; then
22743     BOOT_JDK="$new_path"
22744     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22745 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22746   fi
22747 
22748   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22749 
22750   path="$BOOT_JDK"
22751   has_colon=`$ECHO $path | $GREP ^.:`
22752   new_path="$path"
22753   if test "x$has_colon" = x; then
22754     # Not in mixed or Windows style, start by that.
22755     new_path=`cmd //c echo $path`
22756   fi
22757 
22758 
22759   input_path="$new_path"
22760   # Check if we need to convert this using DOS-style short mode. If the path
22761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22762   # take no chances and rewrite it.
22763   # Note: m4 eats our [], so we need to use [ and ] instead.
22764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22765   if test "x$has_forbidden_chars" != x; then
22766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22767     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22768   fi
22769 
22770 
22771   windows_path="$new_path"
22772   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22773     unix_path=`$CYGPATH -u "$windows_path"`
22774     new_path="$unix_path"
22775   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22776     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22777     new_path="$unix_path"
22778   fi
22779 
22780   if test "x$path" != "x$new_path"; then
22781     BOOT_JDK="$new_path"
22782     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22783 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22784   fi
22785 
22786   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22787   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22788 
22789   else
22790     # We're on a posix platform. Hooray! :)
22791     path="$BOOT_JDK"
22792     has_space=`$ECHO "$path" | $GREP " "`
22793     if test "x$has_space" != x; then
22794       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22795 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22796       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22797     fi
22798 
22799     # Use eval to expand a potential ~
22800     eval path="$path"
22801     if test ! -f "$path" && test ! -d "$path"; then
22802       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22803     fi
22804 
22805     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22806   fi
22807 
22808               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22809 $as_echo_n "checking for Boot JDK... " >&6; }
22810               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22811 $as_echo "$BOOT_JDK" >&6; }
22812               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22813 $as_echo_n "checking Boot JDK version... " >&6; }
22814               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22815               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22816 $as_echo "$BOOT_JDK_VERSION" >&6; }
22817             fi # end check jdk version
22818           fi # end check rt.jar
22819         fi # end check javac
22820       fi # end check java
22821     fi # end check boot jdk found
22822   fi
22823 
22824     done
22825   fi
22826 
22827   fi
22828 
22829 
22830     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22831     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22832       # Do we have a bin/java?
22833       if test ! -x "$BOOT_JDK/bin/java"; then
22834         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22835 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22836         BOOT_JDK_FOUND=no
22837       else
22838         # Do we have a bin/javac?
22839         if test ! -x "$BOOT_JDK/bin/javac"; then
22840           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22841 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22842           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22843 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22844           BOOT_JDK_FOUND=no
22845         else
22846           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22847           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22848             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22849 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22850             BOOT_JDK_FOUND=no
22851           else
22852             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22853             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22854 
22855             # Extra M4 quote needed to protect [] in grep expression.
22856             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22857             if test "x$FOUND_CORRECT_VERSION" = x; then
22858               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22859 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22860               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22861 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22862               BOOT_JDK_FOUND=no
22863             else
22864               # We're done! :-)
22865               BOOT_JDK_FOUND=yes
22866 
22867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22868 
22869   # Input might be given as Windows format, start by converting to
22870   # unix format.
22871   path="$BOOT_JDK"
22872   new_path=`$CYGPATH -u "$path"`
22873 
22874   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22875   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22876   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22877   # "foo.exe" is OK but "foo" is an error.
22878   #
22879   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22880   # It is also a way to make sure we got the proper file name for the real test later on.
22881   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22882   if test "x$test_shortpath" = x; then
22883     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22884 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22885     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22886   fi
22887 
22888   # Call helper function which possibly converts this using DOS-style short mode.
22889   # If so, the updated path is stored in $new_path.
22890 
22891   input_path="$new_path"
22892   # Check if we need to convert this using DOS-style short mode. If the path
22893   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22894   # take no chances and rewrite it.
22895   # Note: m4 eats our [], so we need to use [ and ] instead.
22896   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22897   if test "x$has_forbidden_chars" != x; then
22898     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22899     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22900     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22901     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22902       # Going to short mode and back again did indeed matter. Since short mode is
22903       # case insensitive, let's make it lowercase to improve readability.
22904       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22905       # Now convert it back to Unix-stile (cygpath)
22906       input_path=`$CYGPATH -u "$shortmode_path"`
22907       new_path="$input_path"
22908     fi
22909   fi
22910 
22911   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22912   if test "x$test_cygdrive_prefix" = x; then
22913     # As a simple fix, exclude /usr/bin since it's not a real path.
22914     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22915       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22916       # a path prefixed by /cygdrive for fixpath to work.
22917       new_path="$CYGWIN_ROOT_PATH$input_path"
22918     fi
22919   fi
22920 
22921 
22922   if test "x$path" != "x$new_path"; then
22923     BOOT_JDK="$new_path"
22924     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22925 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22926   fi
22927 
22928   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22929 
22930   path="$BOOT_JDK"
22931   has_colon=`$ECHO $path | $GREP ^.:`
22932   new_path="$path"
22933   if test "x$has_colon" = x; then
22934     # Not in mixed or Windows style, start by that.
22935     new_path=`cmd //c echo $path`
22936   fi
22937 
22938 
22939   input_path="$new_path"
22940   # Check if we need to convert this using DOS-style short mode. If the path
22941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22942   # take no chances and rewrite it.
22943   # Note: m4 eats our [], so we need to use [ and ] instead.
22944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22945   if test "x$has_forbidden_chars" != x; then
22946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22947     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22948   fi
22949 
22950 
22951   windows_path="$new_path"
22952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22953     unix_path=`$CYGPATH -u "$windows_path"`
22954     new_path="$unix_path"
22955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22956     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22957     new_path="$unix_path"
22958   fi
22959 
22960   if test "x$path" != "x$new_path"; then
22961     BOOT_JDK="$new_path"
22962     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22963 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22964   fi
22965 
22966   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22967   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22968 
22969   else
22970     # We're on a posix platform. Hooray! :)
22971     path="$BOOT_JDK"
22972     has_space=`$ECHO "$path" | $GREP " "`
22973     if test "x$has_space" != x; then
22974       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22975 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22976       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22977     fi
22978 
22979     # Use eval to expand a potential ~
22980     eval path="$path"
22981     if test ! -f "$path" && test ! -d "$path"; then
22982       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22983     fi
22984 
22985     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22986   fi
22987 
22988               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22989 $as_echo_n "checking for Boot JDK... " >&6; }
22990               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22991 $as_echo "$BOOT_JDK" >&6; }
22992               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22993 $as_echo_n "checking Boot JDK version... " >&6; }
22994               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22995               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22996 $as_echo "$BOOT_JDK_VERSION" >&6; }
22997             fi # end check jdk version
22998           fi # end check rt.jar
22999         fi # end check javac
23000       fi # end check java
23001     fi # end check boot jdk found
23002   fi
23003 
23004 
23005   if test "x$BOOT_JDK_FOUND" = xno; then
23006     # Now execute the test
23007 
23008   if test "x$PROGRAMFILES" != x; then
23009     VIRTUAL_DIR="$PROGRAMFILES/Java"
23010 
23011   windows_path="$VIRTUAL_DIR"
23012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23013     unix_path=`$CYGPATH -u "$windows_path"`
23014     VIRTUAL_DIR="$unix_path"
23015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23016     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23017     VIRTUAL_DIR="$unix_path"
23018   fi
23019 
23020 
23021   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23022   BOOT_JDK_SUFFIX=""
23023   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23024   if test "x$ALL_JDKS_FOUND" != x; then
23025     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23026 
23027   if test "x$BOOT_JDK_FOUND" = xno; then
23028     # Now execute the test
23029 
23030         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23031         if test -d "$BOOT_JDK"; then
23032           BOOT_JDK_FOUND=maybe
23033           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23034 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23035         fi
23036 
23037 
23038     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23039     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23040       # Do we have a bin/java?
23041       if test ! -x "$BOOT_JDK/bin/java"; then
23042         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23043 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23044         BOOT_JDK_FOUND=no
23045       else
23046         # Do we have a bin/javac?
23047         if test ! -x "$BOOT_JDK/bin/javac"; then
23048           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23049 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23050           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23051 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23052           BOOT_JDK_FOUND=no
23053         else
23054           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23055           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23056             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23057 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23058             BOOT_JDK_FOUND=no
23059           else
23060             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23061             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23062 
23063             # Extra M4 quote needed to protect [] in grep expression.
23064             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23065             if test "x$FOUND_CORRECT_VERSION" = x; then
23066               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23067 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23068               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23069 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23070               BOOT_JDK_FOUND=no
23071             else
23072               # We're done! :-)
23073               BOOT_JDK_FOUND=yes
23074 
23075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23076 
23077   # Input might be given as Windows format, start by converting to
23078   # unix format.
23079   path="$BOOT_JDK"
23080   new_path=`$CYGPATH -u "$path"`
23081 
23082   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23083   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23084   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23085   # "foo.exe" is OK but "foo" is an error.
23086   #
23087   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23088   # It is also a way to make sure we got the proper file name for the real test later on.
23089   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23090   if test "x$test_shortpath" = x; then
23091     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23092 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23093     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23094   fi
23095 
23096   # Call helper function which possibly converts this using DOS-style short mode.
23097   # If so, the updated path is stored in $new_path.
23098 
23099   input_path="$new_path"
23100   # Check if we need to convert this using DOS-style short mode. If the path
23101   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23102   # take no chances and rewrite it.
23103   # Note: m4 eats our [], so we need to use [ and ] instead.
23104   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23105   if test "x$has_forbidden_chars" != x; then
23106     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23107     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23108     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23109     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23110       # Going to short mode and back again did indeed matter. Since short mode is
23111       # case insensitive, let's make it lowercase to improve readability.
23112       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23113       # Now convert it back to Unix-stile (cygpath)
23114       input_path=`$CYGPATH -u "$shortmode_path"`
23115       new_path="$input_path"
23116     fi
23117   fi
23118 
23119   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23120   if test "x$test_cygdrive_prefix" = x; then
23121     # As a simple fix, exclude /usr/bin since it's not a real path.
23122     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23123       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23124       # a path prefixed by /cygdrive for fixpath to work.
23125       new_path="$CYGWIN_ROOT_PATH$input_path"
23126     fi
23127   fi
23128 
23129 
23130   if test "x$path" != "x$new_path"; then
23131     BOOT_JDK="$new_path"
23132     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23133 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23134   fi
23135 
23136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23137 
23138   path="$BOOT_JDK"
23139   has_colon=`$ECHO $path | $GREP ^.:`
23140   new_path="$path"
23141   if test "x$has_colon" = x; then
23142     # Not in mixed or Windows style, start by that.
23143     new_path=`cmd //c echo $path`
23144   fi
23145 
23146 
23147   input_path="$new_path"
23148   # Check if we need to convert this using DOS-style short mode. If the path
23149   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23150   # take no chances and rewrite it.
23151   # Note: m4 eats our [], so we need to use [ and ] instead.
23152   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23153   if test "x$has_forbidden_chars" != x; then
23154     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23155     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23156   fi
23157 
23158 
23159   windows_path="$new_path"
23160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23161     unix_path=`$CYGPATH -u "$windows_path"`
23162     new_path="$unix_path"
23163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23164     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23165     new_path="$unix_path"
23166   fi
23167 
23168   if test "x$path" != "x$new_path"; then
23169     BOOT_JDK="$new_path"
23170     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23171 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23172   fi
23173 
23174   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23175   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23176 
23177   else
23178     # We're on a posix platform. Hooray! :)
23179     path="$BOOT_JDK"
23180     has_space=`$ECHO "$path" | $GREP " "`
23181     if test "x$has_space" != x; then
23182       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23183 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23184       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23185     fi
23186 
23187     # Use eval to expand a potential ~
23188     eval path="$path"
23189     if test ! -f "$path" && test ! -d "$path"; then
23190       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23191     fi
23192 
23193     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23194   fi
23195 
23196               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23197 $as_echo_n "checking for Boot JDK... " >&6; }
23198               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23199 $as_echo "$BOOT_JDK" >&6; }
23200               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23201 $as_echo_n "checking Boot JDK version... " >&6; }
23202               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23203               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23204 $as_echo "$BOOT_JDK_VERSION" >&6; }
23205             fi # end check jdk version
23206           fi # end check rt.jar
23207         fi # end check javac
23208       fi # end check java
23209     fi # end check boot jdk found
23210   fi
23211 
23212     done
23213   fi
23214 
23215   fi
23216 
23217 
23218     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23219     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23220       # Do we have a bin/java?
23221       if test ! -x "$BOOT_JDK/bin/java"; then
23222         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23223 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23224         BOOT_JDK_FOUND=no
23225       else
23226         # Do we have a bin/javac?
23227         if test ! -x "$BOOT_JDK/bin/javac"; then
23228           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23229 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23230           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23231 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23232           BOOT_JDK_FOUND=no
23233         else
23234           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23235           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23236             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23237 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23238             BOOT_JDK_FOUND=no
23239           else
23240             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23241             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23242 
23243             # Extra M4 quote needed to protect [] in grep expression.
23244             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23245             if test "x$FOUND_CORRECT_VERSION" = x; then
23246               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23247 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23248               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23249 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23250               BOOT_JDK_FOUND=no
23251             else
23252               # We're done! :-)
23253               BOOT_JDK_FOUND=yes
23254 
23255   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23256 
23257   # Input might be given as Windows format, start by converting to
23258   # unix format.
23259   path="$BOOT_JDK"
23260   new_path=`$CYGPATH -u "$path"`
23261 
23262   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23263   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23264   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23265   # "foo.exe" is OK but "foo" is an error.
23266   #
23267   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23268   # It is also a way to make sure we got the proper file name for the real test later on.
23269   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23270   if test "x$test_shortpath" = x; then
23271     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23272 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23273     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23274   fi
23275 
23276   # Call helper function which possibly converts this using DOS-style short mode.
23277   # If so, the updated path is stored in $new_path.
23278 
23279   input_path="$new_path"
23280   # Check if we need to convert this using DOS-style short mode. If the path
23281   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23282   # take no chances and rewrite it.
23283   # Note: m4 eats our [], so we need to use [ and ] instead.
23284   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23285   if test "x$has_forbidden_chars" != x; then
23286     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23287     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23288     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23289     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23290       # Going to short mode and back again did indeed matter. Since short mode is
23291       # case insensitive, let's make it lowercase to improve readability.
23292       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23293       # Now convert it back to Unix-stile (cygpath)
23294       input_path=`$CYGPATH -u "$shortmode_path"`
23295       new_path="$input_path"
23296     fi
23297   fi
23298 
23299   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23300   if test "x$test_cygdrive_prefix" = x; then
23301     # As a simple fix, exclude /usr/bin since it's not a real path.
23302     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23303       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23304       # a path prefixed by /cygdrive for fixpath to work.
23305       new_path="$CYGWIN_ROOT_PATH$input_path"
23306     fi
23307   fi
23308 
23309 
23310   if test "x$path" != "x$new_path"; then
23311     BOOT_JDK="$new_path"
23312     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23313 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23314   fi
23315 
23316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23317 
23318   path="$BOOT_JDK"
23319   has_colon=`$ECHO $path | $GREP ^.:`
23320   new_path="$path"
23321   if test "x$has_colon" = x; then
23322     # Not in mixed or Windows style, start by that.
23323     new_path=`cmd //c echo $path`
23324   fi
23325 
23326 
23327   input_path="$new_path"
23328   # Check if we need to convert this using DOS-style short mode. If the path
23329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23330   # take no chances and rewrite it.
23331   # Note: m4 eats our [], so we need to use [ and ] instead.
23332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23333   if test "x$has_forbidden_chars" != x; then
23334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23335     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23336   fi
23337 
23338 
23339   windows_path="$new_path"
23340   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23341     unix_path=`$CYGPATH -u "$windows_path"`
23342     new_path="$unix_path"
23343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23344     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23345     new_path="$unix_path"
23346   fi
23347 
23348   if test "x$path" != "x$new_path"; then
23349     BOOT_JDK="$new_path"
23350     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23351 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23352   fi
23353 
23354   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23355   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23356 
23357   else
23358     # We're on a posix platform. Hooray! :)
23359     path="$BOOT_JDK"
23360     has_space=`$ECHO "$path" | $GREP " "`
23361     if test "x$has_space" != x; then
23362       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23363 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23364       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23365     fi
23366 
23367     # Use eval to expand a potential ~
23368     eval path="$path"
23369     if test ! -f "$path" && test ! -d "$path"; then
23370       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23371     fi
23372 
23373     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23374   fi
23375 
23376               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23377 $as_echo_n "checking for Boot JDK... " >&6; }
23378               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23379 $as_echo "$BOOT_JDK" >&6; }
23380               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23381 $as_echo_n "checking Boot JDK version... " >&6; }
23382               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23383               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23384 $as_echo "$BOOT_JDK_VERSION" >&6; }
23385             fi # end check jdk version
23386           fi # end check rt.jar
23387         fi # end check javac
23388       fi # end check java
23389     fi # end check boot jdk found
23390   fi
23391 
23392 
23393   if test "x$BOOT_JDK_FOUND" = xno; then
23394     # Now execute the test
23395 
23396   if test "x$ProgramFiles" != x; then
23397     VIRTUAL_DIR="$ProgramFiles/Java"
23398 
23399   windows_path="$VIRTUAL_DIR"
23400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23401     unix_path=`$CYGPATH -u "$windows_path"`
23402     VIRTUAL_DIR="$unix_path"
23403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23405     VIRTUAL_DIR="$unix_path"
23406   fi
23407 
23408 
23409   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23410   BOOT_JDK_SUFFIX=""
23411   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23412   if test "x$ALL_JDKS_FOUND" != x; then
23413     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23414 
23415   if test "x$BOOT_JDK_FOUND" = xno; then
23416     # Now execute the test
23417 
23418         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23419         if test -d "$BOOT_JDK"; then
23420           BOOT_JDK_FOUND=maybe
23421           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23422 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23423         fi
23424 
23425 
23426     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23427     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23428       # Do we have a bin/java?
23429       if test ! -x "$BOOT_JDK/bin/java"; then
23430         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23431 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23432         BOOT_JDK_FOUND=no
23433       else
23434         # Do we have a bin/javac?
23435         if test ! -x "$BOOT_JDK/bin/javac"; then
23436           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23437 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23438           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23439 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23440           BOOT_JDK_FOUND=no
23441         else
23442           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23443           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23444             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23445 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23446             BOOT_JDK_FOUND=no
23447           else
23448             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23449             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23450 
23451             # Extra M4 quote needed to protect [] in grep expression.
23452             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23453             if test "x$FOUND_CORRECT_VERSION" = x; then
23454               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23455 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23456               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23457 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23458               BOOT_JDK_FOUND=no
23459             else
23460               # We're done! :-)
23461               BOOT_JDK_FOUND=yes
23462 
23463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23464 
23465   # Input might be given as Windows format, start by converting to
23466   # unix format.
23467   path="$BOOT_JDK"
23468   new_path=`$CYGPATH -u "$path"`
23469 
23470   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23471   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23472   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23473   # "foo.exe" is OK but "foo" is an error.
23474   #
23475   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23476   # It is also a way to make sure we got the proper file name for the real test later on.
23477   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23478   if test "x$test_shortpath" = x; then
23479     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23480 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23481     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23482   fi
23483 
23484   # Call helper function which possibly converts this using DOS-style short mode.
23485   # If so, the updated path is stored in $new_path.
23486 
23487   input_path="$new_path"
23488   # Check if we need to convert this using DOS-style short mode. If the path
23489   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23490   # take no chances and rewrite it.
23491   # Note: m4 eats our [], so we need to use [ and ] instead.
23492   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23493   if test "x$has_forbidden_chars" != x; then
23494     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23495     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23496     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23497     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23498       # Going to short mode and back again did indeed matter. Since short mode is
23499       # case insensitive, let's make it lowercase to improve readability.
23500       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23501       # Now convert it back to Unix-stile (cygpath)
23502       input_path=`$CYGPATH -u "$shortmode_path"`
23503       new_path="$input_path"
23504     fi
23505   fi
23506 
23507   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23508   if test "x$test_cygdrive_prefix" = x; then
23509     # As a simple fix, exclude /usr/bin since it's not a real path.
23510     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23511       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23512       # a path prefixed by /cygdrive for fixpath to work.
23513       new_path="$CYGWIN_ROOT_PATH$input_path"
23514     fi
23515   fi
23516 
23517 
23518   if test "x$path" != "x$new_path"; then
23519     BOOT_JDK="$new_path"
23520     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23521 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23522   fi
23523 
23524   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23525 
23526   path="$BOOT_JDK"
23527   has_colon=`$ECHO $path | $GREP ^.:`
23528   new_path="$path"
23529   if test "x$has_colon" = x; then
23530     # Not in mixed or Windows style, start by that.
23531     new_path=`cmd //c echo $path`
23532   fi
23533 
23534 
23535   input_path="$new_path"
23536   # Check if we need to convert this using DOS-style short mode. If the path
23537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23538   # take no chances and rewrite it.
23539   # Note: m4 eats our [], so we need to use [ and ] instead.
23540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23541   if test "x$has_forbidden_chars" != x; then
23542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23543     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23544   fi
23545 
23546 
23547   windows_path="$new_path"
23548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23549     unix_path=`$CYGPATH -u "$windows_path"`
23550     new_path="$unix_path"
23551   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23552     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23553     new_path="$unix_path"
23554   fi
23555 
23556   if test "x$path" != "x$new_path"; then
23557     BOOT_JDK="$new_path"
23558     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23559 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23560   fi
23561 
23562   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23563   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23564 
23565   else
23566     # We're on a posix platform. Hooray! :)
23567     path="$BOOT_JDK"
23568     has_space=`$ECHO "$path" | $GREP " "`
23569     if test "x$has_space" != x; then
23570       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23571 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23572       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23573     fi
23574 
23575     # Use eval to expand a potential ~
23576     eval path="$path"
23577     if test ! -f "$path" && test ! -d "$path"; then
23578       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23579     fi
23580 
23581     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23582   fi
23583 
23584               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23585 $as_echo_n "checking for Boot JDK... " >&6; }
23586               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23587 $as_echo "$BOOT_JDK" >&6; }
23588               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23589 $as_echo_n "checking Boot JDK version... " >&6; }
23590               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23591               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23592 $as_echo "$BOOT_JDK_VERSION" >&6; }
23593             fi # end check jdk version
23594           fi # end check rt.jar
23595         fi # end check javac
23596       fi # end check java
23597     fi # end check boot jdk found
23598   fi
23599 
23600     done
23601   fi
23602 
23603   fi
23604 
23605 
23606     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23607     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23608       # Do we have a bin/java?
23609       if test ! -x "$BOOT_JDK/bin/java"; then
23610         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23611 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23612         BOOT_JDK_FOUND=no
23613       else
23614         # Do we have a bin/javac?
23615         if test ! -x "$BOOT_JDK/bin/javac"; then
23616           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23617 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23618           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23619 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23620           BOOT_JDK_FOUND=no
23621         else
23622           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23623           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23624             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23625 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23626             BOOT_JDK_FOUND=no
23627           else
23628             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23629             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23630 
23631             # Extra M4 quote needed to protect [] in grep expression.
23632             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23633             if test "x$FOUND_CORRECT_VERSION" = x; then
23634               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23635 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23636               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23637 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23638               BOOT_JDK_FOUND=no
23639             else
23640               # We're done! :-)
23641               BOOT_JDK_FOUND=yes
23642 
23643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23644 
23645   # Input might be given as Windows format, start by converting to
23646   # unix format.
23647   path="$BOOT_JDK"
23648   new_path=`$CYGPATH -u "$path"`
23649 
23650   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23651   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23652   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23653   # "foo.exe" is OK but "foo" is an error.
23654   #
23655   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23656   # It is also a way to make sure we got the proper file name for the real test later on.
23657   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23658   if test "x$test_shortpath" = x; then
23659     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23660 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23661     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23662   fi
23663 
23664   # Call helper function which possibly converts this using DOS-style short mode.
23665   # If so, the updated path is stored in $new_path.
23666 
23667   input_path="$new_path"
23668   # Check if we need to convert this using DOS-style short mode. If the path
23669   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23670   # take no chances and rewrite it.
23671   # Note: m4 eats our [], so we need to use [ and ] instead.
23672   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23673   if test "x$has_forbidden_chars" != x; then
23674     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23675     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23676     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23677     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23678       # Going to short mode and back again did indeed matter. Since short mode is
23679       # case insensitive, let's make it lowercase to improve readability.
23680       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23681       # Now convert it back to Unix-stile (cygpath)
23682       input_path=`$CYGPATH -u "$shortmode_path"`
23683       new_path="$input_path"
23684     fi
23685   fi
23686 
23687   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23688   if test "x$test_cygdrive_prefix" = x; then
23689     # As a simple fix, exclude /usr/bin since it's not a real path.
23690     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23691       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23692       # a path prefixed by /cygdrive for fixpath to work.
23693       new_path="$CYGWIN_ROOT_PATH$input_path"
23694     fi
23695   fi
23696 
23697 
23698   if test "x$path" != "x$new_path"; then
23699     BOOT_JDK="$new_path"
23700     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23701 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23702   fi
23703 
23704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23705 
23706   path="$BOOT_JDK"
23707   has_colon=`$ECHO $path | $GREP ^.:`
23708   new_path="$path"
23709   if test "x$has_colon" = x; then
23710     # Not in mixed or Windows style, start by that.
23711     new_path=`cmd //c echo $path`
23712   fi
23713 
23714 
23715   input_path="$new_path"
23716   # Check if we need to convert this using DOS-style short mode. If the path
23717   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23718   # take no chances and rewrite it.
23719   # Note: m4 eats our [], so we need to use [ and ] instead.
23720   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23721   if test "x$has_forbidden_chars" != x; then
23722     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23723     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23724   fi
23725 
23726 
23727   windows_path="$new_path"
23728   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23729     unix_path=`$CYGPATH -u "$windows_path"`
23730     new_path="$unix_path"
23731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23732     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23733     new_path="$unix_path"
23734   fi
23735 
23736   if test "x$path" != "x$new_path"; then
23737     BOOT_JDK="$new_path"
23738     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23739 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23740   fi
23741 
23742   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23743   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23744 
23745   else
23746     # We're on a posix platform. Hooray! :)
23747     path="$BOOT_JDK"
23748     has_space=`$ECHO "$path" | $GREP " "`
23749     if test "x$has_space" != x; then
23750       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23751 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23752       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23753     fi
23754 
23755     # Use eval to expand a potential ~
23756     eval path="$path"
23757     if test ! -f "$path" && test ! -d "$path"; then
23758       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23759     fi
23760 
23761     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23762   fi
23763 
23764               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23765 $as_echo_n "checking for Boot JDK... " >&6; }
23766               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23767 $as_echo "$BOOT_JDK" >&6; }
23768               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23769 $as_echo_n "checking Boot JDK version... " >&6; }
23770               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23771               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23772 $as_echo "$BOOT_JDK_VERSION" >&6; }
23773             fi # end check jdk version
23774           fi # end check rt.jar
23775         fi # end check javac
23776       fi # end check java
23777     fi # end check boot jdk found
23778   fi
23779 
23780 
23781   if test "x$BOOT_JDK_FOUND" = xno; then
23782     # Now execute the test
23783 
23784   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23785   BOOT_JDK_SUFFIX=""
23786   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23787   if test "x$ALL_JDKS_FOUND" != x; then
23788     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23789 
23790   if test "x$BOOT_JDK_FOUND" = xno; then
23791     # Now execute the test
23792 
23793         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23794         if test -d "$BOOT_JDK"; then
23795           BOOT_JDK_FOUND=maybe
23796           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23797 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23798         fi
23799 
23800 
23801     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23802     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23803       # Do we have a bin/java?
23804       if test ! -x "$BOOT_JDK/bin/java"; then
23805         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23806 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23807         BOOT_JDK_FOUND=no
23808       else
23809         # Do we have a bin/javac?
23810         if test ! -x "$BOOT_JDK/bin/javac"; then
23811           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23812 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23813           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23814 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23815           BOOT_JDK_FOUND=no
23816         else
23817           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23818           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23819             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23820 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23821             BOOT_JDK_FOUND=no
23822           else
23823             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23824             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23825 
23826             # Extra M4 quote needed to protect [] in grep expression.
23827             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23828             if test "x$FOUND_CORRECT_VERSION" = x; then
23829               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23830 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23831               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23832 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23833               BOOT_JDK_FOUND=no
23834             else
23835               # We're done! :-)
23836               BOOT_JDK_FOUND=yes
23837 
23838   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23839 
23840   # Input might be given as Windows format, start by converting to
23841   # unix format.
23842   path="$BOOT_JDK"
23843   new_path=`$CYGPATH -u "$path"`
23844 
23845   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23846   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23847   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23848   # "foo.exe" is OK but "foo" is an error.
23849   #
23850   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23851   # It is also a way to make sure we got the proper file name for the real test later on.
23852   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23853   if test "x$test_shortpath" = x; then
23854     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23855 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23856     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23857   fi
23858 
23859   # Call helper function which possibly converts this using DOS-style short mode.
23860   # If so, the updated path is stored in $new_path.
23861 
23862   input_path="$new_path"
23863   # Check if we need to convert this using DOS-style short mode. If the path
23864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23865   # take no chances and rewrite it.
23866   # Note: m4 eats our [], so we need to use [ and ] instead.
23867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23868   if test "x$has_forbidden_chars" != x; then
23869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23870     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23871     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23872     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23873       # Going to short mode and back again did indeed matter. Since short mode is
23874       # case insensitive, let's make it lowercase to improve readability.
23875       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23876       # Now convert it back to Unix-stile (cygpath)
23877       input_path=`$CYGPATH -u "$shortmode_path"`
23878       new_path="$input_path"
23879     fi
23880   fi
23881 
23882   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23883   if test "x$test_cygdrive_prefix" = x; then
23884     # As a simple fix, exclude /usr/bin since it's not a real path.
23885     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23886       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23887       # a path prefixed by /cygdrive for fixpath to work.
23888       new_path="$CYGWIN_ROOT_PATH$input_path"
23889     fi
23890   fi
23891 
23892 
23893   if test "x$path" != "x$new_path"; then
23894     BOOT_JDK="$new_path"
23895     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23896 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23897   fi
23898 
23899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23900 
23901   path="$BOOT_JDK"
23902   has_colon=`$ECHO $path | $GREP ^.:`
23903   new_path="$path"
23904   if test "x$has_colon" = x; then
23905     # Not in mixed or Windows style, start by that.
23906     new_path=`cmd //c echo $path`
23907   fi
23908 
23909 
23910   input_path="$new_path"
23911   # Check if we need to convert this using DOS-style short mode. If the path
23912   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23913   # take no chances and rewrite it.
23914   # Note: m4 eats our [], so we need to use [ and ] instead.
23915   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23916   if test "x$has_forbidden_chars" != x; then
23917     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23918     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23919   fi
23920 
23921 
23922   windows_path="$new_path"
23923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23924     unix_path=`$CYGPATH -u "$windows_path"`
23925     new_path="$unix_path"
23926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23928     new_path="$unix_path"
23929   fi
23930 
23931   if test "x$path" != "x$new_path"; then
23932     BOOT_JDK="$new_path"
23933     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23934 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23935   fi
23936 
23937   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23938   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23939 
23940   else
23941     # We're on a posix platform. Hooray! :)
23942     path="$BOOT_JDK"
23943     has_space=`$ECHO "$path" | $GREP " "`
23944     if test "x$has_space" != x; then
23945       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23946 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23947       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23948     fi
23949 
23950     # Use eval to expand a potential ~
23951     eval path="$path"
23952     if test ! -f "$path" && test ! -d "$path"; then
23953       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23954     fi
23955 
23956     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23957   fi
23958 
23959               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23960 $as_echo_n "checking for Boot JDK... " >&6; }
23961               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23962 $as_echo "$BOOT_JDK" >&6; }
23963               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23964 $as_echo_n "checking Boot JDK version... " >&6; }
23965               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23966               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23967 $as_echo "$BOOT_JDK_VERSION" >&6; }
23968             fi # end check jdk version
23969           fi # end check rt.jar
23970         fi # end check javac
23971       fi # end check java
23972     fi # end check boot jdk found
23973   fi
23974 
23975     done
23976   fi
23977 
23978 
23979     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23980     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23981       # Do we have a bin/java?
23982       if test ! -x "$BOOT_JDK/bin/java"; then
23983         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23984 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23985         BOOT_JDK_FOUND=no
23986       else
23987         # Do we have a bin/javac?
23988         if test ! -x "$BOOT_JDK/bin/javac"; then
23989           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23990 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23991           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23992 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23993           BOOT_JDK_FOUND=no
23994         else
23995           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23996           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23997             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23998 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23999             BOOT_JDK_FOUND=no
24000           else
24001             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24002             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24003 
24004             # Extra M4 quote needed to protect [] in grep expression.
24005             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24006             if test "x$FOUND_CORRECT_VERSION" = x; then
24007               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24008 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24009               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24010 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24011               BOOT_JDK_FOUND=no
24012             else
24013               # We're done! :-)
24014               BOOT_JDK_FOUND=yes
24015 
24016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24017 
24018   # Input might be given as Windows format, start by converting to
24019   # unix format.
24020   path="$BOOT_JDK"
24021   new_path=`$CYGPATH -u "$path"`
24022 
24023   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24024   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24025   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24026   # "foo.exe" is OK but "foo" is an error.
24027   #
24028   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24029   # It is also a way to make sure we got the proper file name for the real test later on.
24030   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24031   if test "x$test_shortpath" = x; then
24032     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24033 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24034     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24035   fi
24036 
24037   # Call helper function which possibly converts this using DOS-style short mode.
24038   # If so, the updated path is stored in $new_path.
24039 
24040   input_path="$new_path"
24041   # Check if we need to convert this using DOS-style short mode. If the path
24042   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24043   # take no chances and rewrite it.
24044   # Note: m4 eats our [], so we need to use [ and ] instead.
24045   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24046   if test "x$has_forbidden_chars" != x; then
24047     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24048     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24049     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24050     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24051       # Going to short mode and back again did indeed matter. Since short mode is
24052       # case insensitive, let's make it lowercase to improve readability.
24053       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24054       # Now convert it back to Unix-stile (cygpath)
24055       input_path=`$CYGPATH -u "$shortmode_path"`
24056       new_path="$input_path"
24057     fi
24058   fi
24059 
24060   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24061   if test "x$test_cygdrive_prefix" = x; then
24062     # As a simple fix, exclude /usr/bin since it's not a real path.
24063     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24064       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24065       # a path prefixed by /cygdrive for fixpath to work.
24066       new_path="$CYGWIN_ROOT_PATH$input_path"
24067     fi
24068   fi
24069 
24070 
24071   if test "x$path" != "x$new_path"; then
24072     BOOT_JDK="$new_path"
24073     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24074 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24075   fi
24076 
24077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24078 
24079   path="$BOOT_JDK"
24080   has_colon=`$ECHO $path | $GREP ^.:`
24081   new_path="$path"
24082   if test "x$has_colon" = x; then
24083     # Not in mixed or Windows style, start by that.
24084     new_path=`cmd //c echo $path`
24085   fi
24086 
24087 
24088   input_path="$new_path"
24089   # Check if we need to convert this using DOS-style short mode. If the path
24090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24091   # take no chances and rewrite it.
24092   # Note: m4 eats our [], so we need to use [ and ] instead.
24093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24094   if test "x$has_forbidden_chars" != x; then
24095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24096     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24097   fi
24098 
24099 
24100   windows_path="$new_path"
24101   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24102     unix_path=`$CYGPATH -u "$windows_path"`
24103     new_path="$unix_path"
24104   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24105     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24106     new_path="$unix_path"
24107   fi
24108 
24109   if test "x$path" != "x$new_path"; then
24110     BOOT_JDK="$new_path"
24111     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24112 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24113   fi
24114 
24115   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24116   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24117 
24118   else
24119     # We're on a posix platform. Hooray! :)
24120     path="$BOOT_JDK"
24121     has_space=`$ECHO "$path" | $GREP " "`
24122     if test "x$has_space" != x; then
24123       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24124 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24125       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24126     fi
24127 
24128     # Use eval to expand a potential ~
24129     eval path="$path"
24130     if test ! -f "$path" && test ! -d "$path"; then
24131       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24132     fi
24133 
24134     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24135   fi
24136 
24137               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24138 $as_echo_n "checking for Boot JDK... " >&6; }
24139               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24140 $as_echo "$BOOT_JDK" >&6; }
24141               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24142 $as_echo_n "checking Boot JDK version... " >&6; }
24143               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24144               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24145 $as_echo "$BOOT_JDK_VERSION" >&6; }
24146             fi # end check jdk version
24147           fi # end check rt.jar
24148         fi # end check javac
24149       fi # end check java
24150     fi # end check boot jdk found
24151   fi
24152 
24153   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24154 
24155   if test "x$BOOT_JDK_FOUND" = xno; then
24156     # Now execute the test
24157 
24158   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24159   BOOT_JDK_SUFFIX="/Contents/Home"
24160   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24161   if test "x$ALL_JDKS_FOUND" != x; then
24162     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24163 
24164   if test "x$BOOT_JDK_FOUND" = xno; then
24165     # Now execute the test
24166 
24167         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24168         if test -d "$BOOT_JDK"; then
24169           BOOT_JDK_FOUND=maybe
24170           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24171 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24172         fi
24173 
24174 
24175     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24176     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24177       # Do we have a bin/java?
24178       if test ! -x "$BOOT_JDK/bin/java"; then
24179         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24180 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24181         BOOT_JDK_FOUND=no
24182       else
24183         # Do we have a bin/javac?
24184         if test ! -x "$BOOT_JDK/bin/javac"; then
24185           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24186 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24187           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24188 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24189           BOOT_JDK_FOUND=no
24190         else
24191           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24192           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24193             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24194 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24195             BOOT_JDK_FOUND=no
24196           else
24197             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24198             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24199 
24200             # Extra M4 quote needed to protect [] in grep expression.
24201             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24202             if test "x$FOUND_CORRECT_VERSION" = x; then
24203               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24204 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24205               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24206 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24207               BOOT_JDK_FOUND=no
24208             else
24209               # We're done! :-)
24210               BOOT_JDK_FOUND=yes
24211 
24212   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24213 
24214   # Input might be given as Windows format, start by converting to
24215   # unix format.
24216   path="$BOOT_JDK"
24217   new_path=`$CYGPATH -u "$path"`
24218 
24219   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24220   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24221   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24222   # "foo.exe" is OK but "foo" is an error.
24223   #
24224   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24225   # It is also a way to make sure we got the proper file name for the real test later on.
24226   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24227   if test "x$test_shortpath" = x; then
24228     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24229 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24230     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24231   fi
24232 
24233   # Call helper function which possibly converts this using DOS-style short mode.
24234   # If so, the updated path is stored in $new_path.
24235 
24236   input_path="$new_path"
24237   # Check if we need to convert this using DOS-style short mode. If the path
24238   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24239   # take no chances and rewrite it.
24240   # Note: m4 eats our [], so we need to use [ and ] instead.
24241   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24242   if test "x$has_forbidden_chars" != x; then
24243     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24244     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24245     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24246     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24247       # Going to short mode and back again did indeed matter. Since short mode is
24248       # case insensitive, let's make it lowercase to improve readability.
24249       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24250       # Now convert it back to Unix-stile (cygpath)
24251       input_path=`$CYGPATH -u "$shortmode_path"`
24252       new_path="$input_path"
24253     fi
24254   fi
24255 
24256   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24257   if test "x$test_cygdrive_prefix" = x; then
24258     # As a simple fix, exclude /usr/bin since it's not a real path.
24259     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24260       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24261       # a path prefixed by /cygdrive for fixpath to work.
24262       new_path="$CYGWIN_ROOT_PATH$input_path"
24263     fi
24264   fi
24265 
24266 
24267   if test "x$path" != "x$new_path"; then
24268     BOOT_JDK="$new_path"
24269     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24270 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24271   fi
24272 
24273   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24274 
24275   path="$BOOT_JDK"
24276   has_colon=`$ECHO $path | $GREP ^.:`
24277   new_path="$path"
24278   if test "x$has_colon" = x; then
24279     # Not in mixed or Windows style, start by that.
24280     new_path=`cmd //c echo $path`
24281   fi
24282 
24283 
24284   input_path="$new_path"
24285   # Check if we need to convert this using DOS-style short mode. If the path
24286   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24287   # take no chances and rewrite it.
24288   # Note: m4 eats our [], so we need to use [ and ] instead.
24289   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24290   if test "x$has_forbidden_chars" != x; then
24291     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24292     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24293   fi
24294 
24295 
24296   windows_path="$new_path"
24297   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24298     unix_path=`$CYGPATH -u "$windows_path"`
24299     new_path="$unix_path"
24300   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24301     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24302     new_path="$unix_path"
24303   fi
24304 
24305   if test "x$path" != "x$new_path"; then
24306     BOOT_JDK="$new_path"
24307     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24308 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24309   fi
24310 
24311   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24312   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24313 
24314   else
24315     # We're on a posix platform. Hooray! :)
24316     path="$BOOT_JDK"
24317     has_space=`$ECHO "$path" | $GREP " "`
24318     if test "x$has_space" != x; then
24319       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24320 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24321       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24322     fi
24323 
24324     # Use eval to expand a potential ~
24325     eval path="$path"
24326     if test ! -f "$path" && test ! -d "$path"; then
24327       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24328     fi
24329 
24330     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24331   fi
24332 
24333               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24334 $as_echo_n "checking for Boot JDK... " >&6; }
24335               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24336 $as_echo "$BOOT_JDK" >&6; }
24337               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24338 $as_echo_n "checking Boot JDK version... " >&6; }
24339               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24340               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24341 $as_echo "$BOOT_JDK_VERSION" >&6; }
24342             fi # end check jdk version
24343           fi # end check rt.jar
24344         fi # end check javac
24345       fi # end check java
24346     fi # end check boot jdk found
24347   fi
24348 
24349     done
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_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24380             if test "x$FOUND_CORRECT_VERSION" = 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 8 or 9)" >&5
24384 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&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-stile (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 test "x$BOOT_JDK_FOUND" = xno; then
24529     # Now execute the test
24530 
24531   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24532   BOOT_JDK_SUFFIX="/Contents/Home"
24533   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24534   if test "x$ALL_JDKS_FOUND" != x; then
24535     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24536 
24537   if test "x$BOOT_JDK_FOUND" = xno; then
24538     # Now execute the test
24539 
24540         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24541         if test -d "$BOOT_JDK"; then
24542           BOOT_JDK_FOUND=maybe
24543           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24544 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24545         fi
24546 
24547 
24548     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24549     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24550       # Do we have a bin/java?
24551       if test ! -x "$BOOT_JDK/bin/java"; then
24552         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24553 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24554         BOOT_JDK_FOUND=no
24555       else
24556         # Do we have a bin/javac?
24557         if test ! -x "$BOOT_JDK/bin/javac"; then
24558           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24559 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24560           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24561 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24562           BOOT_JDK_FOUND=no
24563         else
24564           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24565           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24566             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24567 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24568             BOOT_JDK_FOUND=no
24569           else
24570             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24571             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24572 
24573             # Extra M4 quote needed to protect [] in grep expression.
24574             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24575             if test "x$FOUND_CORRECT_VERSION" = x; then
24576               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24577 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24578               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24579 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24580               BOOT_JDK_FOUND=no
24581             else
24582               # We're done! :-)
24583               BOOT_JDK_FOUND=yes
24584 
24585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24586 
24587   # Input might be given as Windows format, start by converting to
24588   # unix format.
24589   path="$BOOT_JDK"
24590   new_path=`$CYGPATH -u "$path"`
24591 
24592   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24593   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24594   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24595   # "foo.exe" is OK but "foo" is an error.
24596   #
24597   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24598   # It is also a way to make sure we got the proper file name for the real test later on.
24599   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24600   if test "x$test_shortpath" = x; then
24601     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24602 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24603     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24604   fi
24605 
24606   # Call helper function which possibly converts this using DOS-style short mode.
24607   # If so, the updated path is stored in $new_path.
24608 
24609   input_path="$new_path"
24610   # Check if we need to convert this using DOS-style short mode. If the path
24611   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24612   # take no chances and rewrite it.
24613   # Note: m4 eats our [], so we need to use [ and ] instead.
24614   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24615   if test "x$has_forbidden_chars" != x; then
24616     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24617     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24618     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24619     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24620       # Going to short mode and back again did indeed matter. Since short mode is
24621       # case insensitive, let's make it lowercase to improve readability.
24622       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24623       # Now convert it back to Unix-stile (cygpath)
24624       input_path=`$CYGPATH -u "$shortmode_path"`
24625       new_path="$input_path"
24626     fi
24627   fi
24628 
24629   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24630   if test "x$test_cygdrive_prefix" = x; then
24631     # As a simple fix, exclude /usr/bin since it's not a real path.
24632     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24633       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24634       # a path prefixed by /cygdrive for fixpath to work.
24635       new_path="$CYGWIN_ROOT_PATH$input_path"
24636     fi
24637   fi
24638 
24639 
24640   if test "x$path" != "x$new_path"; then
24641     BOOT_JDK="$new_path"
24642     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24643 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24644   fi
24645 
24646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24647 
24648   path="$BOOT_JDK"
24649   has_colon=`$ECHO $path | $GREP ^.:`
24650   new_path="$path"
24651   if test "x$has_colon" = x; then
24652     # Not in mixed or Windows style, start by that.
24653     new_path=`cmd //c echo $path`
24654   fi
24655 
24656 
24657   input_path="$new_path"
24658   # Check if we need to convert this using DOS-style short mode. If the path
24659   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24660   # take no chances and rewrite it.
24661   # Note: m4 eats our [], so we need to use [ and ] instead.
24662   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24663   if test "x$has_forbidden_chars" != x; then
24664     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24665     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24666   fi
24667 
24668 
24669   windows_path="$new_path"
24670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24671     unix_path=`$CYGPATH -u "$windows_path"`
24672     new_path="$unix_path"
24673   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24674     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24675     new_path="$unix_path"
24676   fi
24677 
24678   if test "x$path" != "x$new_path"; then
24679     BOOT_JDK="$new_path"
24680     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24681 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24682   fi
24683 
24684   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24685   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24686 
24687   else
24688     # We're on a posix platform. Hooray! :)
24689     path="$BOOT_JDK"
24690     has_space=`$ECHO "$path" | $GREP " "`
24691     if test "x$has_space" != x; then
24692       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24693 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24694       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24695     fi
24696 
24697     # Use eval to expand a potential ~
24698     eval path="$path"
24699     if test ! -f "$path" && test ! -d "$path"; then
24700       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24701     fi
24702 
24703     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24704   fi
24705 
24706               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24707 $as_echo_n "checking for Boot JDK... " >&6; }
24708               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24709 $as_echo "$BOOT_JDK" >&6; }
24710               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24711 $as_echo_n "checking Boot JDK version... " >&6; }
24712               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24713               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24714 $as_echo "$BOOT_JDK_VERSION" >&6; }
24715             fi # end check jdk version
24716           fi # end check rt.jar
24717         fi # end check javac
24718       fi # end check java
24719     fi # end check boot jdk found
24720   fi
24721 
24722     done
24723   fi
24724 
24725 
24726     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24727     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24728       # Do we have a bin/java?
24729       if test ! -x "$BOOT_JDK/bin/java"; then
24730         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24731 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24732         BOOT_JDK_FOUND=no
24733       else
24734         # Do we have a bin/javac?
24735         if test ! -x "$BOOT_JDK/bin/javac"; then
24736           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24737 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24738           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24739 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24740           BOOT_JDK_FOUND=no
24741         else
24742           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24743           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24744             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24745 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24746             BOOT_JDK_FOUND=no
24747           else
24748             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24749             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24750 
24751             # Extra M4 quote needed to protect [] in grep expression.
24752             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24753             if test "x$FOUND_CORRECT_VERSION" = x; then
24754               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24755 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24756               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24757 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24758               BOOT_JDK_FOUND=no
24759             else
24760               # We're done! :-)
24761               BOOT_JDK_FOUND=yes
24762 
24763   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24764 
24765   # Input might be given as Windows format, start by converting to
24766   # unix format.
24767   path="$BOOT_JDK"
24768   new_path=`$CYGPATH -u "$path"`
24769 
24770   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24771   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24772   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24773   # "foo.exe" is OK but "foo" is an error.
24774   #
24775   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24776   # It is also a way to make sure we got the proper file name for the real test later on.
24777   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24778   if test "x$test_shortpath" = x; then
24779     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24780 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24781     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24782   fi
24783 
24784   # Call helper function which possibly converts this using DOS-style short mode.
24785   # If so, the updated path is stored in $new_path.
24786 
24787   input_path="$new_path"
24788   # Check if we need to convert this using DOS-style short mode. If the path
24789   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24790   # take no chances and rewrite it.
24791   # Note: m4 eats our [], so we need to use [ and ] instead.
24792   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24793   if test "x$has_forbidden_chars" != x; then
24794     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24795     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24796     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24797     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24798       # Going to short mode and back again did indeed matter. Since short mode is
24799       # case insensitive, let's make it lowercase to improve readability.
24800       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24801       # Now convert it back to Unix-stile (cygpath)
24802       input_path=`$CYGPATH -u "$shortmode_path"`
24803       new_path="$input_path"
24804     fi
24805   fi
24806 
24807   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24808   if test "x$test_cygdrive_prefix" = x; then
24809     # As a simple fix, exclude /usr/bin since it's not a real path.
24810     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24811       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24812       # a path prefixed by /cygdrive for fixpath to work.
24813       new_path="$CYGWIN_ROOT_PATH$input_path"
24814     fi
24815   fi
24816 
24817 
24818   if test "x$path" != "x$new_path"; then
24819     BOOT_JDK="$new_path"
24820     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24821 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24822   fi
24823 
24824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24825 
24826   path="$BOOT_JDK"
24827   has_colon=`$ECHO $path | $GREP ^.:`
24828   new_path="$path"
24829   if test "x$has_colon" = x; then
24830     # Not in mixed or Windows style, start by that.
24831     new_path=`cmd //c echo $path`
24832   fi
24833 
24834 
24835   input_path="$new_path"
24836   # Check if we need to convert this using DOS-style short mode. If the path
24837   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24838   # take no chances and rewrite it.
24839   # Note: m4 eats our [], so we need to use [ and ] instead.
24840   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24841   if test "x$has_forbidden_chars" != x; then
24842     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24843     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24844   fi
24845 
24846 
24847   windows_path="$new_path"
24848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24849     unix_path=`$CYGPATH -u "$windows_path"`
24850     new_path="$unix_path"
24851   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24852     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24853     new_path="$unix_path"
24854   fi
24855 
24856   if test "x$path" != "x$new_path"; then
24857     BOOT_JDK="$new_path"
24858     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24859 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24860   fi
24861 
24862   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24863   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24864 
24865   else
24866     # We're on a posix platform. Hooray! :)
24867     path="$BOOT_JDK"
24868     has_space=`$ECHO "$path" | $GREP " "`
24869     if test "x$has_space" != x; then
24870       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24871 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24872       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24873     fi
24874 
24875     # Use eval to expand a potential ~
24876     eval path="$path"
24877     if test ! -f "$path" && test ! -d "$path"; then
24878       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24879     fi
24880 
24881     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24882   fi
24883 
24884               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24885 $as_echo_n "checking for Boot JDK... " >&6; }
24886               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24887 $as_echo "$BOOT_JDK" >&6; }
24888               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24889 $as_echo_n "checking Boot JDK version... " >&6; }
24890               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24891               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24892 $as_echo "$BOOT_JDK_VERSION" >&6; }
24893             fi # end check jdk version
24894           fi # end check rt.jar
24895         fi # end check javac
24896       fi # end check java
24897     fi # end check boot jdk found
24898   fi
24899 
24900   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24901 
24902   if test "x$BOOT_JDK_FOUND" = xno; then
24903     # Now execute the test
24904 
24905   BOOT_JDK_PREFIX="/usr/lib/jvm"
24906   BOOT_JDK_SUFFIX=""
24907   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24908   if test "x$ALL_JDKS_FOUND" != x; then
24909     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24910 
24911   if test "x$BOOT_JDK_FOUND" = xno; then
24912     # Now execute the test
24913 
24914         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24915         if test -d "$BOOT_JDK"; then
24916           BOOT_JDK_FOUND=maybe
24917           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24918 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24919         fi
24920 
24921 
24922     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24923     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24924       # Do we have a bin/java?
24925       if test ! -x "$BOOT_JDK/bin/java"; then
24926         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24927 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24928         BOOT_JDK_FOUND=no
24929       else
24930         # Do we have a bin/javac?
24931         if test ! -x "$BOOT_JDK/bin/javac"; then
24932           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24933 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24934           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24935 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24936           BOOT_JDK_FOUND=no
24937         else
24938           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24939           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24940             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24941 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24942             BOOT_JDK_FOUND=no
24943           else
24944             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24945             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24946 
24947             # Extra M4 quote needed to protect [] in grep expression.
24948             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24949             if test "x$FOUND_CORRECT_VERSION" = x; then
24950               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24951 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24952               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24953 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24954               BOOT_JDK_FOUND=no
24955             else
24956               # We're done! :-)
24957               BOOT_JDK_FOUND=yes
24958 
24959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24960 
24961   # Input might be given as Windows format, start by converting to
24962   # unix format.
24963   path="$BOOT_JDK"
24964   new_path=`$CYGPATH -u "$path"`
24965 
24966   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24967   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24968   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24969   # "foo.exe" is OK but "foo" is an error.
24970   #
24971   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24972   # It is also a way to make sure we got the proper file name for the real test later on.
24973   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24974   if test "x$test_shortpath" = x; then
24975     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24976 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24977     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24978   fi
24979 
24980   # Call helper function which possibly converts this using DOS-style short mode.
24981   # If so, the updated path is stored in $new_path.
24982 
24983   input_path="$new_path"
24984   # Check if we need to convert this using DOS-style short mode. If the path
24985   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24986   # take no chances and rewrite it.
24987   # Note: m4 eats our [], so we need to use [ and ] instead.
24988   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24989   if test "x$has_forbidden_chars" != x; then
24990     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24991     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24992     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24993     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24994       # Going to short mode and back again did indeed matter. Since short mode is
24995       # case insensitive, let's make it lowercase to improve readability.
24996       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24997       # Now convert it back to Unix-stile (cygpath)
24998       input_path=`$CYGPATH -u "$shortmode_path"`
24999       new_path="$input_path"
25000     fi
25001   fi
25002 
25003   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25004   if test "x$test_cygdrive_prefix" = x; then
25005     # As a simple fix, exclude /usr/bin since it's not a real path.
25006     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25007       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25008       # a path prefixed by /cygdrive for fixpath to work.
25009       new_path="$CYGWIN_ROOT_PATH$input_path"
25010     fi
25011   fi
25012 
25013 
25014   if test "x$path" != "x$new_path"; then
25015     BOOT_JDK="$new_path"
25016     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25017 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25018   fi
25019 
25020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25021 
25022   path="$BOOT_JDK"
25023   has_colon=`$ECHO $path | $GREP ^.:`
25024   new_path="$path"
25025   if test "x$has_colon" = x; then
25026     # Not in mixed or Windows style, start by that.
25027     new_path=`cmd //c echo $path`
25028   fi
25029 
25030 
25031   input_path="$new_path"
25032   # Check if we need to convert this using DOS-style short mode. If the path
25033   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25034   # take no chances and rewrite it.
25035   # Note: m4 eats our [], so we need to use [ and ] instead.
25036   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25037   if test "x$has_forbidden_chars" != x; then
25038     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25039     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25040   fi
25041 
25042 
25043   windows_path="$new_path"
25044   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25045     unix_path=`$CYGPATH -u "$windows_path"`
25046     new_path="$unix_path"
25047   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25048     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25049     new_path="$unix_path"
25050   fi
25051 
25052   if test "x$path" != "x$new_path"; then
25053     BOOT_JDK="$new_path"
25054     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25055 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25056   fi
25057 
25058   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25059   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25060 
25061   else
25062     # We're on a posix platform. Hooray! :)
25063     path="$BOOT_JDK"
25064     has_space=`$ECHO "$path" | $GREP " "`
25065     if test "x$has_space" != x; then
25066       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25067 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25068       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25069     fi
25070 
25071     # Use eval to expand a potential ~
25072     eval path="$path"
25073     if test ! -f "$path" && test ! -d "$path"; then
25074       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25075     fi
25076 
25077     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25078   fi
25079 
25080               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25081 $as_echo_n "checking for Boot JDK... " >&6; }
25082               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25083 $as_echo "$BOOT_JDK" >&6; }
25084               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25085 $as_echo_n "checking Boot JDK version... " >&6; }
25086               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25087               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25088 $as_echo "$BOOT_JDK_VERSION" >&6; }
25089             fi # end check jdk version
25090           fi # end check rt.jar
25091         fi # end check javac
25092       fi # end check java
25093     fi # end check boot jdk found
25094   fi
25095 
25096     done
25097   fi
25098 
25099 
25100     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25101     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25102       # Do we have a bin/java?
25103       if test ! -x "$BOOT_JDK/bin/java"; then
25104         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25105 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25106         BOOT_JDK_FOUND=no
25107       else
25108         # Do we have a bin/javac?
25109         if test ! -x "$BOOT_JDK/bin/javac"; then
25110           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25111 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25112           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25113 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25114           BOOT_JDK_FOUND=no
25115         else
25116           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25117           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25118             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25119 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25120             BOOT_JDK_FOUND=no
25121           else
25122             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25123             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25124 
25125             # Extra M4 quote needed to protect [] in grep expression.
25126             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25127             if test "x$FOUND_CORRECT_VERSION" = x; then
25128               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25129 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25130               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25131 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25132               BOOT_JDK_FOUND=no
25133             else
25134               # We're done! :-)
25135               BOOT_JDK_FOUND=yes
25136 
25137   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25138 
25139   # Input might be given as Windows format, start by converting to
25140   # unix format.
25141   path="$BOOT_JDK"
25142   new_path=`$CYGPATH -u "$path"`
25143 
25144   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25145   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25146   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25147   # "foo.exe" is OK but "foo" is an error.
25148   #
25149   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25150   # It is also a way to make sure we got the proper file name for the real test later on.
25151   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25152   if test "x$test_shortpath" = x; then
25153     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25154 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25155     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25156   fi
25157 
25158   # Call helper function which possibly converts this using DOS-style short mode.
25159   # If so, the updated path is stored in $new_path.
25160 
25161   input_path="$new_path"
25162   # Check if we need to convert this using DOS-style short mode. If the path
25163   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25164   # take no chances and rewrite it.
25165   # Note: m4 eats our [], so we need to use [ and ] instead.
25166   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25167   if test "x$has_forbidden_chars" != x; then
25168     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25169     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25170     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25171     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25172       # Going to short mode and back again did indeed matter. Since short mode is
25173       # case insensitive, let's make it lowercase to improve readability.
25174       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25175       # Now convert it back to Unix-stile (cygpath)
25176       input_path=`$CYGPATH -u "$shortmode_path"`
25177       new_path="$input_path"
25178     fi
25179   fi
25180 
25181   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25182   if test "x$test_cygdrive_prefix" = x; then
25183     # As a simple fix, exclude /usr/bin since it's not a real path.
25184     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25185       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25186       # a path prefixed by /cygdrive for fixpath to work.
25187       new_path="$CYGWIN_ROOT_PATH$input_path"
25188     fi
25189   fi
25190 
25191 
25192   if test "x$path" != "x$new_path"; then
25193     BOOT_JDK="$new_path"
25194     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25195 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25196   fi
25197 
25198   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25199 
25200   path="$BOOT_JDK"
25201   has_colon=`$ECHO $path | $GREP ^.:`
25202   new_path="$path"
25203   if test "x$has_colon" = x; then
25204     # Not in mixed or Windows style, start by that.
25205     new_path=`cmd //c echo $path`
25206   fi
25207 
25208 
25209   input_path="$new_path"
25210   # Check if we need to convert this using DOS-style short mode. If the path
25211   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25212   # take no chances and rewrite it.
25213   # Note: m4 eats our [], so we need to use [ and ] instead.
25214   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25215   if test "x$has_forbidden_chars" != x; then
25216     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25217     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25218   fi
25219 
25220 
25221   windows_path="$new_path"
25222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25223     unix_path=`$CYGPATH -u "$windows_path"`
25224     new_path="$unix_path"
25225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25226     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25227     new_path="$unix_path"
25228   fi
25229 
25230   if test "x$path" != "x$new_path"; then
25231     BOOT_JDK="$new_path"
25232     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25233 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25234   fi
25235 
25236   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25237   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25238 
25239   else
25240     # We're on a posix platform. Hooray! :)
25241     path="$BOOT_JDK"
25242     has_space=`$ECHO "$path" | $GREP " "`
25243     if test "x$has_space" != x; then
25244       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25245 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25246       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25247     fi
25248 
25249     # Use eval to expand a potential ~
25250     eval path="$path"
25251     if test ! -f "$path" && test ! -d "$path"; then
25252       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25253     fi
25254 
25255     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25256   fi
25257 
25258               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25259 $as_echo_n "checking for Boot JDK... " >&6; }
25260               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25261 $as_echo "$BOOT_JDK" >&6; }
25262               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25263 $as_echo_n "checking Boot JDK version... " >&6; }
25264               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25265               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25266 $as_echo "$BOOT_JDK_VERSION" >&6; }
25267             fi # end check jdk version
25268           fi # end check rt.jar
25269         fi # end check javac
25270       fi # end check java
25271     fi # end check boot jdk found
25272   fi
25273 
25274   fi
25275 
25276 
25277     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25278     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25279       # Do we have a bin/java?
25280       if test ! -x "$BOOT_JDK/bin/java"; then
25281         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25282 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25283         BOOT_JDK_FOUND=no
25284       else
25285         # Do we have a bin/javac?
25286         if test ! -x "$BOOT_JDK/bin/javac"; then
25287           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25288 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25289           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25290 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25291           BOOT_JDK_FOUND=no
25292         else
25293           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25294           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25295             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25296 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25297             BOOT_JDK_FOUND=no
25298           else
25299             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25300             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25301 
25302             # Extra M4 quote needed to protect [] in grep expression.
25303             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25304             if test "x$FOUND_CORRECT_VERSION" = x; then
25305               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25306 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25307               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25308 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25309               BOOT_JDK_FOUND=no
25310             else
25311               # We're done! :-)
25312               BOOT_JDK_FOUND=yes
25313 
25314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25315 
25316   # Input might be given as Windows format, start by converting to
25317   # unix format.
25318   path="$BOOT_JDK"
25319   new_path=`$CYGPATH -u "$path"`
25320 
25321   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25322   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25323   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25324   # "foo.exe" is OK but "foo" is an error.
25325   #
25326   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25327   # It is also a way to make sure we got the proper file name for the real test later on.
25328   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25329   if test "x$test_shortpath" = x; then
25330     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25331 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25332     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25333   fi
25334 
25335   # Call helper function which possibly converts this using DOS-style short mode.
25336   # If so, the updated path is stored in $new_path.
25337 
25338   input_path="$new_path"
25339   # Check if we need to convert this using DOS-style short mode. If the path
25340   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25341   # take no chances and rewrite it.
25342   # Note: m4 eats our [], so we need to use [ and ] instead.
25343   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25344   if test "x$has_forbidden_chars" != x; then
25345     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25346     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25347     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25348     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25349       # Going to short mode and back again did indeed matter. Since short mode is
25350       # case insensitive, let's make it lowercase to improve readability.
25351       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25352       # Now convert it back to Unix-stile (cygpath)
25353       input_path=`$CYGPATH -u "$shortmode_path"`
25354       new_path="$input_path"
25355     fi
25356   fi
25357 
25358   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25359   if test "x$test_cygdrive_prefix" = x; then
25360     # As a simple fix, exclude /usr/bin since it's not a real path.
25361     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25362       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25363       # a path prefixed by /cygdrive for fixpath to work.
25364       new_path="$CYGWIN_ROOT_PATH$input_path"
25365     fi
25366   fi
25367 
25368 
25369   if test "x$path" != "x$new_path"; then
25370     BOOT_JDK="$new_path"
25371     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25372 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25373   fi
25374 
25375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25376 
25377   path="$BOOT_JDK"
25378   has_colon=`$ECHO $path | $GREP ^.:`
25379   new_path="$path"
25380   if test "x$has_colon" = x; then
25381     # Not in mixed or Windows style, start by that.
25382     new_path=`cmd //c echo $path`
25383   fi
25384 
25385 
25386   input_path="$new_path"
25387   # Check if we need to convert this using DOS-style short mode. If the path
25388   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25389   # take no chances and rewrite it.
25390   # Note: m4 eats our [], so we need to use [ and ] instead.
25391   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25392   if test "x$has_forbidden_chars" != x; then
25393     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25394     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25395   fi
25396 
25397 
25398   windows_path="$new_path"
25399   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25400     unix_path=`$CYGPATH -u "$windows_path"`
25401     new_path="$unix_path"
25402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25403     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25404     new_path="$unix_path"
25405   fi
25406 
25407   if test "x$path" != "x$new_path"; then
25408     BOOT_JDK="$new_path"
25409     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25410 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25411   fi
25412 
25413   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25414   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25415 
25416   else
25417     # We're on a posix platform. Hooray! :)
25418     path="$BOOT_JDK"
25419     has_space=`$ECHO "$path" | $GREP " "`
25420     if test "x$has_space" != x; then
25421       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25422 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25423       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25424     fi
25425 
25426     # Use eval to expand a potential ~
25427     eval path="$path"
25428     if test ! -f "$path" && test ! -d "$path"; then
25429       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25430     fi
25431 
25432     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25433   fi
25434 
25435               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25436 $as_echo_n "checking for Boot JDK... " >&6; }
25437               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25438 $as_echo "$BOOT_JDK" >&6; }
25439               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25440 $as_echo_n "checking Boot JDK version... " >&6; }
25441               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25442               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25443 $as_echo "$BOOT_JDK_VERSION" >&6; }
25444             fi # end check jdk version
25445           fi # end check rt.jar
25446         fi # end check javac
25447       fi # end check java
25448     fi # end check boot jdk found
25449   fi
25450 
25451 
25452   # If we haven't found anything yet, we've truly lost. Give up.
25453   if test "x$BOOT_JDK_FOUND" = xno; then
25454 
25455   # Print a helpful message on how to acquire the necessary build dependency.
25456   # openjdk is the help tag: freetype, cups, pulse, alsa etc
25457   MISSING_DEPENDENCY=openjdk
25458 
25459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25460     cygwin_help $MISSING_DEPENDENCY
25461   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25462     msys_help $MISSING_DEPENDENCY
25463   else
25464     PKGHANDLER_COMMAND=
25465 
25466     case $PKGHANDLER in
25467       apt-get)
25468         apt_help     $MISSING_DEPENDENCY ;;
25469       yum)
25470         yum_help     $MISSING_DEPENDENCY ;;
25471       port)
25472         port_help    $MISSING_DEPENDENCY ;;
25473       pkgutil)
25474         pkgutil_help $MISSING_DEPENDENCY ;;
25475       pkgadd)
25476         pkgadd_help  $MISSING_DEPENDENCY ;;
25477     esac
25478 
25479     if test "x$PKGHANDLER_COMMAND" != x; then
25480       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25481     fi
25482   fi
25483 
25484     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25485 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25486     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25487 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25488     as_fn_error $? "Cannot continue" "$LINENO" 5
25489   fi
25490 
25491   # Setup proper paths for what we found
25492   BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25493   if test ! -f "$BOOT_RTJAR"; then
25494     # On MacOSX it is called classes.jar
25495     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25496     if test -f "$BOOT_RTJAR"; then
25497       # Remove the ..
25498       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25499     fi
25500   fi
25501   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25502   BOOT_JDK="$BOOT_JDK"
25503 
25504 
25505 
25506 
25507   # Setup tools from the Boot JDK.
25508 
25509   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25510 
25511   # Publish this variable in the help.
25512 
25513 
25514   if test "x$JAVA" = x; then
25515     # The variable is not set by user, try to locate tool using the code snippet
25516 
25517       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25518 $as_echo_n "checking for java in Boot JDK... " >&6; }
25519       JAVA=$BOOT_JDK/bin/java
25520       if test ! -x $JAVA; then
25521         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25522 $as_echo "not found" >&6; }
25523         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25524 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25525         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25526       fi
25527       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25528 $as_echo "ok" >&6; }
25529 
25530 
25531   else
25532     # The variable is set, but is it from the command line or the environment?
25533 
25534     # Try to remove the string !JAVA! from our list.
25535     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25536     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25537       # If it failed, the variable was not from the command line. Ignore it,
25538       # but warn the user (except for BASH, which is always set by the calling BASH).
25539       if test "xJAVA" != xBASH; then
25540         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25541 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25542       fi
25543       # Try to locate tool using the code snippet
25544 
25545       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25546 $as_echo_n "checking for java in Boot JDK... " >&6; }
25547       JAVA=$BOOT_JDK/bin/java
25548       if test ! -x $JAVA; then
25549         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25550 $as_echo "not found" >&6; }
25551         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25552 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25553         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25554       fi
25555       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25556 $as_echo "ok" >&6; }
25557 
25558 
25559     else
25560       # If it succeeded, then it was overridden by the user. We will use it
25561       # for the tool.
25562 
25563       # First remove it from the list of overridden variables, so we can test
25564       # for unknown variables in the end.
25565       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25566 
25567       # Check if the provided tool contains a complete path.
25568       tool_specified="$JAVA"
25569       tool_basename="${tool_specified##*/}"
25570       if test "x$tool_basename" = "x$tool_specified"; then
25571         # A command without a complete path is provided, search $PATH.
25572         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25573 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25574         # Extract the first word of "$tool_basename", so it can be a program name with args.
25575 set dummy $tool_basename; ac_word=$2
25576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25577 $as_echo_n "checking for $ac_word... " >&6; }
25578 if ${ac_cv_path_JAVA+:} false; then :
25579   $as_echo_n "(cached) " >&6
25580 else
25581   case $JAVA in
25582   [\\/]* | ?:[\\/]*)
25583   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25584   ;;
25585   *)
25586   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25587 for as_dir in $PATH
25588 do
25589   IFS=$as_save_IFS
25590   test -z "$as_dir" && as_dir=.
25591     for ac_exec_ext in '' $ac_executable_extensions; do
25592   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25593     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25594     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25595     break 2
25596   fi
25597 done
25598   done
25599 IFS=$as_save_IFS
25600 
25601   ;;
25602 esac
25603 fi
25604 JAVA=$ac_cv_path_JAVA
25605 if test -n "$JAVA"; then
25606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25607 $as_echo "$JAVA" >&6; }
25608 else
25609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25610 $as_echo "no" >&6; }
25611 fi
25612 
25613 
25614         if test "x$JAVA" = x; then
25615           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25616         fi
25617       else
25618         # Otherwise we believe it is a complete path. Use it as it is.
25619         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25620 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25621         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25622 $as_echo_n "checking for JAVA... " >&6; }
25623         if test ! -x "$tool_specified"; then
25624           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25625 $as_echo "not found" >&6; }
25626           as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25627         fi
25628         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25629 $as_echo "$tool_specified" >&6; }
25630       fi
25631     fi
25632   fi
25633 
25634 
25635 
25636   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25637 
25638   # Publish this variable in the help.
25639 
25640 
25641   if test "x$JAVAC" = x; then
25642     # The variable is not set by user, try to locate tool using the code snippet
25643 
25644       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25645 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25646       JAVAC=$BOOT_JDK/bin/javac
25647       if test ! -x $JAVAC; then
25648         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25649 $as_echo "not found" >&6; }
25650         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25651 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25652         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25653       fi
25654       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25655 $as_echo "ok" >&6; }
25656 
25657 
25658   else
25659     # The variable is set, but is it from the command line or the environment?
25660 
25661     # Try to remove the string !JAVAC! from our list.
25662     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25663     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25664       # If it failed, the variable was not from the command line. Ignore it,
25665       # but warn the user (except for BASH, which is always set by the calling BASH).
25666       if test "xJAVAC" != xBASH; then
25667         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25668 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25669       fi
25670       # Try to locate tool using the code snippet
25671 
25672       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25673 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25674       JAVAC=$BOOT_JDK/bin/javac
25675       if test ! -x $JAVAC; then
25676         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25677 $as_echo "not found" >&6; }
25678         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25679 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25680         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25681       fi
25682       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25683 $as_echo "ok" >&6; }
25684 
25685 
25686     else
25687       # If it succeeded, then it was overridden by the user. We will use it
25688       # for the tool.
25689 
25690       # First remove it from the list of overridden variables, so we can test
25691       # for unknown variables in the end.
25692       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25693 
25694       # Check if the provided tool contains a complete path.
25695       tool_specified="$JAVAC"
25696       tool_basename="${tool_specified##*/}"
25697       if test "x$tool_basename" = "x$tool_specified"; then
25698         # A command without a complete path is provided, search $PATH.
25699         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25700 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25701         # Extract the first word of "$tool_basename", so it can be a program name with args.
25702 set dummy $tool_basename; ac_word=$2
25703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25704 $as_echo_n "checking for $ac_word... " >&6; }
25705 if ${ac_cv_path_JAVAC+:} false; then :
25706   $as_echo_n "(cached) " >&6
25707 else
25708   case $JAVAC in
25709   [\\/]* | ?:[\\/]*)
25710   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25711   ;;
25712   *)
25713   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25714 for as_dir in $PATH
25715 do
25716   IFS=$as_save_IFS
25717   test -z "$as_dir" && as_dir=.
25718     for ac_exec_ext in '' $ac_executable_extensions; do
25719   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25720     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25721     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25722     break 2
25723   fi
25724 done
25725   done
25726 IFS=$as_save_IFS
25727 
25728   ;;
25729 esac
25730 fi
25731 JAVAC=$ac_cv_path_JAVAC
25732 if test -n "$JAVAC"; then
25733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25734 $as_echo "$JAVAC" >&6; }
25735 else
25736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25737 $as_echo "no" >&6; }
25738 fi
25739 
25740 
25741         if test "x$JAVAC" = x; then
25742           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25743         fi
25744       else
25745         # Otherwise we believe it is a complete path. Use it as it is.
25746         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25747 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25748         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25749 $as_echo_n "checking for JAVAC... " >&6; }
25750         if test ! -x "$tool_specified"; then
25751           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25752 $as_echo "not found" >&6; }
25753           as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25754         fi
25755         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25756 $as_echo "$tool_specified" >&6; }
25757       fi
25758     fi
25759   fi
25760 
25761 
25762 
25763   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25764 
25765   # Publish this variable in the help.
25766 
25767 
25768   if test "x$JAVAH" = x; then
25769     # The variable is not set by user, try to locate tool using the code snippet
25770 
25771       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25772 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25773       JAVAH=$BOOT_JDK/bin/javah
25774       if test ! -x $JAVAH; then
25775         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25776 $as_echo "not found" >&6; }
25777         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25778 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25779         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25780       fi
25781       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25782 $as_echo "ok" >&6; }
25783 
25784 
25785   else
25786     # The variable is set, but is it from the command line or the environment?
25787 
25788     # Try to remove the string !JAVAH! from our list.
25789     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25790     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25791       # If it failed, the variable was not from the command line. Ignore it,
25792       # but warn the user (except for BASH, which is always set by the calling BASH).
25793       if test "xJAVAH" != xBASH; then
25794         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25795 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25796       fi
25797       # Try to locate tool using the code snippet
25798 
25799       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25800 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25801       JAVAH=$BOOT_JDK/bin/javah
25802       if test ! -x $JAVAH; then
25803         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25804 $as_echo "not found" >&6; }
25805         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25806 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25807         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25808       fi
25809       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25810 $as_echo "ok" >&6; }
25811 
25812 
25813     else
25814       # If it succeeded, then it was overridden by the user. We will use it
25815       # for the tool.
25816 
25817       # First remove it from the list of overridden variables, so we can test
25818       # for unknown variables in the end.
25819       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25820 
25821       # Check if the provided tool contains a complete path.
25822       tool_specified="$JAVAH"
25823       tool_basename="${tool_specified##*/}"
25824       if test "x$tool_basename" = "x$tool_specified"; then
25825         # A command without a complete path is provided, search $PATH.
25826         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25827 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25828         # Extract the first word of "$tool_basename", so it can be a program name with args.
25829 set dummy $tool_basename; ac_word=$2
25830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25831 $as_echo_n "checking for $ac_word... " >&6; }
25832 if ${ac_cv_path_JAVAH+:} false; then :
25833   $as_echo_n "(cached) " >&6
25834 else
25835   case $JAVAH in
25836   [\\/]* | ?:[\\/]*)
25837   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25838   ;;
25839   *)
25840   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25841 for as_dir in $PATH
25842 do
25843   IFS=$as_save_IFS
25844   test -z "$as_dir" && as_dir=.
25845     for ac_exec_ext in '' $ac_executable_extensions; do
25846   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25847     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25848     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25849     break 2
25850   fi
25851 done
25852   done
25853 IFS=$as_save_IFS
25854 
25855   ;;
25856 esac
25857 fi
25858 JAVAH=$ac_cv_path_JAVAH
25859 if test -n "$JAVAH"; then
25860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25861 $as_echo "$JAVAH" >&6; }
25862 else
25863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25864 $as_echo "no" >&6; }
25865 fi
25866 
25867 
25868         if test "x$JAVAH" = x; then
25869           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25870         fi
25871       else
25872         # Otherwise we believe it is a complete path. Use it as it is.
25873         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25874 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25875         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25876 $as_echo_n "checking for JAVAH... " >&6; }
25877         if test ! -x "$tool_specified"; then
25878           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25879 $as_echo "not found" >&6; }
25880           as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25881         fi
25882         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25883 $as_echo "$tool_specified" >&6; }
25884       fi
25885     fi
25886   fi
25887 
25888 
25889 
25890   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25891 
25892   # Publish this variable in the help.
25893 
25894 
25895   if test "x$JAR" = x; then
25896     # The variable is not set by user, try to locate tool using the code snippet
25897 
25898       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25899 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25900       JAR=$BOOT_JDK/bin/jar
25901       if test ! -x $JAR; then
25902         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25903 $as_echo "not found" >&6; }
25904         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25905 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25906         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25907       fi
25908       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25909 $as_echo "ok" >&6; }
25910 
25911 
25912   else
25913     # The variable is set, but is it from the command line or the environment?
25914 
25915     # Try to remove the string !JAR! from our list.
25916     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25917     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25918       # If it failed, the variable was not from the command line. Ignore it,
25919       # but warn the user (except for BASH, which is always set by the calling BASH).
25920       if test "xJAR" != xBASH; then
25921         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25922 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25923       fi
25924       # Try to locate tool using the code snippet
25925 
25926       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25927 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25928       JAR=$BOOT_JDK/bin/jar
25929       if test ! -x $JAR; then
25930         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25931 $as_echo "not found" >&6; }
25932         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25933 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25934         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25935       fi
25936       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25937 $as_echo "ok" >&6; }
25938 
25939 
25940     else
25941       # If it succeeded, then it was overridden by the user. We will use it
25942       # for the tool.
25943 
25944       # First remove it from the list of overridden variables, so we can test
25945       # for unknown variables in the end.
25946       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25947 
25948       # Check if the provided tool contains a complete path.
25949       tool_specified="$JAR"
25950       tool_basename="${tool_specified##*/}"
25951       if test "x$tool_basename" = "x$tool_specified"; then
25952         # A command without a complete path is provided, search $PATH.
25953         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25954 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25955         # Extract the first word of "$tool_basename", so it can be a program name with args.
25956 set dummy $tool_basename; ac_word=$2
25957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25958 $as_echo_n "checking for $ac_word... " >&6; }
25959 if ${ac_cv_path_JAR+:} false; then :
25960   $as_echo_n "(cached) " >&6
25961 else
25962   case $JAR in
25963   [\\/]* | ?:[\\/]*)
25964   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25965   ;;
25966   *)
25967   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25968 for as_dir in $PATH
25969 do
25970   IFS=$as_save_IFS
25971   test -z "$as_dir" && as_dir=.
25972     for ac_exec_ext in '' $ac_executable_extensions; do
25973   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25974     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25975     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25976     break 2
25977   fi
25978 done
25979   done
25980 IFS=$as_save_IFS
25981 
25982   ;;
25983 esac
25984 fi
25985 JAR=$ac_cv_path_JAR
25986 if test -n "$JAR"; then
25987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25988 $as_echo "$JAR" >&6; }
25989 else
25990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25991 $as_echo "no" >&6; }
25992 fi
25993 
25994 
25995         if test "x$JAR" = x; then
25996           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25997         fi
25998       else
25999         # Otherwise we believe it is a complete path. Use it as it is.
26000         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26001 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26002         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26003 $as_echo_n "checking for JAR... " >&6; }
26004         if test ! -x "$tool_specified"; then
26005           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26006 $as_echo "not found" >&6; }
26007           as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26008         fi
26009         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26010 $as_echo "$tool_specified" >&6; }
26011       fi
26012     fi
26013   fi
26014 
26015 
26016 
26017   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26018 
26019   # Publish this variable in the help.
26020 
26021 
26022   if test "x$NATIVE2ASCII" = x; then
26023     # The variable is not set by user, try to locate tool using the code snippet
26024 
26025       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26026 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26027       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26028       if test ! -x $NATIVE2ASCII; then
26029         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26030 $as_echo "not found" >&6; }
26031         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26032 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26033         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26034       fi
26035       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26036 $as_echo "ok" >&6; }
26037 
26038 
26039   else
26040     # The variable is set, but is it from the command line or the environment?
26041 
26042     # Try to remove the string !NATIVE2ASCII! from our list.
26043     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
26044     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26045       # If it failed, the variable was not from the command line. Ignore it,
26046       # but warn the user (except for BASH, which is always set by the calling BASH).
26047       if test "xNATIVE2ASCII" != xBASH; then
26048         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
26049 $as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
26050       fi
26051       # Try to locate tool using the code snippet
26052 
26053       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26054 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26055       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26056       if test ! -x $NATIVE2ASCII; then
26057         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26058 $as_echo "not found" >&6; }
26059         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26060 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26061         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26062       fi
26063       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26064 $as_echo "ok" >&6; }
26065 
26066 
26067     else
26068       # If it succeeded, then it was overridden by the user. We will use it
26069       # for the tool.
26070 
26071       # First remove it from the list of overridden variables, so we can test
26072       # for unknown variables in the end.
26073       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26074 
26075       # Check if the provided tool contains a complete path.
26076       tool_specified="$NATIVE2ASCII"
26077       tool_basename="${tool_specified##*/}"
26078       if test "x$tool_basename" = "x$tool_specified"; then
26079         # A command without a complete path is provided, search $PATH.
26080         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
26081 $as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
26082         # Extract the first word of "$tool_basename", so it can be a program name with args.
26083 set dummy $tool_basename; ac_word=$2
26084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26085 $as_echo_n "checking for $ac_word... " >&6; }
26086 if ${ac_cv_path_NATIVE2ASCII+:} false; then :
26087   $as_echo_n "(cached) " >&6
26088 else
26089   case $NATIVE2ASCII in
26090   [\\/]* | ?:[\\/]*)
26091   ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
26092   ;;
26093   *)
26094   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26095 for as_dir in $PATH
26096 do
26097   IFS=$as_save_IFS
26098   test -z "$as_dir" && as_dir=.
26099     for ac_exec_ext in '' $ac_executable_extensions; do
26100   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26101     ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
26102     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26103     break 2
26104   fi
26105 done
26106   done
26107 IFS=$as_save_IFS
26108 
26109   ;;
26110 esac
26111 fi
26112 NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26113 if test -n "$NATIVE2ASCII"; then
26114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26115 $as_echo "$NATIVE2ASCII" >&6; }
26116 else
26117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26118 $as_echo "no" >&6; }
26119 fi
26120 
26121 
26122         if test "x$NATIVE2ASCII" = x; then
26123           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26124         fi
26125       else
26126         # Otherwise we believe it is a complete path. Use it as it is.
26127         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26128 $as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26129         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26130 $as_echo_n "checking for NATIVE2ASCII... " >&6; }
26131         if test ! -x "$tool_specified"; then
26132           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26133 $as_echo "not found" >&6; }
26134           as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26135         fi
26136         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26137 $as_echo "$tool_specified" >&6; }
26138       fi
26139     fi
26140   fi
26141 
26142 
26143 
26144   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26145 
26146   # Publish this variable in the help.
26147 
26148 
26149   if test "x$JARSIGNER" = x; then
26150     # The variable is not set by user, try to locate tool using the code snippet
26151 
26152       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26153 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26154       JARSIGNER=$BOOT_JDK/bin/jarsigner
26155       if test ! -x $JARSIGNER; then
26156         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26157 $as_echo "not found" >&6; }
26158         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26159 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26160         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26161       fi
26162       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26163 $as_echo "ok" >&6; }
26164 
26165 
26166   else
26167     # The variable is set, but is it from the command line or the environment?
26168 
26169     # Try to remove the string !JARSIGNER! from our list.
26170     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26171     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26172       # If it failed, the variable was not from the command line. Ignore it,
26173       # but warn the user (except for BASH, which is always set by the calling BASH).
26174       if test "xJARSIGNER" != xBASH; then
26175         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26176 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26177       fi
26178       # Try to locate tool using the code snippet
26179 
26180       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26181 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26182       JARSIGNER=$BOOT_JDK/bin/jarsigner
26183       if test ! -x $JARSIGNER; then
26184         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26185 $as_echo "not found" >&6; }
26186         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26187 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26188         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26189       fi
26190       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26191 $as_echo "ok" >&6; }
26192 
26193 
26194     else
26195       # If it succeeded, then it was overridden by the user. We will use it
26196       # for the tool.
26197 
26198       # First remove it from the list of overridden variables, so we can test
26199       # for unknown variables in the end.
26200       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26201 
26202       # Check if the provided tool contains a complete path.
26203       tool_specified="$JARSIGNER"
26204       tool_basename="${tool_specified##*/}"
26205       if test "x$tool_basename" = "x$tool_specified"; then
26206         # A command without a complete path is provided, search $PATH.
26207         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26208 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26209         # Extract the first word of "$tool_basename", so it can be a program name with args.
26210 set dummy $tool_basename; ac_word=$2
26211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26212 $as_echo_n "checking for $ac_word... " >&6; }
26213 if ${ac_cv_path_JARSIGNER+:} false; then :
26214   $as_echo_n "(cached) " >&6
26215 else
26216   case $JARSIGNER in
26217   [\\/]* | ?:[\\/]*)
26218   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26219   ;;
26220   *)
26221   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26222 for as_dir in $PATH
26223 do
26224   IFS=$as_save_IFS
26225   test -z "$as_dir" && as_dir=.
26226     for ac_exec_ext in '' $ac_executable_extensions; do
26227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26228     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26230     break 2
26231   fi
26232 done
26233   done
26234 IFS=$as_save_IFS
26235 
26236   ;;
26237 esac
26238 fi
26239 JARSIGNER=$ac_cv_path_JARSIGNER
26240 if test -n "$JARSIGNER"; then
26241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26242 $as_echo "$JARSIGNER" >&6; }
26243 else
26244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26245 $as_echo "no" >&6; }
26246 fi
26247 
26248 
26249         if test "x$JARSIGNER" = x; then
26250           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26251         fi
26252       else
26253         # Otherwise we believe it is a complete path. Use it as it is.
26254         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26255 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26256         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26257 $as_echo_n "checking for JARSIGNER... " >&6; }
26258         if test ! -x "$tool_specified"; then
26259           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26260 $as_echo "not found" >&6; }
26261           as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26262         fi
26263         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26264 $as_echo "$tool_specified" >&6; }
26265       fi
26266     fi
26267   fi
26268 
26269 
26270 
26271   # Finally, set some other options...
26272 
26273   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26274   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26275 
26276 
26277 
26278 
26279   ##############################################################################
26280   #
26281   # Specify jvm options for anything that is run with the Boot JDK.
26282   # Not all JVM:s accept the same arguments on the command line.
26283   #
26284 
26285 # Check whether --with-boot-jdk-jvmargs was given.
26286 if test "${with_boot_jdk_jvmargs+set}" = set; then :
26287   withval=$with_boot_jdk_jvmargs;
26288 fi
26289 
26290 
26291   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
26292 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
26293 
26294   # Disable special log output when a debug build is used as Boot JDK...
26295 
26296   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
26297   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
26298   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
26299   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26300   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26301   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26302     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
26303     JVM_ARG_OK=true
26304   else
26305     $ECHO "Arg failed:" >&5
26306     $ECHO "$OUTPUT" >&5
26307     JVM_ARG_OK=false
26308   fi
26309 
26310 
26311   # Apply user provided options.
26312 
26313   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
26314   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
26315   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
26316   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26317   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26318   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26319     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
26320     JVM_ARG_OK=true
26321   else
26322     $ECHO "Arg failed:" >&5
26323     $ECHO "$OUTPUT" >&5
26324     JVM_ARG_OK=false
26325   fi
26326 
26327 
26328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
26329 $as_echo "$boot_jdk_jvmargs" >&6; }
26330 
26331   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
26332   JAVA_FLAGS=$boot_jdk_jvmargs
26333 
26334 
26335 
26336   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
26337 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
26338 
26339   # Starting amount of heap memory.
26340 
26341   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
26342   $ECHO "Command: $JAVA -Xms64M -version" >&5
26343   OUTPUT=`$JAVA -Xms64M -version 2>&1`
26344   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26345   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26346   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26347     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
26348     JVM_ARG_OK=true
26349   else
26350     $ECHO "Arg failed:" >&5
26351     $ECHO "$OUTPUT" >&5
26352     JVM_ARG_OK=false
26353   fi
26354 
26355 
26356   # Maximum amount of heap memory.
26357   # Maximum stack size.
26358   if test "x$BUILD_NUM_BITS" = x32; then
26359     JVM_MAX_HEAP=1100M
26360     STACK_SIZE=768
26361   else
26362     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
26363     # pointers are used. Apparently, we need to increase the heap and stack
26364     # space for the jvm. More specifically, when running javac to build huge
26365     # jdk batch
26366     JVM_MAX_HEAP=1600M
26367     STACK_SIZE=1536
26368   fi
26369 
26370   $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
26371   $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
26372   OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
26373   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26374   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26375   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26376     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
26377     JVM_ARG_OK=true
26378   else
26379     $ECHO "Arg failed:" >&5
26380     $ECHO "$OUTPUT" >&5
26381     JVM_ARG_OK=false
26382   fi
26383 
26384 
26385   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
26386   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
26387   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
26388   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26389   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26390   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26391     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
26392     JVM_ARG_OK=true
26393   else
26394     $ECHO "Arg failed:" >&5
26395     $ECHO "$OUTPUT" >&5
26396     JVM_ARG_OK=false
26397   fi
26398 
26399 
26400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
26401 $as_echo "$boot_jdk_jvmargs_big" >&6; }
26402 
26403   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
26404 
26405 
26406 
26407   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
26408 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
26409 
26410   # Use serial gc for small short lived tools if possible
26411 
26412   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
26413   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
26414   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
26415   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26416   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26417   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26418     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
26419     JVM_ARG_OK=true
26420   else
26421     $ECHO "Arg failed:" >&5
26422     $ECHO "$OUTPUT" >&5
26423     JVM_ARG_OK=false
26424   fi
26425 
26426 
26427   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
26428   $ECHO "Command: $JAVA -Xms32M -version" >&5
26429   OUTPUT=`$JAVA -Xms32M -version 2>&1`
26430   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26431   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26432   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26433     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
26434     JVM_ARG_OK=true
26435   else
26436     $ECHO "Arg failed:" >&5
26437     $ECHO "$OUTPUT" >&5
26438     JVM_ARG_OK=false
26439   fi
26440 
26441 
26442   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
26443   $ECHO "Command: $JAVA -Xmx512M -version" >&5
26444   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
26445   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26446   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26447   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26448     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
26449     JVM_ARG_OK=true
26450   else
26451     $ECHO "Arg failed:" >&5
26452     $ECHO "$OUTPUT" >&5
26453     JVM_ARG_OK=false
26454   fi
26455 
26456 
26457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
26458 $as_echo "$boot_jdk_jvmargs_small" >&6; }
26459 
26460   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
26461 
26462 
26463 
26464 ###############################################################################
26465 #
26466 # Configure the sources to use. We can add or override individual directories.
26467 #
26468 ###############################################################################
26469 
26470 
26471   # Where are the sources. Any of these can be overridden
26472   # using --with-override-corba and the likes.
26473   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26474   CORBA_TOPDIR="$SRC_ROOT/corba"
26475   JAXP_TOPDIR="$SRC_ROOT/jaxp"
26476   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26477   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26478   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26479   JDK_TOPDIR="$SRC_ROOT/jdk"
26480 
26481 
26482 
26483 
26484 
26485 
26486 
26487 
26488 
26489 
26490   ###############################################################################
26491   #
26492   # Pickup additional source for a component from outside of the source root
26493   # or override source for a component.
26494   #
26495 
26496 # Check whether --with-add-source-root was given.
26497 if test "${with_add_source_root+set}" = set; then :
26498   withval=$with_add_source_root;
26499 fi
26500 
26501 
26502 
26503 # Check whether --with-override-source-root was given.
26504 if test "${with_override_source_root+set}" = set; then :
26505   withval=$with_override_source_root;
26506 fi
26507 
26508 
26509 
26510 # Check whether --with-adds-and-overrides was given.
26511 if test "${with_adds_and_overrides+set}" = set; then :
26512   withval=$with_adds_and_overrides;
26513 fi
26514 
26515 
26516   if test "x$with_adds_and_overrides" != x; then
26517     with_add_source_root="$with_adds_and_overrides/adds"
26518     with_override_source_root="$with_adds_and_overrides/overrides"
26519   fi
26520 
26521   if test "x$with_add_source_root" != x; then
26522     if ! test -d $with_add_source_root; then
26523       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26524     fi
26525     CURDIR="$PWD"
26526     cd "$with_add_source_root"
26527     ADD_SRC_ROOT="`pwd`"
26528     cd "$CURDIR"
26529     # Verify that the addon source root does not have any root makefiles.
26530     # If it does, then it is usually an error, prevent this.
26531     if test -f $with_add_source_root/langtools/make/Makefile; then
26532       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
26533     fi
26534     if test -f $with_add_source_root/corba/make/Makefile; then
26535       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
26536     fi
26537     if test -f $with_add_source_root/jaxp/make/Makefile; then
26538       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
26539     fi
26540     if test -f $with_add_source_root/jaxws/make/Makefile; then
26541       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
26542     fi
26543     if test -f $with_add_source_root/hotspot/make/Makefile; then
26544       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
26545     fi
26546     if test -f $with_add_source_root/nashorn/make/Makefile; then
26547       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
26548     fi
26549     if test -f $with_add_source_root/jdk/make/Makefile; then
26550       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
26551     fi
26552   fi
26553 
26554 
26555   if test "x$with_override_source_root" != x; then
26556     if ! test -d $with_override_source_root; then
26557       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26558     fi
26559     CURDIR="$PWD"
26560     cd "$with_override_source_root"
26561     OVERRIDE_SRC_ROOT="`pwd`"
26562     cd "$CURDIR"
26563     if test -f $with_override_source_root/langtools/make/Makefile; then
26564       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
26565     fi
26566     if test -f $with_override_source_root/corba/make/Makefile; then
26567       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
26568     fi
26569     if test -f $with_override_source_root/jaxp/make/Makefile; then
26570       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
26571     fi
26572     if test -f $with_override_source_root/jaxws/make/Makefile; then
26573       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
26574     fi
26575     if test -f $with_override_source_root/hotspot/make/Makefile; then
26576       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
26577     fi
26578     if test -f $with_override_source_root/nashorn/make/Makefile; then
26579       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
26580     fi
26581     if test -f $with_override_source_root/jdk/make/Makefile; then
26582       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
26583     fi
26584   fi
26585 
26586 
26587   ###############################################################################
26588   #
26589   # Override a repo completely, this is used for example when you have 3 small
26590   # development sandboxes of the langtools sources and want to avoid having 3 full
26591   # OpenJDK sources checked out on disk.
26592   #
26593   # Assuming that the 3 langtools sandboxes are located here:
26594   # /home/fredrik/sandbox1/langtools
26595   # /home/fredrik/sandbox2/langtools
26596   # /home/fredrik/sandbox3/langtools
26597   #
26598   # From the source root you create build subdirs manually:
26599   #     mkdir -p build1 build2 build3
26600   # in each build directory run:
26601   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26602   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26603   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26604   #
26605 
26606 
26607 # Check whether --with-override-langtools was given.
26608 if test "${with_override_langtools+set}" = set; then :
26609   withval=$with_override_langtools;
26610 fi
26611 
26612 
26613 
26614 # Check whether --with-override-corba was given.
26615 if test "${with_override_corba+set}" = set; then :
26616   withval=$with_override_corba;
26617 fi
26618 
26619 
26620 
26621 # Check whether --with-override-jaxp was given.
26622 if test "${with_override_jaxp+set}" = set; then :
26623   withval=$with_override_jaxp;
26624 fi
26625 
26626 
26627 
26628 # Check whether --with-override-jaxws was given.
26629 if test "${with_override_jaxws+set}" = set; then :
26630   withval=$with_override_jaxws;
26631 fi
26632 
26633 
26634 
26635 # Check whether --with-override-hotspot was given.
26636 if test "${with_override_hotspot+set}" = set; then :
26637   withval=$with_override_hotspot;
26638 fi
26639 
26640 
26641 
26642 # Check whether --with-override-nashorn was given.
26643 if test "${with_override_nashorn+set}" = set; then :
26644   withval=$with_override_nashorn;
26645 fi
26646 
26647 
26648 
26649 # Check whether --with-override-jdk was given.
26650 if test "${with_override_jdk+set}" = set; then :
26651   withval=$with_override_jdk;
26652 fi
26653 
26654 
26655   if test "x$with_override_langtools" != x; then
26656     CURDIR="$PWD"
26657     cd "$with_override_langtools"
26658     LANGTOOLS_TOPDIR="`pwd`"
26659     cd "$CURDIR"
26660     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26661       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26662     fi
26663     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26664 $as_echo_n "checking if langtools should be overridden... " >&6; }
26665     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26666 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26667   fi
26668   if test "x$with_override_corba" != x; then
26669     CURDIR="$PWD"
26670     cd "$with_override_corba"
26671     CORBA_TOPDIR="`pwd`"
26672     cd "$CURDIR"
26673     if ! test -f $CORBA_TOPDIR/make/Makefile; then
26674       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26675     fi
26676     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26677 $as_echo_n "checking if corba should be overridden... " >&6; }
26678     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26679 $as_echo "yes with $CORBA_TOPDIR" >&6; }
26680   fi
26681   if test "x$with_override_jaxp" != x; then
26682     CURDIR="$PWD"
26683     cd "$with_override_jaxp"
26684     JAXP_TOPDIR="`pwd`"
26685     cd "$CURDIR"
26686     if ! test -f $JAXP_TOPDIR/make/Makefile; then
26687       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26688     fi
26689     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26690 $as_echo_n "checking if jaxp should be overridden... " >&6; }
26691     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26692 $as_echo "yes with $JAXP_TOPDIR" >&6; }
26693   fi
26694   if test "x$with_override_jaxws" != x; then
26695     CURDIR="$PWD"
26696     cd "$with_override_jaxws"
26697     JAXWS_TOPDIR="`pwd`"
26698     cd "$CURDIR"
26699     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26700       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26701     fi
26702     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26703 $as_echo_n "checking if jaxws should be overridden... " >&6; }
26704     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26705 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
26706   fi
26707   if test "x$with_override_hotspot" != x; then
26708     CURDIR="$PWD"
26709     cd "$with_override_hotspot"
26710     HOTSPOT_TOPDIR="`pwd`"
26711     cd "$CURDIR"
26712     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26713       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26714     fi
26715     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26716 $as_echo_n "checking if hotspot should be overridden... " >&6; }
26717     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26718 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26719   fi
26720   if test "x$with_override_nashorn" != x; then
26721     CURDIR="$PWD"
26722     cd "$with_override_nashorn"
26723     NASHORN_TOPDIR="`pwd`"
26724     cd "$CURDIR"
26725     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26726       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26727     fi
26728     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26729 $as_echo_n "checking if nashorn should be overridden... " >&6; }
26730     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26731 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
26732   fi
26733   if test "x$with_override_jdk" != x; then
26734     CURDIR="$PWD"
26735     cd "$with_override_jdk"
26736     JDK_TOPDIR="`pwd`"
26737     cd "$CURDIR"
26738     if ! test -f $JDK_TOPDIR/make/Makefile; then
26739       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26740     fi
26741     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26742 $as_echo_n "checking if JDK should be overridden... " >&6; }
26743     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26744 $as_echo "yes with $JDK_TOPDIR" >&6; }
26745   fi
26746 
26747 
26748   BUILD_OUTPUT="$OUTPUT_ROOT"
26749 
26750 
26751   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26752   BUILD_HOTSPOT=true
26753 
26754 
26755 
26756 # Check whether --with-import-hotspot was given.
26757 if test "${with_import_hotspot+set}" = set; then :
26758   withval=$with_import_hotspot;
26759 fi
26760 
26761   if test "x$with_import_hotspot" != x; then
26762     CURDIR="$PWD"
26763     cd "$with_import_hotspot"
26764     HOTSPOT_DIST="`pwd`"
26765     cd "$CURDIR"
26766     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26767       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26768     fi
26769     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26770 $as_echo_n "checking if hotspot should be imported... " >&6; }
26771     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26772 $as_echo "yes from $HOTSPOT_DIST" >&6; }
26773     BUILD_HOTSPOT=false
26774   fi
26775 
26776   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26777 
26778 
26779 ###############################################################################
26780 #
26781 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
26782 # native code.
26783 #
26784 ###############################################################################
26785 
26786 # First determine the toolchain type (compiler family)
26787 
26788 
26789 # Check whether --with-toolchain-type was given.
26790 if test "${with_toolchain_type+set}" = set; then :
26791   withval=$with_toolchain_type;
26792 fi
26793 
26794 
26795   # Use indirect variable referencing
26796   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26797   VALID_TOOLCHAINS=${!toolchain_var_name}
26798 
26799   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26800     if test -n "$XCODEBUILD"; then
26801       # On Mac OS X, default toolchain to clang after Xcode 5
26802       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26803       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26804       if test $? -ne 0; then
26805         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26806       fi
26807       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26808           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26809           $CUT -f 1 -d .`
26810       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26811 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26812       if test $XCODE_MAJOR_VERSION -ge 5; then
26813           DEFAULT_TOOLCHAIN="clang"
26814       else
26815           DEFAULT_TOOLCHAIN="gcc"
26816       fi
26817     else
26818       # If Xcode is not installed, but the command line tools are
26819       # then we can't run xcodebuild. On these systems we should
26820       # default to clang
26821       DEFAULT_TOOLCHAIN="clang"
26822     fi
26823   else
26824     # First toolchain type in the list is the default
26825     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26826   fi
26827 
26828   if test "x$with_toolchain_type" = xlist; then
26829     # List all toolchains
26830     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26831 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26832     for toolchain in $VALID_TOOLCHAINS; do
26833       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26834       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26835       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26836     done
26837 
26838     exit 0
26839   elif test "x$with_toolchain_type" != x; then
26840     # User override; check that it is valid
26841     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26842       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26843 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26844       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26845 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26846       as_fn_error $? "Cannot continue." "$LINENO" 5
26847     fi
26848     TOOLCHAIN_TYPE=$with_toolchain_type
26849   else
26850     # No flag given, use default
26851     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26852   fi
26853 
26854 
26855   TOOLCHAIN_CC_BINARY_clang="clang"
26856   TOOLCHAIN_CC_BINARY_gcc="gcc"
26857   TOOLCHAIN_CC_BINARY_microsoft="cl"
26858   TOOLCHAIN_CC_BINARY_solstudio="cc"
26859   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26860 
26861   TOOLCHAIN_CXX_BINARY_clang="clang++"
26862   TOOLCHAIN_CXX_BINARY_gcc="g++"
26863   TOOLCHAIN_CXX_BINARY_microsoft="cl"
26864   TOOLCHAIN_CXX_BINARY_solstudio="CC"
26865   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26866 
26867   # Use indirect variable referencing
26868   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26869   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26870   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26871   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26872   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26873   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26874 
26875 
26876   # Define filename patterns
26877   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26878     LIBRARY_PREFIX=
26879     SHARED_LIBRARY_SUFFIX='.dll'
26880     STATIC_LIBRARY_SUFFIX='.lib'
26881     SHARED_LIBRARY='$1.dll'
26882     STATIC_LIBRARY='$1.lib'
26883     OBJ_SUFFIX='.obj'
26884     EXE_SUFFIX='.exe'
26885   else
26886     LIBRARY_PREFIX=lib
26887     SHARED_LIBRARY_SUFFIX='.so'
26888     STATIC_LIBRARY_SUFFIX='.a'
26889     SHARED_LIBRARY='lib$1.so'
26890     STATIC_LIBRARY='lib$1.a'
26891     OBJ_SUFFIX='.o'
26892     EXE_SUFFIX=''
26893     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26894       SHARED_LIBRARY='lib$1.dylib'
26895       SHARED_LIBRARY_SUFFIX='.dylib'
26896     fi
26897   fi
26898 
26899 
26900 
26901 
26902 
26903 
26904 
26905 
26906 
26907 
26908   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26909     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26910 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26911   else
26912     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26913 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26914   fi
26915 
26916 
26917 # Then detect the actual binaries needed
26918 
26919   # FIXME: Is this needed?
26920   ac_ext=cpp
26921 ac_cpp='$CXXCPP $CPPFLAGS'
26922 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26923 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26924 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26925 
26926 
26927   # Store the CFLAGS etc passed to the configure script.
26928   ORG_CFLAGS="$CFLAGS"
26929   ORG_CXXFLAGS="$CXXFLAGS"
26930   ORG_OBJCFLAGS="$OBJCFLAGS"
26931 
26932   # On Windows, we need to detect the visual studio installation first.
26933   # This will change the PATH, but we need to keep that new PATH even
26934   # after toolchain detection is done, since the compiler (on x86) uses
26935   # it for DLL resolution in runtime.
26936   if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26937 
26938   # Store path to cygwin link.exe to help excluding it when searching for
26939   # VS linker. This must be done before changing the PATH when looking for VS.
26940   # Extract the first word of "link", so it can be a program name with args.
26941 set dummy link; ac_word=$2
26942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26943 $as_echo_n "checking for $ac_word... " >&6; }
26944 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26945   $as_echo_n "(cached) " >&6
26946 else
26947   case $CYGWIN_LINK in
26948   [\\/]* | ?:[\\/]*)
26949   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26950   ;;
26951   *)
26952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26953 for as_dir in $PATH
26954 do
26955   IFS=$as_save_IFS
26956   test -z "$as_dir" && as_dir=.
26957     for ac_exec_ext in '' $ac_executable_extensions; do
26958   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26959     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26961     break 2
26962   fi
26963 done
26964   done
26965 IFS=$as_save_IFS
26966 
26967   ;;
26968 esac
26969 fi
26970 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26971 if test -n "$CYGWIN_LINK"; then
26972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26973 $as_echo "$CYGWIN_LINK" >&6; }
26974 else
26975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26976 $as_echo "no" >&6; }
26977 fi
26978 
26979 
26980   if test "x$CYGWIN_LINK" != x; then
26981     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26982 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26983     "$CYGWIN_LINK" --version > /dev/null
26984     if test $? -eq 0 ; then
26985       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26986 $as_echo "yes" >&6; }
26987     else
26988       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26989 $as_echo "no" >&6; }
26990       # This might be the VS linker. Don't exclude it later on.
26991       CYGWIN_LINK=""
26992     fi
26993   fi
26994 
26995   # First-hand choice is to locate and run the vsvars bat file.
26996 
26997   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26998     VCVARSFILE="vc/bin/vcvars32.bat"
26999   else
27000     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27001   fi
27002 
27003   VS_ENV_CMD=""
27004   VS_ENV_ARGS=""
27005   if test "x$with_toolsdir" != x; then
27006 
27007   if test "x$VS_ENV_CMD" = x; then
27008     VS100BASE="$with_toolsdir/../.."
27009     METHOD="--with-tools-dir"
27010 
27011   windows_path="$VS100BASE"
27012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27013     unix_path=`$CYGPATH -u "$windows_path"`
27014     VS100BASE="$unix_path"
27015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27016     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27017     VS100BASE="$unix_path"
27018   fi
27019 
27020     if test -d "$VS100BASE"; then
27021       if test -f "$VS100BASE/$VCVARSFILE"; then
27022         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27023 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27024         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27025       else
27026         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27027 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27028         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27029 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27030       fi
27031     fi
27032   fi
27033 
27034   fi
27035 
27036   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
27037     # Having specified an argument which is incorrect will produce an instant failure;
27038     # we should not go on looking
27039     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
27040 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
27041     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
27042 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
27043     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27044   fi
27045 
27046   if test "x$VS100COMNTOOLS" != x; then
27047 
27048   if test "x$VS_ENV_CMD" = x; then
27049     VS100BASE="$VS100COMNTOOLS/../.."
27050     METHOD="VS100COMNTOOLS variable"
27051 
27052   windows_path="$VS100BASE"
27053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27054     unix_path=`$CYGPATH -u "$windows_path"`
27055     VS100BASE="$unix_path"
27056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27057     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27058     VS100BASE="$unix_path"
27059   fi
27060 
27061     if test -d "$VS100BASE"; then
27062       if test -f "$VS100BASE/$VCVARSFILE"; then
27063         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27064 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27065         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27066       else
27067         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27068 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27069         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27070 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27071       fi
27072     fi
27073   fi
27074 
27075   fi
27076   if test "x$PROGRAMFILES" != x; then
27077 
27078   if test "x$VS_ENV_CMD" = x; then
27079     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
27080     METHOD="well-known name"
27081 
27082   windows_path="$VS100BASE"
27083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27084     unix_path=`$CYGPATH -u "$windows_path"`
27085     VS100BASE="$unix_path"
27086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27087     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27088     VS100BASE="$unix_path"
27089   fi
27090 
27091     if test -d "$VS100BASE"; then
27092       if test -f "$VS100BASE/$VCVARSFILE"; then
27093         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27094 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27095         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27096       else
27097         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27098 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27099         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27100 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27101       fi
27102     fi
27103   fi
27104 
27105   fi
27106 
27107   if test "x$VS_ENV_CMD" = x; then
27108     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
27109     METHOD="well-known name"
27110 
27111   windows_path="$VS100BASE"
27112   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27113     unix_path=`$CYGPATH -u "$windows_path"`
27114     VS100BASE="$unix_path"
27115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27116     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27117     VS100BASE="$unix_path"
27118   fi
27119 
27120     if test -d "$VS100BASE"; then
27121       if test -f "$VS100BASE/$VCVARSFILE"; then
27122         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27123 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27124         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27125       else
27126         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27127 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27128         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27129 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27130       fi
27131     fi
27132   fi
27133 
27134 
27135   if test "x$VS_ENV_CMD" = x; then
27136     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
27137     METHOD="well-known name"
27138 
27139   windows_path="$VS100BASE"
27140   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27141     unix_path=`$CYGPATH -u "$windows_path"`
27142     VS100BASE="$unix_path"
27143   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27144     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27145     VS100BASE="$unix_path"
27146   fi
27147 
27148     if test -d "$VS100BASE"; then
27149       if test -f "$VS100BASE/$VCVARSFILE"; then
27150         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27151 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27152         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27153       else
27154         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27155 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27156         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27157 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27158       fi
27159     fi
27160   fi
27161 
27162 
27163   if test "x$ProgramW6432" != x; then
27164 
27165   if test "x$VS_ENV_CMD" = x; then
27166     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
27167     METHOD="well-known name"
27168 
27169   windows_path="$WIN_SDK_BASE"
27170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27171     unix_path=`$CYGPATH -u "$windows_path"`
27172     WIN_SDK_BASE="$unix_path"
27173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27174     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27175     WIN_SDK_BASE="$unix_path"
27176   fi
27177 
27178     if test -d "$WIN_SDK_BASE"; then
27179       # There have been cases of partial or broken SDK installations. A missing
27180       # lib dir is not going to work.
27181       if test ! -d "$WIN_SDK_BASE/../lib"; then
27182         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27183 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27184         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27185 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27186       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27187         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27188 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27189         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27190         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27191           VS_ENV_ARGS="/x86"
27192         else
27193           VS_ENV_ARGS="/x64"
27194         fi
27195       else
27196         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27197 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27198         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27199 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27200       fi
27201     fi
27202   fi
27203 
27204   fi
27205   if test "x$PROGRAMW6432" != x; then
27206 
27207   if test "x$VS_ENV_CMD" = x; then
27208     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
27209     METHOD="well-known name"
27210 
27211   windows_path="$WIN_SDK_BASE"
27212   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27213     unix_path=`$CYGPATH -u "$windows_path"`
27214     WIN_SDK_BASE="$unix_path"
27215   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27216     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27217     WIN_SDK_BASE="$unix_path"
27218   fi
27219 
27220     if test -d "$WIN_SDK_BASE"; then
27221       # There have been cases of partial or broken SDK installations. A missing
27222       # lib dir is not going to work.
27223       if test ! -d "$WIN_SDK_BASE/../lib"; then
27224         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27225 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27226         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27227 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27228       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27229         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27230 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27231         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27232         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27233           VS_ENV_ARGS="/x86"
27234         else
27235           VS_ENV_ARGS="/x64"
27236         fi
27237       else
27238         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27239 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27240         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27241 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27242       fi
27243     fi
27244   fi
27245 
27246   fi
27247   if test "x$PROGRAMFILES" != x; then
27248 
27249   if test "x$VS_ENV_CMD" = x; then
27250     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
27251     METHOD="well-known name"
27252 
27253   windows_path="$WIN_SDK_BASE"
27254   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27255     unix_path=`$CYGPATH -u "$windows_path"`
27256     WIN_SDK_BASE="$unix_path"
27257   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27258     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27259     WIN_SDK_BASE="$unix_path"
27260   fi
27261 
27262     if test -d "$WIN_SDK_BASE"; then
27263       # There have been cases of partial or broken SDK installations. A missing
27264       # lib dir is not going to work.
27265       if test ! -d "$WIN_SDK_BASE/../lib"; then
27266         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27267 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27268         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27269 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27270       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27271         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27272 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27273         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27274         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27275           VS_ENV_ARGS="/x86"
27276         else
27277           VS_ENV_ARGS="/x64"
27278         fi
27279       else
27280         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27281 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27282         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27283 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27284       fi
27285     fi
27286   fi
27287 
27288   fi
27289 
27290   if test "x$VS_ENV_CMD" = x; then
27291     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27292     METHOD="well-known name"
27293 
27294   windows_path="$WIN_SDK_BASE"
27295   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27296     unix_path=`$CYGPATH -u "$windows_path"`
27297     WIN_SDK_BASE="$unix_path"
27298   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27299     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27300     WIN_SDK_BASE="$unix_path"
27301   fi
27302 
27303     if test -d "$WIN_SDK_BASE"; then
27304       # There have been cases of partial or broken SDK installations. A missing
27305       # lib dir is not going to work.
27306       if test ! -d "$WIN_SDK_BASE/../lib"; then
27307         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27308 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27309         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27310 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27311       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27312         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27313 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27314         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27315         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27316           VS_ENV_ARGS="/x86"
27317         else
27318           VS_ENV_ARGS="/x64"
27319         fi
27320       else
27321         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27322 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27323         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27324 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27325       fi
27326     fi
27327   fi
27328 
27329 
27330   if test "x$VS_ENV_CMD" = x; then
27331     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27332     METHOD="well-known name"
27333 
27334   windows_path="$WIN_SDK_BASE"
27335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27336     unix_path=`$CYGPATH -u "$windows_path"`
27337     WIN_SDK_BASE="$unix_path"
27338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27339     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27340     WIN_SDK_BASE="$unix_path"
27341   fi
27342 
27343     if test -d "$WIN_SDK_BASE"; then
27344       # There have been cases of partial or broken SDK installations. A missing
27345       # lib dir is not going to work.
27346       if test ! -d "$WIN_SDK_BASE/../lib"; then
27347         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27348 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27349         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27350 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27351       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27352         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27353 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27354         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27355         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27356           VS_ENV_ARGS="/x86"
27357         else
27358           VS_ENV_ARGS="/x64"
27359         fi
27360       else
27361         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27362 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27363         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27364 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27365       fi
27366     fi
27367   fi
27368 
27369 
27370   if test "x$VS_ENV_CMD" != x; then
27371     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27372 
27373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27374 
27375   # First separate the path from the arguments. This will split at the first
27376   # space.
27377   complete="$VS_ENV_CMD"
27378   path="${complete%% *}"
27379   tmp="$complete EOL"
27380   arguments="${tmp#* }"
27381 
27382   # Input might be given as Windows format, start by converting to
27383   # unix format.
27384   new_path=`$CYGPATH -u "$path"`
27385 
27386   # Now try to locate executable using which
27387   new_path=`$WHICH "$new_path" 2> /dev/null`
27388   # bat and cmd files are not always considered executable in cygwin causing which
27389   # to not find them
27390   if test "x$new_path" = x \
27391       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27392       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27393     new_path=`$CYGPATH -u "$path"`
27394   fi
27395   if test "x$new_path" = x; then
27396     # Oops. Which didn't find the executable.
27397     # The splitting of arguments from the executable at a space might have been incorrect,
27398     # since paths with space are more likely in Windows. Give it another try with the whole
27399     # argument.
27400     path="$complete"
27401     arguments="EOL"
27402     new_path=`$CYGPATH -u "$path"`
27403     new_path=`$WHICH "$new_path" 2> /dev/null`
27404     # bat and cmd files are not always considered executable in cygwin causing which
27405     # to not find them
27406     if test "x$new_path" = x \
27407         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27408         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27409       new_path=`$CYGPATH -u "$path"`
27410     fi
27411     if test "x$new_path" = x; then
27412       # It's still not found. Now this is an unrecoverable error.
27413       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27414 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27415       has_space=`$ECHO "$complete" | $GREP " "`
27416       if test "x$has_space" != x; then
27417         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27418 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27419       fi
27420       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27421     fi
27422   fi
27423 
27424   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27425   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27426   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27427   # "foo.exe" is OK but "foo" is an error.
27428   #
27429   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27430   # It is also a way to make sure we got the proper file name for the real test later on.
27431   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27432   if test "x$test_shortpath" = x; then
27433     # Short path failed, file does not exist as specified.
27434     # Try adding .exe or .cmd
27435     if test -f "${new_path}.exe"; then
27436       input_to_shortpath="${new_path}.exe"
27437     elif test -f "${new_path}.cmd"; then
27438       input_to_shortpath="${new_path}.cmd"
27439     else
27440       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27441 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27442       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27443 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27444       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27445     fi
27446   else
27447     input_to_shortpath="$new_path"
27448   fi
27449 
27450   # Call helper function which possibly converts this using DOS-style short mode.
27451   # If so, the updated path is stored in $new_path.
27452   new_path="$input_to_shortpath"
27453 
27454   input_path="$input_to_shortpath"
27455   # Check if we need to convert this using DOS-style short mode. If the path
27456   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27457   # take no chances and rewrite it.
27458   # Note: m4 eats our [], so we need to use [ and ] instead.
27459   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27460   if test "x$has_forbidden_chars" != x; then
27461     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27462     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27463     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27464     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27465       # Going to short mode and back again did indeed matter. Since short mode is
27466       # case insensitive, let's make it lowercase to improve readability.
27467       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27468       # Now convert it back to Unix-stile (cygpath)
27469       input_path=`$CYGPATH -u "$shortmode_path"`
27470       new_path="$input_path"
27471     fi
27472   fi
27473 
27474   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27475   if test "x$test_cygdrive_prefix" = x; then
27476     # As a simple fix, exclude /usr/bin since it's not a real path.
27477     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27478       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27479       # a path prefixed by /cygdrive for fixpath to work.
27480       new_path="$CYGWIN_ROOT_PATH$input_path"
27481     fi
27482   fi
27483 
27484   # remove trailing .exe if any
27485   new_path="${new_path/%.exe/}"
27486 
27487   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27488 
27489   # First separate the path from the arguments. This will split at the first
27490   # space.
27491   complete="$VS_ENV_CMD"
27492   path="${complete%% *}"
27493   tmp="$complete EOL"
27494   arguments="${tmp#* }"
27495 
27496   # Input might be given as Windows format, start by converting to
27497   # unix format.
27498   new_path="$path"
27499 
27500   windows_path="$new_path"
27501   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27502     unix_path=`$CYGPATH -u "$windows_path"`
27503     new_path="$unix_path"
27504   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27505     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27506     new_path="$unix_path"
27507   fi
27508 
27509 
27510   # Now try to locate executable using which
27511   new_path=`$WHICH "$new_path" 2> /dev/null`
27512 
27513   if test "x$new_path" = x; then
27514     # Oops. Which didn't find the executable.
27515     # The splitting of arguments from the executable at a space might have been incorrect,
27516     # since paths with space are more likely in Windows. Give it another try with the whole
27517     # argument.
27518     path="$complete"
27519     arguments="EOL"
27520     new_path="$path"
27521 
27522   windows_path="$new_path"
27523   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27524     unix_path=`$CYGPATH -u "$windows_path"`
27525     new_path="$unix_path"
27526   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27527     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27528     new_path="$unix_path"
27529   fi
27530 
27531 
27532     new_path=`$WHICH "$new_path" 2> /dev/null`
27533     # bat and cmd files are not always considered executable in MSYS causing which
27534     # to not find them
27535     if test "x$new_path" = x \
27536         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27537         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27538       new_path="$path"
27539 
27540   windows_path="$new_path"
27541   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27542     unix_path=`$CYGPATH -u "$windows_path"`
27543     new_path="$unix_path"
27544   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27545     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27546     new_path="$unix_path"
27547   fi
27548 
27549     fi
27550 
27551     if test "x$new_path" = x; then
27552       # It's still not found. Now this is an unrecoverable error.
27553       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27554 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27555       has_space=`$ECHO "$complete" | $GREP " "`
27556       if test "x$has_space" != x; then
27557         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27558 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27559       fi
27560       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27561     fi
27562   fi
27563 
27564   # Now new_path has a complete unix path to the binary
27565   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27566     # Keep paths in /bin as-is, but remove trailing .exe if any
27567     new_path="${new_path/%.exe/}"
27568     # Do not save /bin paths to all_fixpath_prefixes!
27569   else
27570     # Not in mixed or Windows style, start by that.
27571     new_path=`cmd //c echo $new_path`
27572 
27573   input_path="$new_path"
27574   # Check if we need to convert this using DOS-style short mode. If the path
27575   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27576   # take no chances and rewrite it.
27577   # Note: m4 eats our [], so we need to use [ and ] instead.
27578   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27579   if test "x$has_forbidden_chars" != x; then
27580     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27581     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27582   fi
27583 
27584     # Output is in $new_path
27585 
27586   windows_path="$new_path"
27587   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27588     unix_path=`$CYGPATH -u "$windows_path"`
27589     new_path="$unix_path"
27590   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27591     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27592     new_path="$unix_path"
27593   fi
27594 
27595     # remove trailing .exe if any
27596     new_path="${new_path/%.exe/}"
27597 
27598     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27599     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27600   fi
27601 
27602   else
27603     # We're on a posix platform. Hooray! :)
27604     # First separate the path from the arguments. This will split at the first
27605     # space.
27606     complete="$VS_ENV_CMD"
27607     path="${complete%% *}"
27608     tmp="$complete EOL"
27609     arguments="${tmp#* }"
27610 
27611     # Cannot rely on the command "which" here since it doesn't always work.
27612     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27613     if test -z "$is_absolute_path"; then
27614       # Path to executable is not absolute. Find it.
27615       IFS_save="$IFS"
27616       IFS=:
27617       for p in $PATH; do
27618         if test -f "$p/$path" && test -x "$p/$path"; then
27619           new_path="$p/$path"
27620           break
27621         fi
27622       done
27623       IFS="$IFS_save"
27624     else
27625       # This is an absolute path, we can use it without further modifications.
27626       new_path="$path"
27627     fi
27628 
27629     if test "x$new_path" = x; then
27630       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27631 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27632       has_space=`$ECHO "$complete" | $GREP " "`
27633       if test "x$has_space" != x; then
27634         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27635 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27636       fi
27637       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27638     fi
27639   fi
27640 
27641   # Now join together the path and the arguments once again
27642   if test "x$arguments" != xEOL; then
27643     new_complete="$new_path ${arguments% *}"
27644   else
27645     new_complete="$new_path"
27646   fi
27647 
27648   if test "x$complete" != "x$new_complete"; then
27649     VS_ENV_CMD="$new_complete"
27650     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27651 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27652   fi
27653 
27654 
27655     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27656     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27657 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27658 
27659     # We need to create a couple of temporary files.
27660     VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27661     $MKDIR -p $VS_ENV_TMP_DIR
27662 
27663     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27664     # Instead create a shell script which will set the relevant variables when run.
27665     WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27666 
27667   unix_path="$WINPATH_VS_ENV_CMD"
27668   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27669     windows_path=`$CYGPATH -m "$unix_path"`
27670     WINPATH_VS_ENV_CMD="$windows_path"
27671   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27672     windows_path=`cmd //c echo $unix_path`
27673     WINPATH_VS_ENV_CMD="$windows_path"
27674   fi
27675 
27676     WINPATH_BASH="$BASH"
27677 
27678   unix_path="$WINPATH_BASH"
27679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27680     windows_path=`$CYGPATH -m "$unix_path"`
27681     WINPATH_BASH="$windows_path"
27682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27683     windows_path=`cmd //c echo $unix_path`
27684     WINPATH_BASH="$windows_path"
27685   fi
27686 
27687 
27688     # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27689     # script (executable by bash) that will setup the important variables.
27690     EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27691     $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27692     # This will end up something like:
27693     # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27694     $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27695     # These will end up something like:
27696     # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27697     # The trailing space for everyone except PATH is no typo, but is needed due
27698     # to trailing \ in the Windows paths. These will be stripped later.
27699     $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27700     $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27701     $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27702     $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27703     $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27704     $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27705 
27706     # Now execute the newly created bat file.
27707     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27708     # Change directory so we don't need to mess with Windows paths in redirects.
27709     cd $VS_ENV_TMP_DIR
27710     cmd /c extract-vs-env.bat | $CAT
27711     cd $CURDIR
27712 
27713     if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27714       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27715 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27716       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27717 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27718       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27719 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27720       as_fn_error $? "Cannot continue" "$LINENO" 5
27721     fi
27722 
27723     # Now set all paths and other env variables. This will allow the rest of
27724     # the configure script to find and run the compiler in the proper way.
27725     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27726 $as_echo "$as_me: Setting extracted environment variables" >&6;}
27727     . $VS_ENV_TMP_DIR/set-vs-env.sh
27728     # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27729     # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27730   else
27731     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27732     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27733 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27734   fi
27735 
27736   # At this point, we should have correct variables in the environment, or we can't continue.
27737   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27738 $as_echo_n "checking for Visual Studio variables... " >&6; }
27739 
27740   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27741     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27742       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27743 $as_echo "present but broken" >&6; }
27744       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27745     else
27746       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27747 $as_echo "ok" >&6; }
27748       # Remove any trailing "\" and " " from the variables.
27749       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27750       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27751       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27752       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27753       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27754       # Remove any paths containing # (typically F#) as that messes up make. This
27755       # is needed if visual studio was installed with F# support.
27756       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27757 
27758 
27759 
27760 
27761     fi
27762   else
27763     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27764 $as_echo "not found" >&6; }
27765 
27766     if test "x$VS_ENV_CMD" = x; then
27767       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27768 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27769       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27770 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27771     else
27772       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27773 $as_echo "$as_me: Running the extraction script failed." >&6;}
27774     fi
27775     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27776 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27777     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27778 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27779     as_fn_error $? "Cannot continue" "$LINENO" 5
27780   fi
27781 
27782     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27783     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27784     PATH="$VS_PATH"
27785     # The microsoft toolchain also requires INCLUDE and LIB to be set.
27786     export INCLUDE="$VS_INCLUDE"
27787     export LIB="$VS_LIB"
27788   fi
27789 
27790   # autoconf magic only relies on PATH, so update it if tools dir is specified
27791   OLD_PATH="$PATH"
27792 
27793   # For solaris we really need solaris tools, and not the GNU equivalent.
27794   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27795   # so add that to path before starting to probe.
27796   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27797   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27798     PATH="/usr/ccs/bin:$PATH"
27799   fi
27800 
27801   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27802   # override all other locations.
27803   if test "x$TOOLCHAIN_PATH" != x; then
27804     PATH=$TOOLCHAIN_PATH:$PATH
27805   fi
27806 
27807 
27808   #
27809   # Setup the compilers (CC and CXX)
27810   #
27811 
27812   COMPILER_NAME=C
27813   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27814 
27815   if test "x$CC" != x; then
27816     # User has supplied compiler name already, always let that override.
27817     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27818 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27819     if test "x`basename $CC`" = "x$CC"; then
27820       # A command without a complete path is provided, search $PATH.
27821 
27822       for ac_prog in $CC
27823 do
27824   # Extract the first word of "$ac_prog", so it can be a program name with args.
27825 set dummy $ac_prog; ac_word=$2
27826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27827 $as_echo_n "checking for $ac_word... " >&6; }
27828 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27829   $as_echo_n "(cached) " >&6
27830 else
27831   case $POTENTIAL_CC in
27832   [\\/]* | ?:[\\/]*)
27833   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27834   ;;
27835   *)
27836   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27837 for as_dir in $PATH
27838 do
27839   IFS=$as_save_IFS
27840   test -z "$as_dir" && as_dir=.
27841     for ac_exec_ext in '' $ac_executable_extensions; do
27842   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27843     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27844     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27845     break 2
27846   fi
27847 done
27848   done
27849 IFS=$as_save_IFS
27850 
27851   ;;
27852 esac
27853 fi
27854 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27855 if test -n "$POTENTIAL_CC"; then
27856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27857 $as_echo "$POTENTIAL_CC" >&6; }
27858 else
27859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27860 $as_echo "no" >&6; }
27861 fi
27862 
27863 
27864   test -n "$POTENTIAL_CC" && break
27865 done
27866 
27867       if test "x$POTENTIAL_CC" != x; then
27868         CC=$POTENTIAL_CC
27869       else
27870         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27871       fi
27872     else
27873       # Otherwise it might already be a complete path
27874       if test ! -x "$CC"; then
27875         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27876       fi
27877     fi
27878   else
27879     # No user supplied value. Locate compiler ourselves.
27880 
27881     # If we are cross compiling, assume cross compilation tools follows the
27882     # cross compilation standard where they are prefixed with the autoconf
27883     # standard name for the target. For example the binary
27884     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27885     # If we are not cross compiling, then the default compiler name will be
27886     # used.
27887 
27888     CC=
27889     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27890     # before checking the rest of the PATH.
27891     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27892     # step, this should not be necessary.
27893     if test -n "$TOOLCHAIN_PATH"; then
27894       PATH_save="$PATH"
27895       PATH="$TOOLCHAIN_PATH"
27896       for ac_prog in $SEARCH_LIST
27897 do
27898   # Extract the first word of "$ac_prog", so it can be a program name with args.
27899 set dummy $ac_prog; ac_word=$2
27900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27901 $as_echo_n "checking for $ac_word... " >&6; }
27902 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27903   $as_echo_n "(cached) " >&6
27904 else
27905   case $TOOLCHAIN_PATH_CC in
27906   [\\/]* | ?:[\\/]*)
27907   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27908   ;;
27909   *)
27910   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27911 for as_dir in $PATH
27912 do
27913   IFS=$as_save_IFS
27914   test -z "$as_dir" && as_dir=.
27915     for ac_exec_ext in '' $ac_executable_extensions; do
27916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27917     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27919     break 2
27920   fi
27921 done
27922   done
27923 IFS=$as_save_IFS
27924 
27925   ;;
27926 esac
27927 fi
27928 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27929 if test -n "$TOOLCHAIN_PATH_CC"; then
27930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27931 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27932 else
27933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27934 $as_echo "no" >&6; }
27935 fi
27936 
27937 
27938   test -n "$TOOLCHAIN_PATH_CC" && break
27939 done
27940 
27941       CC=$TOOLCHAIN_PATH_CC
27942       PATH="$PATH_save"
27943     fi
27944 
27945     # AC_PATH_PROGS can't be run multiple times with the same variable,
27946     # so create a new name for this run.
27947     if test "x$CC" = x; then
27948       for ac_prog in $SEARCH_LIST
27949 do
27950   # Extract the first word of "$ac_prog", so it can be a program name with args.
27951 set dummy $ac_prog; ac_word=$2
27952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27953 $as_echo_n "checking for $ac_word... " >&6; }
27954 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27955   $as_echo_n "(cached) " >&6
27956 else
27957   case $POTENTIAL_CC in
27958   [\\/]* | ?:[\\/]*)
27959   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27960   ;;
27961   *)
27962   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27963 for as_dir in $PATH
27964 do
27965   IFS=$as_save_IFS
27966   test -z "$as_dir" && as_dir=.
27967     for ac_exec_ext in '' $ac_executable_extensions; do
27968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27969     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27971     break 2
27972   fi
27973 done
27974   done
27975 IFS=$as_save_IFS
27976 
27977   ;;
27978 esac
27979 fi
27980 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27981 if test -n "$POTENTIAL_CC"; then
27982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27983 $as_echo "$POTENTIAL_CC" >&6; }
27984 else
27985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27986 $as_echo "no" >&6; }
27987 fi
27988 
27989 
27990   test -n "$POTENTIAL_CC" && break
27991 done
27992 
27993       CC=$POTENTIAL_CC
27994     fi
27995 
27996     if test "x$CC" = x; then
27997 
27998   # Print a helpful message on how to acquire the necessary build dependency.
27999   # devkit is the help tag: freetype, cups, pulse, alsa etc
28000   MISSING_DEPENDENCY=devkit
28001 
28002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28003     cygwin_help $MISSING_DEPENDENCY
28004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28005     msys_help $MISSING_DEPENDENCY
28006   else
28007     PKGHANDLER_COMMAND=
28008 
28009     case $PKGHANDLER in
28010       apt-get)
28011         apt_help     $MISSING_DEPENDENCY ;;
28012       yum)
28013         yum_help     $MISSING_DEPENDENCY ;;
28014       port)
28015         port_help    $MISSING_DEPENDENCY ;;
28016       pkgutil)
28017         pkgutil_help $MISSING_DEPENDENCY ;;
28018       pkgadd)
28019         pkgadd_help  $MISSING_DEPENDENCY ;;
28020     esac
28021 
28022     if test "x$PKGHANDLER_COMMAND" != x; then
28023       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28024     fi
28025   fi
28026 
28027       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28028     fi
28029   fi
28030 
28031   # Now we have a compiler binary in CC. Make sure it's okay.
28032 
28033   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28034 
28035   # First separate the path from the arguments. This will split at the first
28036   # space.
28037   complete="$CC"
28038   path="${complete%% *}"
28039   tmp="$complete EOL"
28040   arguments="${tmp#* }"
28041 
28042   # Input might be given as Windows format, start by converting to
28043   # unix format.
28044   new_path=`$CYGPATH -u "$path"`
28045 
28046   # Now try to locate executable using which
28047   new_path=`$WHICH "$new_path" 2> /dev/null`
28048   # bat and cmd files are not always considered executable in cygwin causing which
28049   # to not find them
28050   if test "x$new_path" = x \
28051       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28052       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28053     new_path=`$CYGPATH -u "$path"`
28054   fi
28055   if test "x$new_path" = x; then
28056     # Oops. Which didn't find the executable.
28057     # The splitting of arguments from the executable at a space might have been incorrect,
28058     # since paths with space are more likely in Windows. Give it another try with the whole
28059     # argument.
28060     path="$complete"
28061     arguments="EOL"
28062     new_path=`$CYGPATH -u "$path"`
28063     new_path=`$WHICH "$new_path" 2> /dev/null`
28064     # bat and cmd files are not always considered executable in cygwin causing which
28065     # to not find them
28066     if test "x$new_path" = x \
28067         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28068         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28069       new_path=`$CYGPATH -u "$path"`
28070     fi
28071     if test "x$new_path" = x; then
28072       # It's still not found. Now this is an unrecoverable error.
28073       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28074 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28075       has_space=`$ECHO "$complete" | $GREP " "`
28076       if test "x$has_space" != x; then
28077         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28078 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28079       fi
28080       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28081     fi
28082   fi
28083 
28084   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28085   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28086   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28087   # "foo.exe" is OK but "foo" is an error.
28088   #
28089   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28090   # It is also a way to make sure we got the proper file name for the real test later on.
28091   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28092   if test "x$test_shortpath" = x; then
28093     # Short path failed, file does not exist as specified.
28094     # Try adding .exe or .cmd
28095     if test -f "${new_path}.exe"; then
28096       input_to_shortpath="${new_path}.exe"
28097     elif test -f "${new_path}.cmd"; then
28098       input_to_shortpath="${new_path}.cmd"
28099     else
28100       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28101 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28102       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28103 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28104       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28105     fi
28106   else
28107     input_to_shortpath="$new_path"
28108   fi
28109 
28110   # Call helper function which possibly converts this using DOS-style short mode.
28111   # If so, the updated path is stored in $new_path.
28112   new_path="$input_to_shortpath"
28113 
28114   input_path="$input_to_shortpath"
28115   # Check if we need to convert this using DOS-style short mode. If the path
28116   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28117   # take no chances and rewrite it.
28118   # Note: m4 eats our [], so we need to use [ and ] instead.
28119   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28120   if test "x$has_forbidden_chars" != x; then
28121     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28122     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28123     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28124     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28125       # Going to short mode and back again did indeed matter. Since short mode is
28126       # case insensitive, let's make it lowercase to improve readability.
28127       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28128       # Now convert it back to Unix-stile (cygpath)
28129       input_path=`$CYGPATH -u "$shortmode_path"`
28130       new_path="$input_path"
28131     fi
28132   fi
28133 
28134   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28135   if test "x$test_cygdrive_prefix" = x; then
28136     # As a simple fix, exclude /usr/bin since it's not a real path.
28137     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28138       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28139       # a path prefixed by /cygdrive for fixpath to work.
28140       new_path="$CYGWIN_ROOT_PATH$input_path"
28141     fi
28142   fi
28143 
28144   # remove trailing .exe if any
28145   new_path="${new_path/%.exe/}"
28146 
28147   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28148 
28149   # First separate the path from the arguments. This will split at the first
28150   # space.
28151   complete="$CC"
28152   path="${complete%% *}"
28153   tmp="$complete EOL"
28154   arguments="${tmp#* }"
28155 
28156   # Input might be given as Windows format, start by converting to
28157   # unix format.
28158   new_path="$path"
28159 
28160   windows_path="$new_path"
28161   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28162     unix_path=`$CYGPATH -u "$windows_path"`
28163     new_path="$unix_path"
28164   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28165     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28166     new_path="$unix_path"
28167   fi
28168 
28169 
28170   # Now try to locate executable using which
28171   new_path=`$WHICH "$new_path" 2> /dev/null`
28172 
28173   if test "x$new_path" = x; then
28174     # Oops. Which didn't find the executable.
28175     # The splitting of arguments from the executable at a space might have been incorrect,
28176     # since paths with space are more likely in Windows. Give it another try with the whole
28177     # argument.
28178     path="$complete"
28179     arguments="EOL"
28180     new_path="$path"
28181 
28182   windows_path="$new_path"
28183   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28184     unix_path=`$CYGPATH -u "$windows_path"`
28185     new_path="$unix_path"
28186   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28187     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28188     new_path="$unix_path"
28189   fi
28190 
28191 
28192     new_path=`$WHICH "$new_path" 2> /dev/null`
28193     # bat and cmd files are not always considered executable in MSYS causing which
28194     # to not find them
28195     if test "x$new_path" = x \
28196         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28197         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28198       new_path="$path"
28199 
28200   windows_path="$new_path"
28201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28202     unix_path=`$CYGPATH -u "$windows_path"`
28203     new_path="$unix_path"
28204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28206     new_path="$unix_path"
28207   fi
28208 
28209     fi
28210 
28211     if test "x$new_path" = x; then
28212       # It's still not found. Now this is an unrecoverable error.
28213       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28214 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28215       has_space=`$ECHO "$complete" | $GREP " "`
28216       if test "x$has_space" != x; then
28217         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28218 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28219       fi
28220       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28221     fi
28222   fi
28223 
28224   # Now new_path has a complete unix path to the binary
28225   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28226     # Keep paths in /bin as-is, but remove trailing .exe if any
28227     new_path="${new_path/%.exe/}"
28228     # Do not save /bin paths to all_fixpath_prefixes!
28229   else
28230     # Not in mixed or Windows style, start by that.
28231     new_path=`cmd //c echo $new_path`
28232 
28233   input_path="$new_path"
28234   # Check if we need to convert this using DOS-style short mode. If the path
28235   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28236   # take no chances and rewrite it.
28237   # Note: m4 eats our [], so we need to use [ and ] instead.
28238   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28239   if test "x$has_forbidden_chars" != x; then
28240     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28241     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28242   fi
28243 
28244     # Output is in $new_path
28245 
28246   windows_path="$new_path"
28247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28248     unix_path=`$CYGPATH -u "$windows_path"`
28249     new_path="$unix_path"
28250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28251     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28252     new_path="$unix_path"
28253   fi
28254 
28255     # remove trailing .exe if any
28256     new_path="${new_path/%.exe/}"
28257 
28258     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28259     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28260   fi
28261 
28262   else
28263     # We're on a posix platform. Hooray! :)
28264     # First separate the path from the arguments. This will split at the first
28265     # space.
28266     complete="$CC"
28267     path="${complete%% *}"
28268     tmp="$complete EOL"
28269     arguments="${tmp#* }"
28270 
28271     # Cannot rely on the command "which" here since it doesn't always work.
28272     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28273     if test -z "$is_absolute_path"; then
28274       # Path to executable is not absolute. Find it.
28275       IFS_save="$IFS"
28276       IFS=:
28277       for p in $PATH; do
28278         if test -f "$p/$path" && test -x "$p/$path"; then
28279           new_path="$p/$path"
28280           break
28281         fi
28282       done
28283       IFS="$IFS_save"
28284     else
28285       # This is an absolute path, we can use it without further modifications.
28286       new_path="$path"
28287     fi
28288 
28289     if test "x$new_path" = x; then
28290       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28291 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28292       has_space=`$ECHO "$complete" | $GREP " "`
28293       if test "x$has_space" != x; then
28294         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28295 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28296       fi
28297       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28298     fi
28299   fi
28300 
28301   # Now join together the path and the arguments once again
28302   if test "x$arguments" != xEOL; then
28303     new_complete="$new_path ${arguments% *}"
28304   else
28305     new_complete="$new_path"
28306   fi
28307 
28308   if test "x$complete" != "x$new_complete"; then
28309     CC="$new_complete"
28310     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28311 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28312   fi
28313 
28314   TEST_COMPILER="$CC"
28315   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28316   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28317   if test "x$OPENJDK_BUILD_OS" != xaix; then
28318     # FIXME: This test should not be needed anymore; we don't do that for any platform.
28319     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28320 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
28321 
28322   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28323     # Follow a chain of symbolic links. Use readlink
28324     # where it exists, else fall back to horribly
28325     # complicated shell code.
28326     if test "x$READLINK_TESTED" != yes; then
28327       # On MacOSX there is a readlink tool with a different
28328       # purpose than the GNU readlink tool. Check the found readlink.
28329       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28330       if test "x$ISGNU" = x; then
28331         # A readlink that we do not know how to use.
28332         # Are there other non-GNU readlinks out there?
28333         READLINK_TESTED=yes
28334         READLINK=
28335       fi
28336     fi
28337 
28338     if test "x$READLINK" != x; then
28339       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28340     else
28341       # Save the current directory for restoring afterwards
28342       STARTDIR=$PWD
28343       COUNTER=0
28344       sym_link_dir=`$DIRNAME $TEST_COMPILER`
28345       sym_link_file=`$BASENAME $TEST_COMPILER`
28346       cd $sym_link_dir
28347       # Use -P flag to resolve symlinks in directories.
28348       cd `$THEPWDCMD -P`
28349       sym_link_dir=`$THEPWDCMD -P`
28350       # Resolve file symlinks
28351       while test $COUNTER -lt 20; do
28352         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28353         if test "x$ISLINK" == x; then
28354           # This is not a symbolic link! We are done!
28355           break
28356         fi
28357         # Again resolve directory symlinks since the target of the just found
28358         # link could be in a different directory
28359         cd `$DIRNAME $ISLINK`
28360         sym_link_dir=`$THEPWDCMD -P`
28361         sym_link_file=`$BASENAME $ISLINK`
28362         let COUNTER=COUNTER+1
28363       done
28364       cd $STARTDIR
28365       TEST_COMPILER=$sym_link_dir/$sym_link_file
28366     fi
28367   fi
28368 
28369     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28370 $as_echo "$TEST_COMPILER" >&6; }
28371   fi
28372   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28373 $as_echo_n "checking if CC is disguised ccache... " >&6; }
28374 
28375   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28376   if test "x$COMPILER_BASENAME" = "xccache"; then
28377     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28378 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28379     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28380     # We want to control ccache invocation ourselves, so ignore this cc and try
28381     # searching again.
28382 
28383     # Remove the path to the fake ccache cc from the PATH
28384     RETRY_COMPILER_SAVED_PATH="$PATH"
28385     COMPILER_DIRNAME=`$DIRNAME $CC`
28386     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28387 
28388     # Try again looking for our compiler
28389     if test -n "$ac_tool_prefix"; then
28390   for ac_prog in $TOOLCHAIN_CC_BINARY
28391   do
28392     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28393 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28395 $as_echo_n "checking for $ac_word... " >&6; }
28396 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28397   $as_echo_n "(cached) " >&6
28398 else
28399   if test -n "$PROPER_COMPILER_CC"; then
28400   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28401 else
28402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28403 for as_dir in $PATH
28404 do
28405   IFS=$as_save_IFS
28406   test -z "$as_dir" && as_dir=.
28407     for ac_exec_ext in '' $ac_executable_extensions; do
28408   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28409     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28410     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28411     break 2
28412   fi
28413 done
28414   done
28415 IFS=$as_save_IFS
28416 
28417 fi
28418 fi
28419 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28420 if test -n "$PROPER_COMPILER_CC"; then
28421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28422 $as_echo "$PROPER_COMPILER_CC" >&6; }
28423 else
28424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28425 $as_echo "no" >&6; }
28426 fi
28427 
28428 
28429     test -n "$PROPER_COMPILER_CC" && break
28430   done
28431 fi
28432 if test -z "$PROPER_COMPILER_CC"; then
28433   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28434   for ac_prog in $TOOLCHAIN_CC_BINARY
28435 do
28436   # Extract the first word of "$ac_prog", so it can be a program name with args.
28437 set dummy $ac_prog; ac_word=$2
28438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28439 $as_echo_n "checking for $ac_word... " >&6; }
28440 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28441   $as_echo_n "(cached) " >&6
28442 else
28443   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28444   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28445 else
28446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28447 for as_dir in $PATH
28448 do
28449   IFS=$as_save_IFS
28450   test -z "$as_dir" && as_dir=.
28451     for ac_exec_ext in '' $ac_executable_extensions; do
28452   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28453     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28454     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28455     break 2
28456   fi
28457 done
28458   done
28459 IFS=$as_save_IFS
28460 
28461 fi
28462 fi
28463 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28464 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28466 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28467 else
28468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28469 $as_echo "no" >&6; }
28470 fi
28471 
28472 
28473   test -n "$ac_ct_PROPER_COMPILER_CC" && break
28474 done
28475 
28476   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28477     PROPER_COMPILER_CC=""
28478   else
28479     case $cross_compiling:$ac_tool_warned in
28480 yes:)
28481 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28482 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28483 ac_tool_warned=yes ;;
28484 esac
28485     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28486   fi
28487 fi
28488 
28489 
28490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28491 
28492   # First separate the path from the arguments. This will split at the first
28493   # space.
28494   complete="$PROPER_COMPILER_CC"
28495   path="${complete%% *}"
28496   tmp="$complete EOL"
28497   arguments="${tmp#* }"
28498 
28499   # Input might be given as Windows format, start by converting to
28500   # unix format.
28501   new_path=`$CYGPATH -u "$path"`
28502 
28503   # Now try to locate executable using which
28504   new_path=`$WHICH "$new_path" 2> /dev/null`
28505   # bat and cmd files are not always considered executable in cygwin causing which
28506   # to not find them
28507   if test "x$new_path" = x \
28508       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28509       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28510     new_path=`$CYGPATH -u "$path"`
28511   fi
28512   if test "x$new_path" = x; then
28513     # Oops. Which didn't find the executable.
28514     # The splitting of arguments from the executable at a space might have been incorrect,
28515     # since paths with space are more likely in Windows. Give it another try with the whole
28516     # argument.
28517     path="$complete"
28518     arguments="EOL"
28519     new_path=`$CYGPATH -u "$path"`
28520     new_path=`$WHICH "$new_path" 2> /dev/null`
28521     # bat and cmd files are not always considered executable in cygwin causing which
28522     # to not find them
28523     if test "x$new_path" = x \
28524         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28525         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28526       new_path=`$CYGPATH -u "$path"`
28527     fi
28528     if test "x$new_path" = x; then
28529       # It's still not found. Now this is an unrecoverable error.
28530       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28531 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28532       has_space=`$ECHO "$complete" | $GREP " "`
28533       if test "x$has_space" != x; then
28534         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28535 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28536       fi
28537       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28538     fi
28539   fi
28540 
28541   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28542   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28543   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28544   # "foo.exe" is OK but "foo" is an error.
28545   #
28546   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28547   # It is also a way to make sure we got the proper file name for the real test later on.
28548   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28549   if test "x$test_shortpath" = x; then
28550     # Short path failed, file does not exist as specified.
28551     # Try adding .exe or .cmd
28552     if test -f "${new_path}.exe"; then
28553       input_to_shortpath="${new_path}.exe"
28554     elif test -f "${new_path}.cmd"; then
28555       input_to_shortpath="${new_path}.cmd"
28556     else
28557       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28558 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28559       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28560 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28561       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28562     fi
28563   else
28564     input_to_shortpath="$new_path"
28565   fi
28566 
28567   # Call helper function which possibly converts this using DOS-style short mode.
28568   # If so, the updated path is stored in $new_path.
28569   new_path="$input_to_shortpath"
28570 
28571   input_path="$input_to_shortpath"
28572   # Check if we need to convert this using DOS-style short mode. If the path
28573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28574   # take no chances and rewrite it.
28575   # Note: m4 eats our [], so we need to use [ and ] instead.
28576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28577   if test "x$has_forbidden_chars" != x; then
28578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28579     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28580     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28581     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28582       # Going to short mode and back again did indeed matter. Since short mode is
28583       # case insensitive, let's make it lowercase to improve readability.
28584       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28585       # Now convert it back to Unix-stile (cygpath)
28586       input_path=`$CYGPATH -u "$shortmode_path"`
28587       new_path="$input_path"
28588     fi
28589   fi
28590 
28591   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28592   if test "x$test_cygdrive_prefix" = x; then
28593     # As a simple fix, exclude /usr/bin since it's not a real path.
28594     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28595       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28596       # a path prefixed by /cygdrive for fixpath to work.
28597       new_path="$CYGWIN_ROOT_PATH$input_path"
28598     fi
28599   fi
28600 
28601   # remove trailing .exe if any
28602   new_path="${new_path/%.exe/}"
28603 
28604   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28605 
28606   # First separate the path from the arguments. This will split at the first
28607   # space.
28608   complete="$PROPER_COMPILER_CC"
28609   path="${complete%% *}"
28610   tmp="$complete EOL"
28611   arguments="${tmp#* }"
28612 
28613   # Input might be given as Windows format, start by converting to
28614   # unix format.
28615   new_path="$path"
28616 
28617   windows_path="$new_path"
28618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28619     unix_path=`$CYGPATH -u "$windows_path"`
28620     new_path="$unix_path"
28621   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28622     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28623     new_path="$unix_path"
28624   fi
28625 
28626 
28627   # Now try to locate executable using which
28628   new_path=`$WHICH "$new_path" 2> /dev/null`
28629 
28630   if test "x$new_path" = x; then
28631     # Oops. Which didn't find the executable.
28632     # The splitting of arguments from the executable at a space might have been incorrect,
28633     # since paths with space are more likely in Windows. Give it another try with the whole
28634     # argument.
28635     path="$complete"
28636     arguments="EOL"
28637     new_path="$path"
28638 
28639   windows_path="$new_path"
28640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28641     unix_path=`$CYGPATH -u "$windows_path"`
28642     new_path="$unix_path"
28643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28645     new_path="$unix_path"
28646   fi
28647 
28648 
28649     new_path=`$WHICH "$new_path" 2> /dev/null`
28650     # bat and cmd files are not always considered executable in MSYS causing which
28651     # to not find them
28652     if test "x$new_path" = x \
28653         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28654         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28655       new_path="$path"
28656 
28657   windows_path="$new_path"
28658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28659     unix_path=`$CYGPATH -u "$windows_path"`
28660     new_path="$unix_path"
28661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28662     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28663     new_path="$unix_path"
28664   fi
28665 
28666     fi
28667 
28668     if test "x$new_path" = x; then
28669       # It's still not found. Now this is an unrecoverable error.
28670       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28671 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28672       has_space=`$ECHO "$complete" | $GREP " "`
28673       if test "x$has_space" != x; then
28674         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28675 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28676       fi
28677       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28678     fi
28679   fi
28680 
28681   # Now new_path has a complete unix path to the binary
28682   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28683     # Keep paths in /bin as-is, but remove trailing .exe if any
28684     new_path="${new_path/%.exe/}"
28685     # Do not save /bin paths to all_fixpath_prefixes!
28686   else
28687     # Not in mixed or Windows style, start by that.
28688     new_path=`cmd //c echo $new_path`
28689 
28690   input_path="$new_path"
28691   # Check if we need to convert this using DOS-style short mode. If the path
28692   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28693   # take no chances and rewrite it.
28694   # Note: m4 eats our [], so we need to use [ and ] instead.
28695   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28696   if test "x$has_forbidden_chars" != x; then
28697     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28698     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28699   fi
28700 
28701     # Output is in $new_path
28702 
28703   windows_path="$new_path"
28704   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28705     unix_path=`$CYGPATH -u "$windows_path"`
28706     new_path="$unix_path"
28707   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28708     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28709     new_path="$unix_path"
28710   fi
28711 
28712     # remove trailing .exe if any
28713     new_path="${new_path/%.exe/}"
28714 
28715     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28716     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28717   fi
28718 
28719   else
28720     # We're on a posix platform. Hooray! :)
28721     # First separate the path from the arguments. This will split at the first
28722     # space.
28723     complete="$PROPER_COMPILER_CC"
28724     path="${complete%% *}"
28725     tmp="$complete EOL"
28726     arguments="${tmp#* }"
28727 
28728     # Cannot rely on the command "which" here since it doesn't always work.
28729     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28730     if test -z "$is_absolute_path"; then
28731       # Path to executable is not absolute. Find it.
28732       IFS_save="$IFS"
28733       IFS=:
28734       for p in $PATH; do
28735         if test -f "$p/$path" && test -x "$p/$path"; then
28736           new_path="$p/$path"
28737           break
28738         fi
28739       done
28740       IFS="$IFS_save"
28741     else
28742       # This is an absolute path, we can use it without further modifications.
28743       new_path="$path"
28744     fi
28745 
28746     if test "x$new_path" = x; then
28747       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28748 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28749       has_space=`$ECHO "$complete" | $GREP " "`
28750       if test "x$has_space" != x; then
28751         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28752 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28753       fi
28754       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28755     fi
28756   fi
28757 
28758   # Now join together the path and the arguments once again
28759   if test "x$arguments" != xEOL; then
28760     new_complete="$new_path ${arguments% *}"
28761   else
28762     new_complete="$new_path"
28763   fi
28764 
28765   if test "x$complete" != "x$new_complete"; then
28766     PROPER_COMPILER_CC="$new_complete"
28767     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28768 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28769   fi
28770 
28771     PATH="$RETRY_COMPILER_SAVED_PATH"
28772 
28773     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28774 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28775 
28776   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28777     # Follow a chain of symbolic links. Use readlink
28778     # where it exists, else fall back to horribly
28779     # complicated shell code.
28780     if test "x$READLINK_TESTED" != yes; then
28781       # On MacOSX there is a readlink tool with a different
28782       # purpose than the GNU readlink tool. Check the found readlink.
28783       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28784       if test "x$ISGNU" = x; then
28785         # A readlink that we do not know how to use.
28786         # Are there other non-GNU readlinks out there?
28787         READLINK_TESTED=yes
28788         READLINK=
28789       fi
28790     fi
28791 
28792     if test "x$READLINK" != x; then
28793       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28794     else
28795       # Save the current directory for restoring afterwards
28796       STARTDIR=$PWD
28797       COUNTER=0
28798       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28799       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28800       cd $sym_link_dir
28801       # Use -P flag to resolve symlinks in directories.
28802       cd `$THEPWDCMD -P`
28803       sym_link_dir=`$THEPWDCMD -P`
28804       # Resolve file symlinks
28805       while test $COUNTER -lt 20; do
28806         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28807         if test "x$ISLINK" == x; then
28808           # This is not a symbolic link! We are done!
28809           break
28810         fi
28811         # Again resolve directory symlinks since the target of the just found
28812         # link could be in a different directory
28813         cd `$DIRNAME $ISLINK`
28814         sym_link_dir=`$THEPWDCMD -P`
28815         sym_link_file=`$BASENAME $ISLINK`
28816         let COUNTER=COUNTER+1
28817       done
28818       cd $STARTDIR
28819       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28820     fi
28821   fi
28822 
28823     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28824 $as_echo "$PROPER_COMPILER_CC" >&6; }
28825     CC="$PROPER_COMPILER_CC"
28826   else
28827     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28828 $as_echo "no, keeping CC" >&6; }
28829   fi
28830 
28831 
28832   COMPILER=$CC
28833   COMPILER_NAME=$COMPILER_NAME
28834 
28835   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28836     # cc -V output typically looks like
28837     #     cc: Sun C 5.12 Linux_i386 2011/11/16
28838     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28839     # Check that this is likely to be the Solaris Studio cc.
28840     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28841     if test $? -ne 0; then
28842       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28843       { $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
28844 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28845       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28846 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28847       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28848 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28849       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28850     fi
28851     # Remove usage instructions (if present), and
28852     # collapse compiler output into a single line
28853     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28854         $SED -e 's/ *[Uu]sage:.*//'`
28855     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28856         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28857   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28858     # xlc -qversion output typically looks like
28859     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28860     #     Version: 11.01.0000.0015
28861     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28862     # Check that this is likely to be the IBM XL C compiler.
28863     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28864     if test $? -ne 0; then
28865       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28866       { $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
28867 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28868       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28869 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28870       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28871 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28872       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28873     fi
28874     # Collapse compiler output into a single line
28875     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28876     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28877         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28878   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28879     # There is no specific version flag, but all output starts with a version string.
28880     # First line typically looks something like:
28881     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28882     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28883     # Check that this is likely to be Microsoft CL.EXE.
28884     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28885     if test $? -ne 0; then
28886       { $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
28887 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28888       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28889 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28890       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28891     fi
28892     # Collapse compiler output into a single line
28893     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28894     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28895         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28896   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28897     # gcc --version output typically looks like
28898     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28899     #     Copyright (C) 2013 Free Software Foundation, Inc.
28900     #     This is free software; see the source for copying conditions.  There is NO
28901     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28902     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28903     # Check that this is likely to be GCC.
28904     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28905     if test $? -ne 0; then
28906       { $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
28907 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28908       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28909 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28910       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28911     fi
28912     # Remove Copyright and legalese from version string, and
28913     # collapse into a single line
28914     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28915         $SED -e 's/ *Copyright .*//'`
28916     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28917         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28918   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28919     # clang --version output typically looks like
28920     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28921     #    clang version 3.3 (tags/RELEASE_33/final)
28922     # or
28923     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28924     #    Target: x86_64-pc-linux-gnu
28925     #    Thread model: posix
28926     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28927     # Check that this is likely to be clang
28928     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28929     if test $? -ne 0; then
28930       { $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
28931 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28932       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28933 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28934       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28935     fi
28936     # Collapse compiler output into a single line
28937     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28938     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28939         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28940   else
28941       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28942   fi
28943   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28944   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28945   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28946   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28947 
28948   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28949 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28950 
28951 
28952   # Now that we have resolved CC ourself, let autoconf have its go at it
28953   ac_ext=c
28954 ac_cpp='$CPP $CPPFLAGS'
28955 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28956 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28957 ac_compiler_gnu=$ac_cv_c_compiler_gnu
28958 if test -n "$ac_tool_prefix"; then
28959   for ac_prog in $CC
28960   do
28961     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28962 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28964 $as_echo_n "checking for $ac_word... " >&6; }
28965 if ${ac_cv_prog_CC+:} false; then :
28966   $as_echo_n "(cached) " >&6
28967 else
28968   if test -n "$CC"; then
28969   ac_cv_prog_CC="$CC" # Let the user override the test.
28970 else
28971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28972 for as_dir in $PATH
28973 do
28974   IFS=$as_save_IFS
28975   test -z "$as_dir" && as_dir=.
28976     for ac_exec_ext in '' $ac_executable_extensions; do
28977   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28978     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28980     break 2
28981   fi
28982 done
28983   done
28984 IFS=$as_save_IFS
28985 
28986 fi
28987 fi
28988 CC=$ac_cv_prog_CC
28989 if test -n "$CC"; then
28990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28991 $as_echo "$CC" >&6; }
28992 else
28993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28994 $as_echo "no" >&6; }
28995 fi
28996 
28997 
28998     test -n "$CC" && break
28999   done
29000 fi
29001 if test -z "$CC"; then
29002   ac_ct_CC=$CC
29003   for ac_prog in $CC
29004 do
29005   # Extract the first word of "$ac_prog", so it can be a program name with args.
29006 set dummy $ac_prog; ac_word=$2
29007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29008 $as_echo_n "checking for $ac_word... " >&6; }
29009 if ${ac_cv_prog_ac_ct_CC+:} false; then :
29010   $as_echo_n "(cached) " >&6
29011 else
29012   if test -n "$ac_ct_CC"; then
29013   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29014 else
29015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29016 for as_dir in $PATH
29017 do
29018   IFS=$as_save_IFS
29019   test -z "$as_dir" && as_dir=.
29020     for ac_exec_ext in '' $ac_executable_extensions; do
29021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29022     ac_cv_prog_ac_ct_CC="$ac_prog"
29023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29024     break 2
29025   fi
29026 done
29027   done
29028 IFS=$as_save_IFS
29029 
29030 fi
29031 fi
29032 ac_ct_CC=$ac_cv_prog_ac_ct_CC
29033 if test -n "$ac_ct_CC"; then
29034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29035 $as_echo "$ac_ct_CC" >&6; }
29036 else
29037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29038 $as_echo "no" >&6; }
29039 fi
29040 
29041 
29042   test -n "$ac_ct_CC" && break
29043 done
29044 
29045   if test "x$ac_ct_CC" = x; then
29046     CC=""
29047   else
29048     case $cross_compiling:$ac_tool_warned in
29049 yes:)
29050 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29051 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29052 ac_tool_warned=yes ;;
29053 esac
29054     CC=$ac_ct_CC
29055   fi
29056 fi
29057 
29058 
29059 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29060 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29061 as_fn_error $? "no acceptable C compiler found in \$PATH
29062 See \`config.log' for more details" "$LINENO" 5; }
29063 
29064 # Provide some information about the compiler.
29065 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29066 set X $ac_compile
29067 ac_compiler=$2
29068 for ac_option in --version -v -V -qversion; do
29069   { { ac_try="$ac_compiler $ac_option >&5"
29070 case "(($ac_try" in
29071   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29072   *) ac_try_echo=$ac_try;;
29073 esac
29074 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29075 $as_echo "$ac_try_echo"; } >&5
29076   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29077   ac_status=$?
29078   if test -s conftest.err; then
29079     sed '10a\
29080 ... rest of stderr output deleted ...
29081          10q' conftest.err >conftest.er1
29082     cat conftest.er1 >&5
29083   fi
29084   rm -f conftest.er1 conftest.err
29085   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29086   test $ac_status = 0; }
29087 done
29088 
29089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29090 /* end confdefs.h.  */
29091 
29092 int
29093 main ()
29094 {
29095 
29096   ;
29097   return 0;
29098 }
29099 _ACEOF
29100 ac_clean_files_save=$ac_clean_files
29101 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29102 # Try to create an executable without -o first, disregard a.out.
29103 # It will help us diagnose broken compilers, and finding out an intuition
29104 # of exeext.
29105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29106 $as_echo_n "checking whether the C compiler works... " >&6; }
29107 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29108 
29109 # The possible output files:
29110 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29111 
29112 ac_rmfiles=
29113 for ac_file in $ac_files
29114 do
29115   case $ac_file in
29116     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29117     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29118   esac
29119 done
29120 rm -f $ac_rmfiles
29121 
29122 if { { ac_try="$ac_link_default"
29123 case "(($ac_try" in
29124   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29125   *) ac_try_echo=$ac_try;;
29126 esac
29127 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29128 $as_echo "$ac_try_echo"; } >&5
29129   (eval "$ac_link_default") 2>&5
29130   ac_status=$?
29131   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29132   test $ac_status = 0; }; then :
29133   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29134 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29135 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
29136 # so that the user can short-circuit this test for compilers unknown to
29137 # Autoconf.
29138 for ac_file in $ac_files ''
29139 do
29140   test -f "$ac_file" || continue
29141   case $ac_file in
29142     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29143         ;;
29144     [ab].out )
29145         # We found the default executable, but exeext='' is most
29146         # certainly right.
29147         break;;
29148     *.* )
29149         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29150         then :; else
29151            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29152         fi
29153         # We set ac_cv_exeext here because the later test for it is not
29154         # safe: cross compilers may not add the suffix if given an `-o'
29155         # argument, so we may need to know it at that point already.
29156         # Even if this section looks crufty: it has the advantage of
29157         # actually working.
29158         break;;
29159     * )
29160         break;;
29161   esac
29162 done
29163 test "$ac_cv_exeext" = no && ac_cv_exeext=
29164 
29165 else
29166   ac_file=''
29167 fi
29168 if test -z "$ac_file"; then :
29169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29170 $as_echo "no" >&6; }
29171 $as_echo "$as_me: failed program was:" >&5
29172 sed 's/^/| /' conftest.$ac_ext >&5
29173 
29174 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29175 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29176 as_fn_error 77 "C compiler cannot create executables
29177 See \`config.log' for more details" "$LINENO" 5; }
29178 else
29179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29180 $as_echo "yes" >&6; }
29181 fi
29182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29183 $as_echo_n "checking for C compiler default output file name... " >&6; }
29184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29185 $as_echo "$ac_file" >&6; }
29186 ac_exeext=$ac_cv_exeext
29187 
29188 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29189 ac_clean_files=$ac_clean_files_save
29190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29191 $as_echo_n "checking for suffix of executables... " >&6; }
29192 if { { ac_try="$ac_link"
29193 case "(($ac_try" in
29194   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29195   *) ac_try_echo=$ac_try;;
29196 esac
29197 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29198 $as_echo "$ac_try_echo"; } >&5
29199   (eval "$ac_link") 2>&5
29200   ac_status=$?
29201   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29202   test $ac_status = 0; }; then :
29203   # If both `conftest.exe' and `conftest' are `present' (well, observable)
29204 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29205 # work properly (i.e., refer to `conftest.exe'), while it won't with
29206 # `rm'.
29207 for ac_file in conftest.exe conftest conftest.*; do
29208   test -f "$ac_file" || continue
29209   case $ac_file in
29210     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29211     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29212           break;;
29213     * ) break;;
29214   esac
29215 done
29216 else
29217   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29218 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29219 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29220 See \`config.log' for more details" "$LINENO" 5; }
29221 fi
29222 rm -f conftest conftest$ac_cv_exeext
29223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29224 $as_echo "$ac_cv_exeext" >&6; }
29225 
29226 rm -f conftest.$ac_ext
29227 EXEEXT=$ac_cv_exeext
29228 ac_exeext=$EXEEXT
29229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29230 /* end confdefs.h.  */
29231 #include <stdio.h>
29232 int
29233 main ()
29234 {
29235 FILE *f = fopen ("conftest.out", "w");
29236  return ferror (f) || fclose (f) != 0;
29237 
29238   ;
29239   return 0;
29240 }
29241 _ACEOF
29242 ac_clean_files="$ac_clean_files conftest.out"
29243 # Check that the compiler produces executables we can run.  If not, either
29244 # the compiler is broken, or we cross compile.
29245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29246 $as_echo_n "checking whether we are cross compiling... " >&6; }
29247 if test "$cross_compiling" != yes; then
29248   { { ac_try="$ac_link"
29249 case "(($ac_try" in
29250   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29251   *) ac_try_echo=$ac_try;;
29252 esac
29253 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29254 $as_echo "$ac_try_echo"; } >&5
29255   (eval "$ac_link") 2>&5
29256   ac_status=$?
29257   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29258   test $ac_status = 0; }
29259   if { ac_try='./conftest$ac_cv_exeext'
29260   { { case "(($ac_try" in
29261   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29262   *) ac_try_echo=$ac_try;;
29263 esac
29264 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29265 $as_echo "$ac_try_echo"; } >&5
29266   (eval "$ac_try") 2>&5
29267   ac_status=$?
29268   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29269   test $ac_status = 0; }; }; then
29270     cross_compiling=no
29271   else
29272     if test "$cross_compiling" = maybe; then
29273         cross_compiling=yes
29274     else
29275         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29276 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29277 as_fn_error $? "cannot run C compiled programs.
29278 If you meant to cross compile, use \`--host'.
29279 See \`config.log' for more details" "$LINENO" 5; }
29280     fi
29281   fi
29282 fi
29283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29284 $as_echo "$cross_compiling" >&6; }
29285 
29286 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29287 ac_clean_files=$ac_clean_files_save
29288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29289 $as_echo_n "checking for suffix of object files... " >&6; }
29290 if ${ac_cv_objext+:} false; then :
29291   $as_echo_n "(cached) " >&6
29292 else
29293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29294 /* end confdefs.h.  */
29295 
29296 int
29297 main ()
29298 {
29299 
29300   ;
29301   return 0;
29302 }
29303 _ACEOF
29304 rm -f conftest.o conftest.obj
29305 if { { ac_try="$ac_compile"
29306 case "(($ac_try" in
29307   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29308   *) ac_try_echo=$ac_try;;
29309 esac
29310 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29311 $as_echo "$ac_try_echo"; } >&5
29312   (eval "$ac_compile") 2>&5
29313   ac_status=$?
29314   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29315   test $ac_status = 0; }; then :
29316   for ac_file in conftest.o conftest.obj conftest.*; do
29317   test -f "$ac_file" || continue;
29318   case $ac_file in
29319     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29320     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29321        break;;
29322   esac
29323 done
29324 else
29325   $as_echo "$as_me: failed program was:" >&5
29326 sed 's/^/| /' conftest.$ac_ext >&5
29327 
29328 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29329 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29330 as_fn_error $? "cannot compute suffix of object files: cannot compile
29331 See \`config.log' for more details" "$LINENO" 5; }
29332 fi
29333 rm -f conftest.$ac_cv_objext conftest.$ac_ext
29334 fi
29335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29336 $as_echo "$ac_cv_objext" >&6; }
29337 OBJEXT=$ac_cv_objext
29338 ac_objext=$OBJEXT
29339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29340 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29341 if ${ac_cv_c_compiler_gnu+:} false; then :
29342   $as_echo_n "(cached) " >&6
29343 else
29344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29345 /* end confdefs.h.  */
29346 
29347 int
29348 main ()
29349 {
29350 #ifndef __GNUC__
29351        choke me
29352 #endif
29353 
29354   ;
29355   return 0;
29356 }
29357 _ACEOF
29358 if ac_fn_c_try_compile "$LINENO"; then :
29359   ac_compiler_gnu=yes
29360 else
29361   ac_compiler_gnu=no
29362 fi
29363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29364 ac_cv_c_compiler_gnu=$ac_compiler_gnu
29365 
29366 fi
29367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29368 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
29369 if test $ac_compiler_gnu = yes; then
29370   GCC=yes
29371 else
29372   GCC=
29373 fi
29374 ac_test_CFLAGS=${CFLAGS+set}
29375 ac_save_CFLAGS=$CFLAGS
29376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29377 $as_echo_n "checking whether $CC accepts -g... " >&6; }
29378 if ${ac_cv_prog_cc_g+:} false; then :
29379   $as_echo_n "(cached) " >&6
29380 else
29381   ac_save_c_werror_flag=$ac_c_werror_flag
29382    ac_c_werror_flag=yes
29383    ac_cv_prog_cc_g=no
29384    CFLAGS="-g"
29385    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29386 /* end confdefs.h.  */
29387 
29388 int
29389 main ()
29390 {
29391 
29392   ;
29393   return 0;
29394 }
29395 _ACEOF
29396 if ac_fn_c_try_compile "$LINENO"; then :
29397   ac_cv_prog_cc_g=yes
29398 else
29399   CFLAGS=""
29400       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29401 /* end confdefs.h.  */
29402 
29403 int
29404 main ()
29405 {
29406 
29407   ;
29408   return 0;
29409 }
29410 _ACEOF
29411 if ac_fn_c_try_compile "$LINENO"; then :
29412 
29413 else
29414   ac_c_werror_flag=$ac_save_c_werror_flag
29415          CFLAGS="-g"
29416          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29417 /* end confdefs.h.  */
29418 
29419 int
29420 main ()
29421 {
29422 
29423   ;
29424   return 0;
29425 }
29426 _ACEOF
29427 if ac_fn_c_try_compile "$LINENO"; then :
29428   ac_cv_prog_cc_g=yes
29429 fi
29430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29431 fi
29432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29433 fi
29434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29435    ac_c_werror_flag=$ac_save_c_werror_flag
29436 fi
29437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29438 $as_echo "$ac_cv_prog_cc_g" >&6; }
29439 if test "$ac_test_CFLAGS" = set; then
29440   CFLAGS=$ac_save_CFLAGS
29441 elif test $ac_cv_prog_cc_g = yes; then
29442   if test "$GCC" = yes; then
29443     CFLAGS="-g -O2"
29444   else
29445     CFLAGS="-g"
29446   fi
29447 else
29448   if test "$GCC" = yes; then
29449     CFLAGS="-O2"
29450   else
29451     CFLAGS=
29452   fi
29453 fi
29454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29455 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29456 if ${ac_cv_prog_cc_c89+:} false; then :
29457   $as_echo_n "(cached) " >&6
29458 else
29459   ac_cv_prog_cc_c89=no
29460 ac_save_CC=$CC
29461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29462 /* end confdefs.h.  */
29463 #include <stdarg.h>
29464 #include <stdio.h>
29465 struct stat;
29466 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29467 struct buf { int x; };
29468 FILE * (*rcsopen) (struct buf *, struct stat *, int);
29469 static char *e (p, i)
29470      char **p;
29471      int i;
29472 {
29473   return p[i];
29474 }
29475 static char *f (char * (*g) (char **, int), char **p, ...)
29476 {
29477   char *s;
29478   va_list v;
29479   va_start (v,p);
29480   s = g (p, va_arg (v,int));
29481   va_end (v);
29482   return s;
29483 }
29484 
29485 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29486    function prototypes and stuff, but not '\xHH' hex character constants.
29487    These don't provoke an error unfortunately, instead are silently treated
29488    as 'x'.  The following induces an error, until -std is added to get
29489    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29490    array size at least.  It's necessary to write '\x00'==0 to get something
29491    that's true only with -std.  */
29492 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29493 
29494 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29495    inside strings and character constants.  */
29496 #define FOO(x) 'x'
29497 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29498 
29499 int test (int i, double x);
29500 struct s1 {int (*f) (int a);};
29501 struct s2 {int (*f) (double a);};
29502 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29503 int argc;
29504 char **argv;
29505 int
29506 main ()
29507 {
29508 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29509   ;
29510   return 0;
29511 }
29512 _ACEOF
29513 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29514         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29515 do
29516   CC="$ac_save_CC $ac_arg"
29517   if ac_fn_c_try_compile "$LINENO"; then :
29518   ac_cv_prog_cc_c89=$ac_arg
29519 fi
29520 rm -f core conftest.err conftest.$ac_objext
29521   test "x$ac_cv_prog_cc_c89" != "xno" && break
29522 done
29523 rm -f conftest.$ac_ext
29524 CC=$ac_save_CC
29525 
29526 fi
29527 # AC_CACHE_VAL
29528 case "x$ac_cv_prog_cc_c89" in
29529   x)
29530     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29531 $as_echo "none needed" >&6; } ;;
29532   xno)
29533     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29534 $as_echo "unsupported" >&6; } ;;
29535   *)
29536     CC="$CC $ac_cv_prog_cc_c89"
29537     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29538 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29539 esac
29540 if test "x$ac_cv_prog_cc_c89" != xno; then :
29541 
29542 fi
29543 
29544 ac_ext=cpp
29545 ac_cpp='$CXXCPP $CPPFLAGS'
29546 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29547 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29548 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29549 
29550 
29551 
29552   COMPILER_NAME=C++
29553   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29554 
29555   if test "x$CXX" != x; then
29556     # User has supplied compiler name already, always let that override.
29557     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29558 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29559     if test "x`basename $CXX`" = "x$CXX"; then
29560       # A command without a complete path is provided, search $PATH.
29561 
29562       for ac_prog in $CXX
29563 do
29564   # Extract the first word of "$ac_prog", so it can be a program name with args.
29565 set dummy $ac_prog; ac_word=$2
29566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29567 $as_echo_n "checking for $ac_word... " >&6; }
29568 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29569   $as_echo_n "(cached) " >&6
29570 else
29571   case $POTENTIAL_CXX in
29572   [\\/]* | ?:[\\/]*)
29573   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29574   ;;
29575   *)
29576   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29577 for as_dir in $PATH
29578 do
29579   IFS=$as_save_IFS
29580   test -z "$as_dir" && as_dir=.
29581     for ac_exec_ext in '' $ac_executable_extensions; do
29582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29583     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29585     break 2
29586   fi
29587 done
29588   done
29589 IFS=$as_save_IFS
29590 
29591   ;;
29592 esac
29593 fi
29594 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29595 if test -n "$POTENTIAL_CXX"; then
29596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29597 $as_echo "$POTENTIAL_CXX" >&6; }
29598 else
29599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29600 $as_echo "no" >&6; }
29601 fi
29602 
29603 
29604   test -n "$POTENTIAL_CXX" && break
29605 done
29606 
29607       if test "x$POTENTIAL_CXX" != x; then
29608         CXX=$POTENTIAL_CXX
29609       else
29610         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29611       fi
29612     else
29613       # Otherwise it might already be a complete path
29614       if test ! -x "$CXX"; then
29615         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29616       fi
29617     fi
29618   else
29619     # No user supplied value. Locate compiler ourselves.
29620 
29621     # If we are cross compiling, assume cross compilation tools follows the
29622     # cross compilation standard where they are prefixed with the autoconf
29623     # standard name for the target. For example the binary
29624     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29625     # If we are not cross compiling, then the default compiler name will be
29626     # used.
29627 
29628     CXX=
29629     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29630     # before checking the rest of the PATH.
29631     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29632     # step, this should not be necessary.
29633     if test -n "$TOOLCHAIN_PATH"; then
29634       PATH_save="$PATH"
29635       PATH="$TOOLCHAIN_PATH"
29636       for ac_prog in $SEARCH_LIST
29637 do
29638   # Extract the first word of "$ac_prog", so it can be a program name with args.
29639 set dummy $ac_prog; ac_word=$2
29640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29641 $as_echo_n "checking for $ac_word... " >&6; }
29642 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29643   $as_echo_n "(cached) " >&6
29644 else
29645   case $TOOLCHAIN_PATH_CXX in
29646   [\\/]* | ?:[\\/]*)
29647   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29648   ;;
29649   *)
29650   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29651 for as_dir in $PATH
29652 do
29653   IFS=$as_save_IFS
29654   test -z "$as_dir" && as_dir=.
29655     for ac_exec_ext in '' $ac_executable_extensions; do
29656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29657     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29659     break 2
29660   fi
29661 done
29662   done
29663 IFS=$as_save_IFS
29664 
29665   ;;
29666 esac
29667 fi
29668 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29669 if test -n "$TOOLCHAIN_PATH_CXX"; then
29670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29671 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29672 else
29673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29674 $as_echo "no" >&6; }
29675 fi
29676 
29677 
29678   test -n "$TOOLCHAIN_PATH_CXX" && break
29679 done
29680 
29681       CXX=$TOOLCHAIN_PATH_CXX
29682       PATH="$PATH_save"
29683     fi
29684 
29685     # AC_PATH_PROGS can't be run multiple times with the same variable,
29686     # so create a new name for this run.
29687     if test "x$CXX" = x; then
29688       for ac_prog in $SEARCH_LIST
29689 do
29690   # Extract the first word of "$ac_prog", so it can be a program name with args.
29691 set dummy $ac_prog; ac_word=$2
29692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29693 $as_echo_n "checking for $ac_word... " >&6; }
29694 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29695   $as_echo_n "(cached) " >&6
29696 else
29697   case $POTENTIAL_CXX in
29698   [\\/]* | ?:[\\/]*)
29699   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29700   ;;
29701   *)
29702   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29703 for as_dir in $PATH
29704 do
29705   IFS=$as_save_IFS
29706   test -z "$as_dir" && as_dir=.
29707     for ac_exec_ext in '' $ac_executable_extensions; do
29708   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29709     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29711     break 2
29712   fi
29713 done
29714   done
29715 IFS=$as_save_IFS
29716 
29717   ;;
29718 esac
29719 fi
29720 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29721 if test -n "$POTENTIAL_CXX"; then
29722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29723 $as_echo "$POTENTIAL_CXX" >&6; }
29724 else
29725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29726 $as_echo "no" >&6; }
29727 fi
29728 
29729 
29730   test -n "$POTENTIAL_CXX" && break
29731 done
29732 
29733       CXX=$POTENTIAL_CXX
29734     fi
29735 
29736     if test "x$CXX" = x; then
29737 
29738   # Print a helpful message on how to acquire the necessary build dependency.
29739   # devkit is the help tag: freetype, cups, pulse, alsa etc
29740   MISSING_DEPENDENCY=devkit
29741 
29742   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29743     cygwin_help $MISSING_DEPENDENCY
29744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29745     msys_help $MISSING_DEPENDENCY
29746   else
29747     PKGHANDLER_COMMAND=
29748 
29749     case $PKGHANDLER in
29750       apt-get)
29751         apt_help     $MISSING_DEPENDENCY ;;
29752       yum)
29753         yum_help     $MISSING_DEPENDENCY ;;
29754       port)
29755         port_help    $MISSING_DEPENDENCY ;;
29756       pkgutil)
29757         pkgutil_help $MISSING_DEPENDENCY ;;
29758       pkgadd)
29759         pkgadd_help  $MISSING_DEPENDENCY ;;
29760     esac
29761 
29762     if test "x$PKGHANDLER_COMMAND" != x; then
29763       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29764     fi
29765   fi
29766 
29767       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29768     fi
29769   fi
29770 
29771   # Now we have a compiler binary in CXX. Make sure it's okay.
29772 
29773   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29774 
29775   # First separate the path from the arguments. This will split at the first
29776   # space.
29777   complete="$CXX"
29778   path="${complete%% *}"
29779   tmp="$complete EOL"
29780   arguments="${tmp#* }"
29781 
29782   # Input might be given as Windows format, start by converting to
29783   # unix format.
29784   new_path=`$CYGPATH -u "$path"`
29785 
29786   # Now try to locate executable using which
29787   new_path=`$WHICH "$new_path" 2> /dev/null`
29788   # bat and cmd files are not always considered executable in cygwin causing which
29789   # to not find them
29790   if test "x$new_path" = x \
29791       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29792       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29793     new_path=`$CYGPATH -u "$path"`
29794   fi
29795   if test "x$new_path" = x; then
29796     # Oops. Which didn't find the executable.
29797     # The splitting of arguments from the executable at a space might have been incorrect,
29798     # since paths with space are more likely in Windows. Give it another try with the whole
29799     # argument.
29800     path="$complete"
29801     arguments="EOL"
29802     new_path=`$CYGPATH -u "$path"`
29803     new_path=`$WHICH "$new_path" 2> /dev/null`
29804     # bat and cmd files are not always considered executable in cygwin causing which
29805     # to not find them
29806     if test "x$new_path" = x \
29807         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29808         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29809       new_path=`$CYGPATH -u "$path"`
29810     fi
29811     if test "x$new_path" = x; then
29812       # It's still not found. Now this is an unrecoverable error.
29813       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29814 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29815       has_space=`$ECHO "$complete" | $GREP " "`
29816       if test "x$has_space" != x; then
29817         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29818 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29819       fi
29820       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29821     fi
29822   fi
29823 
29824   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29825   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29826   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29827   # "foo.exe" is OK but "foo" is an error.
29828   #
29829   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29830   # It is also a way to make sure we got the proper file name for the real test later on.
29831   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29832   if test "x$test_shortpath" = x; then
29833     # Short path failed, file does not exist as specified.
29834     # Try adding .exe or .cmd
29835     if test -f "${new_path}.exe"; then
29836       input_to_shortpath="${new_path}.exe"
29837     elif test -f "${new_path}.cmd"; then
29838       input_to_shortpath="${new_path}.cmd"
29839     else
29840       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29841 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29842       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29843 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29844       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29845     fi
29846   else
29847     input_to_shortpath="$new_path"
29848   fi
29849 
29850   # Call helper function which possibly converts this using DOS-style short mode.
29851   # If so, the updated path is stored in $new_path.
29852   new_path="$input_to_shortpath"
29853 
29854   input_path="$input_to_shortpath"
29855   # Check if we need to convert this using DOS-style short mode. If the path
29856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29857   # take no chances and rewrite it.
29858   # Note: m4 eats our [], so we need to use [ and ] instead.
29859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29860   if test "x$has_forbidden_chars" != x; then
29861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29862     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29863     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29864     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29865       # Going to short mode and back again did indeed matter. Since short mode is
29866       # case insensitive, let's make it lowercase to improve readability.
29867       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29868       # Now convert it back to Unix-stile (cygpath)
29869       input_path=`$CYGPATH -u "$shortmode_path"`
29870       new_path="$input_path"
29871     fi
29872   fi
29873 
29874   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29875   if test "x$test_cygdrive_prefix" = x; then
29876     # As a simple fix, exclude /usr/bin since it's not a real path.
29877     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29878       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29879       # a path prefixed by /cygdrive for fixpath to work.
29880       new_path="$CYGWIN_ROOT_PATH$input_path"
29881     fi
29882   fi
29883 
29884   # remove trailing .exe if any
29885   new_path="${new_path/%.exe/}"
29886 
29887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29888 
29889   # First separate the path from the arguments. This will split at the first
29890   # space.
29891   complete="$CXX"
29892   path="${complete%% *}"
29893   tmp="$complete EOL"
29894   arguments="${tmp#* }"
29895 
29896   # Input might be given as Windows format, start by converting to
29897   # unix format.
29898   new_path="$path"
29899 
29900   windows_path="$new_path"
29901   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29902     unix_path=`$CYGPATH -u "$windows_path"`
29903     new_path="$unix_path"
29904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29905     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29906     new_path="$unix_path"
29907   fi
29908 
29909 
29910   # Now try to locate executable using which
29911   new_path=`$WHICH "$new_path" 2> /dev/null`
29912 
29913   if test "x$new_path" = x; then
29914     # Oops. Which didn't find the executable.
29915     # The splitting of arguments from the executable at a space might have been incorrect,
29916     # since paths with space are more likely in Windows. Give it another try with the whole
29917     # argument.
29918     path="$complete"
29919     arguments="EOL"
29920     new_path="$path"
29921 
29922   windows_path="$new_path"
29923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29924     unix_path=`$CYGPATH -u "$windows_path"`
29925     new_path="$unix_path"
29926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29928     new_path="$unix_path"
29929   fi
29930 
29931 
29932     new_path=`$WHICH "$new_path" 2> /dev/null`
29933     # bat and cmd files are not always considered executable in MSYS causing which
29934     # to not find them
29935     if test "x$new_path" = x \
29936         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29937         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29938       new_path="$path"
29939 
29940   windows_path="$new_path"
29941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29942     unix_path=`$CYGPATH -u "$windows_path"`
29943     new_path="$unix_path"
29944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29945     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29946     new_path="$unix_path"
29947   fi
29948 
29949     fi
29950 
29951     if test "x$new_path" = x; then
29952       # It's still not found. Now this is an unrecoverable error.
29953       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29954 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29955       has_space=`$ECHO "$complete" | $GREP " "`
29956       if test "x$has_space" != x; then
29957         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29958 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29959       fi
29960       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29961     fi
29962   fi
29963 
29964   # Now new_path has a complete unix path to the binary
29965   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29966     # Keep paths in /bin as-is, but remove trailing .exe if any
29967     new_path="${new_path/%.exe/}"
29968     # Do not save /bin paths to all_fixpath_prefixes!
29969   else
29970     # Not in mixed or Windows style, start by that.
29971     new_path=`cmd //c echo $new_path`
29972 
29973   input_path="$new_path"
29974   # Check if we need to convert this using DOS-style short mode. If the path
29975   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29976   # take no chances and rewrite it.
29977   # Note: m4 eats our [], so we need to use [ and ] instead.
29978   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29979   if test "x$has_forbidden_chars" != x; then
29980     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29981     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29982   fi
29983 
29984     # Output is in $new_path
29985 
29986   windows_path="$new_path"
29987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29988     unix_path=`$CYGPATH -u "$windows_path"`
29989     new_path="$unix_path"
29990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29992     new_path="$unix_path"
29993   fi
29994 
29995     # remove trailing .exe if any
29996     new_path="${new_path/%.exe/}"
29997 
29998     # Save the first 10 bytes of this path to the storage, so fixpath can work.
29999     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30000   fi
30001 
30002   else
30003     # We're on a posix platform. Hooray! :)
30004     # First separate the path from the arguments. This will split at the first
30005     # space.
30006     complete="$CXX"
30007     path="${complete%% *}"
30008     tmp="$complete EOL"
30009     arguments="${tmp#* }"
30010 
30011     # Cannot rely on the command "which" here since it doesn't always work.
30012     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30013     if test -z "$is_absolute_path"; then
30014       # Path to executable is not absolute. Find it.
30015       IFS_save="$IFS"
30016       IFS=:
30017       for p in $PATH; do
30018         if test -f "$p/$path" && test -x "$p/$path"; then
30019           new_path="$p/$path"
30020           break
30021         fi
30022       done
30023       IFS="$IFS_save"
30024     else
30025       # This is an absolute path, we can use it without further modifications.
30026       new_path="$path"
30027     fi
30028 
30029     if test "x$new_path" = x; then
30030       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30031 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30032       has_space=`$ECHO "$complete" | $GREP " "`
30033       if test "x$has_space" != x; then
30034         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30035 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30036       fi
30037       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30038     fi
30039   fi
30040 
30041   # Now join together the path and the arguments once again
30042   if test "x$arguments" != xEOL; then
30043     new_complete="$new_path ${arguments% *}"
30044   else
30045     new_complete="$new_path"
30046   fi
30047 
30048   if test "x$complete" != "x$new_complete"; then
30049     CXX="$new_complete"
30050     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30051 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30052   fi
30053 
30054   TEST_COMPILER="$CXX"
30055   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30056   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30057   if test "x$OPENJDK_BUILD_OS" != xaix; then
30058     # FIXME: This test should not be needed anymore; we don't do that for any platform.
30059     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30060 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30061 
30062   if test "x$OPENJDK_BUILD_OS" != xwindows; then
30063     # Follow a chain of symbolic links. Use readlink
30064     # where it exists, else fall back to horribly
30065     # complicated shell code.
30066     if test "x$READLINK_TESTED" != yes; then
30067       # On MacOSX there is a readlink tool with a different
30068       # purpose than the GNU readlink tool. Check the found readlink.
30069       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30070       if test "x$ISGNU" = x; then
30071         # A readlink that we do not know how to use.
30072         # Are there other non-GNU readlinks out there?
30073         READLINK_TESTED=yes
30074         READLINK=
30075       fi
30076     fi
30077 
30078     if test "x$READLINK" != x; then
30079       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30080     else
30081       # Save the current directory for restoring afterwards
30082       STARTDIR=$PWD
30083       COUNTER=0
30084       sym_link_dir=`$DIRNAME $TEST_COMPILER`
30085       sym_link_file=`$BASENAME $TEST_COMPILER`
30086       cd $sym_link_dir
30087       # Use -P flag to resolve symlinks in directories.
30088       cd `$THEPWDCMD -P`
30089       sym_link_dir=`$THEPWDCMD -P`
30090       # Resolve file symlinks
30091       while test $COUNTER -lt 20; do
30092         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30093         if test "x$ISLINK" == x; then
30094           # This is not a symbolic link! We are done!
30095           break
30096         fi
30097         # Again resolve directory symlinks since the target of the just found
30098         # link could be in a different directory
30099         cd `$DIRNAME $ISLINK`
30100         sym_link_dir=`$THEPWDCMD -P`
30101         sym_link_file=`$BASENAME $ISLINK`
30102         let COUNTER=COUNTER+1
30103       done
30104       cd $STARTDIR
30105       TEST_COMPILER=$sym_link_dir/$sym_link_file
30106     fi
30107   fi
30108 
30109     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30110 $as_echo "$TEST_COMPILER" >&6; }
30111   fi
30112   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30113 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
30114 
30115   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30116   if test "x$COMPILER_BASENAME" = "xccache"; then
30117     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30118 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30119     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30120     # We want to control ccache invocation ourselves, so ignore this cc and try
30121     # searching again.
30122 
30123     # Remove the path to the fake ccache cc from the PATH
30124     RETRY_COMPILER_SAVED_PATH="$PATH"
30125     COMPILER_DIRNAME=`$DIRNAME $CXX`
30126     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30127 
30128     # Try again looking for our compiler
30129     if test -n "$ac_tool_prefix"; then
30130   for ac_prog in $TOOLCHAIN_CXX_BINARY
30131   do
30132     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30133 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30135 $as_echo_n "checking for $ac_word... " >&6; }
30136 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30137   $as_echo_n "(cached) " >&6
30138 else
30139   if test -n "$PROPER_COMPILER_CXX"; then
30140   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30141 else
30142 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30143 for as_dir in $PATH
30144 do
30145   IFS=$as_save_IFS
30146   test -z "$as_dir" && as_dir=.
30147     for ac_exec_ext in '' $ac_executable_extensions; do
30148   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30149     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30150     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30151     break 2
30152   fi
30153 done
30154   done
30155 IFS=$as_save_IFS
30156 
30157 fi
30158 fi
30159 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30160 if test -n "$PROPER_COMPILER_CXX"; then
30161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30162 $as_echo "$PROPER_COMPILER_CXX" >&6; }
30163 else
30164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30165 $as_echo "no" >&6; }
30166 fi
30167 
30168 
30169     test -n "$PROPER_COMPILER_CXX" && break
30170   done
30171 fi
30172 if test -z "$PROPER_COMPILER_CXX"; then
30173   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30174   for ac_prog in $TOOLCHAIN_CXX_BINARY
30175 do
30176   # Extract the first word of "$ac_prog", so it can be a program name with args.
30177 set dummy $ac_prog; ac_word=$2
30178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30179 $as_echo_n "checking for $ac_word... " >&6; }
30180 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30181   $as_echo_n "(cached) " >&6
30182 else
30183   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30184   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30185 else
30186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30187 for as_dir in $PATH
30188 do
30189   IFS=$as_save_IFS
30190   test -z "$as_dir" && as_dir=.
30191     for ac_exec_ext in '' $ac_executable_extensions; do
30192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30193     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30195     break 2
30196   fi
30197 done
30198   done
30199 IFS=$as_save_IFS
30200 
30201 fi
30202 fi
30203 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30204 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30206 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30207 else
30208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30209 $as_echo "no" >&6; }
30210 fi
30211 
30212 
30213   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30214 done
30215 
30216   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30217     PROPER_COMPILER_CXX=""
30218   else
30219     case $cross_compiling:$ac_tool_warned in
30220 yes:)
30221 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30222 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30223 ac_tool_warned=yes ;;
30224 esac
30225     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30226   fi
30227 fi
30228 
30229 
30230   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30231 
30232   # First separate the path from the arguments. This will split at the first
30233   # space.
30234   complete="$PROPER_COMPILER_CXX"
30235   path="${complete%% *}"
30236   tmp="$complete EOL"
30237   arguments="${tmp#* }"
30238 
30239   # Input might be given as Windows format, start by converting to
30240   # unix format.
30241   new_path=`$CYGPATH -u "$path"`
30242 
30243   # Now try to locate executable using which
30244   new_path=`$WHICH "$new_path" 2> /dev/null`
30245   # bat and cmd files are not always considered executable in cygwin causing which
30246   # to not find them
30247   if test "x$new_path" = x \
30248       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30249       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30250     new_path=`$CYGPATH -u "$path"`
30251   fi
30252   if test "x$new_path" = x; then
30253     # Oops. Which didn't find the executable.
30254     # The splitting of arguments from the executable at a space might have been incorrect,
30255     # since paths with space are more likely in Windows. Give it another try with the whole
30256     # argument.
30257     path="$complete"
30258     arguments="EOL"
30259     new_path=`$CYGPATH -u "$path"`
30260     new_path=`$WHICH "$new_path" 2> /dev/null`
30261     # bat and cmd files are not always considered executable in cygwin causing which
30262     # to not find them
30263     if test "x$new_path" = x \
30264         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30265         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30266       new_path=`$CYGPATH -u "$path"`
30267     fi
30268     if test "x$new_path" = x; then
30269       # It's still not found. Now this is an unrecoverable error.
30270       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30271 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30272       has_space=`$ECHO "$complete" | $GREP " "`
30273       if test "x$has_space" != x; then
30274         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30275 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30276       fi
30277       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30278     fi
30279   fi
30280 
30281   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30282   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30283   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30284   # "foo.exe" is OK but "foo" is an error.
30285   #
30286   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30287   # It is also a way to make sure we got the proper file name for the real test later on.
30288   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30289   if test "x$test_shortpath" = x; then
30290     # Short path failed, file does not exist as specified.
30291     # Try adding .exe or .cmd
30292     if test -f "${new_path}.exe"; then
30293       input_to_shortpath="${new_path}.exe"
30294     elif test -f "${new_path}.cmd"; then
30295       input_to_shortpath="${new_path}.cmd"
30296     else
30297       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30298 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30299       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30300 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30301       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30302     fi
30303   else
30304     input_to_shortpath="$new_path"
30305   fi
30306 
30307   # Call helper function which possibly converts this using DOS-style short mode.
30308   # If so, the updated path is stored in $new_path.
30309   new_path="$input_to_shortpath"
30310 
30311   input_path="$input_to_shortpath"
30312   # Check if we need to convert this using DOS-style short mode. If the path
30313   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30314   # take no chances and rewrite it.
30315   # Note: m4 eats our [], so we need to use [ and ] instead.
30316   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30317   if test "x$has_forbidden_chars" != x; then
30318     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30319     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30320     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30321     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30322       # Going to short mode and back again did indeed matter. Since short mode is
30323       # case insensitive, let's make it lowercase to improve readability.
30324       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30325       # Now convert it back to Unix-stile (cygpath)
30326       input_path=`$CYGPATH -u "$shortmode_path"`
30327       new_path="$input_path"
30328     fi
30329   fi
30330 
30331   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30332   if test "x$test_cygdrive_prefix" = x; then
30333     # As a simple fix, exclude /usr/bin since it's not a real path.
30334     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30335       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30336       # a path prefixed by /cygdrive for fixpath to work.
30337       new_path="$CYGWIN_ROOT_PATH$input_path"
30338     fi
30339   fi
30340 
30341   # remove trailing .exe if any
30342   new_path="${new_path/%.exe/}"
30343 
30344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30345 
30346   # First separate the path from the arguments. This will split at the first
30347   # space.
30348   complete="$PROPER_COMPILER_CXX"
30349   path="${complete%% *}"
30350   tmp="$complete EOL"
30351   arguments="${tmp#* }"
30352 
30353   # Input might be given as Windows format, start by converting to
30354   # unix format.
30355   new_path="$path"
30356 
30357   windows_path="$new_path"
30358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30359     unix_path=`$CYGPATH -u "$windows_path"`
30360     new_path="$unix_path"
30361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30363     new_path="$unix_path"
30364   fi
30365 
30366 
30367   # Now try to locate executable using which
30368   new_path=`$WHICH "$new_path" 2> /dev/null`
30369 
30370   if test "x$new_path" = x; then
30371     # Oops. Which didn't find the executable.
30372     # The splitting of arguments from the executable at a space might have been incorrect,
30373     # since paths with space are more likely in Windows. Give it another try with the whole
30374     # argument.
30375     path="$complete"
30376     arguments="EOL"
30377     new_path="$path"
30378 
30379   windows_path="$new_path"
30380   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30381     unix_path=`$CYGPATH -u "$windows_path"`
30382     new_path="$unix_path"
30383   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30384     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30385     new_path="$unix_path"
30386   fi
30387 
30388 
30389     new_path=`$WHICH "$new_path" 2> /dev/null`
30390     # bat and cmd files are not always considered executable in MSYS causing which
30391     # to not find them
30392     if test "x$new_path" = x \
30393         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30394         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30395       new_path="$path"
30396 
30397   windows_path="$new_path"
30398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30399     unix_path=`$CYGPATH -u "$windows_path"`
30400     new_path="$unix_path"
30401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30403     new_path="$unix_path"
30404   fi
30405 
30406     fi
30407 
30408     if test "x$new_path" = x; then
30409       # It's still not found. Now this is an unrecoverable error.
30410       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30411 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30412       has_space=`$ECHO "$complete" | $GREP " "`
30413       if test "x$has_space" != x; then
30414         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30415 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30416       fi
30417       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30418     fi
30419   fi
30420 
30421   # Now new_path has a complete unix path to the binary
30422   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30423     # Keep paths in /bin as-is, but remove trailing .exe if any
30424     new_path="${new_path/%.exe/}"
30425     # Do not save /bin paths to all_fixpath_prefixes!
30426   else
30427     # Not in mixed or Windows style, start by that.
30428     new_path=`cmd //c echo $new_path`
30429 
30430   input_path="$new_path"
30431   # Check if we need to convert this using DOS-style short mode. If the path
30432   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30433   # take no chances and rewrite it.
30434   # Note: m4 eats our [], so we need to use [ and ] instead.
30435   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30436   if test "x$has_forbidden_chars" != x; then
30437     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30438     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30439   fi
30440 
30441     # Output is in $new_path
30442 
30443   windows_path="$new_path"
30444   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30445     unix_path=`$CYGPATH -u "$windows_path"`
30446     new_path="$unix_path"
30447   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30448     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30449     new_path="$unix_path"
30450   fi
30451 
30452     # remove trailing .exe if any
30453     new_path="${new_path/%.exe/}"
30454 
30455     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30456     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30457   fi
30458 
30459   else
30460     # We're on a posix platform. Hooray! :)
30461     # First separate the path from the arguments. This will split at the first
30462     # space.
30463     complete="$PROPER_COMPILER_CXX"
30464     path="${complete%% *}"
30465     tmp="$complete EOL"
30466     arguments="${tmp#* }"
30467 
30468     # Cannot rely on the command "which" here since it doesn't always work.
30469     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30470     if test -z "$is_absolute_path"; then
30471       # Path to executable is not absolute. Find it.
30472       IFS_save="$IFS"
30473       IFS=:
30474       for p in $PATH; do
30475         if test -f "$p/$path" && test -x "$p/$path"; then
30476           new_path="$p/$path"
30477           break
30478         fi
30479       done
30480       IFS="$IFS_save"
30481     else
30482       # This is an absolute path, we can use it without further modifications.
30483       new_path="$path"
30484     fi
30485 
30486     if test "x$new_path" = x; then
30487       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30488 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30489       has_space=`$ECHO "$complete" | $GREP " "`
30490       if test "x$has_space" != x; then
30491         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30492 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30493       fi
30494       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30495     fi
30496   fi
30497 
30498   # Now join together the path and the arguments once again
30499   if test "x$arguments" != xEOL; then
30500     new_complete="$new_path ${arguments% *}"
30501   else
30502     new_complete="$new_path"
30503   fi
30504 
30505   if test "x$complete" != "x$new_complete"; then
30506     PROPER_COMPILER_CXX="$new_complete"
30507     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30508 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30509   fi
30510 
30511     PATH="$RETRY_COMPILER_SAVED_PATH"
30512 
30513     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30514 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30515 
30516   if test "x$OPENJDK_BUILD_OS" != xwindows; then
30517     # Follow a chain of symbolic links. Use readlink
30518     # where it exists, else fall back to horribly
30519     # complicated shell code.
30520     if test "x$READLINK_TESTED" != yes; then
30521       # On MacOSX there is a readlink tool with a different
30522       # purpose than the GNU readlink tool. Check the found readlink.
30523       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30524       if test "x$ISGNU" = x; then
30525         # A readlink that we do not know how to use.
30526         # Are there other non-GNU readlinks out there?
30527         READLINK_TESTED=yes
30528         READLINK=
30529       fi
30530     fi
30531 
30532     if test "x$READLINK" != x; then
30533       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30534     else
30535       # Save the current directory for restoring afterwards
30536       STARTDIR=$PWD
30537       COUNTER=0
30538       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30539       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30540       cd $sym_link_dir
30541       # Use -P flag to resolve symlinks in directories.
30542       cd `$THEPWDCMD -P`
30543       sym_link_dir=`$THEPWDCMD -P`
30544       # Resolve file symlinks
30545       while test $COUNTER -lt 20; do
30546         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30547         if test "x$ISLINK" == x; then
30548           # This is not a symbolic link! We are done!
30549           break
30550         fi
30551         # Again resolve directory symlinks since the target of the just found
30552         # link could be in a different directory
30553         cd `$DIRNAME $ISLINK`
30554         sym_link_dir=`$THEPWDCMD -P`
30555         sym_link_file=`$BASENAME $ISLINK`
30556         let COUNTER=COUNTER+1
30557       done
30558       cd $STARTDIR
30559       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30560     fi
30561   fi
30562 
30563     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30564 $as_echo "$PROPER_COMPILER_CXX" >&6; }
30565     CXX="$PROPER_COMPILER_CXX"
30566   else
30567     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30568 $as_echo "no, keeping CXX" >&6; }
30569   fi
30570 
30571 
30572   COMPILER=$CXX
30573   COMPILER_NAME=$COMPILER_NAME
30574 
30575   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30576     # cc -V output typically looks like
30577     #     cc: Sun C 5.12 Linux_i386 2011/11/16
30578     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30579     # Check that this is likely to be the Solaris Studio cc.
30580     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30581     if test $? -ne 0; then
30582       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30583       { $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
30584 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30585       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30586 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30587       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30588 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30589       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30590     fi
30591     # Remove usage instructions (if present), and
30592     # collapse compiler output into a single line
30593     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30594         $SED -e 's/ *[Uu]sage:.*//'`
30595     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30596         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30597   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30598     # xlc -qversion output typically looks like
30599     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30600     #     Version: 11.01.0000.0015
30601     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30602     # Check that this is likely to be the IBM XL C compiler.
30603     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30604     if test $? -ne 0; then
30605       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30606       { $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
30607 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30608       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30609 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30610       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30611 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30612       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30613     fi
30614     # Collapse compiler output into a single line
30615     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30616     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30617         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30618   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30619     # There is no specific version flag, but all output starts with a version string.
30620     # First line typically looks something like:
30621     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30622     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30623     # Check that this is likely to be Microsoft CL.EXE.
30624     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30625     if test $? -ne 0; then
30626       { $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
30627 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30628       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30629 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30630       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30631     fi
30632     # Collapse compiler output into a single line
30633     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30634     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30635         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30636   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30637     # gcc --version output typically looks like
30638     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30639     #     Copyright (C) 2013 Free Software Foundation, Inc.
30640     #     This is free software; see the source for copying conditions.  There is NO
30641     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30642     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30643     # Check that this is likely to be GCC.
30644     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30645     if test $? -ne 0; then
30646       { $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
30647 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30648       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30649 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30650       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30651     fi
30652     # Remove Copyright and legalese from version string, and
30653     # collapse into a single line
30654     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30655         $SED -e 's/ *Copyright .*//'`
30656     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30657         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30658   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30659     # clang --version output typically looks like
30660     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30661     #    clang version 3.3 (tags/RELEASE_33/final)
30662     # or
30663     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30664     #    Target: x86_64-pc-linux-gnu
30665     #    Thread model: posix
30666     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30667     # Check that this is likely to be clang
30668     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30669     if test $? -ne 0; then
30670       { $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
30671 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30672       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30673 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30674       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30675     fi
30676     # Collapse compiler output into a single line
30677     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30678     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30679         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30680   else
30681       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30682   fi
30683   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30684   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30685   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30686   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30687 
30688   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30689 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30690 
30691 
30692   # Now that we have resolved CXX ourself, let autoconf have its go at it
30693   ac_ext=cpp
30694 ac_cpp='$CXXCPP $CPPFLAGS'
30695 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30696 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30697 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30698 if test -z "$CXX"; then
30699   if test -n "$CCC"; then
30700     CXX=$CCC
30701   else
30702     if test -n "$ac_tool_prefix"; then
30703   for ac_prog in $CXX
30704   do
30705     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30706 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30708 $as_echo_n "checking for $ac_word... " >&6; }
30709 if ${ac_cv_prog_CXX+:} false; then :
30710   $as_echo_n "(cached) " >&6
30711 else
30712   if test -n "$CXX"; then
30713   ac_cv_prog_CXX="$CXX" # Let the user override the test.
30714 else
30715 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30716 for as_dir in $PATH
30717 do
30718   IFS=$as_save_IFS
30719   test -z "$as_dir" && as_dir=.
30720     for ac_exec_ext in '' $ac_executable_extensions; do
30721   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30722     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30723     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30724     break 2
30725   fi
30726 done
30727   done
30728 IFS=$as_save_IFS
30729 
30730 fi
30731 fi
30732 CXX=$ac_cv_prog_CXX
30733 if test -n "$CXX"; then
30734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30735 $as_echo "$CXX" >&6; }
30736 else
30737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30738 $as_echo "no" >&6; }
30739 fi
30740 
30741 
30742     test -n "$CXX" && break
30743   done
30744 fi
30745 if test -z "$CXX"; then
30746   ac_ct_CXX=$CXX
30747   for ac_prog in $CXX
30748 do
30749   # Extract the first word of "$ac_prog", so it can be a program name with args.
30750 set dummy $ac_prog; ac_word=$2
30751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30752 $as_echo_n "checking for $ac_word... " >&6; }
30753 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30754   $as_echo_n "(cached) " >&6
30755 else
30756   if test -n "$ac_ct_CXX"; then
30757   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30758 else
30759 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30760 for as_dir in $PATH
30761 do
30762   IFS=$as_save_IFS
30763   test -z "$as_dir" && as_dir=.
30764     for ac_exec_ext in '' $ac_executable_extensions; do
30765   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30766     ac_cv_prog_ac_ct_CXX="$ac_prog"
30767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30768     break 2
30769   fi
30770 done
30771   done
30772 IFS=$as_save_IFS
30773 
30774 fi
30775 fi
30776 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30777 if test -n "$ac_ct_CXX"; then
30778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30779 $as_echo "$ac_ct_CXX" >&6; }
30780 else
30781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30782 $as_echo "no" >&6; }
30783 fi
30784 
30785 
30786   test -n "$ac_ct_CXX" && break
30787 done
30788 
30789   if test "x$ac_ct_CXX" = x; then
30790     CXX="g++"
30791   else
30792     case $cross_compiling:$ac_tool_warned in
30793 yes:)
30794 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30795 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30796 ac_tool_warned=yes ;;
30797 esac
30798     CXX=$ac_ct_CXX
30799   fi
30800 fi
30801 
30802   fi
30803 fi
30804 # Provide some information about the compiler.
30805 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30806 set X $ac_compile
30807 ac_compiler=$2
30808 for ac_option in --version -v -V -qversion; do
30809   { { ac_try="$ac_compiler $ac_option >&5"
30810 case "(($ac_try" in
30811   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30812   *) ac_try_echo=$ac_try;;
30813 esac
30814 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30815 $as_echo "$ac_try_echo"; } >&5
30816   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30817   ac_status=$?
30818   if test -s conftest.err; then
30819     sed '10a\
30820 ... rest of stderr output deleted ...
30821          10q' conftest.err >conftest.er1
30822     cat conftest.er1 >&5
30823   fi
30824   rm -f conftest.er1 conftest.err
30825   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30826   test $ac_status = 0; }
30827 done
30828 
30829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30830 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30831 if ${ac_cv_cxx_compiler_gnu+:} false; then :
30832   $as_echo_n "(cached) " >&6
30833 else
30834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30835 /* end confdefs.h.  */
30836 
30837 int
30838 main ()
30839 {
30840 #ifndef __GNUC__
30841        choke me
30842 #endif
30843 
30844   ;
30845   return 0;
30846 }
30847 _ACEOF
30848 if ac_fn_cxx_try_compile "$LINENO"; then :
30849   ac_compiler_gnu=yes
30850 else
30851   ac_compiler_gnu=no
30852 fi
30853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30854 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30855 
30856 fi
30857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30858 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30859 if test $ac_compiler_gnu = yes; then
30860   GXX=yes
30861 else
30862   GXX=
30863 fi
30864 ac_test_CXXFLAGS=${CXXFLAGS+set}
30865 ac_save_CXXFLAGS=$CXXFLAGS
30866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30867 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
30868 if ${ac_cv_prog_cxx_g+:} false; then :
30869   $as_echo_n "(cached) " >&6
30870 else
30871   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30872    ac_cxx_werror_flag=yes
30873    ac_cv_prog_cxx_g=no
30874    CXXFLAGS="-g"
30875    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30876 /* end confdefs.h.  */
30877 
30878 int
30879 main ()
30880 {
30881 
30882   ;
30883   return 0;
30884 }
30885 _ACEOF
30886 if ac_fn_cxx_try_compile "$LINENO"; then :
30887   ac_cv_prog_cxx_g=yes
30888 else
30889   CXXFLAGS=""
30890       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30891 /* end confdefs.h.  */
30892 
30893 int
30894 main ()
30895 {
30896 
30897   ;
30898   return 0;
30899 }
30900 _ACEOF
30901 if ac_fn_cxx_try_compile "$LINENO"; then :
30902 
30903 else
30904   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30905          CXXFLAGS="-g"
30906          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30907 /* end confdefs.h.  */
30908 
30909 int
30910 main ()
30911 {
30912 
30913   ;
30914   return 0;
30915 }
30916 _ACEOF
30917 if ac_fn_cxx_try_compile "$LINENO"; then :
30918   ac_cv_prog_cxx_g=yes
30919 fi
30920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30921 fi
30922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30923 fi
30924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30925    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30926 fi
30927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30928 $as_echo "$ac_cv_prog_cxx_g" >&6; }
30929 if test "$ac_test_CXXFLAGS" = set; then
30930   CXXFLAGS=$ac_save_CXXFLAGS
30931 elif test $ac_cv_prog_cxx_g = yes; then
30932   if test "$GXX" = yes; then
30933     CXXFLAGS="-g -O2"
30934   else
30935     CXXFLAGS="-g"
30936   fi
30937 else
30938   if test "$GXX" = yes; then
30939     CXXFLAGS="-O2"
30940   else
30941     CXXFLAGS=
30942   fi
30943 fi
30944 ac_ext=cpp
30945 ac_cpp='$CXXCPP $CPPFLAGS'
30946 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30947 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30948 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30949 
30950 
30951   #
30952   # Setup the preprocessor (CPP and CXXCPP)
30953   #
30954   ac_ext=c
30955 ac_cpp='$CPP $CPPFLAGS'
30956 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30957 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30958 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30960 $as_echo_n "checking how to run the C preprocessor... " >&6; }
30961 # On Suns, sometimes $CPP names a directory.
30962 if test -n "$CPP" && test -d "$CPP"; then
30963   CPP=
30964 fi
30965 if test -z "$CPP"; then
30966   if ${ac_cv_prog_CPP+:} false; then :
30967   $as_echo_n "(cached) " >&6
30968 else
30969       # Double quotes because CPP needs to be expanded
30970     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30971     do
30972       ac_preproc_ok=false
30973 for ac_c_preproc_warn_flag in '' yes
30974 do
30975   # Use a header file that comes with gcc, so configuring glibc
30976   # with a fresh cross-compiler works.
30977   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30978   # <limits.h> exists even on freestanding compilers.
30979   # On the NeXT, cc -E runs the code through the compiler's parser,
30980   # not just through cpp. "Syntax error" is here to catch this case.
30981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30982 /* end confdefs.h.  */
30983 #ifdef __STDC__
30984 # include <limits.h>
30985 #else
30986 # include <assert.h>
30987 #endif
30988                      Syntax error
30989 _ACEOF
30990 if ac_fn_c_try_cpp "$LINENO"; then :
30991 
30992 else
30993   # Broken: fails on valid input.
30994 continue
30995 fi
30996 rm -f conftest.err conftest.i conftest.$ac_ext
30997 
30998   # OK, works on sane cases.  Now check whether nonexistent headers
30999   # can be detected and how.
31000   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31001 /* end confdefs.h.  */
31002 #include <ac_nonexistent.h>
31003 _ACEOF
31004 if ac_fn_c_try_cpp "$LINENO"; then :
31005   # Broken: success on invalid input.
31006 continue
31007 else
31008   # Passes both tests.
31009 ac_preproc_ok=:
31010 break
31011 fi
31012 rm -f conftest.err conftest.i conftest.$ac_ext
31013 
31014 done
31015 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31016 rm -f conftest.i conftest.err conftest.$ac_ext
31017 if $ac_preproc_ok; then :
31018   break
31019 fi
31020 
31021     done
31022     ac_cv_prog_CPP=$CPP
31023 
31024 fi
31025   CPP=$ac_cv_prog_CPP
31026 else
31027   ac_cv_prog_CPP=$CPP
31028 fi
31029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31030 $as_echo "$CPP" >&6; }
31031 ac_preproc_ok=false
31032 for ac_c_preproc_warn_flag in '' yes
31033 do
31034   # Use a header file that comes with gcc, so configuring glibc
31035   # with a fresh cross-compiler works.
31036   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31037   # <limits.h> exists even on freestanding compilers.
31038   # On the NeXT, cc -E runs the code through the compiler's parser,
31039   # not just through cpp. "Syntax error" is here to catch this case.
31040   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31041 /* end confdefs.h.  */
31042 #ifdef __STDC__
31043 # include <limits.h>
31044 #else
31045 # include <assert.h>
31046 #endif
31047                      Syntax error
31048 _ACEOF
31049 if ac_fn_c_try_cpp "$LINENO"; then :
31050 
31051 else
31052   # Broken: fails on valid input.
31053 continue
31054 fi
31055 rm -f conftest.err conftest.i conftest.$ac_ext
31056 
31057   # OK, works on sane cases.  Now check whether nonexistent headers
31058   # can be detected and how.
31059   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31060 /* end confdefs.h.  */
31061 #include <ac_nonexistent.h>
31062 _ACEOF
31063 if ac_fn_c_try_cpp "$LINENO"; then :
31064   # Broken: success on invalid input.
31065 continue
31066 else
31067   # Passes both tests.
31068 ac_preproc_ok=:
31069 break
31070 fi
31071 rm -f conftest.err conftest.i conftest.$ac_ext
31072 
31073 done
31074 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31075 rm -f conftest.i conftest.err conftest.$ac_ext
31076 if $ac_preproc_ok; then :
31077 
31078 else
31079   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31080 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31081 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31082 See \`config.log' for more details" "$LINENO" 5; }
31083 fi
31084 
31085 ac_ext=cpp
31086 ac_cpp='$CXXCPP $CPPFLAGS'
31087 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31088 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31089 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31090 
31091 
31092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31093 
31094   # First separate the path from the arguments. This will split at the first
31095   # space.
31096   complete="$CPP"
31097   path="${complete%% *}"
31098   tmp="$complete EOL"
31099   arguments="${tmp#* }"
31100 
31101   # Input might be given as Windows format, start by converting to
31102   # unix format.
31103   new_path=`$CYGPATH -u "$path"`
31104 
31105   # Now try to locate executable using which
31106   new_path=`$WHICH "$new_path" 2> /dev/null`
31107   # bat and cmd files are not always considered executable in cygwin causing which
31108   # to not find them
31109   if test "x$new_path" = x \
31110       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31111       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31112     new_path=`$CYGPATH -u "$path"`
31113   fi
31114   if test "x$new_path" = x; then
31115     # Oops. Which didn't find the executable.
31116     # The splitting of arguments from the executable at a space might have been incorrect,
31117     # since paths with space are more likely in Windows. Give it another try with the whole
31118     # argument.
31119     path="$complete"
31120     arguments="EOL"
31121     new_path=`$CYGPATH -u "$path"`
31122     new_path=`$WHICH "$new_path" 2> /dev/null`
31123     # bat and cmd files are not always considered executable in cygwin causing which
31124     # to not find them
31125     if test "x$new_path" = x \
31126         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31127         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31128       new_path=`$CYGPATH -u "$path"`
31129     fi
31130     if test "x$new_path" = x; then
31131       # It's still not found. Now this is an unrecoverable error.
31132       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31133 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31134       has_space=`$ECHO "$complete" | $GREP " "`
31135       if test "x$has_space" != x; then
31136         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31137 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31138       fi
31139       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31140     fi
31141   fi
31142 
31143   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31144   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31145   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31146   # "foo.exe" is OK but "foo" is an error.
31147   #
31148   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31149   # It is also a way to make sure we got the proper file name for the real test later on.
31150   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31151   if test "x$test_shortpath" = x; then
31152     # Short path failed, file does not exist as specified.
31153     # Try adding .exe or .cmd
31154     if test -f "${new_path}.exe"; then
31155       input_to_shortpath="${new_path}.exe"
31156     elif test -f "${new_path}.cmd"; then
31157       input_to_shortpath="${new_path}.cmd"
31158     else
31159       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31160 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31161       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31162 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31163       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31164     fi
31165   else
31166     input_to_shortpath="$new_path"
31167   fi
31168 
31169   # Call helper function which possibly converts this using DOS-style short mode.
31170   # If so, the updated path is stored in $new_path.
31171   new_path="$input_to_shortpath"
31172 
31173   input_path="$input_to_shortpath"
31174   # Check if we need to convert this using DOS-style short mode. If the path
31175   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31176   # take no chances and rewrite it.
31177   # Note: m4 eats our [], so we need to use [ and ] instead.
31178   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31179   if test "x$has_forbidden_chars" != x; then
31180     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31181     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31182     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31183     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31184       # Going to short mode and back again did indeed matter. Since short mode is
31185       # case insensitive, let's make it lowercase to improve readability.
31186       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31187       # Now convert it back to Unix-stile (cygpath)
31188       input_path=`$CYGPATH -u "$shortmode_path"`
31189       new_path="$input_path"
31190     fi
31191   fi
31192 
31193   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31194   if test "x$test_cygdrive_prefix" = x; then
31195     # As a simple fix, exclude /usr/bin since it's not a real path.
31196     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31197       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31198       # a path prefixed by /cygdrive for fixpath to work.
31199       new_path="$CYGWIN_ROOT_PATH$input_path"
31200     fi
31201   fi
31202 
31203   # remove trailing .exe if any
31204   new_path="${new_path/%.exe/}"
31205 
31206   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31207 
31208   # First separate the path from the arguments. This will split at the first
31209   # space.
31210   complete="$CPP"
31211   path="${complete%% *}"
31212   tmp="$complete EOL"
31213   arguments="${tmp#* }"
31214 
31215   # Input might be given as Windows format, start by converting to
31216   # unix format.
31217   new_path="$path"
31218 
31219   windows_path="$new_path"
31220   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31221     unix_path=`$CYGPATH -u "$windows_path"`
31222     new_path="$unix_path"
31223   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31224     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31225     new_path="$unix_path"
31226   fi
31227 
31228 
31229   # Now try to locate executable using which
31230   new_path=`$WHICH "$new_path" 2> /dev/null`
31231 
31232   if test "x$new_path" = x; then
31233     # Oops. Which didn't find the executable.
31234     # The splitting of arguments from the executable at a space might have been incorrect,
31235     # since paths with space are more likely in Windows. Give it another try with the whole
31236     # argument.
31237     path="$complete"
31238     arguments="EOL"
31239     new_path="$path"
31240 
31241   windows_path="$new_path"
31242   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31243     unix_path=`$CYGPATH -u "$windows_path"`
31244     new_path="$unix_path"
31245   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31246     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31247     new_path="$unix_path"
31248   fi
31249 
31250 
31251     new_path=`$WHICH "$new_path" 2> /dev/null`
31252     # bat and cmd files are not always considered executable in MSYS causing which
31253     # to not find them
31254     if test "x$new_path" = x \
31255         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31256         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31257       new_path="$path"
31258 
31259   windows_path="$new_path"
31260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31261     unix_path=`$CYGPATH -u "$windows_path"`
31262     new_path="$unix_path"
31263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31265     new_path="$unix_path"
31266   fi
31267 
31268     fi
31269 
31270     if test "x$new_path" = x; then
31271       # It's still not found. Now this is an unrecoverable error.
31272       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31273 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31274       has_space=`$ECHO "$complete" | $GREP " "`
31275       if test "x$has_space" != x; then
31276         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31277 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31278       fi
31279       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31280     fi
31281   fi
31282 
31283   # Now new_path has a complete unix path to the binary
31284   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31285     # Keep paths in /bin as-is, but remove trailing .exe if any
31286     new_path="${new_path/%.exe/}"
31287     # Do not save /bin paths to all_fixpath_prefixes!
31288   else
31289     # Not in mixed or Windows style, start by that.
31290     new_path=`cmd //c echo $new_path`
31291 
31292   input_path="$new_path"
31293   # Check if we need to convert this using DOS-style short mode. If the path
31294   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31295   # take no chances and rewrite it.
31296   # Note: m4 eats our [], so we need to use [ and ] instead.
31297   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31298   if test "x$has_forbidden_chars" != x; then
31299     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31300     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31301   fi
31302 
31303     # Output is in $new_path
31304 
31305   windows_path="$new_path"
31306   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31307     unix_path=`$CYGPATH -u "$windows_path"`
31308     new_path="$unix_path"
31309   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31310     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31311     new_path="$unix_path"
31312   fi
31313 
31314     # remove trailing .exe if any
31315     new_path="${new_path/%.exe/}"
31316 
31317     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31318     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31319   fi
31320 
31321   else
31322     # We're on a posix platform. Hooray! :)
31323     # First separate the path from the arguments. This will split at the first
31324     # space.
31325     complete="$CPP"
31326     path="${complete%% *}"
31327     tmp="$complete EOL"
31328     arguments="${tmp#* }"
31329 
31330     # Cannot rely on the command "which" here since it doesn't always work.
31331     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31332     if test -z "$is_absolute_path"; then
31333       # Path to executable is not absolute. Find it.
31334       IFS_save="$IFS"
31335       IFS=:
31336       for p in $PATH; do
31337         if test -f "$p/$path" && test -x "$p/$path"; then
31338           new_path="$p/$path"
31339           break
31340         fi
31341       done
31342       IFS="$IFS_save"
31343     else
31344       # This is an absolute path, we can use it without further modifications.
31345       new_path="$path"
31346     fi
31347 
31348     if test "x$new_path" = x; then
31349       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31350 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31351       has_space=`$ECHO "$complete" | $GREP " "`
31352       if test "x$has_space" != x; then
31353         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31354 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31355       fi
31356       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31357     fi
31358   fi
31359 
31360   # Now join together the path and the arguments once again
31361   if test "x$arguments" != xEOL; then
31362     new_complete="$new_path ${arguments% *}"
31363   else
31364     new_complete="$new_path"
31365   fi
31366 
31367   if test "x$complete" != "x$new_complete"; then
31368     CPP="$new_complete"
31369     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31370 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31371   fi
31372 
31373   ac_ext=cpp
31374 ac_cpp='$CXXCPP $CPPFLAGS'
31375 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31376 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31377 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31379 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31380 if test -z "$CXXCPP"; then
31381   if ${ac_cv_prog_CXXCPP+:} false; then :
31382   $as_echo_n "(cached) " >&6
31383 else
31384       # Double quotes because CXXCPP needs to be expanded
31385     for CXXCPP in "$CXX -E" "/lib/cpp"
31386     do
31387       ac_preproc_ok=false
31388 for ac_cxx_preproc_warn_flag in '' yes
31389 do
31390   # Use a header file that comes with gcc, so configuring glibc
31391   # with a fresh cross-compiler works.
31392   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31393   # <limits.h> exists even on freestanding compilers.
31394   # On the NeXT, cc -E runs the code through the compiler's parser,
31395   # not just through cpp. "Syntax error" is here to catch this case.
31396   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31397 /* end confdefs.h.  */
31398 #ifdef __STDC__
31399 # include <limits.h>
31400 #else
31401 # include <assert.h>
31402 #endif
31403                      Syntax error
31404 _ACEOF
31405 if ac_fn_cxx_try_cpp "$LINENO"; then :
31406 
31407 else
31408   # Broken: fails on valid input.
31409 continue
31410 fi
31411 rm -f conftest.err conftest.i conftest.$ac_ext
31412 
31413   # OK, works on sane cases.  Now check whether nonexistent headers
31414   # can be detected and how.
31415   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31416 /* end confdefs.h.  */
31417 #include <ac_nonexistent.h>
31418 _ACEOF
31419 if ac_fn_cxx_try_cpp "$LINENO"; then :
31420   # Broken: success on invalid input.
31421 continue
31422 else
31423   # Passes both tests.
31424 ac_preproc_ok=:
31425 break
31426 fi
31427 rm -f conftest.err conftest.i conftest.$ac_ext
31428 
31429 done
31430 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31431 rm -f conftest.i conftest.err conftest.$ac_ext
31432 if $ac_preproc_ok; then :
31433   break
31434 fi
31435 
31436     done
31437     ac_cv_prog_CXXCPP=$CXXCPP
31438 
31439 fi
31440   CXXCPP=$ac_cv_prog_CXXCPP
31441 else
31442   ac_cv_prog_CXXCPP=$CXXCPP
31443 fi
31444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31445 $as_echo "$CXXCPP" >&6; }
31446 ac_preproc_ok=false
31447 for ac_cxx_preproc_warn_flag in '' yes
31448 do
31449   # Use a header file that comes with gcc, so configuring glibc
31450   # with a fresh cross-compiler works.
31451   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31452   # <limits.h> exists even on freestanding compilers.
31453   # On the NeXT, cc -E runs the code through the compiler's parser,
31454   # not just through cpp. "Syntax error" is here to catch this case.
31455   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31456 /* end confdefs.h.  */
31457 #ifdef __STDC__
31458 # include <limits.h>
31459 #else
31460 # include <assert.h>
31461 #endif
31462                      Syntax error
31463 _ACEOF
31464 if ac_fn_cxx_try_cpp "$LINENO"; then :
31465 
31466 else
31467   # Broken: fails on valid input.
31468 continue
31469 fi
31470 rm -f conftest.err conftest.i conftest.$ac_ext
31471 
31472   # OK, works on sane cases.  Now check whether nonexistent headers
31473   # can be detected and how.
31474   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31475 /* end confdefs.h.  */
31476 #include <ac_nonexistent.h>
31477 _ACEOF
31478 if ac_fn_cxx_try_cpp "$LINENO"; then :
31479   # Broken: success on invalid input.
31480 continue
31481 else
31482   # Passes both tests.
31483 ac_preproc_ok=:
31484 break
31485 fi
31486 rm -f conftest.err conftest.i conftest.$ac_ext
31487 
31488 done
31489 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31490 rm -f conftest.i conftest.err conftest.$ac_ext
31491 if $ac_preproc_ok; then :
31492 
31493 else
31494   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31495 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31496 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31497 See \`config.log' for more details" "$LINENO" 5; }
31498 fi
31499 
31500 ac_ext=cpp
31501 ac_cpp='$CXXCPP $CPPFLAGS'
31502 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31503 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31504 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31505 
31506 
31507   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31508 
31509   # First separate the path from the arguments. This will split at the first
31510   # space.
31511   complete="$CXXCPP"
31512   path="${complete%% *}"
31513   tmp="$complete EOL"
31514   arguments="${tmp#* }"
31515 
31516   # Input might be given as Windows format, start by converting to
31517   # unix format.
31518   new_path=`$CYGPATH -u "$path"`
31519 
31520   # Now try to locate executable using which
31521   new_path=`$WHICH "$new_path" 2> /dev/null`
31522   # bat and cmd files are not always considered executable in cygwin causing which
31523   # to not find them
31524   if test "x$new_path" = x \
31525       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31526       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31527     new_path=`$CYGPATH -u "$path"`
31528   fi
31529   if test "x$new_path" = x; then
31530     # Oops. Which didn't find the executable.
31531     # The splitting of arguments from the executable at a space might have been incorrect,
31532     # since paths with space are more likely in Windows. Give it another try with the whole
31533     # argument.
31534     path="$complete"
31535     arguments="EOL"
31536     new_path=`$CYGPATH -u "$path"`
31537     new_path=`$WHICH "$new_path" 2> /dev/null`
31538     # bat and cmd files are not always considered executable in cygwin causing which
31539     # to not find them
31540     if test "x$new_path" = x \
31541         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31542         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31543       new_path=`$CYGPATH -u "$path"`
31544     fi
31545     if test "x$new_path" = x; then
31546       # It's still not found. Now this is an unrecoverable error.
31547       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31548 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31549       has_space=`$ECHO "$complete" | $GREP " "`
31550       if test "x$has_space" != x; then
31551         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31552 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31553       fi
31554       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31555     fi
31556   fi
31557 
31558   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31559   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31560   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31561   # "foo.exe" is OK but "foo" is an error.
31562   #
31563   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31564   # It is also a way to make sure we got the proper file name for the real test later on.
31565   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31566   if test "x$test_shortpath" = x; then
31567     # Short path failed, file does not exist as specified.
31568     # Try adding .exe or .cmd
31569     if test -f "${new_path}.exe"; then
31570       input_to_shortpath="${new_path}.exe"
31571     elif test -f "${new_path}.cmd"; then
31572       input_to_shortpath="${new_path}.cmd"
31573     else
31574       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31575 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31576       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31577 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31578       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31579     fi
31580   else
31581     input_to_shortpath="$new_path"
31582   fi
31583 
31584   # Call helper function which possibly converts this using DOS-style short mode.
31585   # If so, the updated path is stored in $new_path.
31586   new_path="$input_to_shortpath"
31587 
31588   input_path="$input_to_shortpath"
31589   # Check if we need to convert this using DOS-style short mode. If the path
31590   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31591   # take no chances and rewrite it.
31592   # Note: m4 eats our [], so we need to use [ and ] instead.
31593   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31594   if test "x$has_forbidden_chars" != x; then
31595     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31596     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31597     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31598     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31599       # Going to short mode and back again did indeed matter. Since short mode is
31600       # case insensitive, let's make it lowercase to improve readability.
31601       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31602       # Now convert it back to Unix-stile (cygpath)
31603       input_path=`$CYGPATH -u "$shortmode_path"`
31604       new_path="$input_path"
31605     fi
31606   fi
31607 
31608   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31609   if test "x$test_cygdrive_prefix" = x; then
31610     # As a simple fix, exclude /usr/bin since it's not a real path.
31611     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31612       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31613       # a path prefixed by /cygdrive for fixpath to work.
31614       new_path="$CYGWIN_ROOT_PATH$input_path"
31615     fi
31616   fi
31617 
31618   # remove trailing .exe if any
31619   new_path="${new_path/%.exe/}"
31620 
31621   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31622 
31623   # First separate the path from the arguments. This will split at the first
31624   # space.
31625   complete="$CXXCPP"
31626   path="${complete%% *}"
31627   tmp="$complete EOL"
31628   arguments="${tmp#* }"
31629 
31630   # Input might be given as Windows format, start by converting to
31631   # unix format.
31632   new_path="$path"
31633 
31634   windows_path="$new_path"
31635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31636     unix_path=`$CYGPATH -u "$windows_path"`
31637     new_path="$unix_path"
31638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31640     new_path="$unix_path"
31641   fi
31642 
31643 
31644   # Now try to locate executable using which
31645   new_path=`$WHICH "$new_path" 2> /dev/null`
31646 
31647   if test "x$new_path" = x; then
31648     # Oops. Which didn't find the executable.
31649     # The splitting of arguments from the executable at a space might have been incorrect,
31650     # since paths with space are more likely in Windows. Give it another try with the whole
31651     # argument.
31652     path="$complete"
31653     arguments="EOL"
31654     new_path="$path"
31655 
31656   windows_path="$new_path"
31657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31658     unix_path=`$CYGPATH -u "$windows_path"`
31659     new_path="$unix_path"
31660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31661     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31662     new_path="$unix_path"
31663   fi
31664 
31665 
31666     new_path=`$WHICH "$new_path" 2> /dev/null`
31667     # bat and cmd files are not always considered executable in MSYS causing which
31668     # to not find them
31669     if test "x$new_path" = x \
31670         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31671         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31672       new_path="$path"
31673 
31674   windows_path="$new_path"
31675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31676     unix_path=`$CYGPATH -u "$windows_path"`
31677     new_path="$unix_path"
31678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31680     new_path="$unix_path"
31681   fi
31682 
31683     fi
31684 
31685     if test "x$new_path" = x; then
31686       # It's still not found. Now this is an unrecoverable error.
31687       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31688 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31689       has_space=`$ECHO "$complete" | $GREP " "`
31690       if test "x$has_space" != x; then
31691         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31692 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31693       fi
31694       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31695     fi
31696   fi
31697 
31698   # Now new_path has a complete unix path to the binary
31699   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31700     # Keep paths in /bin as-is, but remove trailing .exe if any
31701     new_path="${new_path/%.exe/}"
31702     # Do not save /bin paths to all_fixpath_prefixes!
31703   else
31704     # Not in mixed or Windows style, start by that.
31705     new_path=`cmd //c echo $new_path`
31706 
31707   input_path="$new_path"
31708   # Check if we need to convert this using DOS-style short mode. If the path
31709   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31710   # take no chances and rewrite it.
31711   # Note: m4 eats our [], so we need to use [ and ] instead.
31712   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31713   if test "x$has_forbidden_chars" != x; then
31714     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31715     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31716   fi
31717 
31718     # Output is in $new_path
31719 
31720   windows_path="$new_path"
31721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31722     unix_path=`$CYGPATH -u "$windows_path"`
31723     new_path="$unix_path"
31724   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31725     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31726     new_path="$unix_path"
31727   fi
31728 
31729     # remove trailing .exe if any
31730     new_path="${new_path/%.exe/}"
31731 
31732     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31733     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31734   fi
31735 
31736   else
31737     # We're on a posix platform. Hooray! :)
31738     # First separate the path from the arguments. This will split at the first
31739     # space.
31740     complete="$CXXCPP"
31741     path="${complete%% *}"
31742     tmp="$complete EOL"
31743     arguments="${tmp#* }"
31744 
31745     # Cannot rely on the command "which" here since it doesn't always work.
31746     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31747     if test -z "$is_absolute_path"; then
31748       # Path to executable is not absolute. Find it.
31749       IFS_save="$IFS"
31750       IFS=:
31751       for p in $PATH; do
31752         if test -f "$p/$path" && test -x "$p/$path"; then
31753           new_path="$p/$path"
31754           break
31755         fi
31756       done
31757       IFS="$IFS_save"
31758     else
31759       # This is an absolute path, we can use it without further modifications.
31760       new_path="$path"
31761     fi
31762 
31763     if test "x$new_path" = x; then
31764       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31765 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31766       has_space=`$ECHO "$complete" | $GREP " "`
31767       if test "x$has_space" != x; then
31768         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31769 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31770       fi
31771       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31772     fi
31773   fi
31774 
31775   # Now join together the path and the arguments once again
31776   if test "x$arguments" != xEOL; then
31777     new_complete="$new_path ${arguments% *}"
31778   else
31779     new_complete="$new_path"
31780   fi
31781 
31782   if test "x$complete" != "x$new_complete"; then
31783     CXXCPP="$new_complete"
31784     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31785 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31786   fi
31787 
31788 
31789   #
31790   # Setup the linker (LD)
31791   #
31792   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31793     # In the Microsoft toolchain we have a separate LD command "link".
31794     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31795     # a cygwin program for something completely different.
31796     # Extract the first word of "link", so it can be a program name with args.
31797 set dummy link; ac_word=$2
31798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31799 $as_echo_n "checking for $ac_word... " >&6; }
31800 if ${ac_cv_prog_LD+:} false; then :
31801   $as_echo_n "(cached) " >&6
31802 else
31803   if test -n "$LD"; then
31804   ac_cv_prog_LD="$LD" # Let the user override the test.
31805 else
31806   ac_prog_rejected=no
31807 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31808 for as_dir in $PATH
31809 do
31810   IFS=$as_save_IFS
31811   test -z "$as_dir" && as_dir=.
31812     for ac_exec_ext in '' $ac_executable_extensions; do
31813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31814     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31815        ac_prog_rejected=yes
31816        continue
31817      fi
31818     ac_cv_prog_LD="link"
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 if test $ac_prog_rejected = yes; then
31827   # We found a bogon in the path, so make sure we never use it.
31828   set dummy $ac_cv_prog_LD
31829   shift
31830   if test $# != 0; then
31831     # We chose a different compiler from the bogus one.
31832     # However, it has the same basename, so the bogon will be chosen
31833     # first if we set LD to just the basename; use the full file name.
31834     shift
31835     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31836   fi
31837 fi
31838 fi
31839 fi
31840 LD=$ac_cv_prog_LD
31841 if test -n "$LD"; then
31842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31843 $as_echo "$LD" >&6; }
31844 else
31845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31846 $as_echo "no" >&6; }
31847 fi
31848 
31849 
31850 
31851   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31852 
31853   # First separate the path from the arguments. This will split at the first
31854   # space.
31855   complete="$LD"
31856   path="${complete%% *}"
31857   tmp="$complete EOL"
31858   arguments="${tmp#* }"
31859 
31860   # Input might be given as Windows format, start by converting to
31861   # unix format.
31862   new_path=`$CYGPATH -u "$path"`
31863 
31864   # Now try to locate executable using which
31865   new_path=`$WHICH "$new_path" 2> /dev/null`
31866   # bat and cmd files are not always considered executable in cygwin causing which
31867   # to not find them
31868   if test "x$new_path" = x \
31869       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31870       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31871     new_path=`$CYGPATH -u "$path"`
31872   fi
31873   if test "x$new_path" = x; then
31874     # Oops. Which didn't find the executable.
31875     # The splitting of arguments from the executable at a space might have been incorrect,
31876     # since paths with space are more likely in Windows. Give it another try with the whole
31877     # argument.
31878     path="$complete"
31879     arguments="EOL"
31880     new_path=`$CYGPATH -u "$path"`
31881     new_path=`$WHICH "$new_path" 2> /dev/null`
31882     # bat and cmd files are not always considered executable in cygwin causing which
31883     # to not find them
31884     if test "x$new_path" = x \
31885         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31886         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31887       new_path=`$CYGPATH -u "$path"`
31888     fi
31889     if test "x$new_path" = x; then
31890       # It's still not found. Now this is an unrecoverable error.
31891       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31892 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31893       has_space=`$ECHO "$complete" | $GREP " "`
31894       if test "x$has_space" != x; then
31895         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31896 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31897       fi
31898       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31899     fi
31900   fi
31901 
31902   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31903   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31904   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31905   # "foo.exe" is OK but "foo" is an error.
31906   #
31907   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31908   # It is also a way to make sure we got the proper file name for the real test later on.
31909   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31910   if test "x$test_shortpath" = x; then
31911     # Short path failed, file does not exist as specified.
31912     # Try adding .exe or .cmd
31913     if test -f "${new_path}.exe"; then
31914       input_to_shortpath="${new_path}.exe"
31915     elif test -f "${new_path}.cmd"; then
31916       input_to_shortpath="${new_path}.cmd"
31917     else
31918       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31919 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31920       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31921 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31922       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31923     fi
31924   else
31925     input_to_shortpath="$new_path"
31926   fi
31927 
31928   # Call helper function which possibly converts this using DOS-style short mode.
31929   # If so, the updated path is stored in $new_path.
31930   new_path="$input_to_shortpath"
31931 
31932   input_path="$input_to_shortpath"
31933   # Check if we need to convert this using DOS-style short mode. If the path
31934   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31935   # take no chances and rewrite it.
31936   # Note: m4 eats our [], so we need to use [ and ] instead.
31937   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31938   if test "x$has_forbidden_chars" != x; then
31939     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31940     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31941     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31942     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31943       # Going to short mode and back again did indeed matter. Since short mode is
31944       # case insensitive, let's make it lowercase to improve readability.
31945       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31946       # Now convert it back to Unix-stile (cygpath)
31947       input_path=`$CYGPATH -u "$shortmode_path"`
31948       new_path="$input_path"
31949     fi
31950   fi
31951 
31952   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31953   if test "x$test_cygdrive_prefix" = x; then
31954     # As a simple fix, exclude /usr/bin since it's not a real path.
31955     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31956       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31957       # a path prefixed by /cygdrive for fixpath to work.
31958       new_path="$CYGWIN_ROOT_PATH$input_path"
31959     fi
31960   fi
31961 
31962   # remove trailing .exe if any
31963   new_path="${new_path/%.exe/}"
31964 
31965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31966 
31967   # First separate the path from the arguments. This will split at the first
31968   # space.
31969   complete="$LD"
31970   path="${complete%% *}"
31971   tmp="$complete EOL"
31972   arguments="${tmp#* }"
31973 
31974   # Input might be given as Windows format, start by converting to
31975   # unix format.
31976   new_path="$path"
31977 
31978   windows_path="$new_path"
31979   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31980     unix_path=`$CYGPATH -u "$windows_path"`
31981     new_path="$unix_path"
31982   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31983     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31984     new_path="$unix_path"
31985   fi
31986 
31987 
31988   # Now try to locate executable using which
31989   new_path=`$WHICH "$new_path" 2> /dev/null`
31990 
31991   if test "x$new_path" = x; then
31992     # Oops. Which didn't find the executable.
31993     # The splitting of arguments from the executable at a space might have been incorrect,
31994     # since paths with space are more likely in Windows. Give it another try with the whole
31995     # argument.
31996     path="$complete"
31997     arguments="EOL"
31998     new_path="$path"
31999 
32000   windows_path="$new_path"
32001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32002     unix_path=`$CYGPATH -u "$windows_path"`
32003     new_path="$unix_path"
32004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32006     new_path="$unix_path"
32007   fi
32008 
32009 
32010     new_path=`$WHICH "$new_path" 2> /dev/null`
32011     # bat and cmd files are not always considered executable in MSYS causing which
32012     # to not find them
32013     if test "x$new_path" = x \
32014         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32015         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32016       new_path="$path"
32017 
32018   windows_path="$new_path"
32019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32020     unix_path=`$CYGPATH -u "$windows_path"`
32021     new_path="$unix_path"
32022   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32023     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32024     new_path="$unix_path"
32025   fi
32026 
32027     fi
32028 
32029     if test "x$new_path" = x; then
32030       # It's still not found. Now this is an unrecoverable error.
32031       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32032 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32033       has_space=`$ECHO "$complete" | $GREP " "`
32034       if test "x$has_space" != x; then
32035         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32036 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32037       fi
32038       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32039     fi
32040   fi
32041 
32042   # Now new_path has a complete unix path to the binary
32043   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32044     # Keep paths in /bin as-is, but remove trailing .exe if any
32045     new_path="${new_path/%.exe/}"
32046     # Do not save /bin paths to all_fixpath_prefixes!
32047   else
32048     # Not in mixed or Windows style, start by that.
32049     new_path=`cmd //c echo $new_path`
32050 
32051   input_path="$new_path"
32052   # Check if we need to convert this using DOS-style short mode. If the path
32053   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32054   # take no chances and rewrite it.
32055   # Note: m4 eats our [], so we need to use [ and ] instead.
32056   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32057   if test "x$has_forbidden_chars" != x; then
32058     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32059     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32060   fi
32061 
32062     # Output is in $new_path
32063 
32064   windows_path="$new_path"
32065   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32066     unix_path=`$CYGPATH -u "$windows_path"`
32067     new_path="$unix_path"
32068   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32069     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32070     new_path="$unix_path"
32071   fi
32072 
32073     # remove trailing .exe if any
32074     new_path="${new_path/%.exe/}"
32075 
32076     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32077     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32078   fi
32079 
32080   else
32081     # We're on a posix platform. Hooray! :)
32082     # First separate the path from the arguments. This will split at the first
32083     # space.
32084     complete="$LD"
32085     path="${complete%% *}"
32086     tmp="$complete EOL"
32087     arguments="${tmp#* }"
32088 
32089     # Cannot rely on the command "which" here since it doesn't always work.
32090     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32091     if test -z "$is_absolute_path"; then
32092       # Path to executable is not absolute. Find it.
32093       IFS_save="$IFS"
32094       IFS=:
32095       for p in $PATH; do
32096         if test -f "$p/$path" && test -x "$p/$path"; then
32097           new_path="$p/$path"
32098           break
32099         fi
32100       done
32101       IFS="$IFS_save"
32102     else
32103       # This is an absolute path, we can use it without further modifications.
32104       new_path="$path"
32105     fi
32106 
32107     if test "x$new_path" = x; then
32108       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32109 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32110       has_space=`$ECHO "$complete" | $GREP " "`
32111       if test "x$has_space" != x; then
32112         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32113 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32114       fi
32115       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32116     fi
32117   fi
32118 
32119   # Now join together the path and the arguments once again
32120   if test "x$arguments" != xEOL; then
32121     new_complete="$new_path ${arguments% *}"
32122   else
32123     new_complete="$new_path"
32124   fi
32125 
32126   if test "x$complete" != "x$new_complete"; then
32127     LD="$new_complete"
32128     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32129 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32130   fi
32131 
32132     # Verify that we indeed succeeded with this trick.
32133     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32134 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32135     "$LD" --version > /dev/null
32136     if test $? -eq 0 ; then
32137       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32138 $as_echo "no" >&6; }
32139       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32140     else
32141       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32142 $as_echo "yes" >&6; }
32143     fi
32144     LDCXX="$LD"
32145   else
32146     # All other toolchains use the compiler to link.
32147     LD="$CC"
32148     LDCXX="$CXX"
32149   fi
32150 
32151   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32152 
32153 
32154   #
32155   # Setup the assembler (AS)
32156   #
32157   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32158     # FIXME: should this really be solaris, or solstudio?
32159 
32160 
32161   # Publish this variable in the help.
32162 
32163 
32164   if test "x$AS" = x; then
32165     # The variable is not set by user, try to locate tool using the code snippet
32166     for ac_prog in as
32167 do
32168   # Extract the first word of "$ac_prog", so it can be a program name with args.
32169 set dummy $ac_prog; ac_word=$2
32170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32171 $as_echo_n "checking for $ac_word... " >&6; }
32172 if ${ac_cv_path_AS+:} false; then :
32173   $as_echo_n "(cached) " >&6
32174 else
32175   case $AS in
32176   [\\/]* | ?:[\\/]*)
32177   ac_cv_path_AS="$AS" # Let the user override the test with a path.
32178   ;;
32179   *)
32180   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32181 for as_dir in $PATH
32182 do
32183   IFS=$as_save_IFS
32184   test -z "$as_dir" && as_dir=.
32185     for ac_exec_ext in '' $ac_executable_extensions; do
32186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32187     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32189     break 2
32190   fi
32191 done
32192   done
32193 IFS=$as_save_IFS
32194 
32195   ;;
32196 esac
32197 fi
32198 AS=$ac_cv_path_AS
32199 if test -n "$AS"; then
32200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32201 $as_echo "$AS" >&6; }
32202 else
32203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32204 $as_echo "no" >&6; }
32205 fi
32206 
32207 
32208   test -n "$AS" && break
32209 done
32210 
32211   else
32212     # The variable is set, but is it from the command line or the environment?
32213 
32214     # Try to remove the string !AS! from our list.
32215     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32216     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32217       # If it failed, the variable was not from the command line. Ignore it,
32218       # but warn the user (except for BASH, which is always set by the calling BASH).
32219       if test "xAS" != xBASH; then
32220         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32221 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32222       fi
32223       # Try to locate tool using the code snippet
32224       for ac_prog in as
32225 do
32226   # Extract the first word of "$ac_prog", so it can be a program name with args.
32227 set dummy $ac_prog; ac_word=$2
32228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32229 $as_echo_n "checking for $ac_word... " >&6; }
32230 if ${ac_cv_path_AS+:} false; then :
32231   $as_echo_n "(cached) " >&6
32232 else
32233   case $AS in
32234   [\\/]* | ?:[\\/]*)
32235   ac_cv_path_AS="$AS" # Let the user override the test with a path.
32236   ;;
32237   *)
32238   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32239 for as_dir in $PATH
32240 do
32241   IFS=$as_save_IFS
32242   test -z "$as_dir" && as_dir=.
32243     for ac_exec_ext in '' $ac_executable_extensions; do
32244   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32245     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32246     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32247     break 2
32248   fi
32249 done
32250   done
32251 IFS=$as_save_IFS
32252 
32253   ;;
32254 esac
32255 fi
32256 AS=$ac_cv_path_AS
32257 if test -n "$AS"; then
32258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32259 $as_echo "$AS" >&6; }
32260 else
32261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32262 $as_echo "no" >&6; }
32263 fi
32264 
32265 
32266   test -n "$AS" && break
32267 done
32268 
32269     else
32270       # If it succeeded, then it was overridden by the user. We will use it
32271       # for the tool.
32272 
32273       # First remove it from the list of overridden variables, so we can test
32274       # for unknown variables in the end.
32275       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32276 
32277       # Check if the provided tool contains a complete path.
32278       tool_specified="$AS"
32279       tool_basename="${tool_specified##*/}"
32280       if test "x$tool_basename" = "x$tool_specified"; then
32281         # A command without a complete path is provided, search $PATH.
32282         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32283 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32284         # Extract the first word of "$tool_basename", so it can be a program name with args.
32285 set dummy $tool_basename; ac_word=$2
32286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32287 $as_echo_n "checking for $ac_word... " >&6; }
32288 if ${ac_cv_path_AS+:} false; then :
32289   $as_echo_n "(cached) " >&6
32290 else
32291   case $AS in
32292   [\\/]* | ?:[\\/]*)
32293   ac_cv_path_AS="$AS" # Let the user override the test with a path.
32294   ;;
32295   *)
32296   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32297 for as_dir in $PATH
32298 do
32299   IFS=$as_save_IFS
32300   test -z "$as_dir" && as_dir=.
32301     for ac_exec_ext in '' $ac_executable_extensions; do
32302   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32303     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32304     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32305     break 2
32306   fi
32307 done
32308   done
32309 IFS=$as_save_IFS
32310 
32311   ;;
32312 esac
32313 fi
32314 AS=$ac_cv_path_AS
32315 if test -n "$AS"; then
32316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32317 $as_echo "$AS" >&6; }
32318 else
32319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32320 $as_echo "no" >&6; }
32321 fi
32322 
32323 
32324         if test "x$AS" = x; then
32325           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32326         fi
32327       else
32328         # Otherwise we believe it is a complete path. Use it as it is.
32329         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32330 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32331         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32332 $as_echo_n "checking for AS... " >&6; }
32333         if test ! -x "$tool_specified"; then
32334           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32335 $as_echo "not found" >&6; }
32336           as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32337         fi
32338         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32339 $as_echo "$tool_specified" >&6; }
32340       fi
32341     fi
32342   fi
32343 
32344 
32345 
32346   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32347 
32348   # First separate the path from the arguments. This will split at the first
32349   # space.
32350   complete="$AS"
32351   path="${complete%% *}"
32352   tmp="$complete EOL"
32353   arguments="${tmp#* }"
32354 
32355   # Input might be given as Windows format, start by converting to
32356   # unix format.
32357   new_path=`$CYGPATH -u "$path"`
32358 
32359   # Now try to locate executable using which
32360   new_path=`$WHICH "$new_path" 2> /dev/null`
32361   # bat and cmd files are not always considered executable in cygwin causing which
32362   # to not find them
32363   if test "x$new_path" = x \
32364       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32365       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32366     new_path=`$CYGPATH -u "$path"`
32367   fi
32368   if test "x$new_path" = x; then
32369     # Oops. Which didn't find the executable.
32370     # The splitting of arguments from the executable at a space might have been incorrect,
32371     # since paths with space are more likely in Windows. Give it another try with the whole
32372     # argument.
32373     path="$complete"
32374     arguments="EOL"
32375     new_path=`$CYGPATH -u "$path"`
32376     new_path=`$WHICH "$new_path" 2> /dev/null`
32377     # bat and cmd files are not always considered executable in cygwin causing which
32378     # to not find them
32379     if test "x$new_path" = x \
32380         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32381         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32382       new_path=`$CYGPATH -u "$path"`
32383     fi
32384     if test "x$new_path" = x; then
32385       # It's still not found. Now this is an unrecoverable error.
32386       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32387 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32388       has_space=`$ECHO "$complete" | $GREP " "`
32389       if test "x$has_space" != x; then
32390         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32391 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32392       fi
32393       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32394     fi
32395   fi
32396 
32397   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32398   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32399   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32400   # "foo.exe" is OK but "foo" is an error.
32401   #
32402   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32403   # It is also a way to make sure we got the proper file name for the real test later on.
32404   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32405   if test "x$test_shortpath" = x; then
32406     # Short path failed, file does not exist as specified.
32407     # Try adding .exe or .cmd
32408     if test -f "${new_path}.exe"; then
32409       input_to_shortpath="${new_path}.exe"
32410     elif test -f "${new_path}.cmd"; then
32411       input_to_shortpath="${new_path}.cmd"
32412     else
32413       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32414 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32415       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32416 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32417       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32418     fi
32419   else
32420     input_to_shortpath="$new_path"
32421   fi
32422 
32423   # Call helper function which possibly converts this using DOS-style short mode.
32424   # If so, the updated path is stored in $new_path.
32425   new_path="$input_to_shortpath"
32426 
32427   input_path="$input_to_shortpath"
32428   # Check if we need to convert this using DOS-style short mode. If the path
32429   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32430   # take no chances and rewrite it.
32431   # Note: m4 eats our [], so we need to use [ and ] instead.
32432   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32433   if test "x$has_forbidden_chars" != x; then
32434     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32435     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32436     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32437     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32438       # Going to short mode and back again did indeed matter. Since short mode is
32439       # case insensitive, let's make it lowercase to improve readability.
32440       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32441       # Now convert it back to Unix-stile (cygpath)
32442       input_path=`$CYGPATH -u "$shortmode_path"`
32443       new_path="$input_path"
32444     fi
32445   fi
32446 
32447   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32448   if test "x$test_cygdrive_prefix" = x; then
32449     # As a simple fix, exclude /usr/bin since it's not a real path.
32450     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32451       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32452       # a path prefixed by /cygdrive for fixpath to work.
32453       new_path="$CYGWIN_ROOT_PATH$input_path"
32454     fi
32455   fi
32456 
32457   # remove trailing .exe if any
32458   new_path="${new_path/%.exe/}"
32459 
32460   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32461 
32462   # First separate the path from the arguments. This will split at the first
32463   # space.
32464   complete="$AS"
32465   path="${complete%% *}"
32466   tmp="$complete EOL"
32467   arguments="${tmp#* }"
32468 
32469   # Input might be given as Windows format, start by converting to
32470   # unix format.
32471   new_path="$path"
32472 
32473   windows_path="$new_path"
32474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32475     unix_path=`$CYGPATH -u "$windows_path"`
32476     new_path="$unix_path"
32477   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32478     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32479     new_path="$unix_path"
32480   fi
32481 
32482 
32483   # Now try to locate executable using which
32484   new_path=`$WHICH "$new_path" 2> /dev/null`
32485 
32486   if test "x$new_path" = x; then
32487     # Oops. Which didn't find the executable.
32488     # The splitting of arguments from the executable at a space might have been incorrect,
32489     # since paths with space are more likely in Windows. Give it another try with the whole
32490     # argument.
32491     path="$complete"
32492     arguments="EOL"
32493     new_path="$path"
32494 
32495   windows_path="$new_path"
32496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32497     unix_path=`$CYGPATH -u "$windows_path"`
32498     new_path="$unix_path"
32499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32500     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32501     new_path="$unix_path"
32502   fi
32503 
32504 
32505     new_path=`$WHICH "$new_path" 2> /dev/null`
32506     # bat and cmd files are not always considered executable in MSYS causing which
32507     # to not find them
32508     if test "x$new_path" = x \
32509         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32510         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32511       new_path="$path"
32512 
32513   windows_path="$new_path"
32514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32515     unix_path=`$CYGPATH -u "$windows_path"`
32516     new_path="$unix_path"
32517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32519     new_path="$unix_path"
32520   fi
32521 
32522     fi
32523 
32524     if test "x$new_path" = x; then
32525       # It's still not found. Now this is an unrecoverable error.
32526       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32527 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32528       has_space=`$ECHO "$complete" | $GREP " "`
32529       if test "x$has_space" != x; then
32530         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32531 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32532       fi
32533       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32534     fi
32535   fi
32536 
32537   # Now new_path has a complete unix path to the binary
32538   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32539     # Keep paths in /bin as-is, but remove trailing .exe if any
32540     new_path="${new_path/%.exe/}"
32541     # Do not save /bin paths to all_fixpath_prefixes!
32542   else
32543     # Not in mixed or Windows style, start by that.
32544     new_path=`cmd //c echo $new_path`
32545 
32546   input_path="$new_path"
32547   # Check if we need to convert this using DOS-style short mode. If the path
32548   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32549   # take no chances and rewrite it.
32550   # Note: m4 eats our [], so we need to use [ and ] instead.
32551   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32552   if test "x$has_forbidden_chars" != x; then
32553     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32554     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32555   fi
32556 
32557     # Output is in $new_path
32558 
32559   windows_path="$new_path"
32560   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32561     unix_path=`$CYGPATH -u "$windows_path"`
32562     new_path="$unix_path"
32563   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32564     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32565     new_path="$unix_path"
32566   fi
32567 
32568     # remove trailing .exe if any
32569     new_path="${new_path/%.exe/}"
32570 
32571     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32572     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32573   fi
32574 
32575   else
32576     # We're on a posix platform. Hooray! :)
32577     # First separate the path from the arguments. This will split at the first
32578     # space.
32579     complete="$AS"
32580     path="${complete%% *}"
32581     tmp="$complete EOL"
32582     arguments="${tmp#* }"
32583 
32584     # Cannot rely on the command "which" here since it doesn't always work.
32585     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32586     if test -z "$is_absolute_path"; then
32587       # Path to executable is not absolute. Find it.
32588       IFS_save="$IFS"
32589       IFS=:
32590       for p in $PATH; do
32591         if test -f "$p/$path" && test -x "$p/$path"; then
32592           new_path="$p/$path"
32593           break
32594         fi
32595       done
32596       IFS="$IFS_save"
32597     else
32598       # This is an absolute path, we can use it without further modifications.
32599       new_path="$path"
32600     fi
32601 
32602     if test "x$new_path" = x; then
32603       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32604 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32605       has_space=`$ECHO "$complete" | $GREP " "`
32606       if test "x$has_space" != x; then
32607         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32608 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32609       fi
32610       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32611     fi
32612   fi
32613 
32614   # Now join together the path and the arguments once again
32615   if test "x$arguments" != xEOL; then
32616     new_complete="$new_path ${arguments% *}"
32617   else
32618     new_complete="$new_path"
32619   fi
32620 
32621   if test "x$complete" != "x$new_complete"; then
32622     AS="$new_complete"
32623     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32624 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32625   fi
32626 
32627   else
32628     # FIXME: is this correct for microsoft?
32629     AS="$CC -c"
32630   fi
32631 
32632 
32633   #
32634   # Setup the archiver (AR)
32635   #
32636   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32637     # The corresponding ar tool is lib.exe (used to create static libraries)
32638     # Extract the first word of "lib", so it can be a program name with args.
32639 set dummy lib; ac_word=$2
32640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32641 $as_echo_n "checking for $ac_word... " >&6; }
32642 if ${ac_cv_prog_AR+:} false; then :
32643   $as_echo_n "(cached) " >&6
32644 else
32645   if test -n "$AR"; then
32646   ac_cv_prog_AR="$AR" # Let the user override the test.
32647 else
32648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32649 for as_dir in $PATH
32650 do
32651   IFS=$as_save_IFS
32652   test -z "$as_dir" && as_dir=.
32653     for ac_exec_ext in '' $ac_executable_extensions; do
32654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32655     ac_cv_prog_AR="lib"
32656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32657     break 2
32658   fi
32659 done
32660   done
32661 IFS=$as_save_IFS
32662 
32663 fi
32664 fi
32665 AR=$ac_cv_prog_AR
32666 if test -n "$AR"; then
32667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32668 $as_echo "$AR" >&6; }
32669 else
32670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32671 $as_echo "no" >&6; }
32672 fi
32673 
32674 
32675   else
32676 
32677 
32678   # Publish this variable in the help.
32679 
32680 
32681   if test "x$AR" = x; then
32682     # The variable is not set by user, try to locate tool using the code snippet
32683     if test -n "$ac_tool_prefix"; then
32684   for ac_prog in ar
32685   do
32686     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32687 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32689 $as_echo_n "checking for $ac_word... " >&6; }
32690 if ${ac_cv_prog_AR+:} false; then :
32691   $as_echo_n "(cached) " >&6
32692 else
32693   if test -n "$AR"; then
32694   ac_cv_prog_AR="$AR" # Let the user override the test.
32695 else
32696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32697 for as_dir in $PATH
32698 do
32699   IFS=$as_save_IFS
32700   test -z "$as_dir" && as_dir=.
32701     for ac_exec_ext in '' $ac_executable_extensions; do
32702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32703     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32705     break 2
32706   fi
32707 done
32708   done
32709 IFS=$as_save_IFS
32710 
32711 fi
32712 fi
32713 AR=$ac_cv_prog_AR
32714 if test -n "$AR"; then
32715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32716 $as_echo "$AR" >&6; }
32717 else
32718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32719 $as_echo "no" >&6; }
32720 fi
32721 
32722 
32723     test -n "$AR" && break
32724   done
32725 fi
32726 if test -z "$AR"; then
32727   ac_ct_AR=$AR
32728   for ac_prog in ar
32729 do
32730   # Extract the first word of "$ac_prog", so it can be a program name with args.
32731 set dummy $ac_prog; ac_word=$2
32732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32733 $as_echo_n "checking for $ac_word... " >&6; }
32734 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32735   $as_echo_n "(cached) " >&6
32736 else
32737   if test -n "$ac_ct_AR"; then
32738   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32739 else
32740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32741 for as_dir in $PATH
32742 do
32743   IFS=$as_save_IFS
32744   test -z "$as_dir" && as_dir=.
32745     for ac_exec_ext in '' $ac_executable_extensions; do
32746   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32747     ac_cv_prog_ac_ct_AR="$ac_prog"
32748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32749     break 2
32750   fi
32751 done
32752   done
32753 IFS=$as_save_IFS
32754 
32755 fi
32756 fi
32757 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32758 if test -n "$ac_ct_AR"; then
32759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32760 $as_echo "$ac_ct_AR" >&6; }
32761 else
32762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32763 $as_echo "no" >&6; }
32764 fi
32765 
32766 
32767   test -n "$ac_ct_AR" && break
32768 done
32769 
32770   if test "x$ac_ct_AR" = x; then
32771     AR=""
32772   else
32773     case $cross_compiling:$ac_tool_warned in
32774 yes:)
32775 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32776 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32777 ac_tool_warned=yes ;;
32778 esac
32779     AR=$ac_ct_AR
32780   fi
32781 fi
32782 
32783   else
32784     # The variable is set, but is it from the command line or the environment?
32785 
32786     # Try to remove the string !AR! from our list.
32787     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32788     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32789       # If it failed, the variable was not from the command line. Ignore it,
32790       # but warn the user (except for BASH, which is always set by the calling BASH).
32791       if test "xAR" != xBASH; then
32792         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32793 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32794       fi
32795       # Try to locate tool using the code snippet
32796       if test -n "$ac_tool_prefix"; then
32797   for ac_prog in ar
32798   do
32799     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32800 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32802 $as_echo_n "checking for $ac_word... " >&6; }
32803 if ${ac_cv_prog_AR+:} false; then :
32804   $as_echo_n "(cached) " >&6
32805 else
32806   if test -n "$AR"; then
32807   ac_cv_prog_AR="$AR" # Let the user override the test.
32808 else
32809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32810 for as_dir in $PATH
32811 do
32812   IFS=$as_save_IFS
32813   test -z "$as_dir" && as_dir=.
32814     for ac_exec_ext in '' $ac_executable_extensions; do
32815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32816     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32818     break 2
32819   fi
32820 done
32821   done
32822 IFS=$as_save_IFS
32823 
32824 fi
32825 fi
32826 AR=$ac_cv_prog_AR
32827 if test -n "$AR"; then
32828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32829 $as_echo "$AR" >&6; }
32830 else
32831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32832 $as_echo "no" >&6; }
32833 fi
32834 
32835 
32836     test -n "$AR" && break
32837   done
32838 fi
32839 if test -z "$AR"; then
32840   ac_ct_AR=$AR
32841   for ac_prog in ar
32842 do
32843   # Extract the first word of "$ac_prog", so it can be a program name with args.
32844 set dummy $ac_prog; ac_word=$2
32845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32846 $as_echo_n "checking for $ac_word... " >&6; }
32847 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32848   $as_echo_n "(cached) " >&6
32849 else
32850   if test -n "$ac_ct_AR"; then
32851   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32852 else
32853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32854 for as_dir in $PATH
32855 do
32856   IFS=$as_save_IFS
32857   test -z "$as_dir" && as_dir=.
32858     for ac_exec_ext in '' $ac_executable_extensions; do
32859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32860     ac_cv_prog_ac_ct_AR="$ac_prog"
32861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32862     break 2
32863   fi
32864 done
32865   done
32866 IFS=$as_save_IFS
32867 
32868 fi
32869 fi
32870 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32871 if test -n "$ac_ct_AR"; then
32872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32873 $as_echo "$ac_ct_AR" >&6; }
32874 else
32875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32876 $as_echo "no" >&6; }
32877 fi
32878 
32879 
32880   test -n "$ac_ct_AR" && break
32881 done
32882 
32883   if test "x$ac_ct_AR" = x; then
32884     AR=""
32885   else
32886     case $cross_compiling:$ac_tool_warned in
32887 yes:)
32888 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32889 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32890 ac_tool_warned=yes ;;
32891 esac
32892     AR=$ac_ct_AR
32893   fi
32894 fi
32895 
32896     else
32897       # If it succeeded, then it was overridden by the user. We will use it
32898       # for the tool.
32899 
32900       # First remove it from the list of overridden variables, so we can test
32901       # for unknown variables in the end.
32902       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32903 
32904       # Check if the provided tool contains a complete path.
32905       tool_specified="$AR"
32906       tool_basename="${tool_specified##*/}"
32907       if test "x$tool_basename" = "x$tool_specified"; then
32908         # A command without a complete path is provided, search $PATH.
32909         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32910 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32911         # Extract the first word of "$tool_basename", so it can be a program name with args.
32912 set dummy $tool_basename; ac_word=$2
32913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32914 $as_echo_n "checking for $ac_word... " >&6; }
32915 if ${ac_cv_path_AR+:} false; then :
32916   $as_echo_n "(cached) " >&6
32917 else
32918   case $AR in
32919   [\\/]* | ?:[\\/]*)
32920   ac_cv_path_AR="$AR" # Let the user override the test with a path.
32921   ;;
32922   *)
32923   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32924 for as_dir in $PATH
32925 do
32926   IFS=$as_save_IFS
32927   test -z "$as_dir" && as_dir=.
32928     for ac_exec_ext in '' $ac_executable_extensions; do
32929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32930     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32932     break 2
32933   fi
32934 done
32935   done
32936 IFS=$as_save_IFS
32937 
32938   ;;
32939 esac
32940 fi
32941 AR=$ac_cv_path_AR
32942 if test -n "$AR"; then
32943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32944 $as_echo "$AR" >&6; }
32945 else
32946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32947 $as_echo "no" >&6; }
32948 fi
32949 
32950 
32951         if test "x$AR" = x; then
32952           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32953         fi
32954       else
32955         # Otherwise we believe it is a complete path. Use it as it is.
32956         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32957 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32958         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32959 $as_echo_n "checking for AR... " >&6; }
32960         if test ! -x "$tool_specified"; then
32961           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32962 $as_echo "not found" >&6; }
32963           as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32964         fi
32965         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32966 $as_echo "$tool_specified" >&6; }
32967       fi
32968     fi
32969   fi
32970 
32971 
32972   fi
32973 
32974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32975 
32976   # First separate the path from the arguments. This will split at the first
32977   # space.
32978   complete="$AR"
32979   path="${complete%% *}"
32980   tmp="$complete EOL"
32981   arguments="${tmp#* }"
32982 
32983   # Input might be given as Windows format, start by converting to
32984   # unix format.
32985   new_path=`$CYGPATH -u "$path"`
32986 
32987   # Now try to locate executable using which
32988   new_path=`$WHICH "$new_path" 2> /dev/null`
32989   # bat and cmd files are not always considered executable in cygwin causing which
32990   # to not find them
32991   if test "x$new_path" = x \
32992       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32993       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32994     new_path=`$CYGPATH -u "$path"`
32995   fi
32996   if test "x$new_path" = x; then
32997     # Oops. Which didn't find the executable.
32998     # The splitting of arguments from the executable at a space might have been incorrect,
32999     # since paths with space are more likely in Windows. Give it another try with the whole
33000     # argument.
33001     path="$complete"
33002     arguments="EOL"
33003     new_path=`$CYGPATH -u "$path"`
33004     new_path=`$WHICH "$new_path" 2> /dev/null`
33005     # bat and cmd files are not always considered executable in cygwin causing which
33006     # to not find them
33007     if test "x$new_path" = x \
33008         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33009         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33010       new_path=`$CYGPATH -u "$path"`
33011     fi
33012     if test "x$new_path" = x; then
33013       # It's still not found. Now this is an unrecoverable error.
33014       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33015 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33016       has_space=`$ECHO "$complete" | $GREP " "`
33017       if test "x$has_space" != x; then
33018         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33019 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33020       fi
33021       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33022     fi
33023   fi
33024 
33025   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33026   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33027   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33028   # "foo.exe" is OK but "foo" is an error.
33029   #
33030   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33031   # It is also a way to make sure we got the proper file name for the real test later on.
33032   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33033   if test "x$test_shortpath" = x; then
33034     # Short path failed, file does not exist as specified.
33035     # Try adding .exe or .cmd
33036     if test -f "${new_path}.exe"; then
33037       input_to_shortpath="${new_path}.exe"
33038     elif test -f "${new_path}.cmd"; then
33039       input_to_shortpath="${new_path}.cmd"
33040     else
33041       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33042 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33043       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33044 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33045       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33046     fi
33047   else
33048     input_to_shortpath="$new_path"
33049   fi
33050 
33051   # Call helper function which possibly converts this using DOS-style short mode.
33052   # If so, the updated path is stored in $new_path.
33053   new_path="$input_to_shortpath"
33054 
33055   input_path="$input_to_shortpath"
33056   # Check if we need to convert this using DOS-style short mode. If the path
33057   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33058   # take no chances and rewrite it.
33059   # Note: m4 eats our [], so we need to use [ and ] instead.
33060   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33061   if test "x$has_forbidden_chars" != x; then
33062     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33063     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33064     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33065     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33066       # Going to short mode and back again did indeed matter. Since short mode is
33067       # case insensitive, let's make it lowercase to improve readability.
33068       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33069       # Now convert it back to Unix-stile (cygpath)
33070       input_path=`$CYGPATH -u "$shortmode_path"`
33071       new_path="$input_path"
33072     fi
33073   fi
33074 
33075   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33076   if test "x$test_cygdrive_prefix" = x; then
33077     # As a simple fix, exclude /usr/bin since it's not a real path.
33078     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33079       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33080       # a path prefixed by /cygdrive for fixpath to work.
33081       new_path="$CYGWIN_ROOT_PATH$input_path"
33082     fi
33083   fi
33084 
33085   # remove trailing .exe if any
33086   new_path="${new_path/%.exe/}"
33087 
33088   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33089 
33090   # First separate the path from the arguments. This will split at the first
33091   # space.
33092   complete="$AR"
33093   path="${complete%% *}"
33094   tmp="$complete EOL"
33095   arguments="${tmp#* }"
33096 
33097   # Input might be given as Windows format, start by converting to
33098   # unix format.
33099   new_path="$path"
33100 
33101   windows_path="$new_path"
33102   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33103     unix_path=`$CYGPATH -u "$windows_path"`
33104     new_path="$unix_path"
33105   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33106     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33107     new_path="$unix_path"
33108   fi
33109 
33110 
33111   # Now try to locate executable using which
33112   new_path=`$WHICH "$new_path" 2> /dev/null`
33113 
33114   if test "x$new_path" = x; then
33115     # Oops. Which didn't find the executable.
33116     # The splitting of arguments from the executable at a space might have been incorrect,
33117     # since paths with space are more likely in Windows. Give it another try with the whole
33118     # argument.
33119     path="$complete"
33120     arguments="EOL"
33121     new_path="$path"
33122 
33123   windows_path="$new_path"
33124   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33125     unix_path=`$CYGPATH -u "$windows_path"`
33126     new_path="$unix_path"
33127   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33128     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33129     new_path="$unix_path"
33130   fi
33131 
33132 
33133     new_path=`$WHICH "$new_path" 2> /dev/null`
33134     # bat and cmd files are not always considered executable in MSYS causing which
33135     # to not find them
33136     if test "x$new_path" = x \
33137         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33138         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33139       new_path="$path"
33140 
33141   windows_path="$new_path"
33142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33143     unix_path=`$CYGPATH -u "$windows_path"`
33144     new_path="$unix_path"
33145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33147     new_path="$unix_path"
33148   fi
33149 
33150     fi
33151 
33152     if test "x$new_path" = x; then
33153       # It's still not found. Now this is an unrecoverable error.
33154       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33155 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33156       has_space=`$ECHO "$complete" | $GREP " "`
33157       if test "x$has_space" != x; then
33158         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33159 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33160       fi
33161       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33162     fi
33163   fi
33164 
33165   # Now new_path has a complete unix path to the binary
33166   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33167     # Keep paths in /bin as-is, but remove trailing .exe if any
33168     new_path="${new_path/%.exe/}"
33169     # Do not save /bin paths to all_fixpath_prefixes!
33170   else
33171     # Not in mixed or Windows style, start by that.
33172     new_path=`cmd //c echo $new_path`
33173 
33174   input_path="$new_path"
33175   # Check if we need to convert this using DOS-style short mode. If the path
33176   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33177   # take no chances and rewrite it.
33178   # Note: m4 eats our [], so we need to use [ and ] instead.
33179   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33180   if test "x$has_forbidden_chars" != x; then
33181     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33182     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33183   fi
33184 
33185     # Output is in $new_path
33186 
33187   windows_path="$new_path"
33188   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33189     unix_path=`$CYGPATH -u "$windows_path"`
33190     new_path="$unix_path"
33191   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33192     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33193     new_path="$unix_path"
33194   fi
33195 
33196     # remove trailing .exe if any
33197     new_path="${new_path/%.exe/}"
33198 
33199     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33200     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33201   fi
33202 
33203   else
33204     # We're on a posix platform. Hooray! :)
33205     # First separate the path from the arguments. This will split at the first
33206     # space.
33207     complete="$AR"
33208     path="${complete%% *}"
33209     tmp="$complete EOL"
33210     arguments="${tmp#* }"
33211 
33212     # Cannot rely on the command "which" here since it doesn't always work.
33213     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33214     if test -z "$is_absolute_path"; then
33215       # Path to executable is not absolute. Find it.
33216       IFS_save="$IFS"
33217       IFS=:
33218       for p in $PATH; do
33219         if test -f "$p/$path" && test -x "$p/$path"; then
33220           new_path="$p/$path"
33221           break
33222         fi
33223       done
33224       IFS="$IFS_save"
33225     else
33226       # This is an absolute path, we can use it without further modifications.
33227       new_path="$path"
33228     fi
33229 
33230     if test "x$new_path" = x; then
33231       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33232 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33233       has_space=`$ECHO "$complete" | $GREP " "`
33234       if test "x$has_space" != x; then
33235         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33236 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33237       fi
33238       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33239     fi
33240   fi
33241 
33242   # Now join together the path and the arguments once again
33243   if test "x$arguments" != xEOL; then
33244     new_complete="$new_path ${arguments% *}"
33245   else
33246     new_complete="$new_path"
33247   fi
33248 
33249   if test "x$complete" != "x$new_complete"; then
33250     AR="$new_complete"
33251     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33252 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33253   fi
33254 
33255 
33256 
33257   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33258     ac_ext=m
33259 ac_cpp='$OBJCPP $CPPFLAGS'
33260 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33261 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33262 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33263 if test -n "$ac_tool_prefix"; then
33264   for ac_prog in gcc objcc objc cc CC
33265   do
33266     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33267 set dummy $ac_tool_prefix$ac_prog; 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_OBJC+:} false; then :
33271   $as_echo_n "(cached) " >&6
33272 else
33273   if test -n "$OBJC"; then
33274   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33275 else
33276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33277 for as_dir in $PATH
33278 do
33279   IFS=$as_save_IFS
33280   test -z "$as_dir" && as_dir=.
33281     for ac_exec_ext in '' $ac_executable_extensions; do
33282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33283     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33285     break 2
33286   fi
33287 done
33288   done
33289 IFS=$as_save_IFS
33290 
33291 fi
33292 fi
33293 OBJC=$ac_cv_prog_OBJC
33294 if test -n "$OBJC"; then
33295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33296 $as_echo "$OBJC" >&6; }
33297 else
33298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33299 $as_echo "no" >&6; }
33300 fi
33301 
33302 
33303     test -n "$OBJC" && break
33304   done
33305 fi
33306 if test -z "$OBJC"; then
33307   ac_ct_OBJC=$OBJC
33308   for ac_prog in gcc objcc objc cc CC
33309 do
33310   # Extract the first word of "$ac_prog", so it can be a program name with args.
33311 set dummy $ac_prog; ac_word=$2
33312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33313 $as_echo_n "checking for $ac_word... " >&6; }
33314 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33315   $as_echo_n "(cached) " >&6
33316 else
33317   if test -n "$ac_ct_OBJC"; then
33318   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33319 else
33320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33321 for as_dir in $PATH
33322 do
33323   IFS=$as_save_IFS
33324   test -z "$as_dir" && as_dir=.
33325     for ac_exec_ext in '' $ac_executable_extensions; do
33326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33327     ac_cv_prog_ac_ct_OBJC="$ac_prog"
33328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33329     break 2
33330   fi
33331 done
33332   done
33333 IFS=$as_save_IFS
33334 
33335 fi
33336 fi
33337 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33338 if test -n "$ac_ct_OBJC"; then
33339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33340 $as_echo "$ac_ct_OBJC" >&6; }
33341 else
33342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33343 $as_echo "no" >&6; }
33344 fi
33345 
33346 
33347   test -n "$ac_ct_OBJC" && break
33348 done
33349 
33350   if test "x$ac_ct_OBJC" = x; then
33351     OBJC="gcc"
33352   else
33353     case $cross_compiling:$ac_tool_warned in
33354 yes:)
33355 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33356 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33357 ac_tool_warned=yes ;;
33358 esac
33359     OBJC=$ac_ct_OBJC
33360   fi
33361 fi
33362 
33363 # Provide some information about the compiler.
33364 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33365 set X $ac_compile
33366 ac_compiler=$2
33367 for ac_option in --version -v -V -qversion; do
33368   { { ac_try="$ac_compiler $ac_option >&5"
33369 case "(($ac_try" in
33370   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33371   *) ac_try_echo=$ac_try;;
33372 esac
33373 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33374 $as_echo "$ac_try_echo"; } >&5
33375   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33376   ac_status=$?
33377   if test -s conftest.err; then
33378     sed '10a\
33379 ... rest of stderr output deleted ...
33380          10q' conftest.err >conftest.er1
33381     cat conftest.er1 >&5
33382   fi
33383   rm -f conftest.er1 conftest.err
33384   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33385   test $ac_status = 0; }
33386 done
33387 
33388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33389 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33390 if ${ac_cv_objc_compiler_gnu+:} false; then :
33391   $as_echo_n "(cached) " >&6
33392 else
33393   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33394 /* end confdefs.h.  */
33395 
33396 int
33397 main ()
33398 {
33399 #ifndef __GNUC__
33400        choke me
33401 #endif
33402 
33403   ;
33404   return 0;
33405 }
33406 _ACEOF
33407 if ac_fn_objc_try_compile "$LINENO"; then :
33408   ac_compiler_gnu=yes
33409 else
33410   ac_compiler_gnu=no
33411 fi
33412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33413 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33414 
33415 fi
33416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33417 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33418 if test $ac_compiler_gnu = yes; then
33419   GOBJC=yes
33420 else
33421   GOBJC=
33422 fi
33423 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33424 ac_save_OBJCFLAGS=$OBJCFLAGS
33425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33426 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33427 if ${ac_cv_prog_objc_g+:} false; then :
33428   $as_echo_n "(cached) " >&6
33429 else
33430   ac_save_objc_werror_flag=$ac_objc_werror_flag
33431    ac_objc_werror_flag=yes
33432    ac_cv_prog_objc_g=no
33433    OBJCFLAGS="-g"
33434    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33435 /* end confdefs.h.  */
33436 
33437 int
33438 main ()
33439 {
33440 
33441   ;
33442   return 0;
33443 }
33444 _ACEOF
33445 if ac_fn_objc_try_compile "$LINENO"; then :
33446   ac_cv_prog_objc_g=yes
33447 else
33448   OBJCFLAGS=""
33449       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33450 /* end confdefs.h.  */
33451 
33452 int
33453 main ()
33454 {
33455 
33456   ;
33457   return 0;
33458 }
33459 _ACEOF
33460 if ac_fn_objc_try_compile "$LINENO"; then :
33461 
33462 else
33463   ac_objc_werror_flag=$ac_save_objc_werror_flag
33464          OBJCFLAGS="-g"
33465          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33466 /* end confdefs.h.  */
33467 
33468 int
33469 main ()
33470 {
33471 
33472   ;
33473   return 0;
33474 }
33475 _ACEOF
33476 if ac_fn_objc_try_compile "$LINENO"; then :
33477   ac_cv_prog_objc_g=yes
33478 fi
33479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33480 fi
33481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33482 fi
33483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33484    ac_objc_werror_flag=$ac_save_objc_werror_flag
33485 fi
33486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33487 $as_echo "$ac_cv_prog_objc_g" >&6; }
33488 if test "$ac_test_OBJCFLAGS" = set; then
33489   OBJCFLAGS=$ac_save_OBJCFLAGS
33490 elif test $ac_cv_prog_objc_g = yes; then
33491   if test "$GOBJC" = yes; then
33492     OBJCFLAGS="-g -O2"
33493   else
33494     OBJCFLAGS="-g"
33495   fi
33496 else
33497   if test "$GOBJC" = yes; then
33498     OBJCFLAGS="-O2"
33499   else
33500     OBJCFLAGS=
33501   fi
33502 fi
33503 ac_ext=cpp
33504 ac_cpp='$CXXCPP $CPPFLAGS'
33505 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33506 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33507 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33508 
33509 
33510   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33511 
33512   # First separate the path from the arguments. This will split at the first
33513   # space.
33514   complete="$OBJC"
33515   path="${complete%% *}"
33516   tmp="$complete EOL"
33517   arguments="${tmp#* }"
33518 
33519   # Input might be given as Windows format, start by converting to
33520   # unix format.
33521   new_path=`$CYGPATH -u "$path"`
33522 
33523   # Now try to locate executable using which
33524   new_path=`$WHICH "$new_path" 2> /dev/null`
33525   # bat and cmd files are not always considered executable in cygwin causing which
33526   # to not find them
33527   if test "x$new_path" = x \
33528       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33529       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33530     new_path=`$CYGPATH -u "$path"`
33531   fi
33532   if test "x$new_path" = x; then
33533     # Oops. Which didn't find the executable.
33534     # The splitting of arguments from the executable at a space might have been incorrect,
33535     # since paths with space are more likely in Windows. Give it another try with the whole
33536     # argument.
33537     path="$complete"
33538     arguments="EOL"
33539     new_path=`$CYGPATH -u "$path"`
33540     new_path=`$WHICH "$new_path" 2> /dev/null`
33541     # bat and cmd files are not always considered executable in cygwin causing which
33542     # to not find them
33543     if test "x$new_path" = x \
33544         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33545         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33546       new_path=`$CYGPATH -u "$path"`
33547     fi
33548     if test "x$new_path" = x; then
33549       # It's still not found. Now this is an unrecoverable error.
33550       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33551 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33552       has_space=`$ECHO "$complete" | $GREP " "`
33553       if test "x$has_space" != x; then
33554         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33555 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33556       fi
33557       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33558     fi
33559   fi
33560 
33561   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33562   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33563   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33564   # "foo.exe" is OK but "foo" is an error.
33565   #
33566   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33567   # It is also a way to make sure we got the proper file name for the real test later on.
33568   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33569   if test "x$test_shortpath" = x; then
33570     # Short path failed, file does not exist as specified.
33571     # Try adding .exe or .cmd
33572     if test -f "${new_path}.exe"; then
33573       input_to_shortpath="${new_path}.exe"
33574     elif test -f "${new_path}.cmd"; then
33575       input_to_shortpath="${new_path}.cmd"
33576     else
33577       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33578 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33579       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33580 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33581       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33582     fi
33583   else
33584     input_to_shortpath="$new_path"
33585   fi
33586 
33587   # Call helper function which possibly converts this using DOS-style short mode.
33588   # If so, the updated path is stored in $new_path.
33589   new_path="$input_to_shortpath"
33590 
33591   input_path="$input_to_shortpath"
33592   # Check if we need to convert this using DOS-style short mode. If the path
33593   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33594   # take no chances and rewrite it.
33595   # Note: m4 eats our [], so we need to use [ and ] instead.
33596   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33597   if test "x$has_forbidden_chars" != x; then
33598     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33599     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33600     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33601     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33602       # Going to short mode and back again did indeed matter. Since short mode is
33603       # case insensitive, let's make it lowercase to improve readability.
33604       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33605       # Now convert it back to Unix-stile (cygpath)
33606       input_path=`$CYGPATH -u "$shortmode_path"`
33607       new_path="$input_path"
33608     fi
33609   fi
33610 
33611   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33612   if test "x$test_cygdrive_prefix" = x; then
33613     # As a simple fix, exclude /usr/bin since it's not a real path.
33614     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33615       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33616       # a path prefixed by /cygdrive for fixpath to work.
33617       new_path="$CYGWIN_ROOT_PATH$input_path"
33618     fi
33619   fi
33620 
33621   # remove trailing .exe if any
33622   new_path="${new_path/%.exe/}"
33623 
33624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33625 
33626   # First separate the path from the arguments. This will split at the first
33627   # space.
33628   complete="$OBJC"
33629   path="${complete%% *}"
33630   tmp="$complete EOL"
33631   arguments="${tmp#* }"
33632 
33633   # Input might be given as Windows format, start by converting to
33634   # unix format.
33635   new_path="$path"
33636 
33637   windows_path="$new_path"
33638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33639     unix_path=`$CYGPATH -u "$windows_path"`
33640     new_path="$unix_path"
33641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33642     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33643     new_path="$unix_path"
33644   fi
33645 
33646 
33647   # Now try to locate executable using which
33648   new_path=`$WHICH "$new_path" 2> /dev/null`
33649 
33650   if test "x$new_path" = x; then
33651     # Oops. Which didn't find the executable.
33652     # The splitting of arguments from the executable at a space might have been incorrect,
33653     # since paths with space are more likely in Windows. Give it another try with the whole
33654     # argument.
33655     path="$complete"
33656     arguments="EOL"
33657     new_path="$path"
33658 
33659   windows_path="$new_path"
33660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33661     unix_path=`$CYGPATH -u "$windows_path"`
33662     new_path="$unix_path"
33663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33664     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33665     new_path="$unix_path"
33666   fi
33667 
33668 
33669     new_path=`$WHICH "$new_path" 2> /dev/null`
33670     # bat and cmd files are not always considered executable in MSYS causing which
33671     # to not find them
33672     if test "x$new_path" = x \
33673         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33674         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33675       new_path="$path"
33676 
33677   windows_path="$new_path"
33678   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33679     unix_path=`$CYGPATH -u "$windows_path"`
33680     new_path="$unix_path"
33681   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33682     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33683     new_path="$unix_path"
33684   fi
33685 
33686     fi
33687 
33688     if test "x$new_path" = x; then
33689       # It's still not found. Now this is an unrecoverable error.
33690       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33691 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33692       has_space=`$ECHO "$complete" | $GREP " "`
33693       if test "x$has_space" != x; then
33694         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33695 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33696       fi
33697       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33698     fi
33699   fi
33700 
33701   # Now new_path has a complete unix path to the binary
33702   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33703     # Keep paths in /bin as-is, but remove trailing .exe if any
33704     new_path="${new_path/%.exe/}"
33705     # Do not save /bin paths to all_fixpath_prefixes!
33706   else
33707     # Not in mixed or Windows style, start by that.
33708     new_path=`cmd //c echo $new_path`
33709 
33710   input_path="$new_path"
33711   # Check if we need to convert this using DOS-style short mode. If the path
33712   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33713   # take no chances and rewrite it.
33714   # Note: m4 eats our [], so we need to use [ and ] instead.
33715   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33716   if test "x$has_forbidden_chars" != x; then
33717     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33718     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33719   fi
33720 
33721     # Output is in $new_path
33722 
33723   windows_path="$new_path"
33724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33725     unix_path=`$CYGPATH -u "$windows_path"`
33726     new_path="$unix_path"
33727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33729     new_path="$unix_path"
33730   fi
33731 
33732     # remove trailing .exe if any
33733     new_path="${new_path/%.exe/}"
33734 
33735     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33736     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33737   fi
33738 
33739   else
33740     # We're on a posix platform. Hooray! :)
33741     # First separate the path from the arguments. This will split at the first
33742     # space.
33743     complete="$OBJC"
33744     path="${complete%% *}"
33745     tmp="$complete EOL"
33746     arguments="${tmp#* }"
33747 
33748     # Cannot rely on the command "which" here since it doesn't always work.
33749     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33750     if test -z "$is_absolute_path"; then
33751       # Path to executable is not absolute. Find it.
33752       IFS_save="$IFS"
33753       IFS=:
33754       for p in $PATH; do
33755         if test -f "$p/$path" && test -x "$p/$path"; then
33756           new_path="$p/$path"
33757           break
33758         fi
33759       done
33760       IFS="$IFS_save"
33761     else
33762       # This is an absolute path, we can use it without further modifications.
33763       new_path="$path"
33764     fi
33765 
33766     if test "x$new_path" = x; then
33767       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33768 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33769       has_space=`$ECHO "$complete" | $GREP " "`
33770       if test "x$has_space" != x; then
33771         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33772 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33773       fi
33774       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33775     fi
33776   fi
33777 
33778   # Now join together the path and the arguments once again
33779   if test "x$arguments" != xEOL; then
33780     new_complete="$new_path ${arguments% *}"
33781   else
33782     new_complete="$new_path"
33783   fi
33784 
33785   if test "x$complete" != "x$new_complete"; then
33786     OBJC="$new_complete"
33787     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33788 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33789   fi
33790 
33791 
33792 
33793   # Publish this variable in the help.
33794 
33795 
33796   if test "x$LIPO" = x; then
33797     # The variable is not set by user, try to locate tool using the code snippet
33798     for ac_prog in lipo
33799 do
33800   # Extract the first word of "$ac_prog", so it can be a program name with args.
33801 set dummy $ac_prog; ac_word=$2
33802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33803 $as_echo_n "checking for $ac_word... " >&6; }
33804 if ${ac_cv_path_LIPO+:} false; then :
33805   $as_echo_n "(cached) " >&6
33806 else
33807   case $LIPO in
33808   [\\/]* | ?:[\\/]*)
33809   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33810   ;;
33811   *)
33812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33813 for as_dir in $PATH
33814 do
33815   IFS=$as_save_IFS
33816   test -z "$as_dir" && as_dir=.
33817     for ac_exec_ext in '' $ac_executable_extensions; do
33818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33819     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33821     break 2
33822   fi
33823 done
33824   done
33825 IFS=$as_save_IFS
33826 
33827   ;;
33828 esac
33829 fi
33830 LIPO=$ac_cv_path_LIPO
33831 if test -n "$LIPO"; then
33832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33833 $as_echo "$LIPO" >&6; }
33834 else
33835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33836 $as_echo "no" >&6; }
33837 fi
33838 
33839 
33840   test -n "$LIPO" && break
33841 done
33842 
33843   else
33844     # The variable is set, but is it from the command line or the environment?
33845 
33846     # Try to remove the string !LIPO! from our list.
33847     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33848     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33849       # If it failed, the variable was not from the command line. Ignore it,
33850       # but warn the user (except for BASH, which is always set by the calling BASH).
33851       if test "xLIPO" != xBASH; then
33852         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33853 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33854       fi
33855       # Try to locate tool using the code snippet
33856       for ac_prog in lipo
33857 do
33858   # Extract the first word of "$ac_prog", so it can be a program name with args.
33859 set dummy $ac_prog; ac_word=$2
33860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33861 $as_echo_n "checking for $ac_word... " >&6; }
33862 if ${ac_cv_path_LIPO+:} false; then :
33863   $as_echo_n "(cached) " >&6
33864 else
33865   case $LIPO in
33866   [\\/]* | ?:[\\/]*)
33867   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33868   ;;
33869   *)
33870   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33871 for as_dir in $PATH
33872 do
33873   IFS=$as_save_IFS
33874   test -z "$as_dir" && as_dir=.
33875     for ac_exec_ext in '' $ac_executable_extensions; do
33876   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33877     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33878     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33879     break 2
33880   fi
33881 done
33882   done
33883 IFS=$as_save_IFS
33884 
33885   ;;
33886 esac
33887 fi
33888 LIPO=$ac_cv_path_LIPO
33889 if test -n "$LIPO"; then
33890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33891 $as_echo "$LIPO" >&6; }
33892 else
33893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33894 $as_echo "no" >&6; }
33895 fi
33896 
33897 
33898   test -n "$LIPO" && break
33899 done
33900 
33901     else
33902       # If it succeeded, then it was overridden by the user. We will use it
33903       # for the tool.
33904 
33905       # First remove it from the list of overridden variables, so we can test
33906       # for unknown variables in the end.
33907       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33908 
33909       # Check if the provided tool contains a complete path.
33910       tool_specified="$LIPO"
33911       tool_basename="${tool_specified##*/}"
33912       if test "x$tool_basename" = "x$tool_specified"; then
33913         # A command without a complete path is provided, search $PATH.
33914         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33915 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33916         # Extract the first word of "$tool_basename", so it can be a program name with args.
33917 set dummy $tool_basename; ac_word=$2
33918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33919 $as_echo_n "checking for $ac_word... " >&6; }
33920 if ${ac_cv_path_LIPO+:} false; then :
33921   $as_echo_n "(cached) " >&6
33922 else
33923   case $LIPO in
33924   [\\/]* | ?:[\\/]*)
33925   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33926   ;;
33927   *)
33928   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33929 for as_dir in $PATH
33930 do
33931   IFS=$as_save_IFS
33932   test -z "$as_dir" && as_dir=.
33933     for ac_exec_ext in '' $ac_executable_extensions; do
33934   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33935     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33936     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33937     break 2
33938   fi
33939 done
33940   done
33941 IFS=$as_save_IFS
33942 
33943   ;;
33944 esac
33945 fi
33946 LIPO=$ac_cv_path_LIPO
33947 if test -n "$LIPO"; then
33948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33949 $as_echo "$LIPO" >&6; }
33950 else
33951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33952 $as_echo "no" >&6; }
33953 fi
33954 
33955 
33956         if test "x$LIPO" = x; then
33957           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33958         fi
33959       else
33960         # Otherwise we believe it is a complete path. Use it as it is.
33961         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33962 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33963         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33964 $as_echo_n "checking for LIPO... " >&6; }
33965         if test ! -x "$tool_specified"; then
33966           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33967 $as_echo "not found" >&6; }
33968           as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33969         fi
33970         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33971 $as_echo "$tool_specified" >&6; }
33972       fi
33973     fi
33974   fi
33975 
33976 
33977 
33978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33979 
33980   # First separate the path from the arguments. This will split at the first
33981   # space.
33982   complete="$LIPO"
33983   path="${complete%% *}"
33984   tmp="$complete EOL"
33985   arguments="${tmp#* }"
33986 
33987   # Input might be given as Windows format, start by converting to
33988   # unix format.
33989   new_path=`$CYGPATH -u "$path"`
33990 
33991   # Now try to locate executable using which
33992   new_path=`$WHICH "$new_path" 2> /dev/null`
33993   # bat and cmd files are not always considered executable in cygwin causing which
33994   # to not find them
33995   if test "x$new_path" = x \
33996       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33997       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33998     new_path=`$CYGPATH -u "$path"`
33999   fi
34000   if test "x$new_path" = x; then
34001     # Oops. Which didn't find the executable.
34002     # The splitting of arguments from the executable at a space might have been incorrect,
34003     # since paths with space are more likely in Windows. Give it another try with the whole
34004     # argument.
34005     path="$complete"
34006     arguments="EOL"
34007     new_path=`$CYGPATH -u "$path"`
34008     new_path=`$WHICH "$new_path" 2> /dev/null`
34009     # bat and cmd files are not always considered executable in cygwin causing which
34010     # to not find them
34011     if test "x$new_path" = x \
34012         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34013         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34014       new_path=`$CYGPATH -u "$path"`
34015     fi
34016     if test "x$new_path" = x; then
34017       # It's still not found. Now this is an unrecoverable error.
34018       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34019 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34020       has_space=`$ECHO "$complete" | $GREP " "`
34021       if test "x$has_space" != x; then
34022         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34023 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34024       fi
34025       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34026     fi
34027   fi
34028 
34029   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34030   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34031   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34032   # "foo.exe" is OK but "foo" is an error.
34033   #
34034   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34035   # It is also a way to make sure we got the proper file name for the real test later on.
34036   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34037   if test "x$test_shortpath" = x; then
34038     # Short path failed, file does not exist as specified.
34039     # Try adding .exe or .cmd
34040     if test -f "${new_path}.exe"; then
34041       input_to_shortpath="${new_path}.exe"
34042     elif test -f "${new_path}.cmd"; then
34043       input_to_shortpath="${new_path}.cmd"
34044     else
34045       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34046 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34047       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34048 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34049       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34050     fi
34051   else
34052     input_to_shortpath="$new_path"
34053   fi
34054 
34055   # Call helper function which possibly converts this using DOS-style short mode.
34056   # If so, the updated path is stored in $new_path.
34057   new_path="$input_to_shortpath"
34058 
34059   input_path="$input_to_shortpath"
34060   # Check if we need to convert this using DOS-style short mode. If the path
34061   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34062   # take no chances and rewrite it.
34063   # Note: m4 eats our [], so we need to use [ and ] instead.
34064   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34065   if test "x$has_forbidden_chars" != x; then
34066     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34067     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34068     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34069     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34070       # Going to short mode and back again did indeed matter. Since short mode is
34071       # case insensitive, let's make it lowercase to improve readability.
34072       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34073       # Now convert it back to Unix-stile (cygpath)
34074       input_path=`$CYGPATH -u "$shortmode_path"`
34075       new_path="$input_path"
34076     fi
34077   fi
34078 
34079   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34080   if test "x$test_cygdrive_prefix" = x; then
34081     # As a simple fix, exclude /usr/bin since it's not a real path.
34082     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34083       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34084       # a path prefixed by /cygdrive for fixpath to work.
34085       new_path="$CYGWIN_ROOT_PATH$input_path"
34086     fi
34087   fi
34088 
34089   # remove trailing .exe if any
34090   new_path="${new_path/%.exe/}"
34091 
34092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34093 
34094   # First separate the path from the arguments. This will split at the first
34095   # space.
34096   complete="$LIPO"
34097   path="${complete%% *}"
34098   tmp="$complete EOL"
34099   arguments="${tmp#* }"
34100 
34101   # Input might be given as Windows format, start by converting to
34102   # unix format.
34103   new_path="$path"
34104 
34105   windows_path="$new_path"
34106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34107     unix_path=`$CYGPATH -u "$windows_path"`
34108     new_path="$unix_path"
34109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34110     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34111     new_path="$unix_path"
34112   fi
34113 
34114 
34115   # Now try to locate executable using which
34116   new_path=`$WHICH "$new_path" 2> /dev/null`
34117 
34118   if test "x$new_path" = x; then
34119     # Oops. Which didn't find the executable.
34120     # The splitting of arguments from the executable at a space might have been incorrect,
34121     # since paths with space are more likely in Windows. Give it another try with the whole
34122     # argument.
34123     path="$complete"
34124     arguments="EOL"
34125     new_path="$path"
34126 
34127   windows_path="$new_path"
34128   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34129     unix_path=`$CYGPATH -u "$windows_path"`
34130     new_path="$unix_path"
34131   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34132     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34133     new_path="$unix_path"
34134   fi
34135 
34136 
34137     new_path=`$WHICH "$new_path" 2> /dev/null`
34138     # bat and cmd files are not always considered executable in MSYS causing which
34139     # to not find them
34140     if test "x$new_path" = x \
34141         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34142         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34143       new_path="$path"
34144 
34145   windows_path="$new_path"
34146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34147     unix_path=`$CYGPATH -u "$windows_path"`
34148     new_path="$unix_path"
34149   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34150     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34151     new_path="$unix_path"
34152   fi
34153 
34154     fi
34155 
34156     if test "x$new_path" = x; then
34157       # It's still not found. Now this is an unrecoverable error.
34158       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34159 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34160       has_space=`$ECHO "$complete" | $GREP " "`
34161       if test "x$has_space" != x; then
34162         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34163 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34164       fi
34165       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34166     fi
34167   fi
34168 
34169   # Now new_path has a complete unix path to the binary
34170   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34171     # Keep paths in /bin as-is, but remove trailing .exe if any
34172     new_path="${new_path/%.exe/}"
34173     # Do not save /bin paths to all_fixpath_prefixes!
34174   else
34175     # Not in mixed or Windows style, start by that.
34176     new_path=`cmd //c echo $new_path`
34177 
34178   input_path="$new_path"
34179   # Check if we need to convert this using DOS-style short mode. If the path
34180   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34181   # take no chances and rewrite it.
34182   # Note: m4 eats our [], so we need to use [ and ] instead.
34183   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34184   if test "x$has_forbidden_chars" != x; then
34185     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34186     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34187   fi
34188 
34189     # Output is in $new_path
34190 
34191   windows_path="$new_path"
34192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34193     unix_path=`$CYGPATH -u "$windows_path"`
34194     new_path="$unix_path"
34195   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34196     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34197     new_path="$unix_path"
34198   fi
34199 
34200     # remove trailing .exe if any
34201     new_path="${new_path/%.exe/}"
34202 
34203     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34204     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34205   fi
34206 
34207   else
34208     # We're on a posix platform. Hooray! :)
34209     # First separate the path from the arguments. This will split at the first
34210     # space.
34211     complete="$LIPO"
34212     path="${complete%% *}"
34213     tmp="$complete EOL"
34214     arguments="${tmp#* }"
34215 
34216     # Cannot rely on the command "which" here since it doesn't always work.
34217     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34218     if test -z "$is_absolute_path"; then
34219       # Path to executable is not absolute. Find it.
34220       IFS_save="$IFS"
34221       IFS=:
34222       for p in $PATH; do
34223         if test -f "$p/$path" && test -x "$p/$path"; then
34224           new_path="$p/$path"
34225           break
34226         fi
34227       done
34228       IFS="$IFS_save"
34229     else
34230       # This is an absolute path, we can use it without further modifications.
34231       new_path="$path"
34232     fi
34233 
34234     if test "x$new_path" = x; then
34235       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34236 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34237       has_space=`$ECHO "$complete" | $GREP " "`
34238       if test "x$has_space" != x; then
34239         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34240 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34241       fi
34242       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34243     fi
34244   fi
34245 
34246   # Now join together the path and the arguments once again
34247   if test "x$arguments" != xEOL; then
34248     new_complete="$new_path ${arguments% *}"
34249   else
34250     new_complete="$new_path"
34251   fi
34252 
34253   if test "x$complete" != "x$new_complete"; then
34254     LIPO="$new_complete"
34255     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34256 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34257   fi
34258 
34259   else
34260     OBJC=
34261   fi
34262 
34263   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34264     # Extract the first word of "mt", so it can be a program name with args.
34265 set dummy mt; ac_word=$2
34266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34267 $as_echo_n "checking for $ac_word... " >&6; }
34268 if ${ac_cv_prog_MT+:} false; then :
34269   $as_echo_n "(cached) " >&6
34270 else
34271   if test -n "$MT"; then
34272   ac_cv_prog_MT="$MT" # Let the user override the test.
34273 else
34274   ac_prog_rejected=no
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     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34283        ac_prog_rejected=yes
34284        continue
34285      fi
34286     ac_cv_prog_MT="mt"
34287     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34288     break 2
34289   fi
34290 done
34291   done
34292 IFS=$as_save_IFS
34293 
34294 if test $ac_prog_rejected = yes; then
34295   # We found a bogon in the path, so make sure we never use it.
34296   set dummy $ac_cv_prog_MT
34297   shift
34298   if test $# != 0; then
34299     # We chose a different compiler from the bogus one.
34300     # However, it has the same basename, so the bogon will be chosen
34301     # first if we set MT to just the basename; use the full file name.
34302     shift
34303     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34304   fi
34305 fi
34306 fi
34307 fi
34308 MT=$ac_cv_prog_MT
34309 if test -n "$MT"; then
34310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34311 $as_echo "$MT" >&6; }
34312 else
34313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34314 $as_echo "no" >&6; }
34315 fi
34316 
34317 
34318 
34319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34320 
34321   # First separate the path from the arguments. This will split at the first
34322   # space.
34323   complete="$MT"
34324   path="${complete%% *}"
34325   tmp="$complete EOL"
34326   arguments="${tmp#* }"
34327 
34328   # Input might be given as Windows format, start by converting to
34329   # unix format.
34330   new_path=`$CYGPATH -u "$path"`
34331 
34332   # Now try to locate executable using which
34333   new_path=`$WHICH "$new_path" 2> /dev/null`
34334   # bat and cmd files are not always considered executable in cygwin causing which
34335   # to not find them
34336   if test "x$new_path" = x \
34337       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34338       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34339     new_path=`$CYGPATH -u "$path"`
34340   fi
34341   if test "x$new_path" = x; then
34342     # Oops. Which didn't find the executable.
34343     # The splitting of arguments from the executable at a space might have been incorrect,
34344     # since paths with space are more likely in Windows. Give it another try with the whole
34345     # argument.
34346     path="$complete"
34347     arguments="EOL"
34348     new_path=`$CYGPATH -u "$path"`
34349     new_path=`$WHICH "$new_path" 2> /dev/null`
34350     # bat and cmd files are not always considered executable in cygwin causing which
34351     # to not find them
34352     if test "x$new_path" = x \
34353         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34354         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34355       new_path=`$CYGPATH -u "$path"`
34356     fi
34357     if test "x$new_path" = x; then
34358       # It's still not found. Now this is an unrecoverable error.
34359       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34360 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34361       has_space=`$ECHO "$complete" | $GREP " "`
34362       if test "x$has_space" != x; then
34363         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34364 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34365       fi
34366       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34367     fi
34368   fi
34369 
34370   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34371   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34372   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34373   # "foo.exe" is OK but "foo" is an error.
34374   #
34375   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34376   # It is also a way to make sure we got the proper file name for the real test later on.
34377   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34378   if test "x$test_shortpath" = x; then
34379     # Short path failed, file does not exist as specified.
34380     # Try adding .exe or .cmd
34381     if test -f "${new_path}.exe"; then
34382       input_to_shortpath="${new_path}.exe"
34383     elif test -f "${new_path}.cmd"; then
34384       input_to_shortpath="${new_path}.cmd"
34385     else
34386       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34387 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34388       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34389 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34390       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34391     fi
34392   else
34393     input_to_shortpath="$new_path"
34394   fi
34395 
34396   # Call helper function which possibly converts this using DOS-style short mode.
34397   # If so, the updated path is stored in $new_path.
34398   new_path="$input_to_shortpath"
34399 
34400   input_path="$input_to_shortpath"
34401   # Check if we need to convert this using DOS-style short mode. If the path
34402   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34403   # take no chances and rewrite it.
34404   # Note: m4 eats our [], so we need to use [ and ] instead.
34405   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34406   if test "x$has_forbidden_chars" != x; then
34407     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34408     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34409     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34410     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34411       # Going to short mode and back again did indeed matter. Since short mode is
34412       # case insensitive, let's make it lowercase to improve readability.
34413       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34414       # Now convert it back to Unix-stile (cygpath)
34415       input_path=`$CYGPATH -u "$shortmode_path"`
34416       new_path="$input_path"
34417     fi
34418   fi
34419 
34420   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34421   if test "x$test_cygdrive_prefix" = x; then
34422     # As a simple fix, exclude /usr/bin since it's not a real path.
34423     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34424       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34425       # a path prefixed by /cygdrive for fixpath to work.
34426       new_path="$CYGWIN_ROOT_PATH$input_path"
34427     fi
34428   fi
34429 
34430   # remove trailing .exe if any
34431   new_path="${new_path/%.exe/}"
34432 
34433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34434 
34435   # First separate the path from the arguments. This will split at the first
34436   # space.
34437   complete="$MT"
34438   path="${complete%% *}"
34439   tmp="$complete EOL"
34440   arguments="${tmp#* }"
34441 
34442   # Input might be given as Windows format, start by converting to
34443   # unix format.
34444   new_path="$path"
34445 
34446   windows_path="$new_path"
34447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34448     unix_path=`$CYGPATH -u "$windows_path"`
34449     new_path="$unix_path"
34450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34452     new_path="$unix_path"
34453   fi
34454 
34455 
34456   # Now try to locate executable using which
34457   new_path=`$WHICH "$new_path" 2> /dev/null`
34458 
34459   if test "x$new_path" = x; then
34460     # Oops. Which didn't find the executable.
34461     # The splitting of arguments from the executable at a space might have been incorrect,
34462     # since paths with space are more likely in Windows. Give it another try with the whole
34463     # argument.
34464     path="$complete"
34465     arguments="EOL"
34466     new_path="$path"
34467 
34468   windows_path="$new_path"
34469   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34470     unix_path=`$CYGPATH -u "$windows_path"`
34471     new_path="$unix_path"
34472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34473     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34474     new_path="$unix_path"
34475   fi
34476 
34477 
34478     new_path=`$WHICH "$new_path" 2> /dev/null`
34479     # bat and cmd files are not always considered executable in MSYS causing which
34480     # to not find them
34481     if test "x$new_path" = x \
34482         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34483         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34484       new_path="$path"
34485 
34486   windows_path="$new_path"
34487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34488     unix_path=`$CYGPATH -u "$windows_path"`
34489     new_path="$unix_path"
34490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34492     new_path="$unix_path"
34493   fi
34494 
34495     fi
34496 
34497     if test "x$new_path" = x; then
34498       # It's still not found. Now this is an unrecoverable error.
34499       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34500 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34501       has_space=`$ECHO "$complete" | $GREP " "`
34502       if test "x$has_space" != x; then
34503         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34504 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34505       fi
34506       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34507     fi
34508   fi
34509 
34510   # Now new_path has a complete unix path to the binary
34511   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34512     # Keep paths in /bin as-is, but remove trailing .exe if any
34513     new_path="${new_path/%.exe/}"
34514     # Do not save /bin paths to all_fixpath_prefixes!
34515   else
34516     # Not in mixed or Windows style, start by that.
34517     new_path=`cmd //c echo $new_path`
34518 
34519   input_path="$new_path"
34520   # Check if we need to convert this using DOS-style short mode. If the path
34521   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34522   # take no chances and rewrite it.
34523   # Note: m4 eats our [], so we need to use [ and ] instead.
34524   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34525   if test "x$has_forbidden_chars" != x; then
34526     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34527     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34528   fi
34529 
34530     # Output is in $new_path
34531 
34532   windows_path="$new_path"
34533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34534     unix_path=`$CYGPATH -u "$windows_path"`
34535     new_path="$unix_path"
34536   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34537     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34538     new_path="$unix_path"
34539   fi
34540 
34541     # remove trailing .exe if any
34542     new_path="${new_path/%.exe/}"
34543 
34544     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34545     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34546   fi
34547 
34548   else
34549     # We're on a posix platform. Hooray! :)
34550     # First separate the path from the arguments. This will split at the first
34551     # space.
34552     complete="$MT"
34553     path="${complete%% *}"
34554     tmp="$complete EOL"
34555     arguments="${tmp#* }"
34556 
34557     # Cannot rely on the command "which" here since it doesn't always work.
34558     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34559     if test -z "$is_absolute_path"; then
34560       # Path to executable is not absolute. Find it.
34561       IFS_save="$IFS"
34562       IFS=:
34563       for p in $PATH; do
34564         if test -f "$p/$path" && test -x "$p/$path"; then
34565           new_path="$p/$path"
34566           break
34567         fi
34568       done
34569       IFS="$IFS_save"
34570     else
34571       # This is an absolute path, we can use it without further modifications.
34572       new_path="$path"
34573     fi
34574 
34575     if test "x$new_path" = x; then
34576       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34577 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34578       has_space=`$ECHO "$complete" | $GREP " "`
34579       if test "x$has_space" != x; then
34580         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34581 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34582       fi
34583       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34584     fi
34585   fi
34586 
34587   # Now join together the path and the arguments once again
34588   if test "x$arguments" != xEOL; then
34589     new_complete="$new_path ${arguments% *}"
34590   else
34591     new_complete="$new_path"
34592   fi
34593 
34594   if test "x$complete" != "x$new_complete"; then
34595     MT="$new_complete"
34596     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34597 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34598   fi
34599 
34600     # Setup the resource compiler (RC)
34601     # Extract the first word of "rc", so it can be a program name with args.
34602 set dummy rc; ac_word=$2
34603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34604 $as_echo_n "checking for $ac_word... " >&6; }
34605 if ${ac_cv_prog_RC+:} false; then :
34606   $as_echo_n "(cached) " >&6
34607 else
34608   if test -n "$RC"; then
34609   ac_cv_prog_RC="$RC" # Let the user override the test.
34610 else
34611   ac_prog_rejected=no
34612 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34613 for as_dir in $PATH
34614 do
34615   IFS=$as_save_IFS
34616   test -z "$as_dir" && as_dir=.
34617     for ac_exec_ext in '' $ac_executable_extensions; do
34618   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34619     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34620        ac_prog_rejected=yes
34621        continue
34622      fi
34623     ac_cv_prog_RC="rc"
34624     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34625     break 2
34626   fi
34627 done
34628   done
34629 IFS=$as_save_IFS
34630 
34631 if test $ac_prog_rejected = yes; then
34632   # We found a bogon in the path, so make sure we never use it.
34633   set dummy $ac_cv_prog_RC
34634   shift
34635   if test $# != 0; then
34636     # We chose a different compiler from the bogus one.
34637     # However, it has the same basename, so the bogon will be chosen
34638     # first if we set RC to just the basename; use the full file name.
34639     shift
34640     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34641   fi
34642 fi
34643 fi
34644 fi
34645 RC=$ac_cv_prog_RC
34646 if test -n "$RC"; then
34647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34648 $as_echo "$RC" >&6; }
34649 else
34650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34651 $as_echo "no" >&6; }
34652 fi
34653 
34654 
34655 
34656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34657 
34658   # First separate the path from the arguments. This will split at the first
34659   # space.
34660   complete="$RC"
34661   path="${complete%% *}"
34662   tmp="$complete EOL"
34663   arguments="${tmp#* }"
34664 
34665   # Input might be given as Windows format, start by converting to
34666   # unix format.
34667   new_path=`$CYGPATH -u "$path"`
34668 
34669   # Now try to locate executable using which
34670   new_path=`$WHICH "$new_path" 2> /dev/null`
34671   # bat and cmd files are not always considered executable in cygwin causing which
34672   # to not find them
34673   if test "x$new_path" = x \
34674       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34675       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34676     new_path=`$CYGPATH -u "$path"`
34677   fi
34678   if test "x$new_path" = x; then
34679     # Oops. Which didn't find the executable.
34680     # The splitting of arguments from the executable at a space might have been incorrect,
34681     # since paths with space are more likely in Windows. Give it another try with the whole
34682     # argument.
34683     path="$complete"
34684     arguments="EOL"
34685     new_path=`$CYGPATH -u "$path"`
34686     new_path=`$WHICH "$new_path" 2> /dev/null`
34687     # bat and cmd files are not always considered executable in cygwin causing which
34688     # to not find them
34689     if test "x$new_path" = x \
34690         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34691         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34692       new_path=`$CYGPATH -u "$path"`
34693     fi
34694     if test "x$new_path" = x; then
34695       # It's still not found. Now this is an unrecoverable error.
34696       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34697 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34698       has_space=`$ECHO "$complete" | $GREP " "`
34699       if test "x$has_space" != x; then
34700         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34701 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34702       fi
34703       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34704     fi
34705   fi
34706 
34707   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34708   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34709   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34710   # "foo.exe" is OK but "foo" is an error.
34711   #
34712   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34713   # It is also a way to make sure we got the proper file name for the real test later on.
34714   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34715   if test "x$test_shortpath" = x; then
34716     # Short path failed, file does not exist as specified.
34717     # Try adding .exe or .cmd
34718     if test -f "${new_path}.exe"; then
34719       input_to_shortpath="${new_path}.exe"
34720     elif test -f "${new_path}.cmd"; then
34721       input_to_shortpath="${new_path}.cmd"
34722     else
34723       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34724 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34725       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34726 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34727       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34728     fi
34729   else
34730     input_to_shortpath="$new_path"
34731   fi
34732 
34733   # Call helper function which possibly converts this using DOS-style short mode.
34734   # If so, the updated path is stored in $new_path.
34735   new_path="$input_to_shortpath"
34736 
34737   input_path="$input_to_shortpath"
34738   # Check if we need to convert this using DOS-style short mode. If the path
34739   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34740   # take no chances and rewrite it.
34741   # Note: m4 eats our [], so we need to use [ and ] instead.
34742   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34743   if test "x$has_forbidden_chars" != x; then
34744     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34745     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34746     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34747     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34748       # Going to short mode and back again did indeed matter. Since short mode is
34749       # case insensitive, let's make it lowercase to improve readability.
34750       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34751       # Now convert it back to Unix-stile (cygpath)
34752       input_path=`$CYGPATH -u "$shortmode_path"`
34753       new_path="$input_path"
34754     fi
34755   fi
34756 
34757   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34758   if test "x$test_cygdrive_prefix" = x; then
34759     # As a simple fix, exclude /usr/bin since it's not a real path.
34760     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34761       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34762       # a path prefixed by /cygdrive for fixpath to work.
34763       new_path="$CYGWIN_ROOT_PATH$input_path"
34764     fi
34765   fi
34766 
34767   # remove trailing .exe if any
34768   new_path="${new_path/%.exe/}"
34769 
34770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34771 
34772   # First separate the path from the arguments. This will split at the first
34773   # space.
34774   complete="$RC"
34775   path="${complete%% *}"
34776   tmp="$complete EOL"
34777   arguments="${tmp#* }"
34778 
34779   # Input might be given as Windows format, start by converting to
34780   # unix format.
34781   new_path="$path"
34782 
34783   windows_path="$new_path"
34784   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34785     unix_path=`$CYGPATH -u "$windows_path"`
34786     new_path="$unix_path"
34787   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34788     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34789     new_path="$unix_path"
34790   fi
34791 
34792 
34793   # Now try to locate executable using which
34794   new_path=`$WHICH "$new_path" 2> /dev/null`
34795 
34796   if test "x$new_path" = x; then
34797     # Oops. Which didn't find the executable.
34798     # The splitting of arguments from the executable at a space might have been incorrect,
34799     # since paths with space are more likely in Windows. Give it another try with the whole
34800     # argument.
34801     path="$complete"
34802     arguments="EOL"
34803     new_path="$path"
34804 
34805   windows_path="$new_path"
34806   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34807     unix_path=`$CYGPATH -u "$windows_path"`
34808     new_path="$unix_path"
34809   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34810     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34811     new_path="$unix_path"
34812   fi
34813 
34814 
34815     new_path=`$WHICH "$new_path" 2> /dev/null`
34816     # bat and cmd files are not always considered executable in MSYS causing which
34817     # to not find them
34818     if test "x$new_path" = x \
34819         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34820         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34821       new_path="$path"
34822 
34823   windows_path="$new_path"
34824   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34825     unix_path=`$CYGPATH -u "$windows_path"`
34826     new_path="$unix_path"
34827   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34828     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34829     new_path="$unix_path"
34830   fi
34831 
34832     fi
34833 
34834     if test "x$new_path" = x; then
34835       # It's still not found. Now this is an unrecoverable error.
34836       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34837 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34838       has_space=`$ECHO "$complete" | $GREP " "`
34839       if test "x$has_space" != x; then
34840         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34841 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34842       fi
34843       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34844     fi
34845   fi
34846 
34847   # Now new_path has a complete unix path to the binary
34848   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34849     # Keep paths in /bin as-is, but remove trailing .exe if any
34850     new_path="${new_path/%.exe/}"
34851     # Do not save /bin paths to all_fixpath_prefixes!
34852   else
34853     # Not in mixed or Windows style, start by that.
34854     new_path=`cmd //c echo $new_path`
34855 
34856   input_path="$new_path"
34857   # Check if we need to convert this using DOS-style short mode. If the path
34858   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34859   # take no chances and rewrite it.
34860   # Note: m4 eats our [], so we need to use [ and ] instead.
34861   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34862   if test "x$has_forbidden_chars" != x; then
34863     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34864     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34865   fi
34866 
34867     # Output is in $new_path
34868 
34869   windows_path="$new_path"
34870   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34871     unix_path=`$CYGPATH -u "$windows_path"`
34872     new_path="$unix_path"
34873   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34874     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34875     new_path="$unix_path"
34876   fi
34877 
34878     # remove trailing .exe if any
34879     new_path="${new_path/%.exe/}"
34880 
34881     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34882     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34883   fi
34884 
34885   else
34886     # We're on a posix platform. Hooray! :)
34887     # First separate the path from the arguments. This will split at the first
34888     # space.
34889     complete="$RC"
34890     path="${complete%% *}"
34891     tmp="$complete EOL"
34892     arguments="${tmp#* }"
34893 
34894     # Cannot rely on the command "which" here since it doesn't always work.
34895     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34896     if test -z "$is_absolute_path"; then
34897       # Path to executable is not absolute. Find it.
34898       IFS_save="$IFS"
34899       IFS=:
34900       for p in $PATH; do
34901         if test -f "$p/$path" && test -x "$p/$path"; then
34902           new_path="$p/$path"
34903           break
34904         fi
34905       done
34906       IFS="$IFS_save"
34907     else
34908       # This is an absolute path, we can use it without further modifications.
34909       new_path="$path"
34910     fi
34911 
34912     if test "x$new_path" = x; then
34913       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34914 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34915       has_space=`$ECHO "$complete" | $GREP " "`
34916       if test "x$has_space" != x; then
34917         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34918 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34919       fi
34920       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34921     fi
34922   fi
34923 
34924   # Now join together the path and the arguments once again
34925   if test "x$arguments" != xEOL; then
34926     new_complete="$new_path ${arguments% *}"
34927   else
34928     new_complete="$new_path"
34929   fi
34930 
34931   if test "x$complete" != "x$new_complete"; then
34932     RC="$new_complete"
34933     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34934 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34935   fi
34936 
34937     # Extract the first word of "dumpbin", so it can be a program name with args.
34938 set dummy dumpbin; ac_word=$2
34939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34940 $as_echo_n "checking for $ac_word... " >&6; }
34941 if ${ac_cv_prog_DUMPBIN+:} false; then :
34942   $as_echo_n "(cached) " >&6
34943 else
34944   if test -n "$DUMPBIN"; then
34945   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34946 else
34947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34948 for as_dir in $PATH
34949 do
34950   IFS=$as_save_IFS
34951   test -z "$as_dir" && as_dir=.
34952     for ac_exec_ext in '' $ac_executable_extensions; do
34953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34954     ac_cv_prog_DUMPBIN="dumpbin"
34955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34956     break 2
34957   fi
34958 done
34959   done
34960 IFS=$as_save_IFS
34961 
34962 fi
34963 fi
34964 DUMPBIN=$ac_cv_prog_DUMPBIN
34965 if test -n "$DUMPBIN"; then
34966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34967 $as_echo "$DUMPBIN" >&6; }
34968 else
34969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34970 $as_echo "no" >&6; }
34971 fi
34972 
34973 
34974 
34975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34976 
34977   # First separate the path from the arguments. This will split at the first
34978   # space.
34979   complete="$DUMPBIN"
34980   path="${complete%% *}"
34981   tmp="$complete EOL"
34982   arguments="${tmp#* }"
34983 
34984   # Input might be given as Windows format, start by converting to
34985   # unix format.
34986   new_path=`$CYGPATH -u "$path"`
34987 
34988   # Now try to locate executable using which
34989   new_path=`$WHICH "$new_path" 2> /dev/null`
34990   # bat and cmd files are not always considered executable in cygwin causing which
34991   # to not find them
34992   if test "x$new_path" = x \
34993       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34994       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34995     new_path=`$CYGPATH -u "$path"`
34996   fi
34997   if test "x$new_path" = x; then
34998     # Oops. Which didn't find the executable.
34999     # The splitting of arguments from the executable at a space might have been incorrect,
35000     # since paths with space are more likely in Windows. Give it another try with the whole
35001     # argument.
35002     path="$complete"
35003     arguments="EOL"
35004     new_path=`$CYGPATH -u "$path"`
35005     new_path=`$WHICH "$new_path" 2> /dev/null`
35006     # bat and cmd files are not always considered executable in cygwin causing which
35007     # to not find them
35008     if test "x$new_path" = x \
35009         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35010         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35011       new_path=`$CYGPATH -u "$path"`
35012     fi
35013     if test "x$new_path" = x; then
35014       # It's still not found. Now this is an unrecoverable error.
35015       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35016 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35017       has_space=`$ECHO "$complete" | $GREP " "`
35018       if test "x$has_space" != x; then
35019         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35020 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35021       fi
35022       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35023     fi
35024   fi
35025 
35026   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35027   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35028   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35029   # "foo.exe" is OK but "foo" is an error.
35030   #
35031   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35032   # It is also a way to make sure we got the proper file name for the real test later on.
35033   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35034   if test "x$test_shortpath" = x; then
35035     # Short path failed, file does not exist as specified.
35036     # Try adding .exe or .cmd
35037     if test -f "${new_path}.exe"; then
35038       input_to_shortpath="${new_path}.exe"
35039     elif test -f "${new_path}.cmd"; then
35040       input_to_shortpath="${new_path}.cmd"
35041     else
35042       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35043 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35044       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35045 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35046       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35047     fi
35048   else
35049     input_to_shortpath="$new_path"
35050   fi
35051 
35052   # Call helper function which possibly converts this using DOS-style short mode.
35053   # If so, the updated path is stored in $new_path.
35054   new_path="$input_to_shortpath"
35055 
35056   input_path="$input_to_shortpath"
35057   # Check if we need to convert this using DOS-style short mode. If the path
35058   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35059   # take no chances and rewrite it.
35060   # Note: m4 eats our [], so we need to use [ and ] instead.
35061   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35062   if test "x$has_forbidden_chars" != x; then
35063     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35064     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35065     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35066     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35067       # Going to short mode and back again did indeed matter. Since short mode is
35068       # case insensitive, let's make it lowercase to improve readability.
35069       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35070       # Now convert it back to Unix-stile (cygpath)
35071       input_path=`$CYGPATH -u "$shortmode_path"`
35072       new_path="$input_path"
35073     fi
35074   fi
35075 
35076   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35077   if test "x$test_cygdrive_prefix" = x; then
35078     # As a simple fix, exclude /usr/bin since it's not a real path.
35079     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35080       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35081       # a path prefixed by /cygdrive for fixpath to work.
35082       new_path="$CYGWIN_ROOT_PATH$input_path"
35083     fi
35084   fi
35085 
35086   # remove trailing .exe if any
35087   new_path="${new_path/%.exe/}"
35088 
35089   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35090 
35091   # First separate the path from the arguments. This will split at the first
35092   # space.
35093   complete="$DUMPBIN"
35094   path="${complete%% *}"
35095   tmp="$complete EOL"
35096   arguments="${tmp#* }"
35097 
35098   # Input might be given as Windows format, start by converting to
35099   # unix format.
35100   new_path="$path"
35101 
35102   windows_path="$new_path"
35103   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35104     unix_path=`$CYGPATH -u "$windows_path"`
35105     new_path="$unix_path"
35106   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35107     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35108     new_path="$unix_path"
35109   fi
35110 
35111 
35112   # Now try to locate executable using which
35113   new_path=`$WHICH "$new_path" 2> /dev/null`
35114 
35115   if test "x$new_path" = x; then
35116     # Oops. Which didn't find the executable.
35117     # The splitting of arguments from the executable at a space might have been incorrect,
35118     # since paths with space are more likely in Windows. Give it another try with the whole
35119     # argument.
35120     path="$complete"
35121     arguments="EOL"
35122     new_path="$path"
35123 
35124   windows_path="$new_path"
35125   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35126     unix_path=`$CYGPATH -u "$windows_path"`
35127     new_path="$unix_path"
35128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35129     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35130     new_path="$unix_path"
35131   fi
35132 
35133 
35134     new_path=`$WHICH "$new_path" 2> /dev/null`
35135     # bat and cmd files are not always considered executable in MSYS causing which
35136     # to not find them
35137     if test "x$new_path" = x \
35138         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35139         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35140       new_path="$path"
35141 
35142   windows_path="$new_path"
35143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35144     unix_path=`$CYGPATH -u "$windows_path"`
35145     new_path="$unix_path"
35146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35147     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35148     new_path="$unix_path"
35149   fi
35150 
35151     fi
35152 
35153     if test "x$new_path" = x; then
35154       # It's still not found. Now this is an unrecoverable error.
35155       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35156 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35157       has_space=`$ECHO "$complete" | $GREP " "`
35158       if test "x$has_space" != x; then
35159         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35160 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35161       fi
35162       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35163     fi
35164   fi
35165 
35166   # Now new_path has a complete unix path to the binary
35167   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35168     # Keep paths in /bin as-is, but remove trailing .exe if any
35169     new_path="${new_path/%.exe/}"
35170     # Do not save /bin paths to all_fixpath_prefixes!
35171   else
35172     # Not in mixed or Windows style, start by that.
35173     new_path=`cmd //c echo $new_path`
35174 
35175   input_path="$new_path"
35176   # Check if we need to convert this using DOS-style short mode. If the path
35177   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35178   # take no chances and rewrite it.
35179   # Note: m4 eats our [], so we need to use [ and ] instead.
35180   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35181   if test "x$has_forbidden_chars" != x; then
35182     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35183     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35184   fi
35185 
35186     # Output is in $new_path
35187 
35188   windows_path="$new_path"
35189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35190     unix_path=`$CYGPATH -u "$windows_path"`
35191     new_path="$unix_path"
35192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35193     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35194     new_path="$unix_path"
35195   fi
35196 
35197     # remove trailing .exe if any
35198     new_path="${new_path/%.exe/}"
35199 
35200     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35201     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35202   fi
35203 
35204   else
35205     # We're on a posix platform. Hooray! :)
35206     # First separate the path from the arguments. This will split at the first
35207     # space.
35208     complete="$DUMPBIN"
35209     path="${complete%% *}"
35210     tmp="$complete EOL"
35211     arguments="${tmp#* }"
35212 
35213     # Cannot rely on the command "which" here since it doesn't always work.
35214     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35215     if test -z "$is_absolute_path"; then
35216       # Path to executable is not absolute. Find it.
35217       IFS_save="$IFS"
35218       IFS=:
35219       for p in $PATH; do
35220         if test -f "$p/$path" && test -x "$p/$path"; then
35221           new_path="$p/$path"
35222           break
35223         fi
35224       done
35225       IFS="$IFS_save"
35226     else
35227       # This is an absolute path, we can use it without further modifications.
35228       new_path="$path"
35229     fi
35230 
35231     if test "x$new_path" = x; then
35232       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35233 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35234       has_space=`$ECHO "$complete" | $GREP " "`
35235       if test "x$has_space" != x; then
35236         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35237 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35238       fi
35239       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35240     fi
35241   fi
35242 
35243   # Now join together the path and the arguments once again
35244   if test "x$arguments" != xEOL; then
35245     new_complete="$new_path ${arguments% *}"
35246   else
35247     new_complete="$new_path"
35248   fi
35249 
35250   if test "x$complete" != "x$new_complete"; then
35251     DUMPBIN="$new_complete"
35252     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35253 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35254   fi
35255 
35256   fi
35257 
35258   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35259 
35260 
35261   # Publish this variable in the help.
35262 
35263 
35264   if test "x$STRIP" = x; then
35265     # The variable is not set by user, try to locate tool using the code snippet
35266     for ac_prog in strip
35267 do
35268   # Extract the first word of "$ac_prog", so it can be a program name with args.
35269 set dummy $ac_prog; ac_word=$2
35270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35271 $as_echo_n "checking for $ac_word... " >&6; }
35272 if ${ac_cv_path_STRIP+:} false; then :
35273   $as_echo_n "(cached) " >&6
35274 else
35275   case $STRIP in
35276   [\\/]* | ?:[\\/]*)
35277   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35278   ;;
35279   *)
35280   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35281 for as_dir in $PATH
35282 do
35283   IFS=$as_save_IFS
35284   test -z "$as_dir" && as_dir=.
35285     for ac_exec_ext in '' $ac_executable_extensions; do
35286   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35287     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35288     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35289     break 2
35290   fi
35291 done
35292   done
35293 IFS=$as_save_IFS
35294 
35295   ;;
35296 esac
35297 fi
35298 STRIP=$ac_cv_path_STRIP
35299 if test -n "$STRIP"; then
35300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35301 $as_echo "$STRIP" >&6; }
35302 else
35303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35304 $as_echo "no" >&6; }
35305 fi
35306 
35307 
35308   test -n "$STRIP" && break
35309 done
35310 
35311   else
35312     # The variable is set, but is it from the command line or the environment?
35313 
35314     # Try to remove the string !STRIP! from our list.
35315     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35316     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35317       # If it failed, the variable was not from the command line. Ignore it,
35318       # but warn the user (except for BASH, which is always set by the calling BASH).
35319       if test "xSTRIP" != xBASH; then
35320         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35321 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35322       fi
35323       # Try to locate tool using the code snippet
35324       for ac_prog in strip
35325 do
35326   # Extract the first word of "$ac_prog", so it can be a program name with args.
35327 set dummy $ac_prog; ac_word=$2
35328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35329 $as_echo_n "checking for $ac_word... " >&6; }
35330 if ${ac_cv_path_STRIP+:} false; then :
35331   $as_echo_n "(cached) " >&6
35332 else
35333   case $STRIP in
35334   [\\/]* | ?:[\\/]*)
35335   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35336   ;;
35337   *)
35338   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35339 for as_dir in $PATH
35340 do
35341   IFS=$as_save_IFS
35342   test -z "$as_dir" && as_dir=.
35343     for ac_exec_ext in '' $ac_executable_extensions; do
35344   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35345     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35346     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35347     break 2
35348   fi
35349 done
35350   done
35351 IFS=$as_save_IFS
35352 
35353   ;;
35354 esac
35355 fi
35356 STRIP=$ac_cv_path_STRIP
35357 if test -n "$STRIP"; then
35358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35359 $as_echo "$STRIP" >&6; }
35360 else
35361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35362 $as_echo "no" >&6; }
35363 fi
35364 
35365 
35366   test -n "$STRIP" && break
35367 done
35368 
35369     else
35370       # If it succeeded, then it was overridden by the user. We will use it
35371       # for the tool.
35372 
35373       # First remove it from the list of overridden variables, so we can test
35374       # for unknown variables in the end.
35375       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35376 
35377       # Check if the provided tool contains a complete path.
35378       tool_specified="$STRIP"
35379       tool_basename="${tool_specified##*/}"
35380       if test "x$tool_basename" = "x$tool_specified"; then
35381         # A command without a complete path is provided, search $PATH.
35382         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35383 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35384         # Extract the first word of "$tool_basename", so it can be a program name with args.
35385 set dummy $tool_basename; ac_word=$2
35386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35387 $as_echo_n "checking for $ac_word... " >&6; }
35388 if ${ac_cv_path_STRIP+:} false; then :
35389   $as_echo_n "(cached) " >&6
35390 else
35391   case $STRIP in
35392   [\\/]* | ?:[\\/]*)
35393   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35394   ;;
35395   *)
35396   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35397 for as_dir in $PATH
35398 do
35399   IFS=$as_save_IFS
35400   test -z "$as_dir" && as_dir=.
35401     for ac_exec_ext in '' $ac_executable_extensions; do
35402   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35403     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35404     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35405     break 2
35406   fi
35407 done
35408   done
35409 IFS=$as_save_IFS
35410 
35411   ;;
35412 esac
35413 fi
35414 STRIP=$ac_cv_path_STRIP
35415 if test -n "$STRIP"; then
35416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35417 $as_echo "$STRIP" >&6; }
35418 else
35419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35420 $as_echo "no" >&6; }
35421 fi
35422 
35423 
35424         if test "x$STRIP" = x; then
35425           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35426         fi
35427       else
35428         # Otherwise we believe it is a complete path. Use it as it is.
35429         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35430 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35431         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35432 $as_echo_n "checking for STRIP... " >&6; }
35433         if test ! -x "$tool_specified"; then
35434           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35435 $as_echo "not found" >&6; }
35436           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35437         fi
35438         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35439 $as_echo "$tool_specified" >&6; }
35440       fi
35441     fi
35442   fi
35443 
35444 
35445 
35446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35447 
35448   # First separate the path from the arguments. This will split at the first
35449   # space.
35450   complete="$STRIP"
35451   path="${complete%% *}"
35452   tmp="$complete EOL"
35453   arguments="${tmp#* }"
35454 
35455   # Input might be given as Windows format, start by converting to
35456   # unix format.
35457   new_path=`$CYGPATH -u "$path"`
35458 
35459   # Now try to locate executable using which
35460   new_path=`$WHICH "$new_path" 2> /dev/null`
35461   # bat and cmd files are not always considered executable in cygwin causing which
35462   # to not find them
35463   if test "x$new_path" = x \
35464       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35465       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35466     new_path=`$CYGPATH -u "$path"`
35467   fi
35468   if test "x$new_path" = x; then
35469     # Oops. Which didn't find the executable.
35470     # The splitting of arguments from the executable at a space might have been incorrect,
35471     # since paths with space are more likely in Windows. Give it another try with the whole
35472     # argument.
35473     path="$complete"
35474     arguments="EOL"
35475     new_path=`$CYGPATH -u "$path"`
35476     new_path=`$WHICH "$new_path" 2> /dev/null`
35477     # bat and cmd files are not always considered executable in cygwin causing which
35478     # to not find them
35479     if test "x$new_path" = x \
35480         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35481         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35482       new_path=`$CYGPATH -u "$path"`
35483     fi
35484     if test "x$new_path" = x; then
35485       # It's still not found. Now this is an unrecoverable error.
35486       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35487 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35488       has_space=`$ECHO "$complete" | $GREP " "`
35489       if test "x$has_space" != x; then
35490         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35491 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35492       fi
35493       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35494     fi
35495   fi
35496 
35497   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35498   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35499   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35500   # "foo.exe" is OK but "foo" is an error.
35501   #
35502   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35503   # It is also a way to make sure we got the proper file name for the real test later on.
35504   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35505   if test "x$test_shortpath" = x; then
35506     # Short path failed, file does not exist as specified.
35507     # Try adding .exe or .cmd
35508     if test -f "${new_path}.exe"; then
35509       input_to_shortpath="${new_path}.exe"
35510     elif test -f "${new_path}.cmd"; then
35511       input_to_shortpath="${new_path}.cmd"
35512     else
35513       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35514 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35515       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35516 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35517       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35518     fi
35519   else
35520     input_to_shortpath="$new_path"
35521   fi
35522 
35523   # Call helper function which possibly converts this using DOS-style short mode.
35524   # If so, the updated path is stored in $new_path.
35525   new_path="$input_to_shortpath"
35526 
35527   input_path="$input_to_shortpath"
35528   # Check if we need to convert this using DOS-style short mode. If the path
35529   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35530   # take no chances and rewrite it.
35531   # Note: m4 eats our [], so we need to use [ and ] instead.
35532   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35533   if test "x$has_forbidden_chars" != x; then
35534     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35535     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35536     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35537     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35538       # Going to short mode and back again did indeed matter. Since short mode is
35539       # case insensitive, let's make it lowercase to improve readability.
35540       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35541       # Now convert it back to Unix-stile (cygpath)
35542       input_path=`$CYGPATH -u "$shortmode_path"`
35543       new_path="$input_path"
35544     fi
35545   fi
35546 
35547   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35548   if test "x$test_cygdrive_prefix" = x; then
35549     # As a simple fix, exclude /usr/bin since it's not a real path.
35550     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35551       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35552       # a path prefixed by /cygdrive for fixpath to work.
35553       new_path="$CYGWIN_ROOT_PATH$input_path"
35554     fi
35555   fi
35556 
35557   # remove trailing .exe if any
35558   new_path="${new_path/%.exe/}"
35559 
35560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35561 
35562   # First separate the path from the arguments. This will split at the first
35563   # space.
35564   complete="$STRIP"
35565   path="${complete%% *}"
35566   tmp="$complete EOL"
35567   arguments="${tmp#* }"
35568 
35569   # Input might be given as Windows format, start by converting to
35570   # unix format.
35571   new_path="$path"
35572 
35573   windows_path="$new_path"
35574   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35575     unix_path=`$CYGPATH -u "$windows_path"`
35576     new_path="$unix_path"
35577   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35578     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35579     new_path="$unix_path"
35580   fi
35581 
35582 
35583   # Now try to locate executable using which
35584   new_path=`$WHICH "$new_path" 2> /dev/null`
35585 
35586   if test "x$new_path" = x; then
35587     # Oops. Which didn't find the executable.
35588     # The splitting of arguments from the executable at a space might have been incorrect,
35589     # since paths with space are more likely in Windows. Give it another try with the whole
35590     # argument.
35591     path="$complete"
35592     arguments="EOL"
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 
35605     new_path=`$WHICH "$new_path" 2> /dev/null`
35606     # bat and cmd files are not always considered executable in MSYS causing which
35607     # to not find them
35608     if test "x$new_path" = x \
35609         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35610         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35611       new_path="$path"
35612 
35613   windows_path="$new_path"
35614   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35615     unix_path=`$CYGPATH -u "$windows_path"`
35616     new_path="$unix_path"
35617   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35618     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35619     new_path="$unix_path"
35620   fi
35621 
35622     fi
35623 
35624     if test "x$new_path" = x; then
35625       # It's still not found. Now this is an unrecoverable error.
35626       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35627 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35628       has_space=`$ECHO "$complete" | $GREP " "`
35629       if test "x$has_space" != x; then
35630         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35631 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35632       fi
35633       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35634     fi
35635   fi
35636 
35637   # Now new_path has a complete unix path to the binary
35638   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35639     # Keep paths in /bin as-is, but remove trailing .exe if any
35640     new_path="${new_path/%.exe/}"
35641     # Do not save /bin paths to all_fixpath_prefixes!
35642   else
35643     # Not in mixed or Windows style, start by that.
35644     new_path=`cmd //c echo $new_path`
35645 
35646   input_path="$new_path"
35647   # Check if we need to convert this using DOS-style short mode. If the path
35648   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35649   # take no chances and rewrite it.
35650   # Note: m4 eats our [], so we need to use [ and ] instead.
35651   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35652   if test "x$has_forbidden_chars" != x; then
35653     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35654     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35655   fi
35656 
35657     # Output is in $new_path
35658 
35659   windows_path="$new_path"
35660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35661     unix_path=`$CYGPATH -u "$windows_path"`
35662     new_path="$unix_path"
35663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35664     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35665     new_path="$unix_path"
35666   fi
35667 
35668     # remove trailing .exe if any
35669     new_path="${new_path/%.exe/}"
35670 
35671     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35672     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35673   fi
35674 
35675   else
35676     # We're on a posix platform. Hooray! :)
35677     # First separate the path from the arguments. This will split at the first
35678     # space.
35679     complete="$STRIP"
35680     path="${complete%% *}"
35681     tmp="$complete EOL"
35682     arguments="${tmp#* }"
35683 
35684     # Cannot rely on the command "which" here since it doesn't always work.
35685     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35686     if test -z "$is_absolute_path"; then
35687       # Path to executable is not absolute. Find it.
35688       IFS_save="$IFS"
35689       IFS=:
35690       for p in $PATH; do
35691         if test -f "$p/$path" && test -x "$p/$path"; then
35692           new_path="$p/$path"
35693           break
35694         fi
35695       done
35696       IFS="$IFS_save"
35697     else
35698       # This is an absolute path, we can use it without further modifications.
35699       new_path="$path"
35700     fi
35701 
35702     if test "x$new_path" = x; then
35703       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35704 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35705       has_space=`$ECHO "$complete" | $GREP " "`
35706       if test "x$has_space" != x; then
35707         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35708 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35709       fi
35710       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35711     fi
35712   fi
35713 
35714   # Now join together the path and the arguments once again
35715   if test "x$arguments" != xEOL; then
35716     new_complete="$new_path ${arguments% *}"
35717   else
35718     new_complete="$new_path"
35719   fi
35720 
35721   if test "x$complete" != "x$new_complete"; then
35722     STRIP="$new_complete"
35723     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35724 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35725   fi
35726 
35727 
35728 
35729   # Publish this variable in the help.
35730 
35731 
35732   if test "x$NM" = x; then
35733     # The variable is not set by user, try to locate tool using the code snippet
35734     for ac_prog in nm
35735 do
35736   # Extract the first word of "$ac_prog", so it can be a program name with args.
35737 set dummy $ac_prog; ac_word=$2
35738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35739 $as_echo_n "checking for $ac_word... " >&6; }
35740 if ${ac_cv_path_NM+:} false; then :
35741   $as_echo_n "(cached) " >&6
35742 else
35743   case $NM in
35744   [\\/]* | ?:[\\/]*)
35745   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35746   ;;
35747   *)
35748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35749 for as_dir in $PATH
35750 do
35751   IFS=$as_save_IFS
35752   test -z "$as_dir" && as_dir=.
35753     for ac_exec_ext in '' $ac_executable_extensions; do
35754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35755     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35757     break 2
35758   fi
35759 done
35760   done
35761 IFS=$as_save_IFS
35762 
35763   ;;
35764 esac
35765 fi
35766 NM=$ac_cv_path_NM
35767 if test -n "$NM"; then
35768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35769 $as_echo "$NM" >&6; }
35770 else
35771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35772 $as_echo "no" >&6; }
35773 fi
35774 
35775 
35776   test -n "$NM" && break
35777 done
35778 
35779   else
35780     # The variable is set, but is it from the command line or the environment?
35781 
35782     # Try to remove the string !NM! from our list.
35783     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35784     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35785       # If it failed, the variable was not from the command line. Ignore it,
35786       # but warn the user (except for BASH, which is always set by the calling BASH).
35787       if test "xNM" != xBASH; then
35788         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35789 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35790       fi
35791       # Try to locate tool using the code snippet
35792       for ac_prog in nm
35793 do
35794   # Extract the first word of "$ac_prog", so it can be a program name with args.
35795 set dummy $ac_prog; ac_word=$2
35796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35797 $as_echo_n "checking for $ac_word... " >&6; }
35798 if ${ac_cv_path_NM+:} false; then :
35799   $as_echo_n "(cached) " >&6
35800 else
35801   case $NM in
35802   [\\/]* | ?:[\\/]*)
35803   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35804   ;;
35805   *)
35806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35807 for as_dir in $PATH
35808 do
35809   IFS=$as_save_IFS
35810   test -z "$as_dir" && as_dir=.
35811     for ac_exec_ext in '' $ac_executable_extensions; do
35812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35813     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35815     break 2
35816   fi
35817 done
35818   done
35819 IFS=$as_save_IFS
35820 
35821   ;;
35822 esac
35823 fi
35824 NM=$ac_cv_path_NM
35825 if test -n "$NM"; then
35826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35827 $as_echo "$NM" >&6; }
35828 else
35829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35830 $as_echo "no" >&6; }
35831 fi
35832 
35833 
35834   test -n "$NM" && break
35835 done
35836 
35837     else
35838       # If it succeeded, then it was overridden by the user. We will use it
35839       # for the tool.
35840 
35841       # First remove it from the list of overridden variables, so we can test
35842       # for unknown variables in the end.
35843       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35844 
35845       # Check if the provided tool contains a complete path.
35846       tool_specified="$NM"
35847       tool_basename="${tool_specified##*/}"
35848       if test "x$tool_basename" = "x$tool_specified"; then
35849         # A command without a complete path is provided, search $PATH.
35850         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35851 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35852         # Extract the first word of "$tool_basename", so it can be a program name with args.
35853 set dummy $tool_basename; ac_word=$2
35854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35855 $as_echo_n "checking for $ac_word... " >&6; }
35856 if ${ac_cv_path_NM+:} false; then :
35857   $as_echo_n "(cached) " >&6
35858 else
35859   case $NM in
35860   [\\/]* | ?:[\\/]*)
35861   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35862   ;;
35863   *)
35864   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35865 for as_dir in $PATH
35866 do
35867   IFS=$as_save_IFS
35868   test -z "$as_dir" && as_dir=.
35869     for ac_exec_ext in '' $ac_executable_extensions; do
35870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35871     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35873     break 2
35874   fi
35875 done
35876   done
35877 IFS=$as_save_IFS
35878 
35879   ;;
35880 esac
35881 fi
35882 NM=$ac_cv_path_NM
35883 if test -n "$NM"; then
35884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35885 $as_echo "$NM" >&6; }
35886 else
35887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35888 $as_echo "no" >&6; }
35889 fi
35890 
35891 
35892         if test "x$NM" = x; then
35893           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35894         fi
35895       else
35896         # Otherwise we believe it is a complete path. Use it as it is.
35897         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35898 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35899         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35900 $as_echo_n "checking for NM... " >&6; }
35901         if test ! -x "$tool_specified"; then
35902           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35903 $as_echo "not found" >&6; }
35904           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35905         fi
35906         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35907 $as_echo "$tool_specified" >&6; }
35908       fi
35909     fi
35910   fi
35911 
35912 
35913 
35914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35915 
35916   # First separate the path from the arguments. This will split at the first
35917   # space.
35918   complete="$NM"
35919   path="${complete%% *}"
35920   tmp="$complete EOL"
35921   arguments="${tmp#* }"
35922 
35923   # Input might be given as Windows format, start by converting to
35924   # unix format.
35925   new_path=`$CYGPATH -u "$path"`
35926 
35927   # Now try to locate executable using which
35928   new_path=`$WHICH "$new_path" 2> /dev/null`
35929   # bat and cmd files are not always considered executable in cygwin causing which
35930   # to not find them
35931   if test "x$new_path" = x \
35932       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35933       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35934     new_path=`$CYGPATH -u "$path"`
35935   fi
35936   if test "x$new_path" = x; then
35937     # Oops. Which didn't find the executable.
35938     # The splitting of arguments from the executable at a space might have been incorrect,
35939     # since paths with space are more likely in Windows. Give it another try with the whole
35940     # argument.
35941     path="$complete"
35942     arguments="EOL"
35943     new_path=`$CYGPATH -u "$path"`
35944     new_path=`$WHICH "$new_path" 2> /dev/null`
35945     # bat and cmd files are not always considered executable in cygwin causing which
35946     # to not find them
35947     if test "x$new_path" = x \
35948         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35949         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35950       new_path=`$CYGPATH -u "$path"`
35951     fi
35952     if test "x$new_path" = x; then
35953       # It's still not found. Now this is an unrecoverable error.
35954       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35955 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35956       has_space=`$ECHO "$complete" | $GREP " "`
35957       if test "x$has_space" != x; then
35958         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35959 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35960       fi
35961       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35962     fi
35963   fi
35964 
35965   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35966   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35967   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35968   # "foo.exe" is OK but "foo" is an error.
35969   #
35970   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35971   # It is also a way to make sure we got the proper file name for the real test later on.
35972   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35973   if test "x$test_shortpath" = x; then
35974     # Short path failed, file does not exist as specified.
35975     # Try adding .exe or .cmd
35976     if test -f "${new_path}.exe"; then
35977       input_to_shortpath="${new_path}.exe"
35978     elif test -f "${new_path}.cmd"; then
35979       input_to_shortpath="${new_path}.cmd"
35980     else
35981       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35982 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35983       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35984 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35985       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35986     fi
35987   else
35988     input_to_shortpath="$new_path"
35989   fi
35990 
35991   # Call helper function which possibly converts this using DOS-style short mode.
35992   # If so, the updated path is stored in $new_path.
35993   new_path="$input_to_shortpath"
35994 
35995   input_path="$input_to_shortpath"
35996   # Check if we need to convert this using DOS-style short mode. If the path
35997   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35998   # take no chances and rewrite it.
35999   # Note: m4 eats our [], so we need to use [ and ] instead.
36000   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36001   if test "x$has_forbidden_chars" != x; then
36002     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36003     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36004     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36005     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36006       # Going to short mode and back again did indeed matter. Since short mode is
36007       # case insensitive, let's make it lowercase to improve readability.
36008       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36009       # Now convert it back to Unix-stile (cygpath)
36010       input_path=`$CYGPATH -u "$shortmode_path"`
36011       new_path="$input_path"
36012     fi
36013   fi
36014 
36015   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36016   if test "x$test_cygdrive_prefix" = x; then
36017     # As a simple fix, exclude /usr/bin since it's not a real path.
36018     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36019       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36020       # a path prefixed by /cygdrive for fixpath to work.
36021       new_path="$CYGWIN_ROOT_PATH$input_path"
36022     fi
36023   fi
36024 
36025   # remove trailing .exe if any
36026   new_path="${new_path/%.exe/}"
36027 
36028   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36029 
36030   # First separate the path from the arguments. This will split at the first
36031   # space.
36032   complete="$NM"
36033   path="${complete%% *}"
36034   tmp="$complete EOL"
36035   arguments="${tmp#* }"
36036 
36037   # Input might be given as Windows format, start by converting to
36038   # unix format.
36039   new_path="$path"
36040 
36041   windows_path="$new_path"
36042   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36043     unix_path=`$CYGPATH -u "$windows_path"`
36044     new_path="$unix_path"
36045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36046     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36047     new_path="$unix_path"
36048   fi
36049 
36050 
36051   # Now try to locate executable using which
36052   new_path=`$WHICH "$new_path" 2> /dev/null`
36053 
36054   if test "x$new_path" = x; then
36055     # Oops. Which didn't find the executable.
36056     # The splitting of arguments from the executable at a space might have been incorrect,
36057     # since paths with space are more likely in Windows. Give it another try with the whole
36058     # argument.
36059     path="$complete"
36060     arguments="EOL"
36061     new_path="$path"
36062 
36063   windows_path="$new_path"
36064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36065     unix_path=`$CYGPATH -u "$windows_path"`
36066     new_path="$unix_path"
36067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36068     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36069     new_path="$unix_path"
36070   fi
36071 
36072 
36073     new_path=`$WHICH "$new_path" 2> /dev/null`
36074     # bat and cmd files are not always considered executable in MSYS causing which
36075     # to not find them
36076     if test "x$new_path" = x \
36077         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36078         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36079       new_path="$path"
36080 
36081   windows_path="$new_path"
36082   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36083     unix_path=`$CYGPATH -u "$windows_path"`
36084     new_path="$unix_path"
36085   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36086     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36087     new_path="$unix_path"
36088   fi
36089 
36090     fi
36091 
36092     if test "x$new_path" = x; then
36093       # It's still not found. Now this is an unrecoverable error.
36094       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36095 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36096       has_space=`$ECHO "$complete" | $GREP " "`
36097       if test "x$has_space" != x; then
36098         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36099 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36100       fi
36101       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36102     fi
36103   fi
36104 
36105   # Now new_path has a complete unix path to the binary
36106   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36107     # Keep paths in /bin as-is, but remove trailing .exe if any
36108     new_path="${new_path/%.exe/}"
36109     # Do not save /bin paths to all_fixpath_prefixes!
36110   else
36111     # Not in mixed or Windows style, start by that.
36112     new_path=`cmd //c echo $new_path`
36113 
36114   input_path="$new_path"
36115   # Check if we need to convert this using DOS-style short mode. If the path
36116   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36117   # take no chances and rewrite it.
36118   # Note: m4 eats our [], so we need to use [ and ] instead.
36119   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36120   if test "x$has_forbidden_chars" != x; then
36121     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36122     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36123   fi
36124 
36125     # Output is in $new_path
36126 
36127   windows_path="$new_path"
36128   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36129     unix_path=`$CYGPATH -u "$windows_path"`
36130     new_path="$unix_path"
36131   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36132     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36133     new_path="$unix_path"
36134   fi
36135 
36136     # remove trailing .exe if any
36137     new_path="${new_path/%.exe/}"
36138 
36139     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36140     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36141   fi
36142 
36143   else
36144     # We're on a posix platform. Hooray! :)
36145     # First separate the path from the arguments. This will split at the first
36146     # space.
36147     complete="$NM"
36148     path="${complete%% *}"
36149     tmp="$complete EOL"
36150     arguments="${tmp#* }"
36151 
36152     # Cannot rely on the command "which" here since it doesn't always work.
36153     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36154     if test -z "$is_absolute_path"; then
36155       # Path to executable is not absolute. Find it.
36156       IFS_save="$IFS"
36157       IFS=:
36158       for p in $PATH; do
36159         if test -f "$p/$path" && test -x "$p/$path"; then
36160           new_path="$p/$path"
36161           break
36162         fi
36163       done
36164       IFS="$IFS_save"
36165     else
36166       # This is an absolute path, we can use it without further modifications.
36167       new_path="$path"
36168     fi
36169 
36170     if test "x$new_path" = x; then
36171       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36172 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36173       has_space=`$ECHO "$complete" | $GREP " "`
36174       if test "x$has_space" != x; then
36175         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36176 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36177       fi
36178       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36179     fi
36180   fi
36181 
36182   # Now join together the path and the arguments once again
36183   if test "x$arguments" != xEOL; then
36184     new_complete="$new_path ${arguments% *}"
36185   else
36186     new_complete="$new_path"
36187   fi
36188 
36189   if test "x$complete" != "x$new_complete"; then
36190     NM="$new_complete"
36191     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36192 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36193   fi
36194 
36195 
36196 
36197   # Publish this variable in the help.
36198 
36199 
36200   if test "x$GNM" = x; then
36201     # The variable is not set by user, try to locate tool using the code snippet
36202     for ac_prog in gnm
36203 do
36204   # Extract the first word of "$ac_prog", so it can be a program name with args.
36205 set dummy $ac_prog; ac_word=$2
36206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36207 $as_echo_n "checking for $ac_word... " >&6; }
36208 if ${ac_cv_path_GNM+:} false; then :
36209   $as_echo_n "(cached) " >&6
36210 else
36211   case $GNM in
36212   [\\/]* | ?:[\\/]*)
36213   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36214   ;;
36215   *)
36216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36217 for as_dir in $PATH
36218 do
36219   IFS=$as_save_IFS
36220   test -z "$as_dir" && as_dir=.
36221     for ac_exec_ext in '' $ac_executable_extensions; do
36222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36223     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36225     break 2
36226   fi
36227 done
36228   done
36229 IFS=$as_save_IFS
36230 
36231   ;;
36232 esac
36233 fi
36234 GNM=$ac_cv_path_GNM
36235 if test -n "$GNM"; then
36236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36237 $as_echo "$GNM" >&6; }
36238 else
36239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36240 $as_echo "no" >&6; }
36241 fi
36242 
36243 
36244   test -n "$GNM" && break
36245 done
36246 
36247   else
36248     # The variable is set, but is it from the command line or the environment?
36249 
36250     # Try to remove the string !GNM! from our list.
36251     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36252     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36253       # If it failed, the variable was not from the command line. Ignore it,
36254       # but warn the user (except for BASH, which is always set by the calling BASH).
36255       if test "xGNM" != xBASH; then
36256         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36257 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36258       fi
36259       # Try to locate tool using the code snippet
36260       for ac_prog in gnm
36261 do
36262   # Extract the first word of "$ac_prog", so it can be a program name with args.
36263 set dummy $ac_prog; ac_word=$2
36264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36265 $as_echo_n "checking for $ac_word... " >&6; }
36266 if ${ac_cv_path_GNM+:} false; then :
36267   $as_echo_n "(cached) " >&6
36268 else
36269   case $GNM in
36270   [\\/]* | ?:[\\/]*)
36271   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36272   ;;
36273   *)
36274   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36275 for as_dir in $PATH
36276 do
36277   IFS=$as_save_IFS
36278   test -z "$as_dir" && as_dir=.
36279     for ac_exec_ext in '' $ac_executable_extensions; do
36280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36281     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36283     break 2
36284   fi
36285 done
36286   done
36287 IFS=$as_save_IFS
36288 
36289   ;;
36290 esac
36291 fi
36292 GNM=$ac_cv_path_GNM
36293 if test -n "$GNM"; then
36294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36295 $as_echo "$GNM" >&6; }
36296 else
36297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36298 $as_echo "no" >&6; }
36299 fi
36300 
36301 
36302   test -n "$GNM" && break
36303 done
36304 
36305     else
36306       # If it succeeded, then it was overridden by the user. We will use it
36307       # for the tool.
36308 
36309       # First remove it from the list of overridden variables, so we can test
36310       # for unknown variables in the end.
36311       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36312 
36313       # Check if the provided tool contains a complete path.
36314       tool_specified="$GNM"
36315       tool_basename="${tool_specified##*/}"
36316       if test "x$tool_basename" = "x$tool_specified"; then
36317         # A command without a complete path is provided, search $PATH.
36318         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36319 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36320         # Extract the first word of "$tool_basename", so it can be a program name with args.
36321 set dummy $tool_basename; ac_word=$2
36322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36323 $as_echo_n "checking for $ac_word... " >&6; }
36324 if ${ac_cv_path_GNM+:} false; then :
36325   $as_echo_n "(cached) " >&6
36326 else
36327   case $GNM in
36328   [\\/]* | ?:[\\/]*)
36329   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36330   ;;
36331   *)
36332   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36333 for as_dir in $PATH
36334 do
36335   IFS=$as_save_IFS
36336   test -z "$as_dir" && as_dir=.
36337     for ac_exec_ext in '' $ac_executable_extensions; do
36338   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36339     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36341     break 2
36342   fi
36343 done
36344   done
36345 IFS=$as_save_IFS
36346 
36347   ;;
36348 esac
36349 fi
36350 GNM=$ac_cv_path_GNM
36351 if test -n "$GNM"; then
36352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36353 $as_echo "$GNM" >&6; }
36354 else
36355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36356 $as_echo "no" >&6; }
36357 fi
36358 
36359 
36360         if test "x$GNM" = x; then
36361           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36362         fi
36363       else
36364         # Otherwise we believe it is a complete path. Use it as it is.
36365         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36366 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36367         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36368 $as_echo_n "checking for GNM... " >&6; }
36369         if test ! -x "$tool_specified"; then
36370           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36371 $as_echo "not found" >&6; }
36372           as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36373         fi
36374         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36375 $as_echo "$tool_specified" >&6; }
36376       fi
36377     fi
36378   fi
36379 
36380 
36381 
36382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36383 
36384   # First separate the path from the arguments. This will split at the first
36385   # space.
36386   complete="$GNM"
36387   path="${complete%% *}"
36388   tmp="$complete EOL"
36389   arguments="${tmp#* }"
36390 
36391   # Input might be given as Windows format, start by converting to
36392   # unix format.
36393   new_path=`$CYGPATH -u "$path"`
36394 
36395   # Now try to locate executable using which
36396   new_path=`$WHICH "$new_path" 2> /dev/null`
36397   # bat and cmd files are not always considered executable in cygwin causing which
36398   # to not find them
36399   if test "x$new_path" = x \
36400       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36401       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36402     new_path=`$CYGPATH -u "$path"`
36403   fi
36404   if test "x$new_path" = x; then
36405     # Oops. Which didn't find the executable.
36406     # The splitting of arguments from the executable at a space might have been incorrect,
36407     # since paths with space are more likely in Windows. Give it another try with the whole
36408     # argument.
36409     path="$complete"
36410     arguments="EOL"
36411     new_path=`$CYGPATH -u "$path"`
36412     new_path=`$WHICH "$new_path" 2> /dev/null`
36413     # bat and cmd files are not always considered executable in cygwin causing which
36414     # to not find them
36415     if test "x$new_path" = x \
36416         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36417         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36418       new_path=`$CYGPATH -u "$path"`
36419     fi
36420     if test "x$new_path" = x; then
36421       # It's still not found. Now this is an unrecoverable error.
36422       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36423 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36424       has_space=`$ECHO "$complete" | $GREP " "`
36425       if test "x$has_space" != x; then
36426         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36427 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36428       fi
36429       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36430     fi
36431   fi
36432 
36433   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36434   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36435   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36436   # "foo.exe" is OK but "foo" is an error.
36437   #
36438   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36439   # It is also a way to make sure we got the proper file name for the real test later on.
36440   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36441   if test "x$test_shortpath" = x; then
36442     # Short path failed, file does not exist as specified.
36443     # Try adding .exe or .cmd
36444     if test -f "${new_path}.exe"; then
36445       input_to_shortpath="${new_path}.exe"
36446     elif test -f "${new_path}.cmd"; then
36447       input_to_shortpath="${new_path}.cmd"
36448     else
36449       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36450 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36451       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36452 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36453       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36454     fi
36455   else
36456     input_to_shortpath="$new_path"
36457   fi
36458 
36459   # Call helper function which possibly converts this using DOS-style short mode.
36460   # If so, the updated path is stored in $new_path.
36461   new_path="$input_to_shortpath"
36462 
36463   input_path="$input_to_shortpath"
36464   # Check if we need to convert this using DOS-style short mode. If the path
36465   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36466   # take no chances and rewrite it.
36467   # Note: m4 eats our [], so we need to use [ and ] instead.
36468   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36469   if test "x$has_forbidden_chars" != x; then
36470     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36471     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36472     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36473     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36474       # Going to short mode and back again did indeed matter. Since short mode is
36475       # case insensitive, let's make it lowercase to improve readability.
36476       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36477       # Now convert it back to Unix-stile (cygpath)
36478       input_path=`$CYGPATH -u "$shortmode_path"`
36479       new_path="$input_path"
36480     fi
36481   fi
36482 
36483   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36484   if test "x$test_cygdrive_prefix" = x; then
36485     # As a simple fix, exclude /usr/bin since it's not a real path.
36486     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36487       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36488       # a path prefixed by /cygdrive for fixpath to work.
36489       new_path="$CYGWIN_ROOT_PATH$input_path"
36490     fi
36491   fi
36492 
36493   # remove trailing .exe if any
36494   new_path="${new_path/%.exe/}"
36495 
36496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36497 
36498   # First separate the path from the arguments. This will split at the first
36499   # space.
36500   complete="$GNM"
36501   path="${complete%% *}"
36502   tmp="$complete EOL"
36503   arguments="${tmp#* }"
36504 
36505   # Input might be given as Windows format, start by converting to
36506   # unix format.
36507   new_path="$path"
36508 
36509   windows_path="$new_path"
36510   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36511     unix_path=`$CYGPATH -u "$windows_path"`
36512     new_path="$unix_path"
36513   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36514     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36515     new_path="$unix_path"
36516   fi
36517 
36518 
36519   # Now try to locate executable using which
36520   new_path=`$WHICH "$new_path" 2> /dev/null`
36521 
36522   if test "x$new_path" = x; then
36523     # Oops. Which didn't find the executable.
36524     # The splitting of arguments from the executable at a space might have been incorrect,
36525     # since paths with space are more likely in Windows. Give it another try with the whole
36526     # argument.
36527     path="$complete"
36528     arguments="EOL"
36529     new_path="$path"
36530 
36531   windows_path="$new_path"
36532   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36533     unix_path=`$CYGPATH -u "$windows_path"`
36534     new_path="$unix_path"
36535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36536     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36537     new_path="$unix_path"
36538   fi
36539 
36540 
36541     new_path=`$WHICH "$new_path" 2> /dev/null`
36542     # bat and cmd files are not always considered executable in MSYS causing which
36543     # to not find them
36544     if test "x$new_path" = x \
36545         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36546         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36547       new_path="$path"
36548 
36549   windows_path="$new_path"
36550   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36551     unix_path=`$CYGPATH -u "$windows_path"`
36552     new_path="$unix_path"
36553   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36554     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36555     new_path="$unix_path"
36556   fi
36557 
36558     fi
36559 
36560     if test "x$new_path" = x; then
36561       # It's still not found. Now this is an unrecoverable error.
36562       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36563 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36564       has_space=`$ECHO "$complete" | $GREP " "`
36565       if test "x$has_space" != x; then
36566         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36567 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36568       fi
36569       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36570     fi
36571   fi
36572 
36573   # Now new_path has a complete unix path to the binary
36574   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36575     # Keep paths in /bin as-is, but remove trailing .exe if any
36576     new_path="${new_path/%.exe/}"
36577     # Do not save /bin paths to all_fixpath_prefixes!
36578   else
36579     # Not in mixed or Windows style, start by that.
36580     new_path=`cmd //c echo $new_path`
36581 
36582   input_path="$new_path"
36583   # Check if we need to convert this using DOS-style short mode. If the path
36584   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36585   # take no chances and rewrite it.
36586   # Note: m4 eats our [], so we need to use [ and ] instead.
36587   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36588   if test "x$has_forbidden_chars" != x; then
36589     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36590     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36591   fi
36592 
36593     # Output is in $new_path
36594 
36595   windows_path="$new_path"
36596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36597     unix_path=`$CYGPATH -u "$windows_path"`
36598     new_path="$unix_path"
36599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36601     new_path="$unix_path"
36602   fi
36603 
36604     # remove trailing .exe if any
36605     new_path="${new_path/%.exe/}"
36606 
36607     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36608     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36609   fi
36610 
36611   else
36612     # We're on a posix platform. Hooray! :)
36613     # First separate the path from the arguments. This will split at the first
36614     # space.
36615     complete="$GNM"
36616     path="${complete%% *}"
36617     tmp="$complete EOL"
36618     arguments="${tmp#* }"
36619 
36620     # Cannot rely on the command "which" here since it doesn't always work.
36621     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36622     if test -z "$is_absolute_path"; then
36623       # Path to executable is not absolute. Find it.
36624       IFS_save="$IFS"
36625       IFS=:
36626       for p in $PATH; do
36627         if test -f "$p/$path" && test -x "$p/$path"; then
36628           new_path="$p/$path"
36629           break
36630         fi
36631       done
36632       IFS="$IFS_save"
36633     else
36634       # This is an absolute path, we can use it without further modifications.
36635       new_path="$path"
36636     fi
36637 
36638     if test "x$new_path" = x; then
36639       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36640 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36641       has_space=`$ECHO "$complete" | $GREP " "`
36642       if test "x$has_space" != x; then
36643         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36644 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36645       fi
36646       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36647     fi
36648   fi
36649 
36650   # Now join together the path and the arguments once again
36651   if test "x$arguments" != xEOL; then
36652     new_complete="$new_path ${arguments% *}"
36653   else
36654     new_complete="$new_path"
36655   fi
36656 
36657   if test "x$complete" != "x$new_complete"; then
36658     GNM="$new_complete"
36659     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36660 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36661   fi
36662 
36663 
36664 
36665 
36666   # Publish this variable in the help.
36667 
36668 
36669   if test "x$MCS" = x; then
36670     # The variable is not set by user, try to locate tool using the code snippet
36671     for ac_prog in mcs
36672 do
36673   # Extract the first word of "$ac_prog", so it can be a program name with args.
36674 set dummy $ac_prog; ac_word=$2
36675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36676 $as_echo_n "checking for $ac_word... " >&6; }
36677 if ${ac_cv_path_MCS+:} false; then :
36678   $as_echo_n "(cached) " >&6
36679 else
36680   case $MCS in
36681   [\\/]* | ?:[\\/]*)
36682   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36683   ;;
36684   *)
36685   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36686 for as_dir in $PATH
36687 do
36688   IFS=$as_save_IFS
36689   test -z "$as_dir" && as_dir=.
36690     for ac_exec_ext in '' $ac_executable_extensions; do
36691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36692     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36694     break 2
36695   fi
36696 done
36697   done
36698 IFS=$as_save_IFS
36699 
36700   ;;
36701 esac
36702 fi
36703 MCS=$ac_cv_path_MCS
36704 if test -n "$MCS"; then
36705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36706 $as_echo "$MCS" >&6; }
36707 else
36708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36709 $as_echo "no" >&6; }
36710 fi
36711 
36712 
36713   test -n "$MCS" && break
36714 done
36715 
36716   else
36717     # The variable is set, but is it from the command line or the environment?
36718 
36719     # Try to remove the string !MCS! from our list.
36720     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36721     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36722       # If it failed, the variable was not from the command line. Ignore it,
36723       # but warn the user (except for BASH, which is always set by the calling BASH).
36724       if test "xMCS" != xBASH; then
36725         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36726 $as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36727       fi
36728       # Try to locate tool using the code snippet
36729       for ac_prog in mcs
36730 do
36731   # Extract the first word of "$ac_prog", so it can be a program name with args.
36732 set dummy $ac_prog; ac_word=$2
36733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36734 $as_echo_n "checking for $ac_word... " >&6; }
36735 if ${ac_cv_path_MCS+:} false; then :
36736   $as_echo_n "(cached) " >&6
36737 else
36738   case $MCS in
36739   [\\/]* | ?:[\\/]*)
36740   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36741   ;;
36742   *)
36743   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36744 for as_dir in $PATH
36745 do
36746   IFS=$as_save_IFS
36747   test -z "$as_dir" && as_dir=.
36748     for ac_exec_ext in '' $ac_executable_extensions; do
36749   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36750     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36751     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36752     break 2
36753   fi
36754 done
36755   done
36756 IFS=$as_save_IFS
36757 
36758   ;;
36759 esac
36760 fi
36761 MCS=$ac_cv_path_MCS
36762 if test -n "$MCS"; then
36763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36764 $as_echo "$MCS" >&6; }
36765 else
36766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36767 $as_echo "no" >&6; }
36768 fi
36769 
36770 
36771   test -n "$MCS" && break
36772 done
36773 
36774     else
36775       # If it succeeded, then it was overridden by the user. We will use it
36776       # for the tool.
36777 
36778       # First remove it from the list of overridden variables, so we can test
36779       # for unknown variables in the end.
36780       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36781 
36782       # Check if the provided tool contains a complete path.
36783       tool_specified="$MCS"
36784       tool_basename="${tool_specified##*/}"
36785       if test "x$tool_basename" = "x$tool_specified"; then
36786         # A command without a complete path is provided, search $PATH.
36787         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36788 $as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36789         # Extract the first word of "$tool_basename", so it can be a program name with args.
36790 set dummy $tool_basename; ac_word=$2
36791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36792 $as_echo_n "checking for $ac_word... " >&6; }
36793 if ${ac_cv_path_MCS+:} false; then :
36794   $as_echo_n "(cached) " >&6
36795 else
36796   case $MCS in
36797   [\\/]* | ?:[\\/]*)
36798   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36799   ;;
36800   *)
36801   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36802 for as_dir in $PATH
36803 do
36804   IFS=$as_save_IFS
36805   test -z "$as_dir" && as_dir=.
36806     for ac_exec_ext in '' $ac_executable_extensions; do
36807   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36808     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36809     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36810     break 2
36811   fi
36812 done
36813   done
36814 IFS=$as_save_IFS
36815 
36816   ;;
36817 esac
36818 fi
36819 MCS=$ac_cv_path_MCS
36820 if test -n "$MCS"; then
36821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36822 $as_echo "$MCS" >&6; }
36823 else
36824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36825 $as_echo "no" >&6; }
36826 fi
36827 
36828 
36829         if test "x$MCS" = x; then
36830           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36831         fi
36832       else
36833         # Otherwise we believe it is a complete path. Use it as it is.
36834         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36835 $as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36836         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36837 $as_echo_n "checking for MCS... " >&6; }
36838         if test ! -x "$tool_specified"; then
36839           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36840 $as_echo "not found" >&6; }
36841           as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36842         fi
36843         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36844 $as_echo "$tool_specified" >&6; }
36845       fi
36846     fi
36847   fi
36848 
36849 
36850 
36851   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36852 
36853   # First separate the path from the arguments. This will split at the first
36854   # space.
36855   complete="$MCS"
36856   path="${complete%% *}"
36857   tmp="$complete EOL"
36858   arguments="${tmp#* }"
36859 
36860   # Input might be given as Windows format, start by converting to
36861   # unix format.
36862   new_path=`$CYGPATH -u "$path"`
36863 
36864   # Now try to locate executable using which
36865   new_path=`$WHICH "$new_path" 2> /dev/null`
36866   # bat and cmd files are not always considered executable in cygwin causing which
36867   # to not find them
36868   if test "x$new_path" = x \
36869       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36870       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36871     new_path=`$CYGPATH -u "$path"`
36872   fi
36873   if test "x$new_path" = x; then
36874     # Oops. Which didn't find the executable.
36875     # The splitting of arguments from the executable at a space might have been incorrect,
36876     # since paths with space are more likely in Windows. Give it another try with the whole
36877     # argument.
36878     path="$complete"
36879     arguments="EOL"
36880     new_path=`$CYGPATH -u "$path"`
36881     new_path=`$WHICH "$new_path" 2> /dev/null`
36882     # bat and cmd files are not always considered executable in cygwin causing which
36883     # to not find them
36884     if test "x$new_path" = x \
36885         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36886         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36887       new_path=`$CYGPATH -u "$path"`
36888     fi
36889     if test "x$new_path" = x; then
36890       # It's still not found. Now this is an unrecoverable error.
36891       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36892 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36893       has_space=`$ECHO "$complete" | $GREP " "`
36894       if test "x$has_space" != x; then
36895         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36896 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36897       fi
36898       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36899     fi
36900   fi
36901 
36902   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36903   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36904   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36905   # "foo.exe" is OK but "foo" is an error.
36906   #
36907   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36908   # It is also a way to make sure we got the proper file name for the real test later on.
36909   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36910   if test "x$test_shortpath" = x; then
36911     # Short path failed, file does not exist as specified.
36912     # Try adding .exe or .cmd
36913     if test -f "${new_path}.exe"; then
36914       input_to_shortpath="${new_path}.exe"
36915     elif test -f "${new_path}.cmd"; then
36916       input_to_shortpath="${new_path}.cmd"
36917     else
36918       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36919 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36920       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36921 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36922       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36923     fi
36924   else
36925     input_to_shortpath="$new_path"
36926   fi
36927 
36928   # Call helper function which possibly converts this using DOS-style short mode.
36929   # If so, the updated path is stored in $new_path.
36930   new_path="$input_to_shortpath"
36931 
36932   input_path="$input_to_shortpath"
36933   # Check if we need to convert this using DOS-style short mode. If the path
36934   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36935   # take no chances and rewrite it.
36936   # Note: m4 eats our [], so we need to use [ and ] instead.
36937   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36938   if test "x$has_forbidden_chars" != x; then
36939     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36940     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36941     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36942     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36943       # Going to short mode and back again did indeed matter. Since short mode is
36944       # case insensitive, let's make it lowercase to improve readability.
36945       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36946       # Now convert it back to Unix-stile (cygpath)
36947       input_path=`$CYGPATH -u "$shortmode_path"`
36948       new_path="$input_path"
36949     fi
36950   fi
36951 
36952   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36953   if test "x$test_cygdrive_prefix" = x; then
36954     # As a simple fix, exclude /usr/bin since it's not a real path.
36955     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36956       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36957       # a path prefixed by /cygdrive for fixpath to work.
36958       new_path="$CYGWIN_ROOT_PATH$input_path"
36959     fi
36960   fi
36961 
36962   # remove trailing .exe if any
36963   new_path="${new_path/%.exe/}"
36964 
36965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36966 
36967   # First separate the path from the arguments. This will split at the first
36968   # space.
36969   complete="$MCS"
36970   path="${complete%% *}"
36971   tmp="$complete EOL"
36972   arguments="${tmp#* }"
36973 
36974   # Input might be given as Windows format, start by converting to
36975   # unix format.
36976   new_path="$path"
36977 
36978   windows_path="$new_path"
36979   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36980     unix_path=`$CYGPATH -u "$windows_path"`
36981     new_path="$unix_path"
36982   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36983     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36984     new_path="$unix_path"
36985   fi
36986 
36987 
36988   # Now try to locate executable using which
36989   new_path=`$WHICH "$new_path" 2> /dev/null`
36990 
36991   if test "x$new_path" = x; then
36992     # Oops. Which didn't find the executable.
36993     # The splitting of arguments from the executable at a space might have been incorrect,
36994     # since paths with space are more likely in Windows. Give it another try with the whole
36995     # argument.
36996     path="$complete"
36997     arguments="EOL"
36998     new_path="$path"
36999 
37000   windows_path="$new_path"
37001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37002     unix_path=`$CYGPATH -u "$windows_path"`
37003     new_path="$unix_path"
37004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37006     new_path="$unix_path"
37007   fi
37008 
37009 
37010     new_path=`$WHICH "$new_path" 2> /dev/null`
37011     # bat and cmd files are not always considered executable in MSYS causing which
37012     # to not find them
37013     if test "x$new_path" = x \
37014         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37015         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37016       new_path="$path"
37017 
37018   windows_path="$new_path"
37019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37020     unix_path=`$CYGPATH -u "$windows_path"`
37021     new_path="$unix_path"
37022   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37023     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37024     new_path="$unix_path"
37025   fi
37026 
37027     fi
37028 
37029     if test "x$new_path" = x; then
37030       # It's still not found. Now this is an unrecoverable error.
37031       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37032 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37033       has_space=`$ECHO "$complete" | $GREP " "`
37034       if test "x$has_space" != x; then
37035         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37036 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37037       fi
37038       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37039     fi
37040   fi
37041 
37042   # Now new_path has a complete unix path to the binary
37043   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37044     # Keep paths in /bin as-is, but remove trailing .exe if any
37045     new_path="${new_path/%.exe/}"
37046     # Do not save /bin paths to all_fixpath_prefixes!
37047   else
37048     # Not in mixed or Windows style, start by that.
37049     new_path=`cmd //c echo $new_path`
37050 
37051   input_path="$new_path"
37052   # Check if we need to convert this using DOS-style short mode. If the path
37053   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37054   # take no chances and rewrite it.
37055   # Note: m4 eats our [], so we need to use [ and ] instead.
37056   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37057   if test "x$has_forbidden_chars" != x; then
37058     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37059     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37060   fi
37061 
37062     # Output is in $new_path
37063 
37064   windows_path="$new_path"
37065   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37066     unix_path=`$CYGPATH -u "$windows_path"`
37067     new_path="$unix_path"
37068   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37069     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37070     new_path="$unix_path"
37071   fi
37072 
37073     # remove trailing .exe if any
37074     new_path="${new_path/%.exe/}"
37075 
37076     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37077     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37078   fi
37079 
37080   else
37081     # We're on a posix platform. Hooray! :)
37082     # First separate the path from the arguments. This will split at the first
37083     # space.
37084     complete="$MCS"
37085     path="${complete%% *}"
37086     tmp="$complete EOL"
37087     arguments="${tmp#* }"
37088 
37089     # Cannot rely on the command "which" here since it doesn't always work.
37090     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37091     if test -z "$is_absolute_path"; then
37092       # Path to executable is not absolute. Find it.
37093       IFS_save="$IFS"
37094       IFS=:
37095       for p in $PATH; do
37096         if test -f "$p/$path" && test -x "$p/$path"; then
37097           new_path="$p/$path"
37098           break
37099         fi
37100       done
37101       IFS="$IFS_save"
37102     else
37103       # This is an absolute path, we can use it without further modifications.
37104       new_path="$path"
37105     fi
37106 
37107     if test "x$new_path" = x; then
37108       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37109 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37110       has_space=`$ECHO "$complete" | $GREP " "`
37111       if test "x$has_space" != x; then
37112         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37113 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37114       fi
37115       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37116     fi
37117   fi
37118 
37119   # Now join together the path and the arguments once again
37120   if test "x$arguments" != xEOL; then
37121     new_complete="$new_path ${arguments% *}"
37122   else
37123     new_complete="$new_path"
37124   fi
37125 
37126   if test "x$complete" != "x$new_complete"; then
37127     MCS="$new_complete"
37128     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
37129 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
37130   fi
37131 
37132   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37133     # FIXME: we should unify this with the solaris case above.
37134 
37135 
37136   # Publish this variable in the help.
37137 
37138 
37139   if test "x$STRIP" = x; then
37140     # The variable is not set by user, try to locate tool using the code snippet
37141     if test -n "$ac_tool_prefix"; then
37142   for ac_prog in strip
37143   do
37144     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37145 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37147 $as_echo_n "checking for $ac_word... " >&6; }
37148 if ${ac_cv_prog_STRIP+:} false; then :
37149   $as_echo_n "(cached) " >&6
37150 else
37151   if test -n "$STRIP"; then
37152   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37153 else
37154 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37155 for as_dir in $PATH
37156 do
37157   IFS=$as_save_IFS
37158   test -z "$as_dir" && as_dir=.
37159     for ac_exec_ext in '' $ac_executable_extensions; do
37160   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37161     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37162     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37163     break 2
37164   fi
37165 done
37166   done
37167 IFS=$as_save_IFS
37168 
37169 fi
37170 fi
37171 STRIP=$ac_cv_prog_STRIP
37172 if test -n "$STRIP"; then
37173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37174 $as_echo "$STRIP" >&6; }
37175 else
37176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37177 $as_echo "no" >&6; }
37178 fi
37179 
37180 
37181     test -n "$STRIP" && break
37182   done
37183 fi
37184 if test -z "$STRIP"; then
37185   ac_ct_STRIP=$STRIP
37186   for ac_prog in strip
37187 do
37188   # Extract the first word of "$ac_prog", so it can be a program name with args.
37189 set dummy $ac_prog; ac_word=$2
37190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37191 $as_echo_n "checking for $ac_word... " >&6; }
37192 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37193   $as_echo_n "(cached) " >&6
37194 else
37195   if test -n "$ac_ct_STRIP"; then
37196   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37197 else
37198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37199 for as_dir in $PATH
37200 do
37201   IFS=$as_save_IFS
37202   test -z "$as_dir" && as_dir=.
37203     for ac_exec_ext in '' $ac_executable_extensions; do
37204   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37205     ac_cv_prog_ac_ct_STRIP="$ac_prog"
37206     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37207     break 2
37208   fi
37209 done
37210   done
37211 IFS=$as_save_IFS
37212 
37213 fi
37214 fi
37215 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37216 if test -n "$ac_ct_STRIP"; then
37217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37218 $as_echo "$ac_ct_STRIP" >&6; }
37219 else
37220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37221 $as_echo "no" >&6; }
37222 fi
37223 
37224 
37225   test -n "$ac_ct_STRIP" && break
37226 done
37227 
37228   if test "x$ac_ct_STRIP" = x; then
37229     STRIP=""
37230   else
37231     case $cross_compiling:$ac_tool_warned in
37232 yes:)
37233 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37234 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37235 ac_tool_warned=yes ;;
37236 esac
37237     STRIP=$ac_ct_STRIP
37238   fi
37239 fi
37240 
37241   else
37242     # The variable is set, but is it from the command line or the environment?
37243 
37244     # Try to remove the string !STRIP! from our list.
37245     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37246     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37247       # If it failed, the variable was not from the command line. Ignore it,
37248       # but warn the user (except for BASH, which is always set by the calling BASH).
37249       if test "xSTRIP" != xBASH; then
37250         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37251 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37252       fi
37253       # Try to locate tool using the code snippet
37254       if test -n "$ac_tool_prefix"; then
37255   for ac_prog in strip
37256   do
37257     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37258 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37260 $as_echo_n "checking for $ac_word... " >&6; }
37261 if ${ac_cv_prog_STRIP+:} false; then :
37262   $as_echo_n "(cached) " >&6
37263 else
37264   if test -n "$STRIP"; then
37265   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37266 else
37267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37268 for as_dir in $PATH
37269 do
37270   IFS=$as_save_IFS
37271   test -z "$as_dir" && as_dir=.
37272     for ac_exec_ext in '' $ac_executable_extensions; do
37273   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37274     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37275     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37276     break 2
37277   fi
37278 done
37279   done
37280 IFS=$as_save_IFS
37281 
37282 fi
37283 fi
37284 STRIP=$ac_cv_prog_STRIP
37285 if test -n "$STRIP"; then
37286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37287 $as_echo "$STRIP" >&6; }
37288 else
37289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37290 $as_echo "no" >&6; }
37291 fi
37292 
37293 
37294     test -n "$STRIP" && break
37295   done
37296 fi
37297 if test -z "$STRIP"; then
37298   ac_ct_STRIP=$STRIP
37299   for ac_prog in strip
37300 do
37301   # Extract the first word of "$ac_prog", so it can be a program name with args.
37302 set dummy $ac_prog; ac_word=$2
37303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37304 $as_echo_n "checking for $ac_word... " >&6; }
37305 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37306   $as_echo_n "(cached) " >&6
37307 else
37308   if test -n "$ac_ct_STRIP"; then
37309   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37310 else
37311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37312 for as_dir in $PATH
37313 do
37314   IFS=$as_save_IFS
37315   test -z "$as_dir" && as_dir=.
37316     for ac_exec_ext in '' $ac_executable_extensions; do
37317   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37318     ac_cv_prog_ac_ct_STRIP="$ac_prog"
37319     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37320     break 2
37321   fi
37322 done
37323   done
37324 IFS=$as_save_IFS
37325 
37326 fi
37327 fi
37328 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37329 if test -n "$ac_ct_STRIP"; then
37330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37331 $as_echo "$ac_ct_STRIP" >&6; }
37332 else
37333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37334 $as_echo "no" >&6; }
37335 fi
37336 
37337 
37338   test -n "$ac_ct_STRIP" && break
37339 done
37340 
37341   if test "x$ac_ct_STRIP" = x; then
37342     STRIP=""
37343   else
37344     case $cross_compiling:$ac_tool_warned in
37345 yes:)
37346 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37347 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37348 ac_tool_warned=yes ;;
37349 esac
37350     STRIP=$ac_ct_STRIP
37351   fi
37352 fi
37353 
37354     else
37355       # If it succeeded, then it was overridden by the user. We will use it
37356       # for the tool.
37357 
37358       # First remove it from the list of overridden variables, so we can test
37359       # for unknown variables in the end.
37360       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37361 
37362       # Check if the provided tool contains a complete path.
37363       tool_specified="$STRIP"
37364       tool_basename="${tool_specified##*/}"
37365       if test "x$tool_basename" = "x$tool_specified"; then
37366         # A command without a complete path is provided, search $PATH.
37367         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37368 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37369         # Extract the first word of "$tool_basename", so it can be a program name with args.
37370 set dummy $tool_basename; ac_word=$2
37371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37372 $as_echo_n "checking for $ac_word... " >&6; }
37373 if ${ac_cv_path_STRIP+:} false; then :
37374   $as_echo_n "(cached) " >&6
37375 else
37376   case $STRIP in
37377   [\\/]* | ?:[\\/]*)
37378   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37379   ;;
37380   *)
37381   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37382 for as_dir in $PATH
37383 do
37384   IFS=$as_save_IFS
37385   test -z "$as_dir" && as_dir=.
37386     for ac_exec_ext in '' $ac_executable_extensions; do
37387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37388     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37390     break 2
37391   fi
37392 done
37393   done
37394 IFS=$as_save_IFS
37395 
37396   ;;
37397 esac
37398 fi
37399 STRIP=$ac_cv_path_STRIP
37400 if test -n "$STRIP"; then
37401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37402 $as_echo "$STRIP" >&6; }
37403 else
37404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37405 $as_echo "no" >&6; }
37406 fi
37407 
37408 
37409         if test "x$STRIP" = x; then
37410           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37411         fi
37412       else
37413         # Otherwise we believe it is a complete path. Use it as it is.
37414         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37415 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37416         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37417 $as_echo_n "checking for STRIP... " >&6; }
37418         if test ! -x "$tool_specified"; then
37419           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37420 $as_echo "not found" >&6; }
37421           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37422         fi
37423         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37424 $as_echo "$tool_specified" >&6; }
37425       fi
37426     fi
37427   fi
37428 
37429 
37430 
37431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37432 
37433   # First separate the path from the arguments. This will split at the first
37434   # space.
37435   complete="$STRIP"
37436   path="${complete%% *}"
37437   tmp="$complete EOL"
37438   arguments="${tmp#* }"
37439 
37440   # Input might be given as Windows format, start by converting to
37441   # unix format.
37442   new_path=`$CYGPATH -u "$path"`
37443 
37444   # Now try to locate executable using which
37445   new_path=`$WHICH "$new_path" 2> /dev/null`
37446   # bat and cmd files are not always considered executable in cygwin causing which
37447   # to not find them
37448   if test "x$new_path" = x \
37449       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37450       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37451     new_path=`$CYGPATH -u "$path"`
37452   fi
37453   if test "x$new_path" = x; then
37454     # Oops. Which didn't find the executable.
37455     # The splitting of arguments from the executable at a space might have been incorrect,
37456     # since paths with space are more likely in Windows. Give it another try with the whole
37457     # argument.
37458     path="$complete"
37459     arguments="EOL"
37460     new_path=`$CYGPATH -u "$path"`
37461     new_path=`$WHICH "$new_path" 2> /dev/null`
37462     # bat and cmd files are not always considered executable in cygwin causing which
37463     # to not find them
37464     if test "x$new_path" = x \
37465         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37466         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37467       new_path=`$CYGPATH -u "$path"`
37468     fi
37469     if test "x$new_path" = x; then
37470       # It's still not found. Now this is an unrecoverable error.
37471       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37472 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37473       has_space=`$ECHO "$complete" | $GREP " "`
37474       if test "x$has_space" != x; then
37475         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37476 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37477       fi
37478       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37479     fi
37480   fi
37481 
37482   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37483   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37484   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37485   # "foo.exe" is OK but "foo" is an error.
37486   #
37487   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37488   # It is also a way to make sure we got the proper file name for the real test later on.
37489   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37490   if test "x$test_shortpath" = x; then
37491     # Short path failed, file does not exist as specified.
37492     # Try adding .exe or .cmd
37493     if test -f "${new_path}.exe"; then
37494       input_to_shortpath="${new_path}.exe"
37495     elif test -f "${new_path}.cmd"; then
37496       input_to_shortpath="${new_path}.cmd"
37497     else
37498       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37499 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37500       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37501 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37502       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37503     fi
37504   else
37505     input_to_shortpath="$new_path"
37506   fi
37507 
37508   # Call helper function which possibly converts this using DOS-style short mode.
37509   # If so, the updated path is stored in $new_path.
37510   new_path="$input_to_shortpath"
37511 
37512   input_path="$input_to_shortpath"
37513   # Check if we need to convert this using DOS-style short mode. If the path
37514   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37515   # take no chances and rewrite it.
37516   # Note: m4 eats our [], so we need to use [ and ] instead.
37517   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37518   if test "x$has_forbidden_chars" != x; then
37519     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37520     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37521     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37522     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37523       # Going to short mode and back again did indeed matter. Since short mode is
37524       # case insensitive, let's make it lowercase to improve readability.
37525       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37526       # Now convert it back to Unix-stile (cygpath)
37527       input_path=`$CYGPATH -u "$shortmode_path"`
37528       new_path="$input_path"
37529     fi
37530   fi
37531 
37532   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37533   if test "x$test_cygdrive_prefix" = x; then
37534     # As a simple fix, exclude /usr/bin since it's not a real path.
37535     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37536       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37537       # a path prefixed by /cygdrive for fixpath to work.
37538       new_path="$CYGWIN_ROOT_PATH$input_path"
37539     fi
37540   fi
37541 
37542   # remove trailing .exe if any
37543   new_path="${new_path/%.exe/}"
37544 
37545   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37546 
37547   # First separate the path from the arguments. This will split at the first
37548   # space.
37549   complete="$STRIP"
37550   path="${complete%% *}"
37551   tmp="$complete EOL"
37552   arguments="${tmp#* }"
37553 
37554   # Input might be given as Windows format, start by converting to
37555   # unix format.
37556   new_path="$path"
37557 
37558   windows_path="$new_path"
37559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37560     unix_path=`$CYGPATH -u "$windows_path"`
37561     new_path="$unix_path"
37562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37563     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37564     new_path="$unix_path"
37565   fi
37566 
37567 
37568   # Now try to locate executable using which
37569   new_path=`$WHICH "$new_path" 2> /dev/null`
37570 
37571   if test "x$new_path" = x; then
37572     # Oops. Which didn't find the executable.
37573     # The splitting of arguments from the executable at a space might have been incorrect,
37574     # since paths with space are more likely in Windows. Give it another try with the whole
37575     # argument.
37576     path="$complete"
37577     arguments="EOL"
37578     new_path="$path"
37579 
37580   windows_path="$new_path"
37581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37582     unix_path=`$CYGPATH -u "$windows_path"`
37583     new_path="$unix_path"
37584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37586     new_path="$unix_path"
37587   fi
37588 
37589 
37590     new_path=`$WHICH "$new_path" 2> /dev/null`
37591     # bat and cmd files are not always considered executable in MSYS causing which
37592     # to not find them
37593     if test "x$new_path" = x \
37594         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37595         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37596       new_path="$path"
37597 
37598   windows_path="$new_path"
37599   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37600     unix_path=`$CYGPATH -u "$windows_path"`
37601     new_path="$unix_path"
37602   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37603     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37604     new_path="$unix_path"
37605   fi
37606 
37607     fi
37608 
37609     if test "x$new_path" = x; then
37610       # It's still not found. Now this is an unrecoverable error.
37611       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37612 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37613       has_space=`$ECHO "$complete" | $GREP " "`
37614       if test "x$has_space" != x; then
37615         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37616 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37617       fi
37618       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37619     fi
37620   fi
37621 
37622   # Now new_path has a complete unix path to the binary
37623   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37624     # Keep paths in /bin as-is, but remove trailing .exe if any
37625     new_path="${new_path/%.exe/}"
37626     # Do not save /bin paths to all_fixpath_prefixes!
37627   else
37628     # Not in mixed or Windows style, start by that.
37629     new_path=`cmd //c echo $new_path`
37630 
37631   input_path="$new_path"
37632   # Check if we need to convert this using DOS-style short mode. If the path
37633   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37634   # take no chances and rewrite it.
37635   # Note: m4 eats our [], so we need to use [ and ] instead.
37636   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37637   if test "x$has_forbidden_chars" != x; then
37638     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37639     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37640   fi
37641 
37642     # Output is in $new_path
37643 
37644   windows_path="$new_path"
37645   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37646     unix_path=`$CYGPATH -u "$windows_path"`
37647     new_path="$unix_path"
37648   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37649     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37650     new_path="$unix_path"
37651   fi
37652 
37653     # remove trailing .exe if any
37654     new_path="${new_path/%.exe/}"
37655 
37656     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37657     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37658   fi
37659 
37660   else
37661     # We're on a posix platform. Hooray! :)
37662     # First separate the path from the arguments. This will split at the first
37663     # space.
37664     complete="$STRIP"
37665     path="${complete%% *}"
37666     tmp="$complete EOL"
37667     arguments="${tmp#* }"
37668 
37669     # Cannot rely on the command "which" here since it doesn't always work.
37670     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37671     if test -z "$is_absolute_path"; then
37672       # Path to executable is not absolute. Find it.
37673       IFS_save="$IFS"
37674       IFS=:
37675       for p in $PATH; do
37676         if test -f "$p/$path" && test -x "$p/$path"; then
37677           new_path="$p/$path"
37678           break
37679         fi
37680       done
37681       IFS="$IFS_save"
37682     else
37683       # This is an absolute path, we can use it without further modifications.
37684       new_path="$path"
37685     fi
37686 
37687     if test "x$new_path" = x; then
37688       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37689 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37690       has_space=`$ECHO "$complete" | $GREP " "`
37691       if test "x$has_space" != x; then
37692         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37693 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37694       fi
37695       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37696     fi
37697   fi
37698 
37699   # Now join together the path and the arguments once again
37700   if test "x$arguments" != xEOL; then
37701     new_complete="$new_path ${arguments% *}"
37702   else
37703     new_complete="$new_path"
37704   fi
37705 
37706   if test "x$complete" != "x$new_complete"; then
37707     STRIP="$new_complete"
37708     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37709 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37710   fi
37711 
37712 
37713 
37714   # Publish this variable in the help.
37715 
37716 
37717   if test "x$NM" = x; then
37718     # The variable is not set by user, try to locate tool using the code snippet
37719     if test -n "$ac_tool_prefix"; then
37720   for ac_prog in nm
37721   do
37722     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37723 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37725 $as_echo_n "checking for $ac_word... " >&6; }
37726 if ${ac_cv_prog_NM+:} false; then :
37727   $as_echo_n "(cached) " >&6
37728 else
37729   if test -n "$NM"; then
37730   ac_cv_prog_NM="$NM" # Let the user override the test.
37731 else
37732 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37733 for as_dir in $PATH
37734 do
37735   IFS=$as_save_IFS
37736   test -z "$as_dir" && as_dir=.
37737     for ac_exec_ext in '' $ac_executable_extensions; do
37738   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37739     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37740     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37741     break 2
37742   fi
37743 done
37744   done
37745 IFS=$as_save_IFS
37746 
37747 fi
37748 fi
37749 NM=$ac_cv_prog_NM
37750 if test -n "$NM"; then
37751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37752 $as_echo "$NM" >&6; }
37753 else
37754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37755 $as_echo "no" >&6; }
37756 fi
37757 
37758 
37759     test -n "$NM" && break
37760   done
37761 fi
37762 if test -z "$NM"; then
37763   ac_ct_NM=$NM
37764   for ac_prog in nm
37765 do
37766   # Extract the first word of "$ac_prog", so it can be a program name with args.
37767 set dummy $ac_prog; ac_word=$2
37768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37769 $as_echo_n "checking for $ac_word... " >&6; }
37770 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37771   $as_echo_n "(cached) " >&6
37772 else
37773   if test -n "$ac_ct_NM"; then
37774   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37775 else
37776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37777 for as_dir in $PATH
37778 do
37779   IFS=$as_save_IFS
37780   test -z "$as_dir" && as_dir=.
37781     for ac_exec_ext in '' $ac_executable_extensions; do
37782   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37783     ac_cv_prog_ac_ct_NM="$ac_prog"
37784     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37785     break 2
37786   fi
37787 done
37788   done
37789 IFS=$as_save_IFS
37790 
37791 fi
37792 fi
37793 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37794 if test -n "$ac_ct_NM"; then
37795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37796 $as_echo "$ac_ct_NM" >&6; }
37797 else
37798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37799 $as_echo "no" >&6; }
37800 fi
37801 
37802 
37803   test -n "$ac_ct_NM" && break
37804 done
37805 
37806   if test "x$ac_ct_NM" = x; then
37807     NM=""
37808   else
37809     case $cross_compiling:$ac_tool_warned in
37810 yes:)
37811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37812 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37813 ac_tool_warned=yes ;;
37814 esac
37815     NM=$ac_ct_NM
37816   fi
37817 fi
37818 
37819   else
37820     # The variable is set, but is it from the command line or the environment?
37821 
37822     # Try to remove the string !NM! from our list.
37823     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37824     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37825       # If it failed, the variable was not from the command line. Ignore it,
37826       # but warn the user (except for BASH, which is always set by the calling BASH).
37827       if test "xNM" != xBASH; then
37828         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37829 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37830       fi
37831       # Try to locate tool using the code snippet
37832       if test -n "$ac_tool_prefix"; then
37833   for ac_prog in nm
37834   do
37835     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37836 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37838 $as_echo_n "checking for $ac_word... " >&6; }
37839 if ${ac_cv_prog_NM+:} false; then :
37840   $as_echo_n "(cached) " >&6
37841 else
37842   if test -n "$NM"; then
37843   ac_cv_prog_NM="$NM" # Let the user override the test.
37844 else
37845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37846 for as_dir in $PATH
37847 do
37848   IFS=$as_save_IFS
37849   test -z "$as_dir" && as_dir=.
37850     for ac_exec_ext in '' $ac_executable_extensions; do
37851   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37852     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37853     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37854     break 2
37855   fi
37856 done
37857   done
37858 IFS=$as_save_IFS
37859 
37860 fi
37861 fi
37862 NM=$ac_cv_prog_NM
37863 if test -n "$NM"; then
37864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37865 $as_echo "$NM" >&6; }
37866 else
37867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37868 $as_echo "no" >&6; }
37869 fi
37870 
37871 
37872     test -n "$NM" && break
37873   done
37874 fi
37875 if test -z "$NM"; then
37876   ac_ct_NM=$NM
37877   for ac_prog in nm
37878 do
37879   # Extract the first word of "$ac_prog", so it can be a program name with args.
37880 set dummy $ac_prog; ac_word=$2
37881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37882 $as_echo_n "checking for $ac_word... " >&6; }
37883 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37884   $as_echo_n "(cached) " >&6
37885 else
37886   if test -n "$ac_ct_NM"; then
37887   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37888 else
37889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37890 for as_dir in $PATH
37891 do
37892   IFS=$as_save_IFS
37893   test -z "$as_dir" && as_dir=.
37894     for ac_exec_ext in '' $ac_executable_extensions; do
37895   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37896     ac_cv_prog_ac_ct_NM="$ac_prog"
37897     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37898     break 2
37899   fi
37900 done
37901   done
37902 IFS=$as_save_IFS
37903 
37904 fi
37905 fi
37906 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37907 if test -n "$ac_ct_NM"; then
37908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37909 $as_echo "$ac_ct_NM" >&6; }
37910 else
37911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37912 $as_echo "no" >&6; }
37913 fi
37914 
37915 
37916   test -n "$ac_ct_NM" && break
37917 done
37918 
37919   if test "x$ac_ct_NM" = x; then
37920     NM=""
37921   else
37922     case $cross_compiling:$ac_tool_warned in
37923 yes:)
37924 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37925 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37926 ac_tool_warned=yes ;;
37927 esac
37928     NM=$ac_ct_NM
37929   fi
37930 fi
37931 
37932     else
37933       # If it succeeded, then it was overridden by the user. We will use it
37934       # for the tool.
37935 
37936       # First remove it from the list of overridden variables, so we can test
37937       # for unknown variables in the end.
37938       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37939 
37940       # Check if the provided tool contains a complete path.
37941       tool_specified="$NM"
37942       tool_basename="${tool_specified##*/}"
37943       if test "x$tool_basename" = "x$tool_specified"; then
37944         # A command without a complete path is provided, search $PATH.
37945         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37946 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37947         # Extract the first word of "$tool_basename", so it can be a program name with args.
37948 set dummy $tool_basename; ac_word=$2
37949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37950 $as_echo_n "checking for $ac_word... " >&6; }
37951 if ${ac_cv_path_NM+:} false; then :
37952   $as_echo_n "(cached) " >&6
37953 else
37954   case $NM in
37955   [\\/]* | ?:[\\/]*)
37956   ac_cv_path_NM="$NM" # Let the user override the test with a path.
37957   ;;
37958   *)
37959   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37960 for as_dir in $PATH
37961 do
37962   IFS=$as_save_IFS
37963   test -z "$as_dir" && as_dir=.
37964     for ac_exec_ext in '' $ac_executable_extensions; do
37965   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37966     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37967     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37968     break 2
37969   fi
37970 done
37971   done
37972 IFS=$as_save_IFS
37973 
37974   ;;
37975 esac
37976 fi
37977 NM=$ac_cv_path_NM
37978 if test -n "$NM"; then
37979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37980 $as_echo "$NM" >&6; }
37981 else
37982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37983 $as_echo "no" >&6; }
37984 fi
37985 
37986 
37987         if test "x$NM" = x; then
37988           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37989         fi
37990       else
37991         # Otherwise we believe it is a complete path. Use it as it is.
37992         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37993 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37994         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37995 $as_echo_n "checking for NM... " >&6; }
37996         if test ! -x "$tool_specified"; then
37997           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37998 $as_echo "not found" >&6; }
37999           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38000         fi
38001         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38002 $as_echo "$tool_specified" >&6; }
38003       fi
38004     fi
38005   fi
38006 
38007 
38008 
38009   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38010 
38011   # First separate the path from the arguments. This will split at the first
38012   # space.
38013   complete="$NM"
38014   path="${complete%% *}"
38015   tmp="$complete EOL"
38016   arguments="${tmp#* }"
38017 
38018   # Input might be given as Windows format, start by converting to
38019   # unix format.
38020   new_path=`$CYGPATH -u "$path"`
38021 
38022   # Now try to locate executable using which
38023   new_path=`$WHICH "$new_path" 2> /dev/null`
38024   # bat and cmd files are not always considered executable in cygwin causing which
38025   # to not find them
38026   if test "x$new_path" = x \
38027       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38028       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38029     new_path=`$CYGPATH -u "$path"`
38030   fi
38031   if test "x$new_path" = x; then
38032     # Oops. Which didn't find the executable.
38033     # The splitting of arguments from the executable at a space might have been incorrect,
38034     # since paths with space are more likely in Windows. Give it another try with the whole
38035     # argument.
38036     path="$complete"
38037     arguments="EOL"
38038     new_path=`$CYGPATH -u "$path"`
38039     new_path=`$WHICH "$new_path" 2> /dev/null`
38040     # bat and cmd files are not always considered executable in cygwin causing which
38041     # to not find them
38042     if test "x$new_path" = x \
38043         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38044         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38045       new_path=`$CYGPATH -u "$path"`
38046     fi
38047     if test "x$new_path" = x; then
38048       # It's still not found. Now this is an unrecoverable error.
38049       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38050 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38051       has_space=`$ECHO "$complete" | $GREP " "`
38052       if test "x$has_space" != x; then
38053         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38054 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38055       fi
38056       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38057     fi
38058   fi
38059 
38060   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38061   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38062   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38063   # "foo.exe" is OK but "foo" is an error.
38064   #
38065   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38066   # It is also a way to make sure we got the proper file name for the real test later on.
38067   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38068   if test "x$test_shortpath" = x; then
38069     # Short path failed, file does not exist as specified.
38070     # Try adding .exe or .cmd
38071     if test -f "${new_path}.exe"; then
38072       input_to_shortpath="${new_path}.exe"
38073     elif test -f "${new_path}.cmd"; then
38074       input_to_shortpath="${new_path}.cmd"
38075     else
38076       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38077 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38078       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38079 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38080       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38081     fi
38082   else
38083     input_to_shortpath="$new_path"
38084   fi
38085 
38086   # Call helper function which possibly converts this using DOS-style short mode.
38087   # If so, the updated path is stored in $new_path.
38088   new_path="$input_to_shortpath"
38089 
38090   input_path="$input_to_shortpath"
38091   # Check if we need to convert this using DOS-style short mode. If the path
38092   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38093   # take no chances and rewrite it.
38094   # Note: m4 eats our [], so we need to use [ and ] instead.
38095   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38096   if test "x$has_forbidden_chars" != x; then
38097     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38098     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38099     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38100     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38101       # Going to short mode and back again did indeed matter. Since short mode is
38102       # case insensitive, let's make it lowercase to improve readability.
38103       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38104       # Now convert it back to Unix-stile (cygpath)
38105       input_path=`$CYGPATH -u "$shortmode_path"`
38106       new_path="$input_path"
38107     fi
38108   fi
38109 
38110   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38111   if test "x$test_cygdrive_prefix" = x; then
38112     # As a simple fix, exclude /usr/bin since it's not a real path.
38113     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38114       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38115       # a path prefixed by /cygdrive for fixpath to work.
38116       new_path="$CYGWIN_ROOT_PATH$input_path"
38117     fi
38118   fi
38119 
38120   # remove trailing .exe if any
38121   new_path="${new_path/%.exe/}"
38122 
38123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38124 
38125   # First separate the path from the arguments. This will split at the first
38126   # space.
38127   complete="$NM"
38128   path="${complete%% *}"
38129   tmp="$complete EOL"
38130   arguments="${tmp#* }"
38131 
38132   # Input might be given as Windows format, start by converting to
38133   # unix format.
38134   new_path="$path"
38135 
38136   windows_path="$new_path"
38137   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38138     unix_path=`$CYGPATH -u "$windows_path"`
38139     new_path="$unix_path"
38140   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38141     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38142     new_path="$unix_path"
38143   fi
38144 
38145 
38146   # Now try to locate executable using which
38147   new_path=`$WHICH "$new_path" 2> /dev/null`
38148 
38149   if test "x$new_path" = x; then
38150     # Oops. Which didn't find the executable.
38151     # The splitting of arguments from the executable at a space might have been incorrect,
38152     # since paths with space are more likely in Windows. Give it another try with the whole
38153     # argument.
38154     path="$complete"
38155     arguments="EOL"
38156     new_path="$path"
38157 
38158   windows_path="$new_path"
38159   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38160     unix_path=`$CYGPATH -u "$windows_path"`
38161     new_path="$unix_path"
38162   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38163     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38164     new_path="$unix_path"
38165   fi
38166 
38167 
38168     new_path=`$WHICH "$new_path" 2> /dev/null`
38169     # bat and cmd files are not always considered executable in MSYS causing which
38170     # to not find them
38171     if test "x$new_path" = x \
38172         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38173         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38174       new_path="$path"
38175 
38176   windows_path="$new_path"
38177   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38178     unix_path=`$CYGPATH -u "$windows_path"`
38179     new_path="$unix_path"
38180   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38181     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38182     new_path="$unix_path"
38183   fi
38184 
38185     fi
38186 
38187     if test "x$new_path" = x; then
38188       # It's still not found. Now this is an unrecoverable error.
38189       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38190 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38191       has_space=`$ECHO "$complete" | $GREP " "`
38192       if test "x$has_space" != x; then
38193         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38194 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38195       fi
38196       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38197     fi
38198   fi
38199 
38200   # Now new_path has a complete unix path to the binary
38201   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38202     # Keep paths in /bin as-is, but remove trailing .exe if any
38203     new_path="${new_path/%.exe/}"
38204     # Do not save /bin paths to all_fixpath_prefixes!
38205   else
38206     # Not in mixed or Windows style, start by that.
38207     new_path=`cmd //c echo $new_path`
38208 
38209   input_path="$new_path"
38210   # Check if we need to convert this using DOS-style short mode. If the path
38211   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38212   # take no chances and rewrite it.
38213   # Note: m4 eats our [], so we need to use [ and ] instead.
38214   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38215   if test "x$has_forbidden_chars" != x; then
38216     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38217     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38218   fi
38219 
38220     # Output is in $new_path
38221 
38222   windows_path="$new_path"
38223   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38224     unix_path=`$CYGPATH -u "$windows_path"`
38225     new_path="$unix_path"
38226   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38227     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38228     new_path="$unix_path"
38229   fi
38230 
38231     # remove trailing .exe if any
38232     new_path="${new_path/%.exe/}"
38233 
38234     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38235     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38236   fi
38237 
38238   else
38239     # We're on a posix platform. Hooray! :)
38240     # First separate the path from the arguments. This will split at the first
38241     # space.
38242     complete="$NM"
38243     path="${complete%% *}"
38244     tmp="$complete EOL"
38245     arguments="${tmp#* }"
38246 
38247     # Cannot rely on the command "which" here since it doesn't always work.
38248     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38249     if test -z "$is_absolute_path"; then
38250       # Path to executable is not absolute. Find it.
38251       IFS_save="$IFS"
38252       IFS=:
38253       for p in $PATH; do
38254         if test -f "$p/$path" && test -x "$p/$path"; then
38255           new_path="$p/$path"
38256           break
38257         fi
38258       done
38259       IFS="$IFS_save"
38260     else
38261       # This is an absolute path, we can use it without further modifications.
38262       new_path="$path"
38263     fi
38264 
38265     if test "x$new_path" = x; then
38266       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38267 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38268       has_space=`$ECHO "$complete" | $GREP " "`
38269       if test "x$has_space" != x; then
38270         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38271 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38272       fi
38273       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38274     fi
38275   fi
38276 
38277   # Now join together the path and the arguments once again
38278   if test "x$arguments" != xEOL; then
38279     new_complete="$new_path ${arguments% *}"
38280   else
38281     new_complete="$new_path"
38282   fi
38283 
38284   if test "x$complete" != "x$new_complete"; then
38285     NM="$new_complete"
38286     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38287 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38288   fi
38289 
38290     GNM="$NM"
38291 
38292   fi
38293 
38294   # objcopy is used for moving debug symbols to separate files when
38295   # full debug symbols are enabled.
38296   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38297 
38298 
38299   # Publish this variable in the help.
38300 
38301 
38302   if test "x$OBJCOPY" = x; then
38303     # The variable is not set by user, try to locate tool using the code snippet
38304     if test -n "$ac_tool_prefix"; then
38305   for ac_prog in gobjcopy objcopy
38306   do
38307     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38308 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38310 $as_echo_n "checking for $ac_word... " >&6; }
38311 if ${ac_cv_prog_OBJCOPY+:} false; then :
38312   $as_echo_n "(cached) " >&6
38313 else
38314   if test -n "$OBJCOPY"; then
38315   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38316 else
38317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38318 for as_dir in $PATH
38319 do
38320   IFS=$as_save_IFS
38321   test -z "$as_dir" && as_dir=.
38322     for ac_exec_ext in '' $ac_executable_extensions; do
38323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38324     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38326     break 2
38327   fi
38328 done
38329   done
38330 IFS=$as_save_IFS
38331 
38332 fi
38333 fi
38334 OBJCOPY=$ac_cv_prog_OBJCOPY
38335 if test -n "$OBJCOPY"; then
38336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38337 $as_echo "$OBJCOPY" >&6; }
38338 else
38339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38340 $as_echo "no" >&6; }
38341 fi
38342 
38343 
38344     test -n "$OBJCOPY" && break
38345   done
38346 fi
38347 if test -z "$OBJCOPY"; then
38348   ac_ct_OBJCOPY=$OBJCOPY
38349   for ac_prog in gobjcopy objcopy
38350 do
38351   # Extract the first word of "$ac_prog", so it can be a program name with args.
38352 set dummy $ac_prog; ac_word=$2
38353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38354 $as_echo_n "checking for $ac_word... " >&6; }
38355 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38356   $as_echo_n "(cached) " >&6
38357 else
38358   if test -n "$ac_ct_OBJCOPY"; then
38359   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38360 else
38361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38362 for as_dir in $PATH
38363 do
38364   IFS=$as_save_IFS
38365   test -z "$as_dir" && as_dir=.
38366     for ac_exec_ext in '' $ac_executable_extensions; do
38367   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38368     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38369     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38370     break 2
38371   fi
38372 done
38373   done
38374 IFS=$as_save_IFS
38375 
38376 fi
38377 fi
38378 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38379 if test -n "$ac_ct_OBJCOPY"; then
38380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38381 $as_echo "$ac_ct_OBJCOPY" >&6; }
38382 else
38383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38384 $as_echo "no" >&6; }
38385 fi
38386 
38387 
38388   test -n "$ac_ct_OBJCOPY" && break
38389 done
38390 
38391   if test "x$ac_ct_OBJCOPY" = x; then
38392     OBJCOPY=""
38393   else
38394     case $cross_compiling:$ac_tool_warned in
38395 yes:)
38396 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38397 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38398 ac_tool_warned=yes ;;
38399 esac
38400     OBJCOPY=$ac_ct_OBJCOPY
38401   fi
38402 fi
38403 
38404   else
38405     # The variable is set, but is it from the command line or the environment?
38406 
38407     # Try to remove the string !OBJCOPY! from our list.
38408     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38409     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38410       # If it failed, the variable was not from the command line. Ignore it,
38411       # but warn the user (except for BASH, which is always set by the calling BASH).
38412       if test "xOBJCOPY" != xBASH; then
38413         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38414 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38415       fi
38416       # Try to locate tool using the code snippet
38417       if test -n "$ac_tool_prefix"; then
38418   for ac_prog in gobjcopy objcopy
38419   do
38420     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38421 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38423 $as_echo_n "checking for $ac_word... " >&6; }
38424 if ${ac_cv_prog_OBJCOPY+:} false; then :
38425   $as_echo_n "(cached) " >&6
38426 else
38427   if test -n "$OBJCOPY"; then
38428   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38429 else
38430 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38431 for as_dir in $PATH
38432 do
38433   IFS=$as_save_IFS
38434   test -z "$as_dir" && as_dir=.
38435     for ac_exec_ext in '' $ac_executable_extensions; do
38436   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38437     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38438     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38439     break 2
38440   fi
38441 done
38442   done
38443 IFS=$as_save_IFS
38444 
38445 fi
38446 fi
38447 OBJCOPY=$ac_cv_prog_OBJCOPY
38448 if test -n "$OBJCOPY"; then
38449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38450 $as_echo "$OBJCOPY" >&6; }
38451 else
38452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38453 $as_echo "no" >&6; }
38454 fi
38455 
38456 
38457     test -n "$OBJCOPY" && break
38458   done
38459 fi
38460 if test -z "$OBJCOPY"; then
38461   ac_ct_OBJCOPY=$OBJCOPY
38462   for ac_prog in gobjcopy objcopy
38463 do
38464   # Extract the first word of "$ac_prog", so it can be a program name with args.
38465 set dummy $ac_prog; ac_word=$2
38466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38467 $as_echo_n "checking for $ac_word... " >&6; }
38468 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38469   $as_echo_n "(cached) " >&6
38470 else
38471   if test -n "$ac_ct_OBJCOPY"; then
38472   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38473 else
38474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38475 for as_dir in $PATH
38476 do
38477   IFS=$as_save_IFS
38478   test -z "$as_dir" && as_dir=.
38479     for ac_exec_ext in '' $ac_executable_extensions; do
38480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38481     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38483     break 2
38484   fi
38485 done
38486   done
38487 IFS=$as_save_IFS
38488 
38489 fi
38490 fi
38491 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38492 if test -n "$ac_ct_OBJCOPY"; then
38493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38494 $as_echo "$ac_ct_OBJCOPY" >&6; }
38495 else
38496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38497 $as_echo "no" >&6; }
38498 fi
38499 
38500 
38501   test -n "$ac_ct_OBJCOPY" && break
38502 done
38503 
38504   if test "x$ac_ct_OBJCOPY" = x; then
38505     OBJCOPY=""
38506   else
38507     case $cross_compiling:$ac_tool_warned in
38508 yes:)
38509 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38510 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38511 ac_tool_warned=yes ;;
38512 esac
38513     OBJCOPY=$ac_ct_OBJCOPY
38514   fi
38515 fi
38516 
38517     else
38518       # If it succeeded, then it was overridden by the user. We will use it
38519       # for the tool.
38520 
38521       # First remove it from the list of overridden variables, so we can test
38522       # for unknown variables in the end.
38523       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38524 
38525       # Check if the provided tool contains a complete path.
38526       tool_specified="$OBJCOPY"
38527       tool_basename="${tool_specified##*/}"
38528       if test "x$tool_basename" = "x$tool_specified"; then
38529         # A command without a complete path is provided, search $PATH.
38530         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38531 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38532         # Extract the first word of "$tool_basename", so it can be a program name with args.
38533 set dummy $tool_basename; ac_word=$2
38534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38535 $as_echo_n "checking for $ac_word... " >&6; }
38536 if ${ac_cv_path_OBJCOPY+:} false; then :
38537   $as_echo_n "(cached) " >&6
38538 else
38539   case $OBJCOPY in
38540   [\\/]* | ?:[\\/]*)
38541   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38542   ;;
38543   *)
38544   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38545 for as_dir in $PATH
38546 do
38547   IFS=$as_save_IFS
38548   test -z "$as_dir" && as_dir=.
38549     for ac_exec_ext in '' $ac_executable_extensions; do
38550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38551     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38553     break 2
38554   fi
38555 done
38556   done
38557 IFS=$as_save_IFS
38558 
38559   ;;
38560 esac
38561 fi
38562 OBJCOPY=$ac_cv_path_OBJCOPY
38563 if test -n "$OBJCOPY"; then
38564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38565 $as_echo "$OBJCOPY" >&6; }
38566 else
38567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38568 $as_echo "no" >&6; }
38569 fi
38570 
38571 
38572         if test "x$OBJCOPY" = x; then
38573           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38574         fi
38575       else
38576         # Otherwise we believe it is a complete path. Use it as it is.
38577         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38578 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38579         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38580 $as_echo_n "checking for OBJCOPY... " >&6; }
38581         if test ! -x "$tool_specified"; then
38582           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38583 $as_echo "not found" >&6; }
38584           as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38585         fi
38586         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38587 $as_echo "$tool_specified" >&6; }
38588       fi
38589     fi
38590   fi
38591 
38592 
38593     # Only call fixup if objcopy was found.
38594     if test -n "$OBJCOPY"; then
38595 
38596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38597 
38598   # First separate the path from the arguments. This will split at the first
38599   # space.
38600   complete="$OBJCOPY"
38601   path="${complete%% *}"
38602   tmp="$complete EOL"
38603   arguments="${tmp#* }"
38604 
38605   # Input might be given as Windows format, start by converting to
38606   # unix format.
38607   new_path=`$CYGPATH -u "$path"`
38608 
38609   # Now try to locate executable using which
38610   new_path=`$WHICH "$new_path" 2> /dev/null`
38611   # bat and cmd files are not always considered executable in cygwin causing which
38612   # to not find them
38613   if test "x$new_path" = x \
38614       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38615       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38616     new_path=`$CYGPATH -u "$path"`
38617   fi
38618   if test "x$new_path" = x; then
38619     # Oops. Which didn't find the executable.
38620     # The splitting of arguments from the executable at a space might have been incorrect,
38621     # since paths with space are more likely in Windows. Give it another try with the whole
38622     # argument.
38623     path="$complete"
38624     arguments="EOL"
38625     new_path=`$CYGPATH -u "$path"`
38626     new_path=`$WHICH "$new_path" 2> /dev/null`
38627     # bat and cmd files are not always considered executable in cygwin causing which
38628     # to not find them
38629     if test "x$new_path" = x \
38630         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38631         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38632       new_path=`$CYGPATH -u "$path"`
38633     fi
38634     if test "x$new_path" = x; then
38635       # It's still not found. Now this is an unrecoverable error.
38636       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38637 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38638       has_space=`$ECHO "$complete" | $GREP " "`
38639       if test "x$has_space" != x; then
38640         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38641 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38642       fi
38643       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38644     fi
38645   fi
38646 
38647   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38648   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38649   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38650   # "foo.exe" is OK but "foo" is an error.
38651   #
38652   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38653   # It is also a way to make sure we got the proper file name for the real test later on.
38654   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38655   if test "x$test_shortpath" = x; then
38656     # Short path failed, file does not exist as specified.
38657     # Try adding .exe or .cmd
38658     if test -f "${new_path}.exe"; then
38659       input_to_shortpath="${new_path}.exe"
38660     elif test -f "${new_path}.cmd"; then
38661       input_to_shortpath="${new_path}.cmd"
38662     else
38663       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38664 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38665       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38666 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38667       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38668     fi
38669   else
38670     input_to_shortpath="$new_path"
38671   fi
38672 
38673   # Call helper function which possibly converts this using DOS-style short mode.
38674   # If so, the updated path is stored in $new_path.
38675   new_path="$input_to_shortpath"
38676 
38677   input_path="$input_to_shortpath"
38678   # Check if we need to convert this using DOS-style short mode. If the path
38679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38680   # take no chances and rewrite it.
38681   # Note: m4 eats our [], so we need to use [ and ] instead.
38682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38683   if test "x$has_forbidden_chars" != x; then
38684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38685     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38686     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38687     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38688       # Going to short mode and back again did indeed matter. Since short mode is
38689       # case insensitive, let's make it lowercase to improve readability.
38690       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38691       # Now convert it back to Unix-stile (cygpath)
38692       input_path=`$CYGPATH -u "$shortmode_path"`
38693       new_path="$input_path"
38694     fi
38695   fi
38696 
38697   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38698   if test "x$test_cygdrive_prefix" = x; then
38699     # As a simple fix, exclude /usr/bin since it's not a real path.
38700     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38701       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38702       # a path prefixed by /cygdrive for fixpath to work.
38703       new_path="$CYGWIN_ROOT_PATH$input_path"
38704     fi
38705   fi
38706 
38707   # remove trailing .exe if any
38708   new_path="${new_path/%.exe/}"
38709 
38710   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38711 
38712   # First separate the path from the arguments. This will split at the first
38713   # space.
38714   complete="$OBJCOPY"
38715   path="${complete%% *}"
38716   tmp="$complete EOL"
38717   arguments="${tmp#* }"
38718 
38719   # Input might be given as Windows format, start by converting to
38720   # unix format.
38721   new_path="$path"
38722 
38723   windows_path="$new_path"
38724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38725     unix_path=`$CYGPATH -u "$windows_path"`
38726     new_path="$unix_path"
38727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38729     new_path="$unix_path"
38730   fi
38731 
38732 
38733   # Now try to locate executable using which
38734   new_path=`$WHICH "$new_path" 2> /dev/null`
38735 
38736   if test "x$new_path" = x; then
38737     # Oops. Which didn't find the executable.
38738     # The splitting of arguments from the executable at a space might have been incorrect,
38739     # since paths with space are more likely in Windows. Give it another try with the whole
38740     # argument.
38741     path="$complete"
38742     arguments="EOL"
38743     new_path="$path"
38744 
38745   windows_path="$new_path"
38746   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38747     unix_path=`$CYGPATH -u "$windows_path"`
38748     new_path="$unix_path"
38749   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38750     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38751     new_path="$unix_path"
38752   fi
38753 
38754 
38755     new_path=`$WHICH "$new_path" 2> /dev/null`
38756     # bat and cmd files are not always considered executable in MSYS causing which
38757     # to not find them
38758     if test "x$new_path" = x \
38759         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38760         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38761       new_path="$path"
38762 
38763   windows_path="$new_path"
38764   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38765     unix_path=`$CYGPATH -u "$windows_path"`
38766     new_path="$unix_path"
38767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38768     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38769     new_path="$unix_path"
38770   fi
38771 
38772     fi
38773 
38774     if test "x$new_path" = x; then
38775       # It's still not found. Now this is an unrecoverable error.
38776       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38777 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38778       has_space=`$ECHO "$complete" | $GREP " "`
38779       if test "x$has_space" != x; then
38780         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38781 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38782       fi
38783       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38784     fi
38785   fi
38786 
38787   # Now new_path has a complete unix path to the binary
38788   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38789     # Keep paths in /bin as-is, but remove trailing .exe if any
38790     new_path="${new_path/%.exe/}"
38791     # Do not save /bin paths to all_fixpath_prefixes!
38792   else
38793     # Not in mixed or Windows style, start by that.
38794     new_path=`cmd //c echo $new_path`
38795 
38796   input_path="$new_path"
38797   # Check if we need to convert this using DOS-style short mode. If the path
38798   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38799   # take no chances and rewrite it.
38800   # Note: m4 eats our [], so we need to use [ and ] instead.
38801   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38802   if test "x$has_forbidden_chars" != x; then
38803     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38804     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38805   fi
38806 
38807     # Output is in $new_path
38808 
38809   windows_path="$new_path"
38810   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38811     unix_path=`$CYGPATH -u "$windows_path"`
38812     new_path="$unix_path"
38813   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38814     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38815     new_path="$unix_path"
38816   fi
38817 
38818     # remove trailing .exe if any
38819     new_path="${new_path/%.exe/}"
38820 
38821     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38822     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38823   fi
38824 
38825   else
38826     # We're on a posix platform. Hooray! :)
38827     # First separate the path from the arguments. This will split at the first
38828     # space.
38829     complete="$OBJCOPY"
38830     path="${complete%% *}"
38831     tmp="$complete EOL"
38832     arguments="${tmp#* }"
38833 
38834     # Cannot rely on the command "which" here since it doesn't always work.
38835     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38836     if test -z "$is_absolute_path"; then
38837       # Path to executable is not absolute. Find it.
38838       IFS_save="$IFS"
38839       IFS=:
38840       for p in $PATH; do
38841         if test -f "$p/$path" && test -x "$p/$path"; then
38842           new_path="$p/$path"
38843           break
38844         fi
38845       done
38846       IFS="$IFS_save"
38847     else
38848       # This is an absolute path, we can use it without further modifications.
38849       new_path="$path"
38850     fi
38851 
38852     if test "x$new_path" = x; then
38853       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38854 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38855       has_space=`$ECHO "$complete" | $GREP " "`
38856       if test "x$has_space" != x; then
38857         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38858 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38859       fi
38860       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38861     fi
38862   fi
38863 
38864   # Now join together the path and the arguments once again
38865   if test "x$arguments" != xEOL; then
38866     new_complete="$new_path ${arguments% *}"
38867   else
38868     new_complete="$new_path"
38869   fi
38870 
38871   if test "x$complete" != "x$new_complete"; then
38872     OBJCOPY="$new_complete"
38873     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38874 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38875   fi
38876 
38877     fi
38878   fi
38879 
38880 
38881 
38882   # Publish this variable in the help.
38883 
38884 
38885   if test "x$OBJDUMP" = x; then
38886     # The variable is not set by user, try to locate tool using the code snippet
38887     if test -n "$ac_tool_prefix"; then
38888   for ac_prog in gobjdump objdump
38889   do
38890     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38891 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38893 $as_echo_n "checking for $ac_word... " >&6; }
38894 if ${ac_cv_prog_OBJDUMP+:} false; then :
38895   $as_echo_n "(cached) " >&6
38896 else
38897   if test -n "$OBJDUMP"; then
38898   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38899 else
38900 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38901 for as_dir in $PATH
38902 do
38903   IFS=$as_save_IFS
38904   test -z "$as_dir" && as_dir=.
38905     for ac_exec_ext in '' $ac_executable_extensions; do
38906   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38907     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38908     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38909     break 2
38910   fi
38911 done
38912   done
38913 IFS=$as_save_IFS
38914 
38915 fi
38916 fi
38917 OBJDUMP=$ac_cv_prog_OBJDUMP
38918 if test -n "$OBJDUMP"; then
38919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38920 $as_echo "$OBJDUMP" >&6; }
38921 else
38922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38923 $as_echo "no" >&6; }
38924 fi
38925 
38926 
38927     test -n "$OBJDUMP" && break
38928   done
38929 fi
38930 if test -z "$OBJDUMP"; then
38931   ac_ct_OBJDUMP=$OBJDUMP
38932   for ac_prog in gobjdump objdump
38933 do
38934   # Extract the first word of "$ac_prog", so it can be a program name with args.
38935 set dummy $ac_prog; ac_word=$2
38936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38937 $as_echo_n "checking for $ac_word... " >&6; }
38938 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38939   $as_echo_n "(cached) " >&6
38940 else
38941   if test -n "$ac_ct_OBJDUMP"; then
38942   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38943 else
38944 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38945 for as_dir in $PATH
38946 do
38947   IFS=$as_save_IFS
38948   test -z "$as_dir" && as_dir=.
38949     for ac_exec_ext in '' $ac_executable_extensions; do
38950   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38951     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38952     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38953     break 2
38954   fi
38955 done
38956   done
38957 IFS=$as_save_IFS
38958 
38959 fi
38960 fi
38961 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38962 if test -n "$ac_ct_OBJDUMP"; then
38963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38964 $as_echo "$ac_ct_OBJDUMP" >&6; }
38965 else
38966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38967 $as_echo "no" >&6; }
38968 fi
38969 
38970 
38971   test -n "$ac_ct_OBJDUMP" && break
38972 done
38973 
38974   if test "x$ac_ct_OBJDUMP" = x; then
38975     OBJDUMP=""
38976   else
38977     case $cross_compiling:$ac_tool_warned in
38978 yes:)
38979 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38980 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38981 ac_tool_warned=yes ;;
38982 esac
38983     OBJDUMP=$ac_ct_OBJDUMP
38984   fi
38985 fi
38986 
38987   else
38988     # The variable is set, but is it from the command line or the environment?
38989 
38990     # Try to remove the string !OBJDUMP! from our list.
38991     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38992     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38993       # If it failed, the variable was not from the command line. Ignore it,
38994       # but warn the user (except for BASH, which is always set by the calling BASH).
38995       if test "xOBJDUMP" != xBASH; then
38996         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38997 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38998       fi
38999       # Try to locate tool using the code snippet
39000       if test -n "$ac_tool_prefix"; then
39001   for ac_prog in gobjdump objdump
39002   do
39003     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39004 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39006 $as_echo_n "checking for $ac_word... " >&6; }
39007 if ${ac_cv_prog_OBJDUMP+:} false; then :
39008   $as_echo_n "(cached) " >&6
39009 else
39010   if test -n "$OBJDUMP"; then
39011   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39012 else
39013 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39014 for as_dir in $PATH
39015 do
39016   IFS=$as_save_IFS
39017   test -z "$as_dir" && as_dir=.
39018     for ac_exec_ext in '' $ac_executable_extensions; do
39019   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39020     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39021     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39022     break 2
39023   fi
39024 done
39025   done
39026 IFS=$as_save_IFS
39027 
39028 fi
39029 fi
39030 OBJDUMP=$ac_cv_prog_OBJDUMP
39031 if test -n "$OBJDUMP"; then
39032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39033 $as_echo "$OBJDUMP" >&6; }
39034 else
39035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39036 $as_echo "no" >&6; }
39037 fi
39038 
39039 
39040     test -n "$OBJDUMP" && break
39041   done
39042 fi
39043 if test -z "$OBJDUMP"; then
39044   ac_ct_OBJDUMP=$OBJDUMP
39045   for ac_prog in gobjdump objdump
39046 do
39047   # Extract the first word of "$ac_prog", so it can be a program name with args.
39048 set dummy $ac_prog; ac_word=$2
39049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39050 $as_echo_n "checking for $ac_word... " >&6; }
39051 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39052   $as_echo_n "(cached) " >&6
39053 else
39054   if test -n "$ac_ct_OBJDUMP"; then
39055   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39056 else
39057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39058 for as_dir in $PATH
39059 do
39060   IFS=$as_save_IFS
39061   test -z "$as_dir" && as_dir=.
39062     for ac_exec_ext in '' $ac_executable_extensions; do
39063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39064     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39066     break 2
39067   fi
39068 done
39069   done
39070 IFS=$as_save_IFS
39071 
39072 fi
39073 fi
39074 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39075 if test -n "$ac_ct_OBJDUMP"; then
39076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39077 $as_echo "$ac_ct_OBJDUMP" >&6; }
39078 else
39079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39080 $as_echo "no" >&6; }
39081 fi
39082 
39083 
39084   test -n "$ac_ct_OBJDUMP" && break
39085 done
39086 
39087   if test "x$ac_ct_OBJDUMP" = x; then
39088     OBJDUMP=""
39089   else
39090     case $cross_compiling:$ac_tool_warned in
39091 yes:)
39092 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39093 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39094 ac_tool_warned=yes ;;
39095 esac
39096     OBJDUMP=$ac_ct_OBJDUMP
39097   fi
39098 fi
39099 
39100     else
39101       # If it succeeded, then it was overridden by the user. We will use it
39102       # for the tool.
39103 
39104       # First remove it from the list of overridden variables, so we can test
39105       # for unknown variables in the end.
39106       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39107 
39108       # Check if the provided tool contains a complete path.
39109       tool_specified="$OBJDUMP"
39110       tool_basename="${tool_specified##*/}"
39111       if test "x$tool_basename" = "x$tool_specified"; then
39112         # A command without a complete path is provided, search $PATH.
39113         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39114 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39115         # Extract the first word of "$tool_basename", so it can be a program name with args.
39116 set dummy $tool_basename; ac_word=$2
39117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39118 $as_echo_n "checking for $ac_word... " >&6; }
39119 if ${ac_cv_path_OBJDUMP+:} false; then :
39120   $as_echo_n "(cached) " >&6
39121 else
39122   case $OBJDUMP in
39123   [\\/]* | ?:[\\/]*)
39124   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39125   ;;
39126   *)
39127   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39128 for as_dir in $PATH
39129 do
39130   IFS=$as_save_IFS
39131   test -z "$as_dir" && as_dir=.
39132     for ac_exec_ext in '' $ac_executable_extensions; do
39133   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39134     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39135     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39136     break 2
39137   fi
39138 done
39139   done
39140 IFS=$as_save_IFS
39141 
39142   ;;
39143 esac
39144 fi
39145 OBJDUMP=$ac_cv_path_OBJDUMP
39146 if test -n "$OBJDUMP"; then
39147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39148 $as_echo "$OBJDUMP" >&6; }
39149 else
39150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39151 $as_echo "no" >&6; }
39152 fi
39153 
39154 
39155         if test "x$OBJDUMP" = x; then
39156           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39157         fi
39158       else
39159         # Otherwise we believe it is a complete path. Use it as it is.
39160         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39161 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39162         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39163 $as_echo_n "checking for OBJDUMP... " >&6; }
39164         if test ! -x "$tool_specified"; then
39165           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39166 $as_echo "not found" >&6; }
39167           as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39168         fi
39169         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39170 $as_echo "$tool_specified" >&6; }
39171       fi
39172     fi
39173   fi
39174 
39175 
39176   if test "x$OBJDUMP" != x; then
39177     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39178     # bails if argument is missing.
39179 
39180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39181 
39182   # First separate the path from the arguments. This will split at the first
39183   # space.
39184   complete="$OBJDUMP"
39185   path="${complete%% *}"
39186   tmp="$complete EOL"
39187   arguments="${tmp#* }"
39188 
39189   # Input might be given as Windows format, start by converting to
39190   # unix format.
39191   new_path=`$CYGPATH -u "$path"`
39192 
39193   # Now try to locate executable using which
39194   new_path=`$WHICH "$new_path" 2> /dev/null`
39195   # bat and cmd files are not always considered executable in cygwin causing which
39196   # to not find them
39197   if test "x$new_path" = x \
39198       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39199       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39200     new_path=`$CYGPATH -u "$path"`
39201   fi
39202   if test "x$new_path" = x; then
39203     # Oops. Which didn't find the executable.
39204     # The splitting of arguments from the executable at a space might have been incorrect,
39205     # since paths with space are more likely in Windows. Give it another try with the whole
39206     # argument.
39207     path="$complete"
39208     arguments="EOL"
39209     new_path=`$CYGPATH -u "$path"`
39210     new_path=`$WHICH "$new_path" 2> /dev/null`
39211     # bat and cmd files are not always considered executable in cygwin causing which
39212     # to not find them
39213     if test "x$new_path" = x \
39214         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39215         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39216       new_path=`$CYGPATH -u "$path"`
39217     fi
39218     if test "x$new_path" = x; then
39219       # It's still not found. Now this is an unrecoverable error.
39220       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39221 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39222       has_space=`$ECHO "$complete" | $GREP " "`
39223       if test "x$has_space" != x; then
39224         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39225 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39226       fi
39227       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39228     fi
39229   fi
39230 
39231   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39232   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39233   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39234   # "foo.exe" is OK but "foo" is an error.
39235   #
39236   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39237   # It is also a way to make sure we got the proper file name for the real test later on.
39238   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39239   if test "x$test_shortpath" = x; then
39240     # Short path failed, file does not exist as specified.
39241     # Try adding .exe or .cmd
39242     if test -f "${new_path}.exe"; then
39243       input_to_shortpath="${new_path}.exe"
39244     elif test -f "${new_path}.cmd"; then
39245       input_to_shortpath="${new_path}.cmd"
39246     else
39247       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39248 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39249       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39250 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39251       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39252     fi
39253   else
39254     input_to_shortpath="$new_path"
39255   fi
39256 
39257   # Call helper function which possibly converts this using DOS-style short mode.
39258   # If so, the updated path is stored in $new_path.
39259   new_path="$input_to_shortpath"
39260 
39261   input_path="$input_to_shortpath"
39262   # Check if we need to convert this using DOS-style short mode. If the path
39263   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39264   # take no chances and rewrite it.
39265   # Note: m4 eats our [], so we need to use [ and ] instead.
39266   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39267   if test "x$has_forbidden_chars" != x; then
39268     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39269     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39270     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39271     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39272       # Going to short mode and back again did indeed matter. Since short mode is
39273       # case insensitive, let's make it lowercase to improve readability.
39274       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39275       # Now convert it back to Unix-stile (cygpath)
39276       input_path=`$CYGPATH -u "$shortmode_path"`
39277       new_path="$input_path"
39278     fi
39279   fi
39280 
39281   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39282   if test "x$test_cygdrive_prefix" = x; then
39283     # As a simple fix, exclude /usr/bin since it's not a real path.
39284     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39285       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39286       # a path prefixed by /cygdrive for fixpath to work.
39287       new_path="$CYGWIN_ROOT_PATH$input_path"
39288     fi
39289   fi
39290 
39291   # remove trailing .exe if any
39292   new_path="${new_path/%.exe/}"
39293 
39294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39295 
39296   # First separate the path from the arguments. This will split at the first
39297   # space.
39298   complete="$OBJDUMP"
39299   path="${complete%% *}"
39300   tmp="$complete EOL"
39301   arguments="${tmp#* }"
39302 
39303   # Input might be given as Windows format, start by converting to
39304   # unix format.
39305   new_path="$path"
39306 
39307   windows_path="$new_path"
39308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39309     unix_path=`$CYGPATH -u "$windows_path"`
39310     new_path="$unix_path"
39311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39313     new_path="$unix_path"
39314   fi
39315 
39316 
39317   # Now try to locate executable using which
39318   new_path=`$WHICH "$new_path" 2> /dev/null`
39319 
39320   if test "x$new_path" = x; then
39321     # Oops. Which didn't find the executable.
39322     # The splitting of arguments from the executable at a space might have been incorrect,
39323     # since paths with space are more likely in Windows. Give it another try with the whole
39324     # argument.
39325     path="$complete"
39326     arguments="EOL"
39327     new_path="$path"
39328 
39329   windows_path="$new_path"
39330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39331     unix_path=`$CYGPATH -u "$windows_path"`
39332     new_path="$unix_path"
39333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39334     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39335     new_path="$unix_path"
39336   fi
39337 
39338 
39339     new_path=`$WHICH "$new_path" 2> /dev/null`
39340     # bat and cmd files are not always considered executable in MSYS causing which
39341     # to not find them
39342     if test "x$new_path" = x \
39343         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39344         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39345       new_path="$path"
39346 
39347   windows_path="$new_path"
39348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39349     unix_path=`$CYGPATH -u "$windows_path"`
39350     new_path="$unix_path"
39351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39352     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39353     new_path="$unix_path"
39354   fi
39355 
39356     fi
39357 
39358     if test "x$new_path" = x; then
39359       # It's still not found. Now this is an unrecoverable error.
39360       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39361 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39362       has_space=`$ECHO "$complete" | $GREP " "`
39363       if test "x$has_space" != x; then
39364         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39365 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39366       fi
39367       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39368     fi
39369   fi
39370 
39371   # Now new_path has a complete unix path to the binary
39372   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39373     # Keep paths in /bin as-is, but remove trailing .exe if any
39374     new_path="${new_path/%.exe/}"
39375     # Do not save /bin paths to all_fixpath_prefixes!
39376   else
39377     # Not in mixed or Windows style, start by that.
39378     new_path=`cmd //c echo $new_path`
39379 
39380   input_path="$new_path"
39381   # Check if we need to convert this using DOS-style short mode. If the path
39382   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39383   # take no chances and rewrite it.
39384   # Note: m4 eats our [], so we need to use [ and ] instead.
39385   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39386   if test "x$has_forbidden_chars" != x; then
39387     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39388     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39389   fi
39390 
39391     # Output is in $new_path
39392 
39393   windows_path="$new_path"
39394   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39395     unix_path=`$CYGPATH -u "$windows_path"`
39396     new_path="$unix_path"
39397   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39398     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39399     new_path="$unix_path"
39400   fi
39401 
39402     # remove trailing .exe if any
39403     new_path="${new_path/%.exe/}"
39404 
39405     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39406     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39407   fi
39408 
39409   else
39410     # We're on a posix platform. Hooray! :)
39411     # First separate the path from the arguments. This will split at the first
39412     # space.
39413     complete="$OBJDUMP"
39414     path="${complete%% *}"
39415     tmp="$complete EOL"
39416     arguments="${tmp#* }"
39417 
39418     # Cannot rely on the command "which" here since it doesn't always work.
39419     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39420     if test -z "$is_absolute_path"; then
39421       # Path to executable is not absolute. Find it.
39422       IFS_save="$IFS"
39423       IFS=:
39424       for p in $PATH; do
39425         if test -f "$p/$path" && test -x "$p/$path"; then
39426           new_path="$p/$path"
39427           break
39428         fi
39429       done
39430       IFS="$IFS_save"
39431     else
39432       # This is an absolute path, we can use it without further modifications.
39433       new_path="$path"
39434     fi
39435 
39436     if test "x$new_path" = x; then
39437       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39438 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39439       has_space=`$ECHO "$complete" | $GREP " "`
39440       if test "x$has_space" != x; then
39441         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39442 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39443       fi
39444       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39445     fi
39446   fi
39447 
39448   # Now join together the path and the arguments once again
39449   if test "x$arguments" != xEOL; then
39450     new_complete="$new_path ${arguments% *}"
39451   else
39452     new_complete="$new_path"
39453   fi
39454 
39455   if test "x$complete" != "x$new_complete"; then
39456     OBJDUMP="$new_complete"
39457     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39458 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39459   fi
39460 
39461   fi
39462 
39463 
39464   # Restore old path.
39465   PATH="$OLD_PATH"
39466 
39467   # Restore the flags to the user specified values.
39468   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39469   CFLAGS="$ORG_CFLAGS"
39470   CXXFLAGS="$ORG_CXXFLAGS"
39471   OBJCFLAGS="$ORG_OBJCFLAGS"
39472 
39473 
39474 # Finally do some processing after the detection phase
39475 
39476   if test "x$COMPILE_TYPE" = "xcross"; then
39477     # Now we need to find a C/C++ compiler that can build executables for the
39478     # build platform. We can't use the AC_PROG_CC macro, since it can only be
39479     # used once. Also, we need to do this without adding a tools dir to the
39480     # path, otherwise we might pick up cross-compilers which don't use standard
39481     # naming.
39482 
39483     # FIXME: we should list the discovered compilers as an exclude pattern!
39484     # If we do that, we can do this detection before POST_DETECTION, and still
39485     # find the build compilers in the tools dir, if needed.
39486 
39487 
39488   # Publish this variable in the help.
39489 
39490 
39491   if test "x$BUILD_CC" = x; then
39492     # The variable is not set by user, try to locate tool using the code snippet
39493     for ac_prog in cl cc gcc
39494 do
39495   # Extract the first word of "$ac_prog", so it can be a program name with args.
39496 set dummy $ac_prog; ac_word=$2
39497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39498 $as_echo_n "checking for $ac_word... " >&6; }
39499 if ${ac_cv_path_BUILD_CC+:} false; then :
39500   $as_echo_n "(cached) " >&6
39501 else
39502   case $BUILD_CC in
39503   [\\/]* | ?:[\\/]*)
39504   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39505   ;;
39506   *)
39507   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39508 for as_dir in $PATH
39509 do
39510   IFS=$as_save_IFS
39511   test -z "$as_dir" && as_dir=.
39512     for ac_exec_ext in '' $ac_executable_extensions; do
39513   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39514     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39515     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39516     break 2
39517   fi
39518 done
39519   done
39520 IFS=$as_save_IFS
39521 
39522   ;;
39523 esac
39524 fi
39525 BUILD_CC=$ac_cv_path_BUILD_CC
39526 if test -n "$BUILD_CC"; then
39527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39528 $as_echo "$BUILD_CC" >&6; }
39529 else
39530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39531 $as_echo "no" >&6; }
39532 fi
39533 
39534 
39535   test -n "$BUILD_CC" && break
39536 done
39537 
39538   else
39539     # The variable is set, but is it from the command line or the environment?
39540 
39541     # Try to remove the string !BUILD_CC! from our list.
39542     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39543     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39544       # If it failed, the variable was not from the command line. Ignore it,
39545       # but warn the user (except for BASH, which is always set by the calling BASH).
39546       if test "xBUILD_CC" != xBASH; then
39547         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39548 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39549       fi
39550       # Try to locate tool using the code snippet
39551       for ac_prog in cl cc gcc
39552 do
39553   # Extract the first word of "$ac_prog", so it can be a program name with args.
39554 set dummy $ac_prog; ac_word=$2
39555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39556 $as_echo_n "checking for $ac_word... " >&6; }
39557 if ${ac_cv_path_BUILD_CC+:} false; then :
39558   $as_echo_n "(cached) " >&6
39559 else
39560   case $BUILD_CC in
39561   [\\/]* | ?:[\\/]*)
39562   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39563   ;;
39564   *)
39565   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39566 for as_dir in $PATH
39567 do
39568   IFS=$as_save_IFS
39569   test -z "$as_dir" && as_dir=.
39570     for ac_exec_ext in '' $ac_executable_extensions; do
39571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39572     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39573     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39574     break 2
39575   fi
39576 done
39577   done
39578 IFS=$as_save_IFS
39579 
39580   ;;
39581 esac
39582 fi
39583 BUILD_CC=$ac_cv_path_BUILD_CC
39584 if test -n "$BUILD_CC"; then
39585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39586 $as_echo "$BUILD_CC" >&6; }
39587 else
39588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39589 $as_echo "no" >&6; }
39590 fi
39591 
39592 
39593   test -n "$BUILD_CC" && break
39594 done
39595 
39596     else
39597       # If it succeeded, then it was overridden by the user. We will use it
39598       # for the tool.
39599 
39600       # First remove it from the list of overridden variables, so we can test
39601       # for unknown variables in the end.
39602       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39603 
39604       # Check if the provided tool contains a complete path.
39605       tool_specified="$BUILD_CC"
39606       tool_basename="${tool_specified##*/}"
39607       if test "x$tool_basename" = "x$tool_specified"; then
39608         # A command without a complete path is provided, search $PATH.
39609         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39610 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39611         # Extract the first word of "$tool_basename", so it can be a program name with args.
39612 set dummy $tool_basename; ac_word=$2
39613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39614 $as_echo_n "checking for $ac_word... " >&6; }
39615 if ${ac_cv_path_BUILD_CC+:} false; then :
39616   $as_echo_n "(cached) " >&6
39617 else
39618   case $BUILD_CC in
39619   [\\/]* | ?:[\\/]*)
39620   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39621   ;;
39622   *)
39623   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39624 for as_dir in $PATH
39625 do
39626   IFS=$as_save_IFS
39627   test -z "$as_dir" && as_dir=.
39628     for ac_exec_ext in '' $ac_executable_extensions; do
39629   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39630     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39632     break 2
39633   fi
39634 done
39635   done
39636 IFS=$as_save_IFS
39637 
39638   ;;
39639 esac
39640 fi
39641 BUILD_CC=$ac_cv_path_BUILD_CC
39642 if test -n "$BUILD_CC"; then
39643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39644 $as_echo "$BUILD_CC" >&6; }
39645 else
39646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39647 $as_echo "no" >&6; }
39648 fi
39649 
39650 
39651         if test "x$BUILD_CC" = x; then
39652           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39653         fi
39654       else
39655         # Otherwise we believe it is a complete path. Use it as it is.
39656         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39657 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39658         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39659 $as_echo_n "checking for BUILD_CC... " >&6; }
39660         if test ! -x "$tool_specified"; then
39661           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39662 $as_echo "not found" >&6; }
39663           as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39664         fi
39665         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39666 $as_echo "$tool_specified" >&6; }
39667       fi
39668     fi
39669   fi
39670 
39671 
39672 
39673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39674 
39675   # First separate the path from the arguments. This will split at the first
39676   # space.
39677   complete="$BUILD_CC"
39678   path="${complete%% *}"
39679   tmp="$complete EOL"
39680   arguments="${tmp#* }"
39681 
39682   # Input might be given as Windows format, start by converting to
39683   # unix format.
39684   new_path=`$CYGPATH -u "$path"`
39685 
39686   # Now try to locate executable using which
39687   new_path=`$WHICH "$new_path" 2> /dev/null`
39688   # bat and cmd files are not always considered executable in cygwin causing which
39689   # to not find them
39690   if test "x$new_path" = x \
39691       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39692       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39693     new_path=`$CYGPATH -u "$path"`
39694   fi
39695   if test "x$new_path" = x; then
39696     # Oops. Which didn't find the executable.
39697     # The splitting of arguments from the executable at a space might have been incorrect,
39698     # since paths with space are more likely in Windows. Give it another try with the whole
39699     # argument.
39700     path="$complete"
39701     arguments="EOL"
39702     new_path=`$CYGPATH -u "$path"`
39703     new_path=`$WHICH "$new_path" 2> /dev/null`
39704     # bat and cmd files are not always considered executable in cygwin causing which
39705     # to not find them
39706     if test "x$new_path" = x \
39707         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39708         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39709       new_path=`$CYGPATH -u "$path"`
39710     fi
39711     if test "x$new_path" = x; then
39712       # It's still not found. Now this is an unrecoverable error.
39713       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39714 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39715       has_space=`$ECHO "$complete" | $GREP " "`
39716       if test "x$has_space" != x; then
39717         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39718 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39719       fi
39720       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39721     fi
39722   fi
39723 
39724   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39725   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39726   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39727   # "foo.exe" is OK but "foo" is an error.
39728   #
39729   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39730   # It is also a way to make sure we got the proper file name for the real test later on.
39731   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39732   if test "x$test_shortpath" = x; then
39733     # Short path failed, file does not exist as specified.
39734     # Try adding .exe or .cmd
39735     if test -f "${new_path}.exe"; then
39736       input_to_shortpath="${new_path}.exe"
39737     elif test -f "${new_path}.cmd"; then
39738       input_to_shortpath="${new_path}.cmd"
39739     else
39740       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39741 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39742       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39743 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39744       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39745     fi
39746   else
39747     input_to_shortpath="$new_path"
39748   fi
39749 
39750   # Call helper function which possibly converts this using DOS-style short mode.
39751   # If so, the updated path is stored in $new_path.
39752   new_path="$input_to_shortpath"
39753 
39754   input_path="$input_to_shortpath"
39755   # Check if we need to convert this using DOS-style short mode. If the path
39756   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39757   # take no chances and rewrite it.
39758   # Note: m4 eats our [], so we need to use [ and ] instead.
39759   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39760   if test "x$has_forbidden_chars" != x; then
39761     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39762     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39763     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39764     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39765       # Going to short mode and back again did indeed matter. Since short mode is
39766       # case insensitive, let's make it lowercase to improve readability.
39767       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39768       # Now convert it back to Unix-stile (cygpath)
39769       input_path=`$CYGPATH -u "$shortmode_path"`
39770       new_path="$input_path"
39771     fi
39772   fi
39773 
39774   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39775   if test "x$test_cygdrive_prefix" = x; then
39776     # As a simple fix, exclude /usr/bin since it's not a real path.
39777     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39778       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39779       # a path prefixed by /cygdrive for fixpath to work.
39780       new_path="$CYGWIN_ROOT_PATH$input_path"
39781     fi
39782   fi
39783 
39784   # remove trailing .exe if any
39785   new_path="${new_path/%.exe/}"
39786 
39787   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39788 
39789   # First separate the path from the arguments. This will split at the first
39790   # space.
39791   complete="$BUILD_CC"
39792   path="${complete%% *}"
39793   tmp="$complete EOL"
39794   arguments="${tmp#* }"
39795 
39796   # Input might be given as Windows format, start by converting to
39797   # unix format.
39798   new_path="$path"
39799 
39800   windows_path="$new_path"
39801   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39802     unix_path=`$CYGPATH -u "$windows_path"`
39803     new_path="$unix_path"
39804   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39805     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39806     new_path="$unix_path"
39807   fi
39808 
39809 
39810   # Now try to locate executable using which
39811   new_path=`$WHICH "$new_path" 2> /dev/null`
39812 
39813   if test "x$new_path" = x; then
39814     # Oops. Which didn't find the executable.
39815     # The splitting of arguments from the executable at a space might have been incorrect,
39816     # since paths with space are more likely in Windows. Give it another try with the whole
39817     # argument.
39818     path="$complete"
39819     arguments="EOL"
39820     new_path="$path"
39821 
39822   windows_path="$new_path"
39823   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39824     unix_path=`$CYGPATH -u "$windows_path"`
39825     new_path="$unix_path"
39826   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39827     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39828     new_path="$unix_path"
39829   fi
39830 
39831 
39832     new_path=`$WHICH "$new_path" 2> /dev/null`
39833     # bat and cmd files are not always considered executable in MSYS causing which
39834     # to not find them
39835     if test "x$new_path" = x \
39836         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39837         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39838       new_path="$path"
39839 
39840   windows_path="$new_path"
39841   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39842     unix_path=`$CYGPATH -u "$windows_path"`
39843     new_path="$unix_path"
39844   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39845     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39846     new_path="$unix_path"
39847   fi
39848 
39849     fi
39850 
39851     if test "x$new_path" = x; then
39852       # It's still not found. Now this is an unrecoverable error.
39853       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39854 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39855       has_space=`$ECHO "$complete" | $GREP " "`
39856       if test "x$has_space" != x; then
39857         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39858 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39859       fi
39860       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39861     fi
39862   fi
39863 
39864   # Now new_path has a complete unix path to the binary
39865   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39866     # Keep paths in /bin as-is, but remove trailing .exe if any
39867     new_path="${new_path/%.exe/}"
39868     # Do not save /bin paths to all_fixpath_prefixes!
39869   else
39870     # Not in mixed or Windows style, start by that.
39871     new_path=`cmd //c echo $new_path`
39872 
39873   input_path="$new_path"
39874   # Check if we need to convert this using DOS-style short mode. If the path
39875   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39876   # take no chances and rewrite it.
39877   # Note: m4 eats our [], so we need to use [ and ] instead.
39878   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39879   if test "x$has_forbidden_chars" != x; then
39880     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39881     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39882   fi
39883 
39884     # Output is in $new_path
39885 
39886   windows_path="$new_path"
39887   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39888     unix_path=`$CYGPATH -u "$windows_path"`
39889     new_path="$unix_path"
39890   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39891     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39892     new_path="$unix_path"
39893   fi
39894 
39895     # remove trailing .exe if any
39896     new_path="${new_path/%.exe/}"
39897 
39898     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39899     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39900   fi
39901 
39902   else
39903     # We're on a posix platform. Hooray! :)
39904     # First separate the path from the arguments. This will split at the first
39905     # space.
39906     complete="$BUILD_CC"
39907     path="${complete%% *}"
39908     tmp="$complete EOL"
39909     arguments="${tmp#* }"
39910 
39911     # Cannot rely on the command "which" here since it doesn't always work.
39912     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39913     if test -z "$is_absolute_path"; then
39914       # Path to executable is not absolute. Find it.
39915       IFS_save="$IFS"
39916       IFS=:
39917       for p in $PATH; do
39918         if test -f "$p/$path" && test -x "$p/$path"; then
39919           new_path="$p/$path"
39920           break
39921         fi
39922       done
39923       IFS="$IFS_save"
39924     else
39925       # This is an absolute path, we can use it without further modifications.
39926       new_path="$path"
39927     fi
39928 
39929     if test "x$new_path" = x; then
39930       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39931 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39932       has_space=`$ECHO "$complete" | $GREP " "`
39933       if test "x$has_space" != x; then
39934         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39935 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39936       fi
39937       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39938     fi
39939   fi
39940 
39941   # Now join together the path and the arguments once again
39942   if test "x$arguments" != xEOL; then
39943     new_complete="$new_path ${arguments% *}"
39944   else
39945     new_complete="$new_path"
39946   fi
39947 
39948   if test "x$complete" != "x$new_complete"; then
39949     BUILD_CC="$new_complete"
39950     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39951 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39952   fi
39953 
39954 
39955 
39956   # Publish this variable in the help.
39957 
39958 
39959   if test "x$BUILD_CXX" = x; then
39960     # The variable is not set by user, try to locate tool using the code snippet
39961     for ac_prog in cl CC g++
39962 do
39963   # Extract the first word of "$ac_prog", so it can be a program name with args.
39964 set dummy $ac_prog; ac_word=$2
39965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39966 $as_echo_n "checking for $ac_word... " >&6; }
39967 if ${ac_cv_path_BUILD_CXX+:} false; then :
39968   $as_echo_n "(cached) " >&6
39969 else
39970   case $BUILD_CXX in
39971   [\\/]* | ?:[\\/]*)
39972   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39973   ;;
39974   *)
39975   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39976 for as_dir in $PATH
39977 do
39978   IFS=$as_save_IFS
39979   test -z "$as_dir" && as_dir=.
39980     for ac_exec_ext in '' $ac_executable_extensions; do
39981   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39982     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39983     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39984     break 2
39985   fi
39986 done
39987   done
39988 IFS=$as_save_IFS
39989 
39990   ;;
39991 esac
39992 fi
39993 BUILD_CXX=$ac_cv_path_BUILD_CXX
39994 if test -n "$BUILD_CXX"; then
39995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39996 $as_echo "$BUILD_CXX" >&6; }
39997 else
39998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39999 $as_echo "no" >&6; }
40000 fi
40001 
40002 
40003   test -n "$BUILD_CXX" && break
40004 done
40005 
40006   else
40007     # The variable is set, but is it from the command line or the environment?
40008 
40009     # Try to remove the string !BUILD_CXX! from our list.
40010     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
40011     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40012       # If it failed, the variable was not from the command line. Ignore it,
40013       # but warn the user (except for BASH, which is always set by the calling BASH).
40014       if test "xBUILD_CXX" != xBASH; then
40015         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
40016 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
40017       fi
40018       # Try to locate tool using the code snippet
40019       for ac_prog in cl CC g++
40020 do
40021   # Extract the first word of "$ac_prog", so it can be a program name with args.
40022 set dummy $ac_prog; ac_word=$2
40023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40024 $as_echo_n "checking for $ac_word... " >&6; }
40025 if ${ac_cv_path_BUILD_CXX+:} false; then :
40026   $as_echo_n "(cached) " >&6
40027 else
40028   case $BUILD_CXX in
40029   [\\/]* | ?:[\\/]*)
40030   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40031   ;;
40032   *)
40033   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40034 for as_dir in $PATH
40035 do
40036   IFS=$as_save_IFS
40037   test -z "$as_dir" && as_dir=.
40038     for ac_exec_ext in '' $ac_executable_extensions; do
40039   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40040     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40042     break 2
40043   fi
40044 done
40045   done
40046 IFS=$as_save_IFS
40047 
40048   ;;
40049 esac
40050 fi
40051 BUILD_CXX=$ac_cv_path_BUILD_CXX
40052 if test -n "$BUILD_CXX"; then
40053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40054 $as_echo "$BUILD_CXX" >&6; }
40055 else
40056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40057 $as_echo "no" >&6; }
40058 fi
40059 
40060 
40061   test -n "$BUILD_CXX" && break
40062 done
40063 
40064     else
40065       # If it succeeded, then it was overridden by the user. We will use it
40066       # for the tool.
40067 
40068       # First remove it from the list of overridden variables, so we can test
40069       # for unknown variables in the end.
40070       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40071 
40072       # Check if the provided tool contains a complete path.
40073       tool_specified="$BUILD_CXX"
40074       tool_basename="${tool_specified##*/}"
40075       if test "x$tool_basename" = "x$tool_specified"; then
40076         # A command without a complete path is provided, search $PATH.
40077         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40078 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40079         # Extract the first word of "$tool_basename", so it can be a program name with args.
40080 set dummy $tool_basename; ac_word=$2
40081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40082 $as_echo_n "checking for $ac_word... " >&6; }
40083 if ${ac_cv_path_BUILD_CXX+:} false; then :
40084   $as_echo_n "(cached) " >&6
40085 else
40086   case $BUILD_CXX in
40087   [\\/]* | ?:[\\/]*)
40088   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40089   ;;
40090   *)
40091   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40092 for as_dir in $PATH
40093 do
40094   IFS=$as_save_IFS
40095   test -z "$as_dir" && as_dir=.
40096     for ac_exec_ext in '' $ac_executable_extensions; do
40097   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40098     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40100     break 2
40101   fi
40102 done
40103   done
40104 IFS=$as_save_IFS
40105 
40106   ;;
40107 esac
40108 fi
40109 BUILD_CXX=$ac_cv_path_BUILD_CXX
40110 if test -n "$BUILD_CXX"; then
40111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40112 $as_echo "$BUILD_CXX" >&6; }
40113 else
40114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40115 $as_echo "no" >&6; }
40116 fi
40117 
40118 
40119         if test "x$BUILD_CXX" = x; then
40120           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40121         fi
40122       else
40123         # Otherwise we believe it is a complete path. Use it as it is.
40124         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40125 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40126         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40127 $as_echo_n "checking for BUILD_CXX... " >&6; }
40128         if test ! -x "$tool_specified"; then
40129           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40130 $as_echo "not found" >&6; }
40131           as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40132         fi
40133         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40134 $as_echo "$tool_specified" >&6; }
40135       fi
40136     fi
40137   fi
40138 
40139 
40140 
40141   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40142 
40143   # First separate the path from the arguments. This will split at the first
40144   # space.
40145   complete="$BUILD_CXX"
40146   path="${complete%% *}"
40147   tmp="$complete EOL"
40148   arguments="${tmp#* }"
40149 
40150   # Input might be given as Windows format, start by converting to
40151   # unix format.
40152   new_path=`$CYGPATH -u "$path"`
40153 
40154   # Now try to locate executable using which
40155   new_path=`$WHICH "$new_path" 2> /dev/null`
40156   # bat and cmd files are not always considered executable in cygwin causing which
40157   # to not find them
40158   if test "x$new_path" = x \
40159       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40160       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40161     new_path=`$CYGPATH -u "$path"`
40162   fi
40163   if test "x$new_path" = x; then
40164     # Oops. Which didn't find the executable.
40165     # The splitting of arguments from the executable at a space might have been incorrect,
40166     # since paths with space are more likely in Windows. Give it another try with the whole
40167     # argument.
40168     path="$complete"
40169     arguments="EOL"
40170     new_path=`$CYGPATH -u "$path"`
40171     new_path=`$WHICH "$new_path" 2> /dev/null`
40172     # bat and cmd files are not always considered executable in cygwin causing which
40173     # to not find them
40174     if test "x$new_path" = x \
40175         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40176         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40177       new_path=`$CYGPATH -u "$path"`
40178     fi
40179     if test "x$new_path" = x; then
40180       # It's still not found. Now this is an unrecoverable error.
40181       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40182 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40183       has_space=`$ECHO "$complete" | $GREP " "`
40184       if test "x$has_space" != x; then
40185         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40186 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40187       fi
40188       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40189     fi
40190   fi
40191 
40192   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40193   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40194   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40195   # "foo.exe" is OK but "foo" is an error.
40196   #
40197   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40198   # It is also a way to make sure we got the proper file name for the real test later on.
40199   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40200   if test "x$test_shortpath" = x; then
40201     # Short path failed, file does not exist as specified.
40202     # Try adding .exe or .cmd
40203     if test -f "${new_path}.exe"; then
40204       input_to_shortpath="${new_path}.exe"
40205     elif test -f "${new_path}.cmd"; then
40206       input_to_shortpath="${new_path}.cmd"
40207     else
40208       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40209 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40210       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40211 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40212       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40213     fi
40214   else
40215     input_to_shortpath="$new_path"
40216   fi
40217 
40218   # Call helper function which possibly converts this using DOS-style short mode.
40219   # If so, the updated path is stored in $new_path.
40220   new_path="$input_to_shortpath"
40221 
40222   input_path="$input_to_shortpath"
40223   # Check if we need to convert this using DOS-style short mode. If the path
40224   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40225   # take no chances and rewrite it.
40226   # Note: m4 eats our [], so we need to use [ and ] instead.
40227   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40228   if test "x$has_forbidden_chars" != x; then
40229     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40230     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40231     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40232     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40233       # Going to short mode and back again did indeed matter. Since short mode is
40234       # case insensitive, let's make it lowercase to improve readability.
40235       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40236       # Now convert it back to Unix-stile (cygpath)
40237       input_path=`$CYGPATH -u "$shortmode_path"`
40238       new_path="$input_path"
40239     fi
40240   fi
40241 
40242   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40243   if test "x$test_cygdrive_prefix" = x; then
40244     # As a simple fix, exclude /usr/bin since it's not a real path.
40245     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40246       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40247       # a path prefixed by /cygdrive for fixpath to work.
40248       new_path="$CYGWIN_ROOT_PATH$input_path"
40249     fi
40250   fi
40251 
40252   # remove trailing .exe if any
40253   new_path="${new_path/%.exe/}"
40254 
40255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40256 
40257   # First separate the path from the arguments. This will split at the first
40258   # space.
40259   complete="$BUILD_CXX"
40260   path="${complete%% *}"
40261   tmp="$complete EOL"
40262   arguments="${tmp#* }"
40263 
40264   # Input might be given as Windows format, start by converting to
40265   # unix format.
40266   new_path="$path"
40267 
40268   windows_path="$new_path"
40269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40270     unix_path=`$CYGPATH -u "$windows_path"`
40271     new_path="$unix_path"
40272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40273     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40274     new_path="$unix_path"
40275   fi
40276 
40277 
40278   # Now try to locate executable using which
40279   new_path=`$WHICH "$new_path" 2> /dev/null`
40280 
40281   if test "x$new_path" = x; then
40282     # Oops. Which didn't find the executable.
40283     # The splitting of arguments from the executable at a space might have been incorrect,
40284     # since paths with space are more likely in Windows. Give it another try with the whole
40285     # argument.
40286     path="$complete"
40287     arguments="EOL"
40288     new_path="$path"
40289 
40290   windows_path="$new_path"
40291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40292     unix_path=`$CYGPATH -u "$windows_path"`
40293     new_path="$unix_path"
40294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40295     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40296     new_path="$unix_path"
40297   fi
40298 
40299 
40300     new_path=`$WHICH "$new_path" 2> /dev/null`
40301     # bat and cmd files are not always considered executable in MSYS causing which
40302     # to not find them
40303     if test "x$new_path" = x \
40304         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40305         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40306       new_path="$path"
40307 
40308   windows_path="$new_path"
40309   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40310     unix_path=`$CYGPATH -u "$windows_path"`
40311     new_path="$unix_path"
40312   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40313     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40314     new_path="$unix_path"
40315   fi
40316 
40317     fi
40318 
40319     if test "x$new_path" = x; then
40320       # It's still not found. Now this is an unrecoverable error.
40321       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40322 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40323       has_space=`$ECHO "$complete" | $GREP " "`
40324       if test "x$has_space" != x; then
40325         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40326 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40327       fi
40328       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40329     fi
40330   fi
40331 
40332   # Now new_path has a complete unix path to the binary
40333   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40334     # Keep paths in /bin as-is, but remove trailing .exe if any
40335     new_path="${new_path/%.exe/}"
40336     # Do not save /bin paths to all_fixpath_prefixes!
40337   else
40338     # Not in mixed or Windows style, start by that.
40339     new_path=`cmd //c echo $new_path`
40340 
40341   input_path="$new_path"
40342   # Check if we need to convert this using DOS-style short mode. If the path
40343   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40344   # take no chances and rewrite it.
40345   # Note: m4 eats our [], so we need to use [ and ] instead.
40346   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40347   if test "x$has_forbidden_chars" != x; then
40348     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40349     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40350   fi
40351 
40352     # Output is in $new_path
40353 
40354   windows_path="$new_path"
40355   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40356     unix_path=`$CYGPATH -u "$windows_path"`
40357     new_path="$unix_path"
40358   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40359     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40360     new_path="$unix_path"
40361   fi
40362 
40363     # remove trailing .exe if any
40364     new_path="${new_path/%.exe/}"
40365 
40366     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40367     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40368   fi
40369 
40370   else
40371     # We're on a posix platform. Hooray! :)
40372     # First separate the path from the arguments. This will split at the first
40373     # space.
40374     complete="$BUILD_CXX"
40375     path="${complete%% *}"
40376     tmp="$complete EOL"
40377     arguments="${tmp#* }"
40378 
40379     # Cannot rely on the command "which" here since it doesn't always work.
40380     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40381     if test -z "$is_absolute_path"; then
40382       # Path to executable is not absolute. Find it.
40383       IFS_save="$IFS"
40384       IFS=:
40385       for p in $PATH; do
40386         if test -f "$p/$path" && test -x "$p/$path"; then
40387           new_path="$p/$path"
40388           break
40389         fi
40390       done
40391       IFS="$IFS_save"
40392     else
40393       # This is an absolute path, we can use it without further modifications.
40394       new_path="$path"
40395     fi
40396 
40397     if test "x$new_path" = x; then
40398       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40399 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40400       has_space=`$ECHO "$complete" | $GREP " "`
40401       if test "x$has_space" != x; then
40402         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40403 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40404       fi
40405       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40406     fi
40407   fi
40408 
40409   # Now join together the path and the arguments once again
40410   if test "x$arguments" != xEOL; then
40411     new_complete="$new_path ${arguments% *}"
40412   else
40413     new_complete="$new_path"
40414   fi
40415 
40416   if test "x$complete" != "x$new_complete"; then
40417     BUILD_CXX="$new_complete"
40418     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40419 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40420   fi
40421 
40422 
40423 
40424   # Publish this variable in the help.
40425 
40426 
40427   if test "x$BUILD_LD" = x; then
40428     # The variable is not set by user, try to locate tool using the code snippet
40429     for ac_prog in ld
40430 do
40431   # Extract the first word of "$ac_prog", so it can be a program name with args.
40432 set dummy $ac_prog; ac_word=$2
40433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40434 $as_echo_n "checking for $ac_word... " >&6; }
40435 if ${ac_cv_path_BUILD_LD+:} false; then :
40436   $as_echo_n "(cached) " >&6
40437 else
40438   case $BUILD_LD in
40439   [\\/]* | ?:[\\/]*)
40440   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40441   ;;
40442   *)
40443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40444 for as_dir in $PATH
40445 do
40446   IFS=$as_save_IFS
40447   test -z "$as_dir" && as_dir=.
40448     for ac_exec_ext in '' $ac_executable_extensions; do
40449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40450     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40452     break 2
40453   fi
40454 done
40455   done
40456 IFS=$as_save_IFS
40457 
40458   ;;
40459 esac
40460 fi
40461 BUILD_LD=$ac_cv_path_BUILD_LD
40462 if test -n "$BUILD_LD"; then
40463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40464 $as_echo "$BUILD_LD" >&6; }
40465 else
40466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40467 $as_echo "no" >&6; }
40468 fi
40469 
40470 
40471   test -n "$BUILD_LD" && break
40472 done
40473 
40474   else
40475     # The variable is set, but is it from the command line or the environment?
40476 
40477     # Try to remove the string !BUILD_LD! from our list.
40478     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40479     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40480       # If it failed, the variable was not from the command line. Ignore it,
40481       # but warn the user (except for BASH, which is always set by the calling BASH).
40482       if test "xBUILD_LD" != xBASH; then
40483         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40484 $as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40485       fi
40486       # Try to locate tool using the code snippet
40487       for ac_prog in ld
40488 do
40489   # Extract the first word of "$ac_prog", so it can be a program name with args.
40490 set dummy $ac_prog; ac_word=$2
40491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40492 $as_echo_n "checking for $ac_word... " >&6; }
40493 if ${ac_cv_path_BUILD_LD+:} false; then :
40494   $as_echo_n "(cached) " >&6
40495 else
40496   case $BUILD_LD in
40497   [\\/]* | ?:[\\/]*)
40498   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40499   ;;
40500   *)
40501   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40502 for as_dir in $PATH
40503 do
40504   IFS=$as_save_IFS
40505   test -z "$as_dir" && as_dir=.
40506     for ac_exec_ext in '' $ac_executable_extensions; do
40507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40508     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40510     break 2
40511   fi
40512 done
40513   done
40514 IFS=$as_save_IFS
40515 
40516   ;;
40517 esac
40518 fi
40519 BUILD_LD=$ac_cv_path_BUILD_LD
40520 if test -n "$BUILD_LD"; then
40521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40522 $as_echo "$BUILD_LD" >&6; }
40523 else
40524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40525 $as_echo "no" >&6; }
40526 fi
40527 
40528 
40529   test -n "$BUILD_LD" && break
40530 done
40531 
40532     else
40533       # If it succeeded, then it was overridden by the user. We will use it
40534       # for the tool.
40535 
40536       # First remove it from the list of overridden variables, so we can test
40537       # for unknown variables in the end.
40538       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40539 
40540       # Check if the provided tool contains a complete path.
40541       tool_specified="$BUILD_LD"
40542       tool_basename="${tool_specified##*/}"
40543       if test "x$tool_basename" = "x$tool_specified"; then
40544         # A command without a complete path is provided, search $PATH.
40545         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40546 $as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40547         # Extract the first word of "$tool_basename", so it can be a program name with args.
40548 set dummy $tool_basename; ac_word=$2
40549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40550 $as_echo_n "checking for $ac_word... " >&6; }
40551 if ${ac_cv_path_BUILD_LD+:} false; then :
40552   $as_echo_n "(cached) " >&6
40553 else
40554   case $BUILD_LD in
40555   [\\/]* | ?:[\\/]*)
40556   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40557   ;;
40558   *)
40559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40560 for as_dir in $PATH
40561 do
40562   IFS=$as_save_IFS
40563   test -z "$as_dir" && as_dir=.
40564     for ac_exec_ext in '' $ac_executable_extensions; do
40565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40566     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40568     break 2
40569   fi
40570 done
40571   done
40572 IFS=$as_save_IFS
40573 
40574   ;;
40575 esac
40576 fi
40577 BUILD_LD=$ac_cv_path_BUILD_LD
40578 if test -n "$BUILD_LD"; then
40579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40580 $as_echo "$BUILD_LD" >&6; }
40581 else
40582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40583 $as_echo "no" >&6; }
40584 fi
40585 
40586 
40587         if test "x$BUILD_LD" = x; then
40588           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40589         fi
40590       else
40591         # Otherwise we believe it is a complete path. Use it as it is.
40592         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40593 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40594         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40595 $as_echo_n "checking for BUILD_LD... " >&6; }
40596         if test ! -x "$tool_specified"; then
40597           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40598 $as_echo "not found" >&6; }
40599           as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40600         fi
40601         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40602 $as_echo "$tool_specified" >&6; }
40603       fi
40604     fi
40605   fi
40606 
40607 
40608 
40609   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40610 
40611   # First separate the path from the arguments. This will split at the first
40612   # space.
40613   complete="$BUILD_LD"
40614   path="${complete%% *}"
40615   tmp="$complete EOL"
40616   arguments="${tmp#* }"
40617 
40618   # Input might be given as Windows format, start by converting to
40619   # unix format.
40620   new_path=`$CYGPATH -u "$path"`
40621 
40622   # Now try to locate executable using which
40623   new_path=`$WHICH "$new_path" 2> /dev/null`
40624   # bat and cmd files are not always considered executable in cygwin causing which
40625   # to not find them
40626   if test "x$new_path" = x \
40627       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40628       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40629     new_path=`$CYGPATH -u "$path"`
40630   fi
40631   if test "x$new_path" = x; then
40632     # Oops. Which didn't find the executable.
40633     # The splitting of arguments from the executable at a space might have been incorrect,
40634     # since paths with space are more likely in Windows. Give it another try with the whole
40635     # argument.
40636     path="$complete"
40637     arguments="EOL"
40638     new_path=`$CYGPATH -u "$path"`
40639     new_path=`$WHICH "$new_path" 2> /dev/null`
40640     # bat and cmd files are not always considered executable in cygwin causing which
40641     # to not find them
40642     if test "x$new_path" = x \
40643         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40644         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40645       new_path=`$CYGPATH -u "$path"`
40646     fi
40647     if test "x$new_path" = x; then
40648       # It's still not found. Now this is an unrecoverable error.
40649       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40650 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40651       has_space=`$ECHO "$complete" | $GREP " "`
40652       if test "x$has_space" != x; then
40653         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40654 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40655       fi
40656       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40657     fi
40658   fi
40659 
40660   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40661   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40662   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40663   # "foo.exe" is OK but "foo" is an error.
40664   #
40665   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40666   # It is also a way to make sure we got the proper file name for the real test later on.
40667   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40668   if test "x$test_shortpath" = x; then
40669     # Short path failed, file does not exist as specified.
40670     # Try adding .exe or .cmd
40671     if test -f "${new_path}.exe"; then
40672       input_to_shortpath="${new_path}.exe"
40673     elif test -f "${new_path}.cmd"; then
40674       input_to_shortpath="${new_path}.cmd"
40675     else
40676       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40677 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40678       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40679 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40680       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40681     fi
40682   else
40683     input_to_shortpath="$new_path"
40684   fi
40685 
40686   # Call helper function which possibly converts this using DOS-style short mode.
40687   # If so, the updated path is stored in $new_path.
40688   new_path="$input_to_shortpath"
40689 
40690   input_path="$input_to_shortpath"
40691   # Check if we need to convert this using DOS-style short mode. If the path
40692   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40693   # take no chances and rewrite it.
40694   # Note: m4 eats our [], so we need to use [ and ] instead.
40695   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40696   if test "x$has_forbidden_chars" != x; then
40697     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40698     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40699     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40700     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40701       # Going to short mode and back again did indeed matter. Since short mode is
40702       # case insensitive, let's make it lowercase to improve readability.
40703       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40704       # Now convert it back to Unix-stile (cygpath)
40705       input_path=`$CYGPATH -u "$shortmode_path"`
40706       new_path="$input_path"
40707     fi
40708   fi
40709 
40710   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40711   if test "x$test_cygdrive_prefix" = x; then
40712     # As a simple fix, exclude /usr/bin since it's not a real path.
40713     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40714       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40715       # a path prefixed by /cygdrive for fixpath to work.
40716       new_path="$CYGWIN_ROOT_PATH$input_path"
40717     fi
40718   fi
40719 
40720   # remove trailing .exe if any
40721   new_path="${new_path/%.exe/}"
40722 
40723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40724 
40725   # First separate the path from the arguments. This will split at the first
40726   # space.
40727   complete="$BUILD_LD"
40728   path="${complete%% *}"
40729   tmp="$complete EOL"
40730   arguments="${tmp#* }"
40731 
40732   # Input might be given as Windows format, start by converting to
40733   # unix format.
40734   new_path="$path"
40735 
40736   windows_path="$new_path"
40737   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40738     unix_path=`$CYGPATH -u "$windows_path"`
40739     new_path="$unix_path"
40740   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40741     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40742     new_path="$unix_path"
40743   fi
40744 
40745 
40746   # Now try to locate executable using which
40747   new_path=`$WHICH "$new_path" 2> /dev/null`
40748 
40749   if test "x$new_path" = x; then
40750     # Oops. Which didn't find the executable.
40751     # The splitting of arguments from the executable at a space might have been incorrect,
40752     # since paths with space are more likely in Windows. Give it another try with the whole
40753     # argument.
40754     path="$complete"
40755     arguments="EOL"
40756     new_path="$path"
40757 
40758   windows_path="$new_path"
40759   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40760     unix_path=`$CYGPATH -u "$windows_path"`
40761     new_path="$unix_path"
40762   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40763     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40764     new_path="$unix_path"
40765   fi
40766 
40767 
40768     new_path=`$WHICH "$new_path" 2> /dev/null`
40769     # bat and cmd files are not always considered executable in MSYS causing which
40770     # to not find them
40771     if test "x$new_path" = x \
40772         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40773         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40774       new_path="$path"
40775 
40776   windows_path="$new_path"
40777   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40778     unix_path=`$CYGPATH -u "$windows_path"`
40779     new_path="$unix_path"
40780   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40781     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40782     new_path="$unix_path"
40783   fi
40784 
40785     fi
40786 
40787     if test "x$new_path" = x; then
40788       # It's still not found. Now this is an unrecoverable error.
40789       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40790 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40791       has_space=`$ECHO "$complete" | $GREP " "`
40792       if test "x$has_space" != x; then
40793         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40794 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40795       fi
40796       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40797     fi
40798   fi
40799 
40800   # Now new_path has a complete unix path to the binary
40801   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40802     # Keep paths in /bin as-is, but remove trailing .exe if any
40803     new_path="${new_path/%.exe/}"
40804     # Do not save /bin paths to all_fixpath_prefixes!
40805   else
40806     # Not in mixed or Windows style, start by that.
40807     new_path=`cmd //c echo $new_path`
40808 
40809   input_path="$new_path"
40810   # Check if we need to convert this using DOS-style short mode. If the path
40811   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40812   # take no chances and rewrite it.
40813   # Note: m4 eats our [], so we need to use [ and ] instead.
40814   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40815   if test "x$has_forbidden_chars" != x; then
40816     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40817     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40818   fi
40819 
40820     # Output is in $new_path
40821 
40822   windows_path="$new_path"
40823   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40824     unix_path=`$CYGPATH -u "$windows_path"`
40825     new_path="$unix_path"
40826   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40827     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40828     new_path="$unix_path"
40829   fi
40830 
40831     # remove trailing .exe if any
40832     new_path="${new_path/%.exe/}"
40833 
40834     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40835     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40836   fi
40837 
40838   else
40839     # We're on a posix platform. Hooray! :)
40840     # First separate the path from the arguments. This will split at the first
40841     # space.
40842     complete="$BUILD_LD"
40843     path="${complete%% *}"
40844     tmp="$complete EOL"
40845     arguments="${tmp#* }"
40846 
40847     # Cannot rely on the command "which" here since it doesn't always work.
40848     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40849     if test -z "$is_absolute_path"; then
40850       # Path to executable is not absolute. Find it.
40851       IFS_save="$IFS"
40852       IFS=:
40853       for p in $PATH; do
40854         if test -f "$p/$path" && test -x "$p/$path"; then
40855           new_path="$p/$path"
40856           break
40857         fi
40858       done
40859       IFS="$IFS_save"
40860     else
40861       # This is an absolute path, we can use it without further modifications.
40862       new_path="$path"
40863     fi
40864 
40865     if test "x$new_path" = x; then
40866       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40867 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40868       has_space=`$ECHO "$complete" | $GREP " "`
40869       if test "x$has_space" != x; then
40870         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40871 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40872       fi
40873       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40874     fi
40875   fi
40876 
40877   # Now join together the path and the arguments once again
40878   if test "x$arguments" != xEOL; then
40879     new_complete="$new_path ${arguments% *}"
40880   else
40881     new_complete="$new_path"
40882   fi
40883 
40884   if test "x$complete" != "x$new_complete"; then
40885     BUILD_LD="$new_complete"
40886     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40887 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40888   fi
40889 
40890   else
40891     # If we are not cross compiling, use the normal target compilers for
40892     # building the build platform executables.
40893     BUILD_CC="$CC"
40894     BUILD_CXX="$CXX"
40895     BUILD_LD="$LD"
40896   fi
40897 
40898 
40899 
40900 
40901 
40902 
40903   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40904     # For hotspot, we need these in Windows mixed path,
40905     # so rewrite them all. Need added .exe suffix.
40906     HOTSPOT_CXX="$CXX.exe"
40907     HOTSPOT_LD="$LD.exe"
40908     HOTSPOT_MT="$MT.exe"
40909     HOTSPOT_RC="$RC.exe"
40910 
40911   unix_path="$HOTSPOT_CXX"
40912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40913     windows_path=`$CYGPATH -m "$unix_path"`
40914     HOTSPOT_CXX="$windows_path"
40915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40916     windows_path=`cmd //c echo $unix_path`
40917     HOTSPOT_CXX="$windows_path"
40918   fi
40919 
40920 
40921   unix_path="$HOTSPOT_LD"
40922   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40923     windows_path=`$CYGPATH -m "$unix_path"`
40924     HOTSPOT_LD="$windows_path"
40925   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40926     windows_path=`cmd //c echo $unix_path`
40927     HOTSPOT_LD="$windows_path"
40928   fi
40929 
40930 
40931   unix_path="$HOTSPOT_MT"
40932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40933     windows_path=`$CYGPATH -m "$unix_path"`
40934     HOTSPOT_MT="$windows_path"
40935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40936     windows_path=`cmd //c echo $unix_path`
40937     HOTSPOT_MT="$windows_path"
40938   fi
40939 
40940 
40941   unix_path="$HOTSPOT_RC"
40942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40943     windows_path=`$CYGPATH -m "$unix_path"`
40944     HOTSPOT_RC="$windows_path"
40945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40946     windows_path=`cmd //c echo $unix_path`
40947     HOTSPOT_RC="$windows_path"
40948   fi
40949 
40950 
40951 
40952   else
40953     HOTSPOT_CXX="$CXX"
40954     HOTSPOT_LD="$LD"
40955   fi
40956 
40957 
40958 
40959   if test  "x$TOOLCHAIN_TYPE" = xclang; then
40960     USE_CLANG=true
40961   fi
40962 
40963 
40964   # LDEXE is the linker to use, when creating executables. Not really used.
40965   # FIXME: These should just be removed!
40966   LDEXE="$LD"
40967   LDEXECXX="$LDCXX"
40968 
40969 
40970 
40971 
40972 
40973 
40974   # The package path is used only on macosx?
40975   # FIXME: clean this up, and/or move it elsewhere.
40976   PACKAGE_PATH=/opt/local
40977 
40978 
40979   # Check for extra potential brokenness.
40980   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40981     # On Windows, double-check that we got the right compiler.
40982     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40983     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40984     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40985       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40986         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40987       fi
40988     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40989       if test "x$COMPILER_CPU_TEST" != "xx64"; then
40990         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40991       fi
40992     fi
40993   fi
40994 
40995   if test "x$TOOLCHAIN_TYPE" = xgcc; then
40996     # If this is a --hash-style=gnu system, use --hash-style=both, why?
40997     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40998     # This is later checked when setting flags.
40999 
41000     # "-Og" suppported for GCC 4.8 and later
41001     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
41002 
41003   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
41004 $as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
41005   supports=yes
41006 
41007   saved_cflags="$CFLAGS"
41008   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
41009   ac_ext=c
41010 ac_cpp='$CPP $CPPFLAGS'
41011 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41012 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41013 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41014 
41015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41016 /* end confdefs.h.  */
41017 int i;
41018 _ACEOF
41019 if ac_fn_c_try_compile "$LINENO"; then :
41020 
41021 else
41022   supports=no
41023 fi
41024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41025   ac_ext=cpp
41026 ac_cpp='$CXXCPP $CPPFLAGS'
41027 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41028 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41029 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41030 
41031   CFLAGS="$saved_cflags"
41032 
41033   saved_cxxflags="$CXXFLAGS"
41034   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
41035   ac_ext=cpp
41036 ac_cpp='$CXXCPP $CPPFLAGS'
41037 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41038 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41039 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41040 
41041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41042 /* end confdefs.h.  */
41043 int i;
41044 _ACEOF
41045 if ac_fn_cxx_try_compile "$LINENO"; then :
41046 
41047 else
41048   supports=no
41049 fi
41050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41051   ac_ext=cpp
41052 ac_cpp='$CXXCPP $CPPFLAGS'
41053 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41054 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41055 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41056 
41057   CXXFLAGS="$saved_cxxflags"
41058 
41059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41060 $as_echo "$supports" >&6; }
41061   if test "x$supports" = "xyes" ; then
41062     HAS_CFLAG_OPTIMIZE_DEBUG=true
41063   else
41064     HAS_CFLAG_OPTIMIZE_DEBUG=false
41065   fi
41066 
41067 
41068     # "-fsanitize=undefined" supported for GCC 4.9 and later
41069     CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG="-fsanitize=undefined -fsanitize-recover"
41070 
41071   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"" >&5
41072 $as_echo_n "checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"... " >&6; }
41073   supports=yes
41074 
41075   saved_cflags="$CFLAGS"
41076   CFLAGS="$CFLAGS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41077   ac_ext=c
41078 ac_cpp='$CPP $CPPFLAGS'
41079 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41080 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41081 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41082 
41083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41084 /* end confdefs.h.  */
41085 int i;
41086 _ACEOF
41087 if ac_fn_c_try_compile "$LINENO"; then :
41088 
41089 else
41090   supports=no
41091 fi
41092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41093   ac_ext=cpp
41094 ac_cpp='$CXXCPP $CPPFLAGS'
41095 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41096 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41097 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41098 
41099   CFLAGS="$saved_cflags"
41100 
41101   saved_cxxflags="$CXXFLAGS"
41102   CXXFLAGS="$CXXFLAG $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41103   ac_ext=cpp
41104 ac_cpp='$CXXCPP $CPPFLAGS'
41105 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41106 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41107 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41108 
41109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41110 /* end confdefs.h.  */
41111 int i;
41112 _ACEOF
41113 if ac_fn_cxx_try_compile "$LINENO"; then :
41114 
41115 else
41116   supports=no
41117 fi
41118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41119   ac_ext=cpp
41120 ac_cpp='$CXXCPP $CPPFLAGS'
41121 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41122 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41123 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41124 
41125   CXXFLAGS="$saved_cxxflags"
41126 
41127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41128 $as_echo "$supports" >&6; }
41129   if test "x$supports" = "xyes" ; then
41130     HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=true
41131   else
41132     HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=false
41133   fi
41134 
41135 
41136     # "-z relro" supported in GNU binutils 2.17 and later
41137     LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41138 
41139   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41140 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41141   supports=yes
41142 
41143   saved_ldflags="$LDFLAGS"
41144   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41145   ac_ext=c
41146 ac_cpp='$CPP $CPPFLAGS'
41147 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41148 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41149 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41150 
41151   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41152 /* end confdefs.h.  */
41153 
41154 int
41155 main ()
41156 {
41157 
41158   ;
41159   return 0;
41160 }
41161 _ACEOF
41162 if ac_fn_c_try_link "$LINENO"; then :
41163 
41164 else
41165   supports=no
41166 fi
41167 rm -f core conftest.err conftest.$ac_objext \
41168     conftest$ac_exeext conftest.$ac_ext
41169   ac_ext=cpp
41170 ac_cpp='$CXXCPP $CPPFLAGS'
41171 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41172 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41173 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41174 
41175   LDFLAGS="$saved_ldflags"
41176 
41177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41178 $as_echo "$supports" >&6; }
41179   if test "x$supports" = "xyes" ; then
41180     HAS_LINKER_RELRO=true
41181   else
41182     HAS_LINKER_RELRO=false
41183   fi
41184 
41185 
41186     # "-z now" supported in GNU binutils 2.11 and later
41187     LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41188 
41189   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41190 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41191   supports=yes
41192 
41193   saved_ldflags="$LDFLAGS"
41194   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41195   ac_ext=c
41196 ac_cpp='$CPP $CPPFLAGS'
41197 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41198 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41199 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41200 
41201   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41202 /* end confdefs.h.  */
41203 
41204 int
41205 main ()
41206 {
41207 
41208   ;
41209   return 0;
41210 }
41211 _ACEOF
41212 if ac_fn_c_try_link "$LINENO"; then :
41213 
41214 else
41215   supports=no
41216 fi
41217 rm -f core conftest.err conftest.$ac_objext \
41218     conftest$ac_exeext conftest.$ac_ext
41219   ac_ext=cpp
41220 ac_cpp='$CXXCPP $CPPFLAGS'
41221 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41222 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41223 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41224 
41225   LDFLAGS="$saved_ldflags"
41226 
41227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41228 $as_echo "$supports" >&6; }
41229   if test "x$supports" = "xyes" ; then
41230     HAS_LINKER_NOW=true
41231   else
41232     HAS_LINKER_NOW=false
41233   fi
41234 
41235   fi
41236 
41237   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41238   # in executable.'
41239   USING_BROKEN_SUSE_LD=no
41240   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41241     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41242 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41243     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41244     $ECHO "int main() { }" > main.c
41245     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41246       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41247 $as_echo "no" >&6; }
41248       USING_BROKEN_SUSE_LD=no
41249     else
41250       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41251 $as_echo "yes" >&6; }
41252       USING_BROKEN_SUSE_LD=yes
41253     fi
41254     rm -rf version-script.map main.c a.out
41255   fi
41256 
41257 
41258 
41259 # Setup the JTReg Regression Test Harness.
41260 
41261 
41262 # Check whether --with-jtreg was given.
41263 if test "${with_jtreg+set}" = set; then :
41264   withval=$with_jtreg;
41265 else
41266   with_jtreg=no
41267 fi
41268 
41269 
41270   if test "x$with_jtreg" = xno; then
41271     # jtreg disabled
41272     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41273 $as_echo_n "checking for jtreg... " >&6; }
41274     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41275 $as_echo "no" >&6; }
41276   else
41277     if test "x$with_jtreg" != xyes; then
41278       # with path specified.
41279       JT_HOME="$with_jtreg"
41280     fi
41281 
41282     if test "x$JT_HOME" != x; then
41283       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41284 $as_echo_n "checking for jtreg... " >&6; }
41285 
41286       # use JT_HOME enviroment var.
41287 
41288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41289 
41290   # Input might be given as Windows format, start by converting to
41291   # unix format.
41292   path="$JT_HOME"
41293   new_path=`$CYGPATH -u "$path"`
41294 
41295   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41296   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41297   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41298   # "foo.exe" is OK but "foo" is an error.
41299   #
41300   # This test is therefore slightly more accurate than "test -f" to check for file precense.
41301   # It is also a way to make sure we got the proper file name for the real test later on.
41302   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41303   if test "x$test_shortpath" = x; then
41304     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41305 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41306     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41307   fi
41308 
41309   # Call helper function which possibly converts this using DOS-style short mode.
41310   # If so, the updated path is stored in $new_path.
41311 
41312   input_path="$new_path"
41313   # Check if we need to convert this using DOS-style short mode. If the path
41314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41315   # take no chances and rewrite it.
41316   # Note: m4 eats our [], so we need to use [ and ] instead.
41317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41318   if test "x$has_forbidden_chars" != x; then
41319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41320     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41321     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41322     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41323       # Going to short mode and back again did indeed matter. Since short mode is
41324       # case insensitive, let's make it lowercase to improve readability.
41325       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41326       # Now convert it back to Unix-stile (cygpath)
41327       input_path=`$CYGPATH -u "$shortmode_path"`
41328       new_path="$input_path"
41329     fi
41330   fi
41331 
41332   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41333   if test "x$test_cygdrive_prefix" = x; then
41334     # As a simple fix, exclude /usr/bin since it's not a real path.
41335     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41336       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41337       # a path prefixed by /cygdrive for fixpath to work.
41338       new_path="$CYGWIN_ROOT_PATH$input_path"
41339     fi
41340   fi
41341 
41342 
41343   if test "x$path" != "x$new_path"; then
41344     JT_HOME="$new_path"
41345     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41346 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41347   fi
41348 
41349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41350 
41351   path="$JT_HOME"
41352   has_colon=`$ECHO $path | $GREP ^.:`
41353   new_path="$path"
41354   if test "x$has_colon" = x; then
41355     # Not in mixed or Windows style, start by that.
41356     new_path=`cmd //c echo $path`
41357   fi
41358 
41359 
41360   input_path="$new_path"
41361   # Check if we need to convert this using DOS-style short mode. If the path
41362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41363   # take no chances and rewrite it.
41364   # Note: m4 eats our [], so we need to use [ and ] instead.
41365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41366   if test "x$has_forbidden_chars" != x; then
41367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41368     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41369   fi
41370 
41371 
41372   windows_path="$new_path"
41373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41374     unix_path=`$CYGPATH -u "$windows_path"`
41375     new_path="$unix_path"
41376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41378     new_path="$unix_path"
41379   fi
41380 
41381   if test "x$path" != "x$new_path"; then
41382     JT_HOME="$new_path"
41383     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41384 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41385   fi
41386 
41387   # Save the first 10 bytes of this path to the storage, so fixpath can work.
41388   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41389 
41390   else
41391     # We're on a posix platform. Hooray! :)
41392     path="$JT_HOME"
41393     has_space=`$ECHO "$path" | $GREP " "`
41394     if test "x$has_space" != x; then
41395       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41396 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41397       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41398     fi
41399 
41400     # Use eval to expand a potential ~
41401     eval path="$path"
41402     if test ! -f "$path" && test ! -d "$path"; then
41403       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41404     fi
41405 
41406     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41407   fi
41408 
41409 
41410       # jtreg win32 script works for everybody
41411       JTREGEXE="$JT_HOME/win32/bin/jtreg"
41412 
41413       if test ! -f "$JTREGEXE"; then
41414         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41415       fi
41416 
41417       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41418 $as_echo "$JTREGEXE" >&6; }
41419     else
41420       # try to find jtreg on path
41421 
41422 
41423 
41424   # Publish this variable in the help.
41425 
41426 
41427   if test "x$JTREGEXE" = x; then
41428     # The variable is not set by user, try to locate tool using the code snippet
41429     for ac_prog in jtreg
41430 do
41431   # Extract the first word of "$ac_prog", so it can be a program name with args.
41432 set dummy $ac_prog; ac_word=$2
41433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41434 $as_echo_n "checking for $ac_word... " >&6; }
41435 if ${ac_cv_path_JTREGEXE+:} false; then :
41436   $as_echo_n "(cached) " >&6
41437 else
41438   case $JTREGEXE in
41439   [\\/]* | ?:[\\/]*)
41440   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41441   ;;
41442   *)
41443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41444 for as_dir in $PATH
41445 do
41446   IFS=$as_save_IFS
41447   test -z "$as_dir" && as_dir=.
41448     for ac_exec_ext in '' $ac_executable_extensions; do
41449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41450     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41452     break 2
41453   fi
41454 done
41455   done
41456 IFS=$as_save_IFS
41457 
41458   ;;
41459 esac
41460 fi
41461 JTREGEXE=$ac_cv_path_JTREGEXE
41462 if test -n "$JTREGEXE"; then
41463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41464 $as_echo "$JTREGEXE" >&6; }
41465 else
41466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41467 $as_echo "no" >&6; }
41468 fi
41469 
41470 
41471   test -n "$JTREGEXE" && break
41472 done
41473 
41474   else
41475     # The variable is set, but is it from the command line or the environment?
41476 
41477     # Try to remove the string !JTREGEXE! from our list.
41478     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41479     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41480       # If it failed, the variable was not from the command line. Ignore it,
41481       # but warn the user (except for BASH, which is always set by the calling BASH).
41482       if test "xJTREGEXE" != xBASH; then
41483         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41484 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41485       fi
41486       # Try to locate tool using the code snippet
41487       for ac_prog in jtreg
41488 do
41489   # Extract the first word of "$ac_prog", so it can be a program name with args.
41490 set dummy $ac_prog; ac_word=$2
41491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41492 $as_echo_n "checking for $ac_word... " >&6; }
41493 if ${ac_cv_path_JTREGEXE+:} false; then :
41494   $as_echo_n "(cached) " >&6
41495 else
41496   case $JTREGEXE in
41497   [\\/]* | ?:[\\/]*)
41498   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41499   ;;
41500   *)
41501   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41502 for as_dir in $PATH
41503 do
41504   IFS=$as_save_IFS
41505   test -z "$as_dir" && as_dir=.
41506     for ac_exec_ext in '' $ac_executable_extensions; do
41507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41508     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41510     break 2
41511   fi
41512 done
41513   done
41514 IFS=$as_save_IFS
41515 
41516   ;;
41517 esac
41518 fi
41519 JTREGEXE=$ac_cv_path_JTREGEXE
41520 if test -n "$JTREGEXE"; then
41521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41522 $as_echo "$JTREGEXE" >&6; }
41523 else
41524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41525 $as_echo "no" >&6; }
41526 fi
41527 
41528 
41529   test -n "$JTREGEXE" && break
41530 done
41531 
41532     else
41533       # If it succeeded, then it was overridden by the user. We will use it
41534       # for the tool.
41535 
41536       # First remove it from the list of overridden variables, so we can test
41537       # for unknown variables in the end.
41538       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41539 
41540       # Check if the provided tool contains a complete path.
41541       tool_specified="$JTREGEXE"
41542       tool_basename="${tool_specified##*/}"
41543       if test "x$tool_basename" = "x$tool_specified"; then
41544         # A command without a complete path is provided, search $PATH.
41545         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41546 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41547         # Extract the first word of "$tool_basename", so it can be a program name with args.
41548 set dummy $tool_basename; ac_word=$2
41549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41550 $as_echo_n "checking for $ac_word... " >&6; }
41551 if ${ac_cv_path_JTREGEXE+:} false; then :
41552   $as_echo_n "(cached) " >&6
41553 else
41554   case $JTREGEXE in
41555   [\\/]* | ?:[\\/]*)
41556   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41557   ;;
41558   *)
41559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41560 for as_dir in $PATH
41561 do
41562   IFS=$as_save_IFS
41563   test -z "$as_dir" && as_dir=.
41564     for ac_exec_ext in '' $ac_executable_extensions; do
41565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41566     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41568     break 2
41569   fi
41570 done
41571   done
41572 IFS=$as_save_IFS
41573 
41574   ;;
41575 esac
41576 fi
41577 JTREGEXE=$ac_cv_path_JTREGEXE
41578 if test -n "$JTREGEXE"; then
41579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41580 $as_echo "$JTREGEXE" >&6; }
41581 else
41582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41583 $as_echo "no" >&6; }
41584 fi
41585 
41586 
41587         if test "x$JTREGEXE" = x; then
41588           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41589         fi
41590       else
41591         # Otherwise we believe it is a complete path. Use it as it is.
41592         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41593 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41594         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41595 $as_echo_n "checking for JTREGEXE... " >&6; }
41596         if test ! -x "$tool_specified"; then
41597           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41598 $as_echo "not found" >&6; }
41599           as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41600         fi
41601         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41602 $as_echo "$tool_specified" >&6; }
41603       fi
41604     fi
41605   fi
41606 
41607 
41608 
41609   if test "x$JTREGEXE" = x; then
41610     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41611   fi
41612 
41613 
41614       JT_HOME="`$DIRNAME $JTREGEXE`"
41615     fi
41616   fi
41617 
41618 
41619 
41620 
41621 
41622 
41623   # Option used to tell the compiler whether to create 32- or 64-bit executables
41624   if test "x$TOOLCHAIN_TYPE" = xxlc; then
41625     COMPILER_TARGET_BITS_FLAG="-q"
41626   else
41627     COMPILER_TARGET_BITS_FLAG="-m"
41628   fi
41629 
41630 
41631   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41632   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41633     ARFLAGS="-r"
41634   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41635     ARFLAGS="-X64"
41636   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41637     # lib.exe is used as AR to create static libraries.
41638     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41639   else
41640     ARFLAGS=""
41641   fi
41642 
41643 
41644   ## Setup strip.
41645   # FIXME: should this really be per platform, or should it be per toolchain type?
41646   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41647   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41648   if test "x$OPENJDK_TARGET_OS" = xlinux; then
41649     STRIPFLAGS="-g"
41650   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41651     STRIPFLAGS="-x"
41652   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41653     STRIPFLAGS="-S"
41654   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41655     STRIPFLAGS="-X32_64"
41656   fi
41657 
41658   if test "x$OPENJDK_TARGET_OS" != xwindows; then
41659     POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41660   fi
41661 
41662 
41663   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41664     # FIXME: break out into MCSFLAGS
41665     POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41666   fi
41667 
41668 
41669   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41670     CC_OUT_OPTION=-Fo
41671     EXE_OUT_OPTION=-out:
41672     LD_OUT_OPTION=-out:
41673     AR_OUT_OPTION=-out:
41674   else
41675     # The option used to specify the target .o,.a or .so file.
41676     # When compiling, how to specify the to be created object file.
41677     CC_OUT_OPTION='-o$(SPACE)'
41678     # When linking, how to specify the to be created executable.
41679     EXE_OUT_OPTION='-o$(SPACE)'
41680     # When linking, how to specify the to be created dynamically linkable library.
41681     LD_OUT_OPTION='-o$(SPACE)'
41682     # When archiving, how to specify the to be create static archive for object files.
41683     AR_OUT_OPTION='rcs$(SPACE)'
41684   fi
41685 
41686 
41687 
41688 
41689 
41690   # On Windows, we need to set RC flags.
41691   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41692     RC_FLAGS="-nologo -l 0x409 -r"
41693     if test "x$VARIANT" = xOPT; then
41694       RC_FLAGS="$RC_FLAGS -d NDEBUG"
41695     fi
41696 
41697     # The version variables used to create RC_FLAGS may be overridden
41698     # in a custom configure script, or possibly the command line.
41699     # Let those variables be expanded at make time in spec.gmk.
41700     # The \$ are escaped to the shell, and the $(...) variables
41701     # are evaluated by make.
41702     RC_FLAGS="$RC_FLAGS \
41703         -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41704         -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
41705         -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41706         -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41707         -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41708         -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41709         -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41710   fi
41711 
41712 
41713   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41714     # silence copyright notice and other headers.
41715     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41716   fi
41717 
41718   if test "x$SYSROOT" != "x"; then
41719     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41720       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41721         # Solaris Studio does not have a concept of sysroot. Instead we must
41722         # make sure the default include and lib dirs are appended to each
41723         # compile and link command line.
41724         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41725         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41726             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41727             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41728       fi
41729     elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41730       # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41731       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41732       SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41733     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41734       SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
41735       SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
41736     elif test "x$TOOLCHAIN_TYPE" = xclang; then
41737       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41738       SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41739     fi
41740     # Propagate the sysroot args to hotspot
41741     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41742     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41743     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41744   fi
41745 
41746   # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41747   # set this here so it doesn't have to be peppered throughout the forest
41748   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41749     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41750     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41751   fi
41752 
41753 
41754 
41755 
41756 
41757 # FIXME: Currently we must test this after toolchain but before flags. Fix!
41758 
41759 # Now we can test some aspects on the target using configure macros.
41760 
41761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41762 $as_echo_n "checking for ANSI C header files... " >&6; }
41763 if ${ac_cv_header_stdc+:} false; then :
41764   $as_echo_n "(cached) " >&6
41765 else
41766   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41767 /* end confdefs.h.  */
41768 #include <stdlib.h>
41769 #include <stdarg.h>
41770 #include <string.h>
41771 #include <float.h>
41772 
41773 int
41774 main ()
41775 {
41776 
41777   ;
41778   return 0;
41779 }
41780 _ACEOF
41781 if ac_fn_cxx_try_compile "$LINENO"; then :
41782   ac_cv_header_stdc=yes
41783 else
41784   ac_cv_header_stdc=no
41785 fi
41786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41787 
41788 if test $ac_cv_header_stdc = yes; then
41789   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41790   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41791 /* end confdefs.h.  */
41792 #include <string.h>
41793 
41794 _ACEOF
41795 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41796   $EGREP "memchr" >/dev/null 2>&1; then :
41797 
41798 else
41799   ac_cv_header_stdc=no
41800 fi
41801 rm -f conftest*
41802 
41803 fi
41804 
41805 if test $ac_cv_header_stdc = yes; then
41806   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41807   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41808 /* end confdefs.h.  */
41809 #include <stdlib.h>
41810 
41811 _ACEOF
41812 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41813   $EGREP "free" >/dev/null 2>&1; then :
41814 
41815 else
41816   ac_cv_header_stdc=no
41817 fi
41818 rm -f conftest*
41819 
41820 fi
41821 
41822 if test $ac_cv_header_stdc = yes; then
41823   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41824   if test "$cross_compiling" = yes; then :
41825   :
41826 else
41827   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41828 /* end confdefs.h.  */
41829 #include <ctype.h>
41830 #include <stdlib.h>
41831 #if ((' ' & 0x0FF) == 0x020)
41832 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41833 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41834 #else
41835 # define ISLOWER(c) \
41836                    (('a' <= (c) && (c) <= 'i') \
41837                      || ('j' <= (c) && (c) <= 'r') \
41838                      || ('s' <= (c) && (c) <= 'z'))
41839 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41840 #endif
41841 
41842 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41843 int
41844 main ()
41845 {
41846   int i;
41847   for (i = 0; i < 256; i++)
41848     if (XOR (islower (i), ISLOWER (i))
41849         || toupper (i) != TOUPPER (i))
41850       return 2;
41851   return 0;
41852 }
41853 _ACEOF
41854 if ac_fn_cxx_try_run "$LINENO"; then :
41855 
41856 else
41857   ac_cv_header_stdc=no
41858 fi
41859 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41860   conftest.$ac_objext conftest.beam conftest.$ac_ext
41861 fi
41862 
41863 fi
41864 fi
41865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41866 $as_echo "$ac_cv_header_stdc" >&6; }
41867 if test $ac_cv_header_stdc = yes; then
41868 
41869 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
41870 
41871 fi
41872 
41873 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
41874 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41875                   inttypes.h stdint.h unistd.h
41876 do :
41877   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41878 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41879 "
41880 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41881   cat >>confdefs.h <<_ACEOF
41882 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41883 _ACEOF
41884 
41885 fi
41886 
41887 done
41888 
41889 
41890 
41891   ###############################################################################
41892   #
41893   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41894   # (The JVM can use 32 or 64 bit Java pointers but that decision
41895   # is made at runtime.)
41896   #
41897 
41898   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41899     # Always specify -m flag on Solaris
41900     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41901 
41902   # When we add flags to the "official" CFLAGS etc, we need to
41903   # keep track of these additions in ADDED_CFLAGS etc. These
41904   # will later be checked to make sure only controlled additions
41905   # have been made to CFLAGS etc.
41906   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41907   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41908   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41909 
41910   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41911   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41912   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41913 
41914   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41915   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41916   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41917 
41918   elif test "x$COMPILE_TYPE" = xreduced; then
41919     if test "x$OPENJDK_TARGET_OS" != xwindows; then
41920       # Specify -m if running reduced on other Posix platforms
41921 
41922   # When we add flags to the "official" CFLAGS etc, we need to
41923   # keep track of these additions in ADDED_CFLAGS etc. These
41924   # will later be checked to make sure only controlled additions
41925   # have been made to CFLAGS etc.
41926   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41927   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41928   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41929 
41930   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41931   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41932   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41933 
41934   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41935   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41936   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41937 
41938     fi
41939   fi
41940 
41941   # Make compilation sanity check
41942   for ac_header in stdio.h
41943 do :
41944   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41945 if test "x$ac_cv_header_stdio_h" = xyes; then :
41946   cat >>confdefs.h <<_ACEOF
41947 #define HAVE_STDIO_H 1
41948 _ACEOF
41949 
41950 else
41951 
41952     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41953 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41954     if test "x$COMPILE_TYPE" = xreduced; then
41955       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41956 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41957     elif test "x$COMPILE_TYPE" = xcross; then
41958       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41959 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41960     fi
41961     as_fn_error $? "Cannot continue." "$LINENO" 5
41962 
41963 fi
41964 
41965 done
41966 
41967 
41968   # The cast to long int works around a bug in the HP C Compiler
41969 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41970 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41971 # This bug is HP SR number 8606223364.
41972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41973 $as_echo_n "checking size of int *... " >&6; }
41974 if ${ac_cv_sizeof_int_p+:} false; then :
41975   $as_echo_n "(cached) " >&6
41976 else
41977   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41978 
41979 else
41980   if test "$ac_cv_type_int_p" = yes; then
41981      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41982 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41983 as_fn_error 77 "cannot compute sizeof (int *)
41984 See \`config.log' for more details" "$LINENO" 5; }
41985    else
41986      ac_cv_sizeof_int_p=0
41987    fi
41988 fi
41989 
41990 fi
41991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41992 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41993 
41994 
41995 
41996 cat >>confdefs.h <<_ACEOF
41997 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41998 _ACEOF
41999 
42000 
42001 
42002   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
42003   if test "x$ac_cv_sizeof_int_p" = x; then
42004     # The test failed, lets stick to the assumed value.
42005     { $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
42006 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
42007   else
42008     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42009 
42010     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42011       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
42012       # Let's try to implicitely set the compilers target architecture and retry the test
42013       { $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
42014 $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;}
42015       { $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
42016 $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;}
42017 
42018   # When we add flags to the "official" CFLAGS etc, we need to
42019   # keep track of these additions in ADDED_CFLAGS etc. These
42020   # will later be checked to make sure only controlled additions
42021   # have been made to CFLAGS etc.
42022   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42023   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42024   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42025 
42026   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42027   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42028   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42029 
42030   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42031   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42032   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42033 
42034 
42035       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
42036       unset ac_cv_sizeof_int_p
42037       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
42038       cat >>confdefs.h <<_ACEOF
42039 #undef SIZEOF_INT_P
42040 _ACEOF
42041 
42042       # The cast to long int works around a bug in the HP C Compiler
42043 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42044 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42045 # This bug is HP SR number 8606223364.
42046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42047 $as_echo_n "checking size of int *... " >&6; }
42048 if ${ac_cv_sizeof_int_p+:} false; then :
42049   $as_echo_n "(cached) " >&6
42050 else
42051   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42052 
42053 else
42054   if test "$ac_cv_type_int_p" = yes; then
42055      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42056 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42057 as_fn_error 77 "cannot compute sizeof (int *)
42058 See \`config.log' for more details" "$LINENO" 5; }
42059    else
42060      ac_cv_sizeof_int_p=0
42061    fi
42062 fi
42063 
42064 fi
42065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42066 $as_echo "$ac_cv_sizeof_int_p" >&6; }
42067 
42068 
42069 
42070 cat >>confdefs.h <<_ACEOF
42071 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
42072 _ACEOF
42073 
42074 
42075 
42076       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42077 
42078       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42079         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
42080       fi
42081     fi
42082   fi
42083 
42084   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42085 $as_echo_n "checking for target address size... " >&6; }
42086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42087 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42088 
42089 
42090   ###############################################################################
42091   #
42092   # Is the target little of big endian?
42093   #
42094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42095 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42096 if ${ac_cv_c_bigendian+:} false; then :
42097   $as_echo_n "(cached) " >&6
42098 else
42099   ac_cv_c_bigendian=unknown
42100     # See if we're dealing with a universal compiler.
42101     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42102 /* end confdefs.h.  */
42103 #ifndef __APPLE_CC__
42104                not a universal capable compiler
42105              #endif
42106              typedef int dummy;
42107 
42108 _ACEOF
42109 if ac_fn_cxx_try_compile "$LINENO"; then :
42110 
42111         # Check for potential -arch flags.  It is not universal unless
42112         # there are at least two -arch flags with different values.
42113         ac_arch=
42114         ac_prev=
42115         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42116          if test -n "$ac_prev"; then
42117            case $ac_word in
42118              i?86 | x86_64 | ppc | ppc64)
42119                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42120                  ac_arch=$ac_word
42121                else
42122                  ac_cv_c_bigendian=universal
42123                  break
42124                fi
42125                ;;
42126            esac
42127            ac_prev=
42128          elif test "x$ac_word" = "x-arch"; then
42129            ac_prev=arch
42130          fi
42131        done
42132 fi
42133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42134     if test $ac_cv_c_bigendian = unknown; then
42135       # See if sys/param.h defines the BYTE_ORDER macro.
42136       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42137 /* end confdefs.h.  */
42138 #include <sys/types.h>
42139              #include <sys/param.h>
42140 
42141 int
42142 main ()
42143 {
42144 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42145                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42146                      && LITTLE_ENDIAN)
42147               bogus endian macros
42148              #endif
42149 
42150   ;
42151   return 0;
42152 }
42153 _ACEOF
42154 if ac_fn_cxx_try_compile "$LINENO"; then :
42155   # It does; now see whether it defined to BIG_ENDIAN or not.
42156          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42157 /* end confdefs.h.  */
42158 #include <sys/types.h>
42159                 #include <sys/param.h>
42160 
42161 int
42162 main ()
42163 {
42164 #if BYTE_ORDER != BIG_ENDIAN
42165                  not big endian
42166                 #endif
42167 
42168   ;
42169   return 0;
42170 }
42171 _ACEOF
42172 if ac_fn_cxx_try_compile "$LINENO"; then :
42173   ac_cv_c_bigendian=yes
42174 else
42175   ac_cv_c_bigendian=no
42176 fi
42177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42178 fi
42179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42180     fi
42181     if test $ac_cv_c_bigendian = unknown; then
42182       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42183       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42184 /* end confdefs.h.  */
42185 #include <limits.h>
42186 
42187 int
42188 main ()
42189 {
42190 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42191               bogus endian macros
42192              #endif
42193 
42194   ;
42195   return 0;
42196 }
42197 _ACEOF
42198 if ac_fn_cxx_try_compile "$LINENO"; then :
42199   # It does; now see whether it defined to _BIG_ENDIAN or not.
42200          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42201 /* end confdefs.h.  */
42202 #include <limits.h>
42203 
42204 int
42205 main ()
42206 {
42207 #ifndef _BIG_ENDIAN
42208                  not big endian
42209                 #endif
42210 
42211   ;
42212   return 0;
42213 }
42214 _ACEOF
42215 if ac_fn_cxx_try_compile "$LINENO"; then :
42216   ac_cv_c_bigendian=yes
42217 else
42218   ac_cv_c_bigendian=no
42219 fi
42220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42221 fi
42222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42223     fi
42224     if test $ac_cv_c_bigendian = unknown; then
42225       # Compile a test program.
42226       if test "$cross_compiling" = yes; then :
42227   # Try to guess by grepping values from an object file.
42228          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42229 /* end confdefs.h.  */
42230 short int ascii_mm[] =
42231                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42232                 short int ascii_ii[] =
42233                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42234                 int use_ascii (int i) {
42235                   return ascii_mm[i] + ascii_ii[i];
42236                 }
42237                 short int ebcdic_ii[] =
42238                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42239                 short int ebcdic_mm[] =
42240                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42241                 int use_ebcdic (int i) {
42242                   return ebcdic_mm[i] + ebcdic_ii[i];
42243                 }
42244                 extern int foo;
42245 
42246 int
42247 main ()
42248 {
42249 return use_ascii (foo) == use_ebcdic (foo);
42250   ;
42251   return 0;
42252 }
42253 _ACEOF
42254 if ac_fn_cxx_try_compile "$LINENO"; then :
42255   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42256               ac_cv_c_bigendian=yes
42257             fi
42258             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42259               if test "$ac_cv_c_bigendian" = unknown; then
42260                 ac_cv_c_bigendian=no
42261               else
42262                 # finding both strings is unlikely to happen, but who knows?
42263                 ac_cv_c_bigendian=unknown
42264               fi
42265             fi
42266 fi
42267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42268 else
42269   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42270 /* end confdefs.h.  */
42271 $ac_includes_default
42272 int
42273 main ()
42274 {
42275 
42276              /* Are we little or big endian?  From Harbison&Steele.  */
42277              union
42278              {
42279                long int l;
42280                char c[sizeof (long int)];
42281              } u;
42282              u.l = 1;
42283              return u.c[sizeof (long int) - 1] == 1;
42284 
42285   ;
42286   return 0;
42287 }
42288 _ACEOF
42289 if ac_fn_cxx_try_run "$LINENO"; then :
42290   ac_cv_c_bigendian=no
42291 else
42292   ac_cv_c_bigendian=yes
42293 fi
42294 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42295   conftest.$ac_objext conftest.beam conftest.$ac_ext
42296 fi
42297 
42298     fi
42299 fi
42300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42301 $as_echo "$ac_cv_c_bigendian" >&6; }
42302  case $ac_cv_c_bigendian in #(
42303    yes)
42304      ENDIAN="big";; #(
42305    no)
42306      ENDIAN="little" ;; #(
42307    universal)
42308      ENDIAN="universal_endianness"
42309      ;; #(
42310    *)
42311      ENDIAN="unknown" ;;
42312  esac
42313 
42314 
42315   if test "x$ENDIAN" = xuniversal_endianness; then
42316     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42317   fi
42318   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42319     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
42320   fi
42321 
42322 
42323 # Configure flags for the tools
42324 
42325   ###############################################################################
42326   #
42327   # How to compile shared libraries.
42328   #
42329 
42330   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42331     PICFLAG="-fPIC"
42332     C_FLAG_REORDER=''
42333     CXX_FLAG_REORDER=''
42334 
42335     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42336       # Linking is different on MacOSX
42337       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42338       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42339       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42340       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42341       SET_SHARED_LIBRARY_MAPFILE=''
42342     else
42343       # Default works for linux, might work on other platforms as well.
42344       SHARED_LIBRARY_FLAGS='-shared'
42345       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42346       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42347       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42348       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42349     fi
42350   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42351     PICFLAG=''
42352     C_FLAG_REORDER=''
42353     CXX_FLAG_REORDER=''
42354 
42355     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42356       # Linking is different on MacOSX
42357       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42358       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42359       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42360       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42361       SET_SHARED_LIBRARY_MAPFILE=''
42362     else
42363       # Default works for linux, might work on other platforms as well.
42364       SHARED_LIBRARY_FLAGS='-shared'
42365       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42366       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42367       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42368       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42369     fi
42370   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42371     PICFLAG="-KPIC"
42372     C_FLAG_REORDER='-xF'
42373     CXX_FLAG_REORDER='-xF'
42374     SHARED_LIBRARY_FLAGS="-G"
42375     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42376     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42377     SET_SHARED_LIBRARY_NAME=''
42378     SET_SHARED_LIBRARY_MAPFILE='-M$1'
42379   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42380     PICFLAG="-qpic=large"
42381     C_FLAG_REORDER=''
42382     CXX_FLAG_REORDER=''
42383     SHARED_LIBRARY_FLAGS="-qmkshrobj"
42384     SET_EXECUTABLE_ORIGIN=""
42385     SET_SHARED_LIBRARY_ORIGIN=''
42386     SET_SHARED_LIBRARY_NAME=''
42387     SET_SHARED_LIBRARY_MAPFILE=''
42388   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42389     PICFLAG=""
42390     C_FLAG_REORDER=''
42391     CXX_FLAG_REORDER=''
42392     SHARED_LIBRARY_FLAGS="-LD"
42393     SET_EXECUTABLE_ORIGIN=''
42394     SET_SHARED_LIBRARY_ORIGIN=''
42395     SET_SHARED_LIBRARY_NAME=''
42396     SET_SHARED_LIBRARY_MAPFILE=''
42397   fi
42398 
42399 
42400 
42401 
42402 
42403 
42404 
42405 
42406 
42407   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42408     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42409     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42410     CFLAGS_JDKLIB_EXTRA='-xstrconst'
42411   fi
42412   # The (cross) compiler is now configured, we can now test capabilities
42413   # of the target platform.
42414 
42415 
42416 
42417   ###############################################################################
42418   #
42419   # Setup the opt flags for different compilers
42420   # and different operating systems.
42421   #
42422 
42423   # FIXME: this was indirectly the old default, but just inherited.
42424   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42425   #   C_FLAG_DEPS="-MMD -MF"
42426   # fi
42427 
42428   # Generate make dependency files
42429   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42430     C_FLAG_DEPS="-MMD -MF"
42431   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42432     C_FLAG_DEPS="-MMD -MF"
42433   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42434     C_FLAG_DEPS="-xMMD -xMF"
42435   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42436     C_FLAG_DEPS="-qmakedep=gcc -MF"
42437   fi
42438   CXX_FLAG_DEPS="$C_FLAG_DEPS"
42439 
42440 
42441 
42442   # Debug symbols
42443   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42444     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42445       # reduce from default "-g2" option to save space
42446       CFLAGS_DEBUG_SYMBOLS="-g1"
42447       CXXFLAGS_DEBUG_SYMBOLS="-g1"
42448     else
42449       CFLAGS_DEBUG_SYMBOLS="-g"
42450       CXXFLAGS_DEBUG_SYMBOLS="-g"
42451     fi
42452   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42453     CFLAGS_DEBUG_SYMBOLS="-g"
42454     CXXFLAGS_DEBUG_SYMBOLS="-g"
42455   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42456     CFLAGS_DEBUG_SYMBOLS="-g -xs"
42457     # FIXME: likely a bug, this disables debug symbols rather than enables them
42458     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42459   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42460     CFLAGS_DEBUG_SYMBOLS="-g"
42461     CXXFLAGS_DEBUG_SYMBOLS="-g"
42462   fi
42463 
42464 
42465 
42466   # bounds, memory and behavior checking options
42467   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42468     case $DEBUG_LEVEL in
42469     release )
42470       # no adjustment
42471       ;;
42472     fastdebug )
42473       # Add compile time bounds checks.
42474       CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
42475       CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
42476       ;;
42477     slowdebug )
42478       # Add runtime bounds checks and symbol info.
42479       CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
42480       CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
42481       if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42482         CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
42483         CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
42484       fi
42485       ;;
42486     esac
42487   fi
42488 
42489 
42490 
42491   # Optimization levels
42492   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42493     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42494 
42495     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42496       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42497       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42498       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42499       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42500       C_O_FLAG_DEBUG="-xregs=no%frameptr"
42501       C_O_FLAG_NONE="-xregs=no%frameptr"
42502       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42503       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42504       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42505       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42506       CXX_O_FLAG_NONE="-xregs=no%frameptr"
42507       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42508         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42509         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42510       fi
42511     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42512       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42513       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42514       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42515       C_O_FLAG_DEBUG=""
42516       C_O_FLAG_NONE=""
42517       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42518       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42519       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42520       C_O_FLAG_DEBUG=""
42521       CXX_O_FLAG_NONE=""
42522     fi
42523   else
42524     # The remaining toolchains share opt flags between CC and CXX;
42525     # setup for C and duplicate afterwards.
42526     if test "x$TOOLCHAIN_TYPE" = xgcc; then
42527       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42528         # On MacOSX we optimize for size, something
42529         # we should do for all platforms?
42530         C_O_FLAG_HIGHEST="-Os"
42531         C_O_FLAG_HI="-Os"
42532         C_O_FLAG_NORM="-Os"
42533       else
42534         C_O_FLAG_HIGHEST="-O3"
42535         C_O_FLAG_HI="-O3"
42536         C_O_FLAG_NORM="-O2"
42537       fi
42538       C_O_FLAG_DEBUG="-O0"
42539       C_O_FLAG_NONE="-O0"
42540     elif test "x$TOOLCHAIN_TYPE" = xclang; then
42541       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42542         # On MacOSX we optimize for size, something
42543         # we should do for all platforms?
42544         C_O_FLAG_HIGHEST="-Os"
42545         C_O_FLAG_HI="-Os"
42546         C_O_FLAG_NORM="-Os"
42547       else
42548         C_O_FLAG_HIGHEST="-O3"
42549         C_O_FLAG_HI="-O3"
42550         C_O_FLAG_NORM="-O2"
42551       fi
42552       C_O_FLAG_DEBUG="-O0"
42553       C_O_FLAG_NONE="-O0"
42554     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42555       C_O_FLAG_HIGHEST="-O3"
42556       C_O_FLAG_HI="-O3 -qstrict"
42557       C_O_FLAG_NORM="-O2"
42558       C_O_FLAG_DEBUG="-qnoopt"
42559       C_O_FLAG_NONE="-qnoop"
42560     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42561       C_O_FLAG_HIGHEST="-O2"
42562       C_O_FLAG_HI="-O1"
42563       C_O_FLAG_NORM="-O1"
42564       C_O_FLAG_DEBUG="-Od"
42565       C_O_FLAG_NONE="-Od"
42566     fi
42567     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42568     CXX_O_FLAG_HI="$C_O_FLAG_HI"
42569     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42570     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42571     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42572   fi
42573 
42574   # Adjust optimization flags according to debug level.
42575   case $DEBUG_LEVEL in
42576     release )
42577       # no adjustment
42578       ;;
42579     fastdebug )
42580       # Not quite so much optimization
42581       C_O_FLAG_HI="$C_O_FLAG_NORM"
42582       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42583       ;;
42584     slowdebug )
42585       # Disable optimization
42586       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42587       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42588       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42589       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42590       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42591       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42592       ;;
42593   esac
42594 
42595 
42596 
42597 
42598 
42599 
42600 
42601 
42602 
42603 
42604 
42605 
42606 
42607   # Special extras...
42608   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42609     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42610       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42611       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42612     fi
42613   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42614     LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42615     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42616     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42617   fi
42618 
42619   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42620     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42621 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42622   fi
42623 
42624   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42625     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42626 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42627   fi
42628 
42629   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42630     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42631 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42632   fi
42633 
42634 
42635 # Check whether --with-extra-cflags was given.
42636 if test "${with_extra_cflags+set}" = set; then :
42637   withval=$with_extra_cflags;
42638 fi
42639 
42640 
42641 
42642 # Check whether --with-extra-cxxflags was given.
42643 if test "${with_extra_cxxflags+set}" = set; then :
42644   withval=$with_extra_cxxflags;
42645 fi
42646 
42647 
42648 
42649 # Check whether --with-extra-ldflags was given.
42650 if test "${with_extra_ldflags+set}" = set; then :
42651   withval=$with_extra_ldflags;
42652 fi
42653 
42654 
42655   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42656   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42657   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42658 
42659   # Hotspot needs these set in their legacy form
42660   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42661   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42662   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42663 
42664 
42665 
42666 
42667 
42668   ###############################################################################
42669   #
42670   # Now setup the CFLAGS and LDFLAGS for the JDK build.
42671   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42672   #
42673 
42674   # Setup compiler/platform specific flags into
42675   #    CFLAGS_JDK    - C Compiler flags
42676   #    CXXFLAGS_JDK  - C++ Compiler flags
42677   #    COMMON_CCXXFLAGS_JDK - common to C and C++
42678   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42679     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42680         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42681     case $OPENJDK_TARGET_CPU_ARCH in
42682       arm )
42683         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42684         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42685         ;;
42686       ppc )
42687         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42688         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42689         ;;
42690       * )
42691         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42692         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42693         ;;
42694     esac
42695   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42696     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42697     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42698       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42699       CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42700     fi
42701 
42702     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42703     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42704   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42705     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42706     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42707   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42708     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42709     -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42710     -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42711     -DWIN32 -DIAL"
42712     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42713       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42714     else
42715       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42716     fi
42717   fi
42718 
42719   ###############################################################################
42720 
42721   # Adjust flags according to debug level.
42722   case $DEBUG_LEVEL in
42723     fastdebug | slowdebug )
42724       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42725       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42726       JAVAC_FLAGS="$JAVAC_FLAGS -g"
42727       ;;
42728     release )
42729       ;;
42730     * )
42731       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42732       ;;
42733   esac
42734 
42735   # Setup LP64
42736   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42737 
42738   # Set some common defines. These works for all compilers, but assume
42739   # -D is universally accepted.
42740 
42741   # Setup endianness
42742   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42743     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42744     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42745     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42746     #   Note: -Dmacro         is the same as    #define macro 1
42747     #         -Dmacro=        is the same as    #define macro
42748     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42749       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42750     else
42751       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42752     fi
42753   else
42754     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42755     # are defined in the system?
42756     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42757       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42758     else
42759       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42760     fi
42761   fi
42762 
42763   # Setup target OS define. Use OS target name but in upper case.
42764   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42765   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42766 
42767   # Setup target CPU
42768   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42769 
42770   # Setup debug/release defines
42771   if test "x$DEBUG_LEVEL" = xrelease; then
42772     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42773     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42774       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42775     fi
42776   else
42777     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42778   fi
42779 
42780   # Setup release name
42781   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42782 
42783 
42784   # Set some additional per-OS defines.
42785   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42786     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42787   elif test "x$OPENJDK_TARGET_OS" = xaix; then
42788     # FIXME: PPC64 should not be here.
42789     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42790   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42791     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42792   fi
42793 
42794   # Additional macosx handling
42795   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42796     # Setting these parameters makes it an error to link to macosx APIs that are
42797     # newer than the given OS version and makes the linked binaries compatible
42798     # even if built on a newer version of the OS.
42799     # The expected format is X.Y.Z
42800     MACOSX_VERSION_MIN=10.7.0
42801 
42802 
42803     # The macro takes the version with no dots, ex: 1070
42804     # Let the flags variables get resolved in make for easier override on make
42805     # command line.
42806     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42807     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42808   fi
42809 
42810   # Setup some hard coded includes
42811   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42812       -I${JDK_OUTPUTDIR}/include \
42813       -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
42814       -I${JDK_TOPDIR}/src/share/javavm/export \
42815       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
42816       -I${JDK_TOPDIR}/src/share/native/common \
42817       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
42818 
42819   # The shared libraries are compiled using the picflag.
42820   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42821   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42822 
42823   # Executable flags
42824   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42825   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42826 
42827 
42828 
42829 
42830 
42831 
42832   # Setup LDFLAGS et al.
42833   #
42834 
42835   # Now this is odd. The JDK native libraries have to link against libjvm.so
42836   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42837   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42838   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42839   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42840   # libraries will link to whatever is in memory. Yuck.
42841   #
42842   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42843   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42844     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42845     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42846       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42847     fi
42848     # TODO: make -debug optional "--disable-full-debug-symbols"
42849     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42850   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42851     # If this is a --hash-style=gnu system, use --hash-style=both, why?
42852     # We have previously set HAS_GNU_HASH if this is the case
42853     if test -n "$HAS_GNU_HASH"; then
42854       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42855     fi
42856     if test "x$OPENJDK_TARGET_OS" = xlinux; then
42857       # And since we now know that the linker is gnu, then add -z defs, to forbid
42858       # undefined symbols in object files.
42859       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42860       case $DEBUG_LEVEL in
42861         release )
42862           # tell linker to optimize libraries.
42863           # Should this be supplied to the OSS linker as well?
42864           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42865           ;;
42866         slowdebug )
42867           if test "x$HAS_LINKER_NOW" = "xtrue"; then
42868             # do relocations at load
42869             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42870             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42871           fi
42872           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42873             # mark relocations read only
42874             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42875             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42876           fi
42877           ;;
42878         fastdebug )
42879           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42880             # mark relocations read only
42881             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42882             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42883           fi
42884           ;;
42885         * )
42886           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42887           ;;
42888         esac
42889     fi
42890   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42891     LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42892     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42893   fi
42894 
42895   if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
42896     # If undefined behaviour detection is enabled then we need to tell linker.
42897     case $DEBUG_LEVEL in
42898       release | fastdebug )
42899         ;;
42900       slowdebug )
42901         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&5
42902 $as_echo "$as_me: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&2;}
42903         if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42904           # enable undefined behaviour checking
42905           LDFLAGS_JDK="$LDFLAGS_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42906           LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42907         fi
42908         ;;
42909       * )
42910         as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42911         ;;
42912     esac
42913   fi
42914 
42915   # Customize LDFLAGS for executables
42916 
42917   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42918 
42919   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42920     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42921       LDFLAGS_STACK_SIZE=1048576
42922     else
42923       LDFLAGS_STACK_SIZE=327680
42924     fi
42925     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42926   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42927     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42928   fi
42929 
42930   # Customize LDFLAGS for libs
42931   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42932 
42933   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42934     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42935     LDFLAGS_JDKLIB_SUFFIX=""
42936   else
42937     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42938         -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42939 
42940     # On some platforms (mac) the linker warns about non existing -L dirs.
42941     # Add server first if available. Linking aginst client does not always produce the same results.
42942     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42943     # Default to server for other variants.
42944     if test "x$JVM_VARIANT_SERVER" = xtrue; then
42945       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42946     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42947       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42948     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42949       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42950     else
42951       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42952     fi
42953 
42954     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42955     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42956       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42957     fi
42958   fi
42959 
42960 
42961 
42962 
42963 
42964 
42965 
42966 
42967   # Some Zero and Shark settings.
42968   # ZERO_ARCHFLAG tells the compiler which mode to build for
42969   case "${OPENJDK_TARGET_CPU}" in
42970     s390)
42971       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42972       ;;
42973     *)
42974       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42975   esac
42976 
42977   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42978 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42979   supports=yes
42980 
42981   saved_cflags="$CFLAGS"
42982   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42983   ac_ext=c
42984 ac_cpp='$CPP $CPPFLAGS'
42985 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42986 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42987 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42988 
42989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42990 /* end confdefs.h.  */
42991 int i;
42992 _ACEOF
42993 if ac_fn_c_try_compile "$LINENO"; then :
42994 
42995 else
42996   supports=no
42997 fi
42998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42999   ac_ext=cpp
43000 ac_cpp='$CXXCPP $CPPFLAGS'
43001 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43002 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43003 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43004 
43005   CFLAGS="$saved_cflags"
43006 
43007   saved_cxxflags="$CXXFLAGS"
43008   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
43009   ac_ext=cpp
43010 ac_cpp='$CXXCPP $CPPFLAGS'
43011 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43012 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43013 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43014 
43015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43016 /* end confdefs.h.  */
43017 int i;
43018 _ACEOF
43019 if ac_fn_cxx_try_compile "$LINENO"; then :
43020 
43021 else
43022   supports=no
43023 fi
43024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43025   ac_ext=cpp
43026 ac_cpp='$CXXCPP $CPPFLAGS'
43027 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43028 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43029 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43030 
43031   CXXFLAGS="$saved_cxxflags"
43032 
43033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43034 $as_echo "$supports" >&6; }
43035   if test "x$supports" = "xyes" ; then
43036     :
43037   else
43038     ZERO_ARCHFLAG=""
43039   fi
43040 
43041 
43042 
43043   # Check that the compiler supports -mX (or -qX on AIX) flags
43044   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
43045 
43046   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43047 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43048   supports=yes
43049 
43050   saved_cflags="$CFLAGS"
43051   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43052   ac_ext=c
43053 ac_cpp='$CPP $CPPFLAGS'
43054 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43055 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43056 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43057 
43058   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43059 /* end confdefs.h.  */
43060 int i;
43061 _ACEOF
43062 if ac_fn_c_try_compile "$LINENO"; then :
43063 
43064 else
43065   supports=no
43066 fi
43067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43068   ac_ext=cpp
43069 ac_cpp='$CXXCPP $CPPFLAGS'
43070 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43071 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43072 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43073 
43074   CFLAGS="$saved_cflags"
43075 
43076   saved_cxxflags="$CXXFLAGS"
43077   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43078   ac_ext=cpp
43079 ac_cpp='$CXXCPP $CPPFLAGS'
43080 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43081 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43082 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43083 
43084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43085 /* end confdefs.h.  */
43086 int i;
43087 _ACEOF
43088 if ac_fn_cxx_try_compile "$LINENO"; then :
43089 
43090 else
43091   supports=no
43092 fi
43093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43094   ac_ext=cpp
43095 ac_cpp='$CXXCPP $CPPFLAGS'
43096 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43097 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43098 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43099 
43100   CXXFLAGS="$saved_cxxflags"
43101 
43102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43103 $as_echo "$supports" >&6; }
43104   if test "x$supports" = "xyes" ; then
43105     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43106   else
43107     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43108   fi
43109 
43110 
43111 
43112   case "${TOOLCHAIN_TYPE}" in
43113     microsoft)
43114       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43115       ;;
43116     solstudio)
43117       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43118       ;;
43119     gcc)
43120       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43121       ;;
43122     clang)
43123       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43124       ;;
43125   esac
43126 
43127 
43128 
43129 # Setup debug symbols (need objcopy from the toolchain for that)
43130 
43131   #
43132   # ENABLE_DEBUG_SYMBOLS
43133   # This must be done after the toolchain is setup, since we're looking at objcopy.
43134   #
43135   # Check whether --enable-debug-symbols was given.
43136 if test "${enable_debug_symbols+set}" = set; then :
43137   enableval=$enable_debug_symbols;
43138 fi
43139 
43140 
43141   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43142 $as_echo_n "checking if we should generate debug symbols... " >&6; }
43143 
43144   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43145     # explicit enabling of enable-debug-symbols and can't find objcopy
43146     #   this is an error
43147     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43148   fi
43149 
43150   if test "x$enable_debug_symbols" = "xyes"; then
43151     ENABLE_DEBUG_SYMBOLS=true
43152   elif test "x$enable_debug_symbols" = "xno"; then
43153     ENABLE_DEBUG_SYMBOLS=false
43154   else
43155     # Default is on if objcopy is found
43156     if test "x$OBJCOPY" != x; then
43157       ENABLE_DEBUG_SYMBOLS=true
43158     # MacOS X and Windows don't use objcopy but default is on for those OSes
43159     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43160       ENABLE_DEBUG_SYMBOLS=true
43161     else
43162       ENABLE_DEBUG_SYMBOLS=false
43163     fi
43164   fi
43165 
43166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43167 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43168 
43169   #
43170   # ZIP_DEBUGINFO_FILES
43171   #
43172   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43173 $as_echo_n "checking if we should zip debug-info files... " >&6; }
43174   # Check whether --enable-zip-debug-info was given.
43175 if test "${enable_zip_debug_info+set}" = set; then :
43176   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43177 else
43178   enable_zip_debug_info="yes"
43179 fi
43180 
43181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43182 $as_echo "${enable_zip_debug_info}" >&6; }
43183 
43184   if test "x${enable_zip_debug_info}" = "xno"; then
43185     ZIP_DEBUGINFO_FILES=false
43186   else
43187     ZIP_DEBUGINFO_FILES=true
43188   fi
43189 
43190 
43191 
43192 
43193 
43194 ###############################################################################
43195 #
43196 # Check dependencies for external and internal libraries.
43197 #
43198 ###############################################################################
43199 
43200 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43201 
43202   # When using cygwin or msys, we need a wrapper binary that renames
43203   # /cygdrive/c/ arguments into c:/ arguments and peeks into
43204   # @files and rewrites these too! This wrapper binary is
43205   # called fixpath.
43206   FIXPATH=
43207   if test "x$OPENJDK_BUILD_OS" = xwindows; then
43208     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43209 $as_echo_n "checking if fixpath can be created... " >&6; }
43210     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43211     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43212     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43213       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43214       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43215       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43216       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43217     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43218       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43219       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43220 
43221       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43222       # @ was chosen as separator to minimize risk of other tools messing around with it
43223       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43224       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43225 
43226       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43227     fi
43228     rm -f $OUTPUT_ROOT/fixpath*
43229     cd $OUTPUT_ROOT
43230     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43231     cd $CURDIR
43232 
43233     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43234       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43235 $as_echo "no" >&6; }
43236       cat $OUTPUT_ROOT/fixpath1.log
43237       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43238     fi
43239     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43240 $as_echo "yes" >&6; }
43241     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43242 $as_echo_n "checking if fixpath.exe works... " >&6; }
43243     cd $OUTPUT_ROOT
43244     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43245     cd $CURDIR
43246     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43247       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43248 $as_echo "no" >&6; }
43249       cat $OUTPUT_ROOT/fixpath2.log
43250       as_fn_error $? "fixpath did not work!" "$LINENO" 5
43251     fi
43252     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43253 $as_echo "yes" >&6; }
43254     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43255   fi
43256 
43257 
43258 
43259 
43260 
43261 
43262   ###############################################################################
43263   #
43264   # OS specific settings that we never will need to probe.
43265   #
43266   if test "x$OPENJDK_TARGET_OS" = xlinux; then
43267     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43268 $as_echo_n "checking what is not needed on Linux?... " >&6; }
43269     PULSE_NOT_NEEDED=yes
43270     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43271 $as_echo "pulse" >&6; }
43272   fi
43273 
43274   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43275     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43276 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
43277     ALSA_NOT_NEEDED=yes
43278     PULSE_NOT_NEEDED=yes
43279     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43280 $as_echo "alsa pulse" >&6; }
43281   fi
43282 
43283   if test "x$OPENJDK_TARGET_OS" = xaix; then
43284     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43285 $as_echo_n "checking what is not needed on AIX?... " >&6; }
43286     ALSA_NOT_NEEDED=yes
43287     PULSE_NOT_NEEDED=yes
43288     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43289 $as_echo "alsa pulse" >&6; }
43290   fi
43291 
43292 
43293   if test "x$OPENJDK_TARGET_OS" = xwindows; then
43294     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43295 $as_echo_n "checking what is not needed on Windows?... " >&6; }
43296     CUPS_NOT_NEEDED=yes
43297     ALSA_NOT_NEEDED=yes
43298     PULSE_NOT_NEEDED=yes
43299     X11_NOT_NEEDED=yes
43300     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43301 $as_echo "alsa cups pulse x11" >&6; }
43302   fi
43303 
43304   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43305     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43306 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43307     ALSA_NOT_NEEDED=yes
43308     PULSE_NOT_NEEDED=yes
43309     X11_NOT_NEEDED=yes
43310     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43311 $as_echo "alsa pulse x11" >&6; }
43312   fi
43313 
43314   if test "x$OPENJDK_TARGET_OS" = xbsd; then
43315     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43316 $as_echo_n "checking what is not needed on bsd?... " >&6; }
43317     ALSA_NOT_NEEDED=yes
43318     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43319 $as_echo "alsa" >&6; }
43320   fi
43321 
43322   if test "x$OPENJDK" = "xfalse"; then
43323     FREETYPE_NOT_NEEDED=yes
43324   fi
43325 
43326   if test "x$SUPPORT_HEADFUL" = xno; then
43327     X11_NOT_NEEDED=yes
43328   fi
43329 
43330 
43331 
43332   ###############################################################################
43333   #
43334   # Check for X Windows
43335   #
43336 
43337   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43338   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43339   # --x-libraries for the sysroot, if that seems to be correct.
43340   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43341     if test "x$SYSROOT" != "x"; then
43342       if test "x$x_includes" = xNONE; then
43343         if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43344           x_includes="$SYSROOT/usr/X11R6/include"
43345         elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43346           x_includes="$SYSROOT/usr/include"
43347         fi
43348       fi
43349       if test "x$x_libraries" = xNONE; then
43350         if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43351           x_libraries="$SYSROOT/usr/X11R6/lib"
43352         elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43353           x_libraries="$SYSROOT/usr/lib64"
43354         elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43355           x_libraries="$SYSROOT/usr/lib"
43356         fi
43357       fi
43358     fi
43359   fi
43360 
43361   # Now let autoconf do it's magic
43362   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43363 $as_echo_n "checking for X... " >&6; }
43364 
43365 
43366 # Check whether --with-x was given.
43367 if test "${with_x+set}" = set; then :
43368   withval=$with_x;
43369 fi
43370 
43371 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43372 if test "x$with_x" = xno; then
43373   # The user explicitly disabled X.
43374   have_x=disabled
43375 else
43376   case $x_includes,$x_libraries in #(
43377     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43378     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43379   $as_echo_n "(cached) " >&6
43380 else
43381   # One or both of the vars are not set, and there is no cached value.
43382 ac_x_includes=no ac_x_libraries=no
43383 rm -f -r conftest.dir
43384 if mkdir conftest.dir; then
43385   cd conftest.dir
43386   cat >Imakefile <<'_ACEOF'
43387 incroot:
43388         @echo incroot='${INCROOT}'
43389 usrlibdir:
43390         @echo usrlibdir='${USRLIBDIR}'
43391 libdir:
43392         @echo libdir='${LIBDIR}'
43393 _ACEOF
43394   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43395     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43396     for ac_var in incroot usrlibdir libdir; do
43397       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43398     done
43399     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43400     for ac_extension in a so sl dylib la dll; do
43401       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43402          test -f "$ac_im_libdir/libX11.$ac_extension"; then
43403         ac_im_usrlibdir=$ac_im_libdir; break
43404       fi
43405     done
43406     # Screen out bogus values from the imake configuration.  They are
43407     # bogus both because they are the default anyway, and because
43408     # using them would break gcc on systems where it needs fixed includes.
43409     case $ac_im_incroot in
43410         /usr/include) ac_x_includes= ;;
43411         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43412     esac
43413     case $ac_im_usrlibdir in
43414         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
43415         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43416     esac
43417   fi
43418   cd ..
43419   rm -f -r conftest.dir
43420 fi
43421 
43422 # Standard set of common directories for X headers.
43423 # Check X11 before X11Rn because it is often a symlink to the current release.
43424 ac_x_header_dirs='
43425 /usr/X11/include
43426 /usr/X11R7/include
43427 /usr/X11R6/include
43428 /usr/X11R5/include
43429 /usr/X11R4/include
43430 
43431 /usr/include/X11
43432 /usr/include/X11R7
43433 /usr/include/X11R6
43434 /usr/include/X11R5
43435 /usr/include/X11R4
43436 
43437 /usr/local/X11/include
43438 /usr/local/X11R7/include
43439 /usr/local/X11R6/include
43440 /usr/local/X11R5/include
43441 /usr/local/X11R4/include
43442 
43443 /usr/local/include/X11
43444 /usr/local/include/X11R7
43445 /usr/local/include/X11R6
43446 /usr/local/include/X11R5
43447 /usr/local/include/X11R4
43448 
43449 /usr/X386/include
43450 /usr/x386/include
43451 /usr/XFree86/include/X11
43452 
43453 /usr/include
43454 /usr/local/include
43455 /usr/unsupported/include
43456 /usr/athena/include
43457 /usr/local/x11r5/include
43458 /usr/lpp/Xamples/include
43459 
43460 /usr/openwin/include
43461 /usr/openwin/share/include'
43462 
43463 if test "$ac_x_includes" = no; then
43464   # Guess where to find include files, by looking for Xlib.h.
43465   # First, try using that file with no special directory specified.
43466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43467 /* end confdefs.h.  */
43468 #include <X11/Xlib.h>
43469 _ACEOF
43470 if ac_fn_cxx_try_cpp "$LINENO"; then :
43471   # We can compile using X headers with no special include directory.
43472 ac_x_includes=
43473 else
43474   for ac_dir in $ac_x_header_dirs; do
43475   if test -r "$ac_dir/X11/Xlib.h"; then
43476     ac_x_includes=$ac_dir
43477     break
43478   fi
43479 done
43480 fi
43481 rm -f conftest.err conftest.i conftest.$ac_ext
43482 fi # $ac_x_includes = no
43483 
43484 if test "$ac_x_libraries" = no; then
43485   # Check for the libraries.
43486   # See if we find them without any special options.
43487   # Don't add to $LIBS permanently.
43488   ac_save_LIBS=$LIBS
43489   LIBS="-lX11 $LIBS"
43490   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43491 /* end confdefs.h.  */
43492 #include <X11/Xlib.h>
43493 int
43494 main ()
43495 {
43496 XrmInitialize ()
43497   ;
43498   return 0;
43499 }
43500 _ACEOF
43501 if ac_fn_cxx_try_link "$LINENO"; then :
43502   LIBS=$ac_save_LIBS
43503 # We can link X programs with no special library path.
43504 ac_x_libraries=
43505 else
43506   LIBS=$ac_save_LIBS
43507 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43508 do
43509   # Don't even attempt the hair of trying to link an X program!
43510   for ac_extension in a so sl dylib la dll; do
43511     if test -r "$ac_dir/libX11.$ac_extension"; then
43512       ac_x_libraries=$ac_dir
43513       break 2
43514     fi
43515   done
43516 done
43517 fi
43518 rm -f core conftest.err conftest.$ac_objext \
43519     conftest$ac_exeext conftest.$ac_ext
43520 fi # $ac_x_libraries = no
43521 
43522 case $ac_x_includes,$ac_x_libraries in #(
43523   no,* | *,no | *\'*)
43524     # Didn't find X, or a directory has "'" in its name.
43525     ac_cv_have_x="have_x=no";; #(
43526   *)
43527     # Record where we found X for the cache.
43528     ac_cv_have_x="have_x=yes\
43529         ac_x_includes='$ac_x_includes'\
43530         ac_x_libraries='$ac_x_libraries'"
43531 esac
43532 fi
43533 ;; #(
43534     *) have_x=yes;;
43535   esac
43536   eval "$ac_cv_have_x"
43537 fi # $with_x != no
43538 
43539 if test "$have_x" != yes; then
43540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43541 $as_echo "$have_x" >&6; }
43542   no_x=yes
43543 else
43544   # If each of the values was on the command line, it overrides each guess.
43545   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43546   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43547   # Update the cache value to reflect the command line values.
43548   ac_cv_have_x="have_x=yes\
43549         ac_x_includes='$x_includes'\
43550         ac_x_libraries='$x_libraries'"
43551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43552 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43553 fi
43554 
43555   if test "$no_x" = yes; then
43556   # Not all programs may use this symbol, but it does not hurt to define it.
43557 
43558 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43559 
43560   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43561 else
43562   if test -n "$x_includes"; then
43563     X_CFLAGS="$X_CFLAGS -I$x_includes"
43564   fi
43565 
43566   # It would also be nice to do this for all -L options, not just this one.
43567   if test -n "$x_libraries"; then
43568     X_LIBS="$X_LIBS -L$x_libraries"
43569     # For Solaris; some versions of Sun CC require a space after -R and
43570     # others require no space.  Words are not sufficient . . . .
43571     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43572 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
43573     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43574     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43575     ac_cxx_werror_flag=yes
43576     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43577 /* end confdefs.h.  */
43578 
43579 int
43580 main ()
43581 {
43582 
43583   ;
43584   return 0;
43585 }
43586 _ACEOF
43587 if ac_fn_cxx_try_link "$LINENO"; then :
43588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43589 $as_echo "no" >&6; }
43590        X_LIBS="$X_LIBS -R$x_libraries"
43591 else
43592   LIBS="$ac_xsave_LIBS -R $x_libraries"
43593        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43594 /* end confdefs.h.  */
43595 
43596 int
43597 main ()
43598 {
43599 
43600   ;
43601   return 0;
43602 }
43603 _ACEOF
43604 if ac_fn_cxx_try_link "$LINENO"; then :
43605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43606 $as_echo "yes" >&6; }
43607           X_LIBS="$X_LIBS -R $x_libraries"
43608 else
43609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43610 $as_echo "neither works" >&6; }
43611 fi
43612 rm -f core conftest.err conftest.$ac_objext \
43613     conftest$ac_exeext conftest.$ac_ext
43614 fi
43615 rm -f core conftest.err conftest.$ac_objext \
43616     conftest$ac_exeext conftest.$ac_ext
43617     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43618     LIBS=$ac_xsave_LIBS
43619   fi
43620 
43621   # Check for system-dependent libraries X programs must link with.
43622   # Do this before checking for the system-independent R6 libraries
43623   # (-lICE), since we may need -lsocket or whatever for X linking.
43624 
43625   if test "$ISC" = yes; then
43626     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43627   else
43628     # Martyn Johnson says this is needed for Ultrix, if the X
43629     # libraries were built with DECnet support.  And Karl Berry says
43630     # the Alpha needs dnet_stub (dnet does not exist).
43631     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43632     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43633 /* end confdefs.h.  */
43634 
43635 /* Override any GCC internal prototype to avoid an error.
43636    Use char because int might match the return type of a GCC
43637    builtin and then its argument prototype would still apply.  */
43638 #ifdef __cplusplus
43639 extern "C"
43640 #endif
43641 char XOpenDisplay ();
43642 int
43643 main ()
43644 {
43645 return XOpenDisplay ();
43646   ;
43647   return 0;
43648 }
43649 _ACEOF
43650 if ac_fn_cxx_try_link "$LINENO"; then :
43651 
43652 else
43653   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43654 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43655 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43656   $as_echo_n "(cached) " >&6
43657 else
43658   ac_check_lib_save_LIBS=$LIBS
43659 LIBS="-ldnet  $LIBS"
43660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43661 /* end confdefs.h.  */
43662 
43663 /* Override any GCC internal prototype to avoid an error.
43664    Use char because int might match the return type of a GCC
43665    builtin and then its argument prototype would still apply.  */
43666 #ifdef __cplusplus
43667 extern "C"
43668 #endif
43669 char dnet_ntoa ();
43670 int
43671 main ()
43672 {
43673 return dnet_ntoa ();
43674   ;
43675   return 0;
43676 }
43677 _ACEOF
43678 if ac_fn_cxx_try_link "$LINENO"; then :
43679   ac_cv_lib_dnet_dnet_ntoa=yes
43680 else
43681   ac_cv_lib_dnet_dnet_ntoa=no
43682 fi
43683 rm -f core conftest.err conftest.$ac_objext \
43684     conftest$ac_exeext conftest.$ac_ext
43685 LIBS=$ac_check_lib_save_LIBS
43686 fi
43687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43688 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43689 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43690   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43691 fi
43692 
43693     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43694       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43695 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43696 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43697   $as_echo_n "(cached) " >&6
43698 else
43699   ac_check_lib_save_LIBS=$LIBS
43700 LIBS="-ldnet_stub  $LIBS"
43701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43702 /* end confdefs.h.  */
43703 
43704 /* Override any GCC internal prototype to avoid an error.
43705    Use char because int might match the return type of a GCC
43706    builtin and then its argument prototype would still apply.  */
43707 #ifdef __cplusplus
43708 extern "C"
43709 #endif
43710 char dnet_ntoa ();
43711 int
43712 main ()
43713 {
43714 return dnet_ntoa ();
43715   ;
43716   return 0;
43717 }
43718 _ACEOF
43719 if ac_fn_cxx_try_link "$LINENO"; then :
43720   ac_cv_lib_dnet_stub_dnet_ntoa=yes
43721 else
43722   ac_cv_lib_dnet_stub_dnet_ntoa=no
43723 fi
43724 rm -f core conftest.err conftest.$ac_objext \
43725     conftest$ac_exeext conftest.$ac_ext
43726 LIBS=$ac_check_lib_save_LIBS
43727 fi
43728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43729 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43730 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43731   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43732 fi
43733 
43734     fi
43735 fi
43736 rm -f core conftest.err conftest.$ac_objext \
43737     conftest$ac_exeext conftest.$ac_ext
43738     LIBS="$ac_xsave_LIBS"
43739 
43740     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43741     # to get the SysV transport functions.
43742     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43743     # needs -lnsl.
43744     # The nsl library prevents programs from opening the X display
43745     # on Irix 5.2, according to T.E. Dickey.
43746     # The functions gethostbyname, getservbyname, and inet_addr are
43747     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43748     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43749 if test "x$ac_cv_func_gethostbyname" = xyes; then :
43750 
43751 fi
43752 
43753     if test $ac_cv_func_gethostbyname = no; then
43754       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43755 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43756 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43757   $as_echo_n "(cached) " >&6
43758 else
43759   ac_check_lib_save_LIBS=$LIBS
43760 LIBS="-lnsl  $LIBS"
43761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43762 /* end confdefs.h.  */
43763 
43764 /* Override any GCC internal prototype to avoid an error.
43765    Use char because int might match the return type of a GCC
43766    builtin and then its argument prototype would still apply.  */
43767 #ifdef __cplusplus
43768 extern "C"
43769 #endif
43770 char gethostbyname ();
43771 int
43772 main ()
43773 {
43774 return gethostbyname ();
43775   ;
43776   return 0;
43777 }
43778 _ACEOF
43779 if ac_fn_cxx_try_link "$LINENO"; then :
43780   ac_cv_lib_nsl_gethostbyname=yes
43781 else
43782   ac_cv_lib_nsl_gethostbyname=no
43783 fi
43784 rm -f core conftest.err conftest.$ac_objext \
43785     conftest$ac_exeext conftest.$ac_ext
43786 LIBS=$ac_check_lib_save_LIBS
43787 fi
43788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43789 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43790 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43791   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43792 fi
43793 
43794       if test $ac_cv_lib_nsl_gethostbyname = no; then
43795         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43796 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43797 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43798   $as_echo_n "(cached) " >&6
43799 else
43800   ac_check_lib_save_LIBS=$LIBS
43801 LIBS="-lbsd  $LIBS"
43802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43803 /* end confdefs.h.  */
43804 
43805 /* Override any GCC internal prototype to avoid an error.
43806    Use char because int might match the return type of a GCC
43807    builtin and then its argument prototype would still apply.  */
43808 #ifdef __cplusplus
43809 extern "C"
43810 #endif
43811 char gethostbyname ();
43812 int
43813 main ()
43814 {
43815 return gethostbyname ();
43816   ;
43817   return 0;
43818 }
43819 _ACEOF
43820 if ac_fn_cxx_try_link "$LINENO"; then :
43821   ac_cv_lib_bsd_gethostbyname=yes
43822 else
43823   ac_cv_lib_bsd_gethostbyname=no
43824 fi
43825 rm -f core conftest.err conftest.$ac_objext \
43826     conftest$ac_exeext conftest.$ac_ext
43827 LIBS=$ac_check_lib_save_LIBS
43828 fi
43829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43830 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43831 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43832   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43833 fi
43834 
43835       fi
43836     fi
43837 
43838     # lieder@skyler.mavd.honeywell.com says without -lsocket,
43839     # socket/setsockopt and other routines are undefined under SCO ODT
43840     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43841     # on later versions), says Simon Leinen: it contains gethostby*
43842     # variants that don't use the name server (or something).  -lsocket
43843     # must be given before -lnsl if both are needed.  We assume that
43844     # if connect needs -lnsl, so does gethostbyname.
43845     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43846 if test "x$ac_cv_func_connect" = xyes; then :
43847 
43848 fi
43849 
43850     if test $ac_cv_func_connect = no; then
43851       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43852 $as_echo_n "checking for connect in -lsocket... " >&6; }
43853 if ${ac_cv_lib_socket_connect+:} false; then :
43854   $as_echo_n "(cached) " >&6
43855 else
43856   ac_check_lib_save_LIBS=$LIBS
43857 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43859 /* end confdefs.h.  */
43860 
43861 /* Override any GCC internal prototype to avoid an error.
43862    Use char because int might match the return type of a GCC
43863    builtin and then its argument prototype would still apply.  */
43864 #ifdef __cplusplus
43865 extern "C"
43866 #endif
43867 char connect ();
43868 int
43869 main ()
43870 {
43871 return connect ();
43872   ;
43873   return 0;
43874 }
43875 _ACEOF
43876 if ac_fn_cxx_try_link "$LINENO"; then :
43877   ac_cv_lib_socket_connect=yes
43878 else
43879   ac_cv_lib_socket_connect=no
43880 fi
43881 rm -f core conftest.err conftest.$ac_objext \
43882     conftest$ac_exeext conftest.$ac_ext
43883 LIBS=$ac_check_lib_save_LIBS
43884 fi
43885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43886 $as_echo "$ac_cv_lib_socket_connect" >&6; }
43887 if test "x$ac_cv_lib_socket_connect" = xyes; then :
43888   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43889 fi
43890 
43891     fi
43892 
43893     # Guillermo Gomez says -lposix is necessary on A/UX.
43894     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43895 if test "x$ac_cv_func_remove" = xyes; then :
43896 
43897 fi
43898 
43899     if test $ac_cv_func_remove = no; then
43900       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43901 $as_echo_n "checking for remove in -lposix... " >&6; }
43902 if ${ac_cv_lib_posix_remove+:} false; then :
43903   $as_echo_n "(cached) " >&6
43904 else
43905   ac_check_lib_save_LIBS=$LIBS
43906 LIBS="-lposix  $LIBS"
43907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43908 /* end confdefs.h.  */
43909 
43910 /* Override any GCC internal prototype to avoid an error.
43911    Use char because int might match the return type of a GCC
43912    builtin and then its argument prototype would still apply.  */
43913 #ifdef __cplusplus
43914 extern "C"
43915 #endif
43916 char remove ();
43917 int
43918 main ()
43919 {
43920 return remove ();
43921   ;
43922   return 0;
43923 }
43924 _ACEOF
43925 if ac_fn_cxx_try_link "$LINENO"; then :
43926   ac_cv_lib_posix_remove=yes
43927 else
43928   ac_cv_lib_posix_remove=no
43929 fi
43930 rm -f core conftest.err conftest.$ac_objext \
43931     conftest$ac_exeext conftest.$ac_ext
43932 LIBS=$ac_check_lib_save_LIBS
43933 fi
43934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43935 $as_echo "$ac_cv_lib_posix_remove" >&6; }
43936 if test "x$ac_cv_lib_posix_remove" = xyes; then :
43937   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43938 fi
43939 
43940     fi
43941 
43942     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43943     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43944 if test "x$ac_cv_func_shmat" = xyes; then :
43945 
43946 fi
43947 
43948     if test $ac_cv_func_shmat = no; then
43949       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43950 $as_echo_n "checking for shmat in -lipc... " >&6; }
43951 if ${ac_cv_lib_ipc_shmat+:} false; then :
43952   $as_echo_n "(cached) " >&6
43953 else
43954   ac_check_lib_save_LIBS=$LIBS
43955 LIBS="-lipc  $LIBS"
43956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43957 /* end confdefs.h.  */
43958 
43959 /* Override any GCC internal prototype to avoid an error.
43960    Use char because int might match the return type of a GCC
43961    builtin and then its argument prototype would still apply.  */
43962 #ifdef __cplusplus
43963 extern "C"
43964 #endif
43965 char shmat ();
43966 int
43967 main ()
43968 {
43969 return shmat ();
43970   ;
43971   return 0;
43972 }
43973 _ACEOF
43974 if ac_fn_cxx_try_link "$LINENO"; then :
43975   ac_cv_lib_ipc_shmat=yes
43976 else
43977   ac_cv_lib_ipc_shmat=no
43978 fi
43979 rm -f core conftest.err conftest.$ac_objext \
43980     conftest$ac_exeext conftest.$ac_ext
43981 LIBS=$ac_check_lib_save_LIBS
43982 fi
43983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43984 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43985 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43986   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43987 fi
43988 
43989     fi
43990   fi
43991 
43992   # Check for libraries that X11R6 Xt/Xaw programs need.
43993   ac_save_LDFLAGS=$LDFLAGS
43994   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43995   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43996   # check for ICE first), but we must link in the order -lSM -lICE or
43997   # we get undefined symbols.  So assume we have SM if we have ICE.
43998   # These have to be linked with before -lX11, unlike the other
43999   # libraries we check for below, so use a different variable.
44000   # John Interrante, Karl Berry
44001   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44002 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44003 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44004   $as_echo_n "(cached) " >&6
44005 else
44006   ac_check_lib_save_LIBS=$LIBS
44007 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44009 /* end confdefs.h.  */
44010 
44011 /* Override any GCC internal prototype to avoid an error.
44012    Use char because int might match the return type of a GCC
44013    builtin and then its argument prototype would still apply.  */
44014 #ifdef __cplusplus
44015 extern "C"
44016 #endif
44017 char IceConnectionNumber ();
44018 int
44019 main ()
44020 {
44021 return IceConnectionNumber ();
44022   ;
44023   return 0;
44024 }
44025 _ACEOF
44026 if ac_fn_cxx_try_link "$LINENO"; then :
44027   ac_cv_lib_ICE_IceConnectionNumber=yes
44028 else
44029   ac_cv_lib_ICE_IceConnectionNumber=no
44030 fi
44031 rm -f core conftest.err conftest.$ac_objext \
44032     conftest$ac_exeext conftest.$ac_ext
44033 LIBS=$ac_check_lib_save_LIBS
44034 fi
44035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44036 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44037 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44038   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44039 fi
44040 
44041   LDFLAGS=$ac_save_LDFLAGS
44042 
44043 fi
44044 
44045 
44046   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44047   # this doesn't make sense so we remove it.
44048   if test "x$COMPILE_TYPE" = xcross; then
44049     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44050   fi
44051 
44052   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
44053 
44054   # Print a helpful message on how to acquire the necessary build dependency.
44055   # x11 is the help tag: freetype, cups, pulse, alsa etc
44056   MISSING_DEPENDENCY=x11
44057 
44058   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44059     cygwin_help $MISSING_DEPENDENCY
44060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44061     msys_help $MISSING_DEPENDENCY
44062   else
44063     PKGHANDLER_COMMAND=
44064 
44065     case $PKGHANDLER in
44066       apt-get)
44067         apt_help     $MISSING_DEPENDENCY ;;
44068       yum)
44069         yum_help     $MISSING_DEPENDENCY ;;
44070       port)
44071         port_help    $MISSING_DEPENDENCY ;;
44072       pkgutil)
44073         pkgutil_help $MISSING_DEPENDENCY ;;
44074       pkgadd)
44075         pkgadd_help  $MISSING_DEPENDENCY ;;
44076     esac
44077 
44078     if test "x$PKGHANDLER_COMMAND" != x; then
44079       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44080     fi
44081   fi
44082 
44083     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44084   fi
44085 
44086   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44087     OPENWIN_HOME="/usr/openwin"
44088     X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44089     X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44090         -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44091         -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44092         -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44093   fi
44094 
44095   #
44096   # Weird Sol10 something check...TODO change to try compile
44097   #
44098   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
44099     if test "`uname -r`" = "5.10"; then
44100       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
44101         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
44102       fi
44103     fi
44104   fi
44105 
44106   ac_ext=c
44107 ac_cpp='$CPP $CPPFLAGS'
44108 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44109 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44110 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44111 
44112   OLD_CFLAGS="$CFLAGS"
44113   CFLAGS="$CFLAGS $X_CFLAGS"
44114 
44115   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44116   for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44117 do :
44118   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44119 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44120         # include <X11/Xlib.h>
44121         # include <X11/Xutil.h>
44122 
44123 
44124 "
44125 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44126   cat >>confdefs.h <<_ACEOF
44127 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44128 _ACEOF
44129  X11_A_OK=yes
44130 else
44131   X11_A_OK=no; break
44132 fi
44133 
44134 done
44135 
44136 
44137   CFLAGS="$OLD_CFLAGS"
44138   ac_ext=cpp
44139 ac_cpp='$CXXCPP $CPPFLAGS'
44140 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44141 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44142 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44143 
44144 
44145   if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
44146 
44147   # Print a helpful message on how to acquire the necessary build dependency.
44148   # x11 is the help tag: freetype, cups, pulse, alsa etc
44149   MISSING_DEPENDENCY=x11
44150 
44151   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44152     cygwin_help $MISSING_DEPENDENCY
44153   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44154     msys_help $MISSING_DEPENDENCY
44155   else
44156     PKGHANDLER_COMMAND=
44157 
44158     case $PKGHANDLER in
44159       apt-get)
44160         apt_help     $MISSING_DEPENDENCY ;;
44161       yum)
44162         yum_help     $MISSING_DEPENDENCY ;;
44163       port)
44164         port_help    $MISSING_DEPENDENCY ;;
44165       pkgutil)
44166         pkgutil_help $MISSING_DEPENDENCY ;;
44167       pkgadd)
44168         pkgadd_help  $MISSING_DEPENDENCY ;;
44169     esac
44170 
44171     if test "x$PKGHANDLER_COMMAND" != x; then
44172       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44173     fi
44174   fi
44175 
44176     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44177   fi
44178 
44179 
44180 
44181 
44182 
44183 
44184   ###############################################################################
44185   #
44186   # The common unix printing system cups is used to print from java.
44187   #
44188 
44189 # Check whether --with-cups was given.
44190 if test "${with_cups+set}" = set; then :
44191   withval=$with_cups;
44192 fi
44193 
44194 
44195 # Check whether --with-cups-include was given.
44196 if test "${with_cups_include+set}" = set; then :
44197   withval=$with_cups_include;
44198 fi
44199 
44200 
44201   if test "x$CUPS_NOT_NEEDED" = xyes; then
44202     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44203       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44204 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44205     fi
44206     CUPS_CFLAGS=
44207   else
44208     CUPS_FOUND=no
44209 
44210     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44211       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44212     fi
44213 
44214     if test "x${with_cups}" != x; then
44215       CUPS_CFLAGS="-I${with_cups}/include"
44216       CUPS_FOUND=yes
44217     fi
44218     if test "x${with_cups_include}" != x; then
44219       CUPS_CFLAGS="-I${with_cups_include}"
44220       CUPS_FOUND=yes
44221     fi
44222     if test "x$CUPS_FOUND" = xno; then
44223 
44224 
44225   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44226     # Source the builddeps file again, to make sure it uses the latest variables!
44227     . $builddepsfile
44228     # Look for a target and build machine specific resource!
44229     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44230     if test "x$resource" = x; then
44231       # Ok, lets instead look for a target specific resource
44232       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44233     fi
44234     if test "x$resource" = x; then
44235       # Ok, lets instead look for a build specific resource
44236       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44237     fi
44238     if test "x$resource" = x; then
44239       # Ok, lets instead look for a generic resource
44240       # (The cups comes from M4 and not the shell, thus no need for eval here.)
44241       resource=${builddep_cups}
44242     fi
44243     if test "x$resource" != x; then
44244       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44245 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44246       # If the resource in the builddeps.conf file is an existing directory,
44247       # for example /java/linux/cups
44248       if test -d ${resource}; then
44249         depdir=${resource}
44250       else
44251 
44252   # cups is for example mymodule
44253   # $resource is for example libs/general/libmymod_1_2_3.zip
44254   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44255   # $with_builddeps_dir is for example /localhome/builddeps
44256   # depdir is the name of the variable into which we store the depdir, eg MYMOD
44257   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44258   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44259   filename=`basename $resource`
44260   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44261   filebase=${filename%%.*}
44262   extension=${filename#*.}
44263   installdir=$with_builddeps_dir/$filebase
44264   if test ! -f $installdir/$filename.unpacked; then
44265     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44266 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44267     if test ! -d $installdir; then
44268       mkdir -p $installdir
44269     fi
44270     if test ! -d $installdir; then
44271       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44272     fi
44273     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44274     touch $tmpfile
44275     if test ! -f $tmpfile; then
44276       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44277     fi
44278 
44279   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44280   # $tmpfile is the local file name for the downloaded file.
44281   VALID_TOOL=no
44282   if test "x$BDEPS_FTP" = xwget; then
44283     VALID_TOOL=yes
44284     wget -O $tmpfile $with_builddeps_server/$resource
44285   fi
44286   if test "x$BDEPS_FTP" = xlftp; then
44287     VALID_TOOL=yes
44288     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44289   fi
44290   if test "x$BDEPS_FTP" = xftp; then
44291     VALID_TOOL=yes
44292     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44293     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44294     FTPUSERPWD=${FTPSERVER%%@*}
44295     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44296       FTPUSER=${userpwd%%:*}
44297       FTPPWD=${userpwd#*@}
44298       FTPSERVER=${FTPSERVER#*@}
44299     else
44300       FTPUSER=ftp
44301       FTPPWD=ftp
44302     fi
44303     # the "pass" command does not work on some
44304     # ftp clients (read ftp.exe) but if it works,
44305     # passive mode is better!
44306     ( \
44307         echo "user $FTPUSER $FTPPWD"        ; \
44308         echo "pass"                         ; \
44309         echo "bin"                          ; \
44310         echo "get $FTPPATH $tmpfile"              ; \
44311     ) | ftp -in $FTPSERVER
44312   fi
44313   if test "x$VALID_TOOL" != xyes; then
44314     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44315   fi
44316 
44317     mv $tmpfile $installdir/$filename
44318     if test ! -s $installdir/$filename; then
44319       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44320     fi
44321     case "$extension" in
44322       zip)  echo "Unzipping $installdir/$filename..."
44323         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44324         ;;
44325       tar.gz) echo "Untaring $installdir/$filename..."
44326         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44327         ;;
44328       tgz) echo "Untaring $installdir/$filename..."
44329         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44330         ;;
44331       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44332         ;;
44333     esac
44334   fi
44335   if test -f $installdir/$filename.unpacked; then
44336     depdir=$installdir
44337   fi
44338 
44339       fi
44340       # Source the builddeps file again, because in the previous command, the depdir
44341       # was updated to point at the current build dependency install directory.
44342       . $builddepsfile
44343       # Now extract variables from the builddeps.conf files.
44344       theroot=${builddep_cups_ROOT}
44345       thecflags=${builddep_cups_CFLAGS}
44346       thelibs=${builddep_cups_LIBS}
44347       if test "x$depdir" = x; then
44348         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44349       fi
44350       CUPS=$depdir
44351       if test "x$theroot" != x; then
44352         CUPS="$theroot"
44353       fi
44354       if test "x$thecflags" != x; then
44355         CUPS_CFLAGS="$thecflags"
44356       fi
44357       if test "x$thelibs" != x; then
44358         CUPS_LIBS="$thelibs"
44359       fi
44360       CUPS_FOUND=yes
44361 
44362     fi
44363 
44364   fi
44365 
44366     fi
44367     if test "x$CUPS_FOUND" = xno; then
44368       # Are the cups headers installed in the default /usr/include location?
44369       for ac_header in cups/cups.h cups/ppd.h
44370 do :
44371   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44372 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44373 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44374   cat >>confdefs.h <<_ACEOF
44375 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44376 _ACEOF
44377 
44378             CUPS_FOUND=yes
44379             CUPS_CFLAGS=
44380             DEFAULT_CUPS=yes
44381 
44382 
44383 fi
44384 
44385 done
44386 
44387     fi
44388     if test "x$CUPS_FOUND" = xno; then
44389       # Getting nervous now? Lets poke around for standard Solaris third-party
44390       # package installation locations.
44391       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44392 $as_echo_n "checking for cups headers... " >&6; }
44393       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44394         # An SFW package seems to be installed!
44395         CUPS_FOUND=yes
44396         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44397       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44398         # A CSW package seems to be installed!
44399         CUPS_FOUND=yes
44400         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44401       fi
44402       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44403 $as_echo "$CUPS_FOUND" >&6; }
44404     fi
44405     if test "x$CUPS_FOUND" = xno; then
44406 
44407   # Print a helpful message on how to acquire the necessary build dependency.
44408   # cups is the help tag: freetype, cups, pulse, alsa etc
44409   MISSING_DEPENDENCY=cups
44410 
44411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44412     cygwin_help $MISSING_DEPENDENCY
44413   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44414     msys_help $MISSING_DEPENDENCY
44415   else
44416     PKGHANDLER_COMMAND=
44417 
44418     case $PKGHANDLER in
44419       apt-get)
44420         apt_help     $MISSING_DEPENDENCY ;;
44421       yum)
44422         yum_help     $MISSING_DEPENDENCY ;;
44423       port)
44424         port_help    $MISSING_DEPENDENCY ;;
44425       pkgutil)
44426         pkgutil_help $MISSING_DEPENDENCY ;;
44427       pkgadd)
44428         pkgadd_help  $MISSING_DEPENDENCY ;;
44429     esac
44430 
44431     if test "x$PKGHANDLER_COMMAND" != x; then
44432       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44433     fi
44434   fi
44435 
44436       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44437     fi
44438   fi
44439 
44440 
44441 
44442 
44443 
44444 
44445   ###############################################################################
44446   #
44447   # The ubiquitous freetype library is used to render fonts.
44448   #
44449 
44450 # Check whether --with-freetype was given.
44451 if test "${with_freetype+set}" = set; then :
44452   withval=$with_freetype;
44453 fi
44454 
44455 
44456 # Check whether --with-freetype-include was given.
44457 if test "${with_freetype_include+set}" = set; then :
44458   withval=$with_freetype_include;
44459 fi
44460 
44461 
44462 # Check whether --with-freetype-lib was given.
44463 if test "${with_freetype_lib+set}" = set; then :
44464   withval=$with_freetype_lib;
44465 fi
44466 
44467   # Check whether --enable-freetype-bundling was given.
44468 if test "${enable_freetype_bundling+set}" = set; then :
44469   enableval=$enable_freetype_bundling;
44470 fi
44471 
44472 
44473   FREETYPE_CFLAGS=
44474   FREETYPE_LIBS=
44475   FREETYPE_BUNDLE_LIB_PATH=
44476 
44477   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44478     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44479       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44480 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44481     fi
44482     if test "x$enable_freetype_bundling" != x; then
44483       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44484 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44485     fi
44486   else
44487     # freetype is needed to build; go get it!
44488 
44489     BUNDLE_FREETYPE="$enable_freetype_bundling"
44490 
44491     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44492       # User has specified settings
44493 
44494       if test "x$BUNDLE_FREETYPE" = x; then
44495         # If not specified, default is to bundle freetype
44496         BUNDLE_FREETYPE=yes
44497       fi
44498 
44499       if test "x$with_freetype" != x; then
44500         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44501         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44502       fi
44503 
44504       # Allow --with-freetype-lib and --with-freetype-include to override
44505       if test "x$with_freetype_include" != x; then
44506         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44507       fi
44508       if test "x$with_freetype_lib" != x; then
44509         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44510       fi
44511 
44512       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44513         # Okay, we got it. Check that it works.
44514 
44515   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44516   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44517   METHOD="--with-freetype"
44518 
44519   # First check if the files exists.
44520   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44521     # We found an arbitrary include file. That's a good sign.
44522     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44523 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44524     FOUND_FREETYPE=yes
44525 
44526     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44527     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44528       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44529 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44530       FOUND_FREETYPE=no
44531     else
44532       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44533         # On Windows, we will need both .lib and .dll file.
44534         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44535           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44536 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44537           FOUND_FREETYPE=no
44538         fi
44539       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44540           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44541         # Found lib in isa dir, use that instead.
44542         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44543       fi
44544     fi
44545   fi
44546 
44547   if test "x$FOUND_FREETYPE" = xyes; then
44548 
44549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44550 
44551   # Input might be given as Windows format, start by converting to
44552   # unix format.
44553   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44554   new_path=`$CYGPATH -u "$path"`
44555 
44556   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44557   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44558   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44559   # "foo.exe" is OK but "foo" is an error.
44560   #
44561   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44562   # It is also a way to make sure we got the proper file name for the real test later on.
44563   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44564   if test "x$test_shortpath" = x; then
44565     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44566 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44567     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44568   fi
44569 
44570   # Call helper function which possibly converts this using DOS-style short mode.
44571   # If so, the updated path is stored in $new_path.
44572 
44573   input_path="$new_path"
44574   # Check if we need to convert this using DOS-style short mode. If the path
44575   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44576   # take no chances and rewrite it.
44577   # Note: m4 eats our [], so we need to use [ and ] instead.
44578   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44579   if test "x$has_forbidden_chars" != x; then
44580     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44581     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44582     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44583     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44584       # Going to short mode and back again did indeed matter. Since short mode is
44585       # case insensitive, let's make it lowercase to improve readability.
44586       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44587       # Now convert it back to Unix-stile (cygpath)
44588       input_path=`$CYGPATH -u "$shortmode_path"`
44589       new_path="$input_path"
44590     fi
44591   fi
44592 
44593   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44594   if test "x$test_cygdrive_prefix" = x; then
44595     # As a simple fix, exclude /usr/bin since it's not a real path.
44596     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44597       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44598       # a path prefixed by /cygdrive for fixpath to work.
44599       new_path="$CYGWIN_ROOT_PATH$input_path"
44600     fi
44601   fi
44602 
44603 
44604   if test "x$path" != "x$new_path"; then
44605     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44606     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44607 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44608   fi
44609 
44610   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44611 
44612   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44613   has_colon=`$ECHO $path | $GREP ^.:`
44614   new_path="$path"
44615   if test "x$has_colon" = x; then
44616     # Not in mixed or Windows style, start by that.
44617     new_path=`cmd //c echo $path`
44618   fi
44619 
44620 
44621   input_path="$new_path"
44622   # Check if we need to convert this using DOS-style short mode. If the path
44623   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44624   # take no chances and rewrite it.
44625   # Note: m4 eats our [], so we need to use [ and ] instead.
44626   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44627   if test "x$has_forbidden_chars" != x; then
44628     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44629     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44630   fi
44631 
44632 
44633   windows_path="$new_path"
44634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44635     unix_path=`$CYGPATH -u "$windows_path"`
44636     new_path="$unix_path"
44637   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44638     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44639     new_path="$unix_path"
44640   fi
44641 
44642   if test "x$path" != "x$new_path"; then
44643     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44644     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44645 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44646   fi
44647 
44648   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44649   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44650 
44651   else
44652     # We're on a posix platform. Hooray! :)
44653     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44654     has_space=`$ECHO "$path" | $GREP " "`
44655     if test "x$has_space" != x; then
44656       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44657 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44658       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44659     fi
44660 
44661     # Use eval to expand a potential ~
44662     eval path="$path"
44663     if test ! -f "$path" && test ! -d "$path"; then
44664       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44665     fi
44666 
44667     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44668   fi
44669 
44670 
44671   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44672 
44673   # Input might be given as Windows format, start by converting to
44674   # unix format.
44675   path="$POTENTIAL_FREETYPE_LIB_PATH"
44676   new_path=`$CYGPATH -u "$path"`
44677 
44678   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44679   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44680   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44681   # "foo.exe" is OK but "foo" is an error.
44682   #
44683   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44684   # It is also a way to make sure we got the proper file name for the real test later on.
44685   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44686   if test "x$test_shortpath" = x; then
44687     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44688 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44689     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44690   fi
44691 
44692   # Call helper function which possibly converts this using DOS-style short mode.
44693   # If so, the updated path is stored in $new_path.
44694 
44695   input_path="$new_path"
44696   # Check if we need to convert this using DOS-style short mode. If the path
44697   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44698   # take no chances and rewrite it.
44699   # Note: m4 eats our [], so we need to use [ and ] instead.
44700   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44701   if test "x$has_forbidden_chars" != x; then
44702     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44703     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44704     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44705     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44706       # Going to short mode and back again did indeed matter. Since short mode is
44707       # case insensitive, let's make it lowercase to improve readability.
44708       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44709       # Now convert it back to Unix-stile (cygpath)
44710       input_path=`$CYGPATH -u "$shortmode_path"`
44711       new_path="$input_path"
44712     fi
44713   fi
44714 
44715   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44716   if test "x$test_cygdrive_prefix" = x; then
44717     # As a simple fix, exclude /usr/bin since it's not a real path.
44718     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44719       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44720       # a path prefixed by /cygdrive for fixpath to work.
44721       new_path="$CYGWIN_ROOT_PATH$input_path"
44722     fi
44723   fi
44724 
44725 
44726   if test "x$path" != "x$new_path"; then
44727     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44728     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44729 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44730   fi
44731 
44732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44733 
44734   path="$POTENTIAL_FREETYPE_LIB_PATH"
44735   has_colon=`$ECHO $path | $GREP ^.:`
44736   new_path="$path"
44737   if test "x$has_colon" = x; then
44738     # Not in mixed or Windows style, start by that.
44739     new_path=`cmd //c echo $path`
44740   fi
44741 
44742 
44743   input_path="$new_path"
44744   # Check if we need to convert this using DOS-style short mode. If the path
44745   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44746   # take no chances and rewrite it.
44747   # Note: m4 eats our [], so we need to use [ and ] instead.
44748   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44749   if test "x$has_forbidden_chars" != x; then
44750     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44751     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44752   fi
44753 
44754 
44755   windows_path="$new_path"
44756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44757     unix_path=`$CYGPATH -u "$windows_path"`
44758     new_path="$unix_path"
44759   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44760     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44761     new_path="$unix_path"
44762   fi
44763 
44764   if test "x$path" != "x$new_path"; then
44765     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44766     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44767 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44768   fi
44769 
44770   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44771   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44772 
44773   else
44774     # We're on a posix platform. Hooray! :)
44775     path="$POTENTIAL_FREETYPE_LIB_PATH"
44776     has_space=`$ECHO "$path" | $GREP " "`
44777     if test "x$has_space" != x; then
44778       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44779 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44780       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44781     fi
44782 
44783     # Use eval to expand a potential ~
44784     eval path="$path"
44785     if test ! -f "$path" && test ! -d "$path"; then
44786       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44787     fi
44788 
44789     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44790   fi
44791 
44792 
44793     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44794     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44795 $as_echo_n "checking for freetype includes... " >&6; }
44796     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44797 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44798     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44799     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44800 $as_echo_n "checking for freetype libraries... " >&6; }
44801     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44802 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44803   fi
44804 
44805         if test "x$FOUND_FREETYPE" != xyes; then
44806           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44807         fi
44808       else
44809         # User specified only one of lib or include. This is an error.
44810         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44811           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44812 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44813           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44814         else
44815           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44816 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44817           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44818         fi
44819       fi
44820     else
44821       # User did not specify settings, but we need freetype. Try to locate it.
44822 
44823       if test "x$BUNDLE_FREETYPE" = x; then
44824         # If not specified, default is to bundle freetype only on windows
44825         if test "x$OPENJDK_TARGET_OS" = xwindows; then
44826           BUNDLE_FREETYPE=yes
44827         else
44828           BUNDLE_FREETYPE=no
44829         fi
44830       fi
44831 
44832       if test "x$FOUND_FREETYPE" != xyes; then
44833         # Check builddeps
44834 
44835 
44836   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44837     # Source the builddeps file again, to make sure it uses the latest variables!
44838     . $builddepsfile
44839     # Look for a target and build machine specific resource!
44840     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44841     if test "x$resource" = x; then
44842       # Ok, lets instead look for a target specific resource
44843       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44844     fi
44845     if test "x$resource" = x; then
44846       # Ok, lets instead look for a build specific resource
44847       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44848     fi
44849     if test "x$resource" = x; then
44850       # Ok, lets instead look for a generic resource
44851       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44852       resource=${builddep_freetype2}
44853     fi
44854     if test "x$resource" != x; then
44855       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44856 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44857       # If the resource in the builddeps.conf file is an existing directory,
44858       # for example /java/linux/cups
44859       if test -d ${resource}; then
44860         depdir=${resource}
44861       else
44862 
44863   # freetype2 is for example mymodule
44864   # $resource is for example libs/general/libmymod_1_2_3.zip
44865   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44866   # $with_builddeps_dir is for example /localhome/builddeps
44867   # depdir is the name of the variable into which we store the depdir, eg MYMOD
44868   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44869   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44870   filename=`basename $resource`
44871   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44872   filebase=${filename%%.*}
44873   extension=${filename#*.}
44874   installdir=$with_builddeps_dir/$filebase
44875   if test ! -f $installdir/$filename.unpacked; then
44876     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44877 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44878     if test ! -d $installdir; then
44879       mkdir -p $installdir
44880     fi
44881     if test ! -d $installdir; then
44882       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44883     fi
44884     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44885     touch $tmpfile
44886     if test ! -f $tmpfile; then
44887       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44888     fi
44889 
44890   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44891   # $tmpfile is the local file name for the downloaded file.
44892   VALID_TOOL=no
44893   if test "x$BDEPS_FTP" = xwget; then
44894     VALID_TOOL=yes
44895     wget -O $tmpfile $with_builddeps_server/$resource
44896   fi
44897   if test "x$BDEPS_FTP" = xlftp; then
44898     VALID_TOOL=yes
44899     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44900   fi
44901   if test "x$BDEPS_FTP" = xftp; then
44902     VALID_TOOL=yes
44903     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44904     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44905     FTPUSERPWD=${FTPSERVER%%@*}
44906     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44907       FTPUSER=${userpwd%%:*}
44908       FTPPWD=${userpwd#*@}
44909       FTPSERVER=${FTPSERVER#*@}
44910     else
44911       FTPUSER=ftp
44912       FTPPWD=ftp
44913     fi
44914     # the "pass" command does not work on some
44915     # ftp clients (read ftp.exe) but if it works,
44916     # passive mode is better!
44917     ( \
44918         echo "user $FTPUSER $FTPPWD"        ; \
44919         echo "pass"                         ; \
44920         echo "bin"                          ; \
44921         echo "get $FTPPATH $tmpfile"              ; \
44922     ) | ftp -in $FTPSERVER
44923   fi
44924   if test "x$VALID_TOOL" != xyes; then
44925     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44926   fi
44927 
44928     mv $tmpfile $installdir/$filename
44929     if test ! -s $installdir/$filename; then
44930       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44931     fi
44932     case "$extension" in
44933       zip)  echo "Unzipping $installdir/$filename..."
44934         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44935         ;;
44936       tar.gz) echo "Untaring $installdir/$filename..."
44937         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44938         ;;
44939       tgz) echo "Untaring $installdir/$filename..."
44940         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44941         ;;
44942       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44943         ;;
44944     esac
44945   fi
44946   if test -f $installdir/$filename.unpacked; then
44947     depdir=$installdir
44948   fi
44949 
44950       fi
44951       # Source the builddeps file again, because in the previous command, the depdir
44952       # was updated to point at the current build dependency install directory.
44953       . $builddepsfile
44954       # Now extract variables from the builddeps.conf files.
44955       theroot=${builddep_freetype2_ROOT}
44956       thecflags=${builddep_freetype2_CFLAGS}
44957       thelibs=${builddep_freetype2_LIBS}
44958       if test "x$depdir" = x; then
44959         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44960       fi
44961       FREETYPE=$depdir
44962       if test "x$theroot" != x; then
44963         FREETYPE="$theroot"
44964       fi
44965       if test "x$thecflags" != x; then
44966         FREETYPE_CFLAGS="$thecflags"
44967       fi
44968       if test "x$thelibs" != x; then
44969         FREETYPE_LIBS="$thelibs"
44970       fi
44971       FOUND_FREETYPE=yes
44972       else FOUND_FREETYPE=no
44973 
44974     fi
44975     else FOUND_FREETYPE=no
44976 
44977   fi
44978 
44979         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44980         if test "x$FOUND_FREETYPE" = xyes; then
44981           if test "x$BUNDLE_FREETYPE" = xyes; then
44982             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44983 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
44984             FOUND_FREETYPE=no
44985           else
44986             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44987 $as_echo_n "checking for freetype... " >&6; }
44988             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
44989 $as_echo "yes (using builddeps)" >&6; }
44990           fi
44991         fi
44992       fi
44993 
44994       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
44995       if test "x$SYSROOT" = x; then
44996         if test "x$FOUND_FREETYPE" != xyes; then
44997           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
44998           if test "x$PKG_CONFIG" != x; then
44999 
45000 pkg_failed=no
45001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45002 $as_echo_n "checking for FREETYPE... " >&6; }
45003 
45004 if test -n "$FREETYPE_CFLAGS"; then
45005     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45006  elif test -n "$PKG_CONFIG"; then
45007     if test -n "$PKG_CONFIG" && \
45008     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45009   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45010   ac_status=$?
45011   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45012   test $ac_status = 0; }; then
45013   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45014 else
45015   pkg_failed=yes
45016 fi
45017  else
45018     pkg_failed=untried
45019 fi
45020 if test -n "$FREETYPE_LIBS"; then
45021     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45022  elif test -n "$PKG_CONFIG"; then
45023     if test -n "$PKG_CONFIG" && \
45024     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45025   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45026   ac_status=$?
45027   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45028   test $ac_status = 0; }; then
45029   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45030 else
45031   pkg_failed=yes
45032 fi
45033  else
45034     pkg_failed=untried
45035 fi
45036 
45037 
45038 
45039 if test $pkg_failed = yes; then
45040 
45041 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45042         _pkg_short_errors_supported=yes
45043 else
45044         _pkg_short_errors_supported=no
45045 fi
45046         if test $_pkg_short_errors_supported = yes; then
45047                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45048         else
45049                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45050         fi
45051         # Put the nasty error message in config.log where it belongs
45052         echo "$FREETYPE_PKG_ERRORS" >&5
45053 
45054         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45055 $as_echo "no" >&6; }
45056                 FOUND_FREETYPE=no
45057 elif test $pkg_failed = untried; then
45058         FOUND_FREETYPE=no
45059 else
45060         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45061         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45062         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45063 $as_echo "yes" >&6; }
45064         FOUND_FREETYPE=yes
45065 fi
45066             if test "x$FOUND_FREETYPE" = xyes; then
45067               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45068               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45069               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45070               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45071                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45072               fi
45073               # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45074               if test "x$BUNDLE_FREETYPE" = xyes; then
45075                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45076 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45077                 FOUND_FREETYPE=no
45078               else
45079                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45080 $as_echo_n "checking for freetype... " >&6; }
45081                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45082 $as_echo "yes (using pkg-config)" >&6; }
45083               fi
45084             fi
45085           fi
45086         fi
45087       fi
45088 
45089       if test "x$FOUND_FREETYPE" != xyes; then
45090         # Check in well-known locations
45091         if test "x$OPENJDK_TARGET_OS" = xwindows; then
45092           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45093 
45094   windows_path="$FREETYPE_BASE_DIR"
45095   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45096     unix_path=`$CYGPATH -u "$windows_path"`
45097     FREETYPE_BASE_DIR="$unix_path"
45098   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45099     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45100     FREETYPE_BASE_DIR="$unix_path"
45101   fi
45102 
45103 
45104   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45105   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45106   METHOD="well-known location"
45107 
45108   # First check if the files exists.
45109   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45110     # We found an arbitrary include file. That's a good sign.
45111     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45112 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45113     FOUND_FREETYPE=yes
45114 
45115     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45116     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45117       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45118 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45119       FOUND_FREETYPE=no
45120     else
45121       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45122         # On Windows, we will need both .lib and .dll file.
45123         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45124           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45125 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45126           FOUND_FREETYPE=no
45127         fi
45128       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45129           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45130         # Found lib in isa dir, use that instead.
45131         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45132       fi
45133     fi
45134   fi
45135 
45136   if test "x$FOUND_FREETYPE" = xyes; then
45137 
45138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45139 
45140   # Input might be given as Windows format, start by converting to
45141   # unix format.
45142   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45143   new_path=`$CYGPATH -u "$path"`
45144 
45145   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45146   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45147   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45148   # "foo.exe" is OK but "foo" is an error.
45149   #
45150   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45151   # It is also a way to make sure we got the proper file name for the real test later on.
45152   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45153   if test "x$test_shortpath" = x; then
45154     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45155 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45156     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45157   fi
45158 
45159   # Call helper function which possibly converts this using DOS-style short mode.
45160   # If so, the updated path is stored in $new_path.
45161 
45162   input_path="$new_path"
45163   # Check if we need to convert this using DOS-style short mode. If the path
45164   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45165   # take no chances and rewrite it.
45166   # Note: m4 eats our [], so we need to use [ and ] instead.
45167   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45168   if test "x$has_forbidden_chars" != x; then
45169     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45170     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45171     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45172     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45173       # Going to short mode and back again did indeed matter. Since short mode is
45174       # case insensitive, let's make it lowercase to improve readability.
45175       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45176       # Now convert it back to Unix-stile (cygpath)
45177       input_path=`$CYGPATH -u "$shortmode_path"`
45178       new_path="$input_path"
45179     fi
45180   fi
45181 
45182   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45183   if test "x$test_cygdrive_prefix" = x; then
45184     # As a simple fix, exclude /usr/bin since it's not a real path.
45185     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45186       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45187       # a path prefixed by /cygdrive for fixpath to work.
45188       new_path="$CYGWIN_ROOT_PATH$input_path"
45189     fi
45190   fi
45191 
45192 
45193   if test "x$path" != "x$new_path"; then
45194     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45195     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45196 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45197   fi
45198 
45199   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45200 
45201   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45202   has_colon=`$ECHO $path | $GREP ^.:`
45203   new_path="$path"
45204   if test "x$has_colon" = x; then
45205     # Not in mixed or Windows style, start by that.
45206     new_path=`cmd //c echo $path`
45207   fi
45208 
45209 
45210   input_path="$new_path"
45211   # Check if we need to convert this using DOS-style short mode. If the path
45212   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45213   # take no chances and rewrite it.
45214   # Note: m4 eats our [], so we need to use [ and ] instead.
45215   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45216   if test "x$has_forbidden_chars" != x; then
45217     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45218     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45219   fi
45220 
45221 
45222   windows_path="$new_path"
45223   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45224     unix_path=`$CYGPATH -u "$windows_path"`
45225     new_path="$unix_path"
45226   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45227     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45228     new_path="$unix_path"
45229   fi
45230 
45231   if test "x$path" != "x$new_path"; then
45232     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45233     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45234 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45235   fi
45236 
45237   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45238   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45239 
45240   else
45241     # We're on a posix platform. Hooray! :)
45242     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45243     has_space=`$ECHO "$path" | $GREP " "`
45244     if test "x$has_space" != x; then
45245       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45246 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45247       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45248     fi
45249 
45250     # Use eval to expand a potential ~
45251     eval path="$path"
45252     if test ! -f "$path" && test ! -d "$path"; then
45253       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45254     fi
45255 
45256     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45257   fi
45258 
45259 
45260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45261 
45262   # Input might be given as Windows format, start by converting to
45263   # unix format.
45264   path="$POTENTIAL_FREETYPE_LIB_PATH"
45265   new_path=`$CYGPATH -u "$path"`
45266 
45267   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45268   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45269   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45270   # "foo.exe" is OK but "foo" is an error.
45271   #
45272   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45273   # It is also a way to make sure we got the proper file name for the real test later on.
45274   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45275   if test "x$test_shortpath" = x; then
45276     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45277 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45278     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45279   fi
45280 
45281   # Call helper function which possibly converts this using DOS-style short mode.
45282   # If so, the updated path is stored in $new_path.
45283 
45284   input_path="$new_path"
45285   # Check if we need to convert this using DOS-style short mode. If the path
45286   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45287   # take no chances and rewrite it.
45288   # Note: m4 eats our [], so we need to use [ and ] instead.
45289   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45290   if test "x$has_forbidden_chars" != x; then
45291     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45292     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45293     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45294     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45295       # Going to short mode and back again did indeed matter. Since short mode is
45296       # case insensitive, let's make it lowercase to improve readability.
45297       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45298       # Now convert it back to Unix-stile (cygpath)
45299       input_path=`$CYGPATH -u "$shortmode_path"`
45300       new_path="$input_path"
45301     fi
45302   fi
45303 
45304   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45305   if test "x$test_cygdrive_prefix" = x; then
45306     # As a simple fix, exclude /usr/bin since it's not a real path.
45307     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45308       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45309       # a path prefixed by /cygdrive for fixpath to work.
45310       new_path="$CYGWIN_ROOT_PATH$input_path"
45311     fi
45312   fi
45313 
45314 
45315   if test "x$path" != "x$new_path"; then
45316     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45317     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45318 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45319   fi
45320 
45321   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45322 
45323   path="$POTENTIAL_FREETYPE_LIB_PATH"
45324   has_colon=`$ECHO $path | $GREP ^.:`
45325   new_path="$path"
45326   if test "x$has_colon" = x; then
45327     # Not in mixed or Windows style, start by that.
45328     new_path=`cmd //c echo $path`
45329   fi
45330 
45331 
45332   input_path="$new_path"
45333   # Check if we need to convert this using DOS-style short mode. If the path
45334   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45335   # take no chances and rewrite it.
45336   # Note: m4 eats our [], so we need to use [ and ] instead.
45337   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45338   if test "x$has_forbidden_chars" != x; then
45339     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45340     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45341   fi
45342 
45343 
45344   windows_path="$new_path"
45345   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45346     unix_path=`$CYGPATH -u "$windows_path"`
45347     new_path="$unix_path"
45348   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45349     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45350     new_path="$unix_path"
45351   fi
45352 
45353   if test "x$path" != "x$new_path"; then
45354     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45355     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45356 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45357   fi
45358 
45359   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45360   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45361 
45362   else
45363     # We're on a posix platform. Hooray! :)
45364     path="$POTENTIAL_FREETYPE_LIB_PATH"
45365     has_space=`$ECHO "$path" | $GREP " "`
45366     if test "x$has_space" != x; then
45367       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45368 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45369       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45370     fi
45371 
45372     # Use eval to expand a potential ~
45373     eval path="$path"
45374     if test ! -f "$path" && test ! -d "$path"; then
45375       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45376     fi
45377 
45378     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45379   fi
45380 
45381 
45382     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45383     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45384 $as_echo_n "checking for freetype includes... " >&6; }
45385     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45386 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45387     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45388     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45389 $as_echo_n "checking for freetype libraries... " >&6; }
45390     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45391 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45392   fi
45393 
45394           if test "x$FOUND_FREETYPE" != xyes; then
45395             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45396 
45397   windows_path="$FREETYPE_BASE_DIR"
45398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45399     unix_path=`$CYGPATH -u "$windows_path"`
45400     FREETYPE_BASE_DIR="$unix_path"
45401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45403     FREETYPE_BASE_DIR="$unix_path"
45404   fi
45405 
45406 
45407   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45408   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45409   METHOD="well-known location"
45410 
45411   # First check if the files exists.
45412   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45413     # We found an arbitrary include file. That's a good sign.
45414     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45415 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45416     FOUND_FREETYPE=yes
45417 
45418     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45419     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45420       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45421 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45422       FOUND_FREETYPE=no
45423     else
45424       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45425         # On Windows, we will need both .lib and .dll file.
45426         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45427           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45428 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45429           FOUND_FREETYPE=no
45430         fi
45431       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45432           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45433         # Found lib in isa dir, use that instead.
45434         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45435       fi
45436     fi
45437   fi
45438 
45439   if test "x$FOUND_FREETYPE" = xyes; then
45440 
45441   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45442 
45443   # Input might be given as Windows format, start by converting to
45444   # unix format.
45445   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45446   new_path=`$CYGPATH -u "$path"`
45447 
45448   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45449   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45450   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45451   # "foo.exe" is OK but "foo" is an error.
45452   #
45453   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45454   # It is also a way to make sure we got the proper file name for the real test later on.
45455   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45456   if test "x$test_shortpath" = x; then
45457     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45458 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45459     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45460   fi
45461 
45462   # Call helper function which possibly converts this using DOS-style short mode.
45463   # If so, the updated path is stored in $new_path.
45464 
45465   input_path="$new_path"
45466   # Check if we need to convert this using DOS-style short mode. If the path
45467   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45468   # take no chances and rewrite it.
45469   # Note: m4 eats our [], so we need to use [ and ] instead.
45470   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45471   if test "x$has_forbidden_chars" != x; then
45472     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45473     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45474     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45475     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45476       # Going to short mode and back again did indeed matter. Since short mode is
45477       # case insensitive, let's make it lowercase to improve readability.
45478       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45479       # Now convert it back to Unix-stile (cygpath)
45480       input_path=`$CYGPATH -u "$shortmode_path"`
45481       new_path="$input_path"
45482     fi
45483   fi
45484 
45485   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45486   if test "x$test_cygdrive_prefix" = x; then
45487     # As a simple fix, exclude /usr/bin since it's not a real path.
45488     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45489       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45490       # a path prefixed by /cygdrive for fixpath to work.
45491       new_path="$CYGWIN_ROOT_PATH$input_path"
45492     fi
45493   fi
45494 
45495 
45496   if test "x$path" != "x$new_path"; then
45497     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45498     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45499 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45500   fi
45501 
45502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45503 
45504   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45505   has_colon=`$ECHO $path | $GREP ^.:`
45506   new_path="$path"
45507   if test "x$has_colon" = x; then
45508     # Not in mixed or Windows style, start by that.
45509     new_path=`cmd //c echo $path`
45510   fi
45511 
45512 
45513   input_path="$new_path"
45514   # Check if we need to convert this using DOS-style short mode. If the path
45515   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45516   # take no chances and rewrite it.
45517   # Note: m4 eats our [], so we need to use [ and ] instead.
45518   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45519   if test "x$has_forbidden_chars" != x; then
45520     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45521     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45522   fi
45523 
45524 
45525   windows_path="$new_path"
45526   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45527     unix_path=`$CYGPATH -u "$windows_path"`
45528     new_path="$unix_path"
45529   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45530     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45531     new_path="$unix_path"
45532   fi
45533 
45534   if test "x$path" != "x$new_path"; then
45535     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45536     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45537 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45538   fi
45539 
45540   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45541   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45542 
45543   else
45544     # We're on a posix platform. Hooray! :)
45545     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45546     has_space=`$ECHO "$path" | $GREP " "`
45547     if test "x$has_space" != x; then
45548       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45549 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45550       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45551     fi
45552 
45553     # Use eval to expand a potential ~
45554     eval path="$path"
45555     if test ! -f "$path" && test ! -d "$path"; then
45556       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45557     fi
45558 
45559     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45560   fi
45561 
45562 
45563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45564 
45565   # Input might be given as Windows format, start by converting to
45566   # unix format.
45567   path="$POTENTIAL_FREETYPE_LIB_PATH"
45568   new_path=`$CYGPATH -u "$path"`
45569 
45570   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45571   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45572   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45573   # "foo.exe" is OK but "foo" is an error.
45574   #
45575   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45576   # It is also a way to make sure we got the proper file name for the real test later on.
45577   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45578   if test "x$test_shortpath" = x; then
45579     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45580 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45581     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45582   fi
45583 
45584   # Call helper function which possibly converts this using DOS-style short mode.
45585   # If so, the updated path is stored in $new_path.
45586 
45587   input_path="$new_path"
45588   # Check if we need to convert this using DOS-style short mode. If the path
45589   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45590   # take no chances and rewrite it.
45591   # Note: m4 eats our [], so we need to use [ and ] instead.
45592   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45593   if test "x$has_forbidden_chars" != x; then
45594     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45595     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45596     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45597     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45598       # Going to short mode and back again did indeed matter. Since short mode is
45599       # case insensitive, let's make it lowercase to improve readability.
45600       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45601       # Now convert it back to Unix-stile (cygpath)
45602       input_path=`$CYGPATH -u "$shortmode_path"`
45603       new_path="$input_path"
45604     fi
45605   fi
45606 
45607   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45608   if test "x$test_cygdrive_prefix" = x; then
45609     # As a simple fix, exclude /usr/bin since it's not a real path.
45610     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45611       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45612       # a path prefixed by /cygdrive for fixpath to work.
45613       new_path="$CYGWIN_ROOT_PATH$input_path"
45614     fi
45615   fi
45616 
45617 
45618   if test "x$path" != "x$new_path"; then
45619     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45620     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45621 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45622   fi
45623 
45624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45625 
45626   path="$POTENTIAL_FREETYPE_LIB_PATH"
45627   has_colon=`$ECHO $path | $GREP ^.:`
45628   new_path="$path"
45629   if test "x$has_colon" = x; then
45630     # Not in mixed or Windows style, start by that.
45631     new_path=`cmd //c echo $path`
45632   fi
45633 
45634 
45635   input_path="$new_path"
45636   # Check if we need to convert this using DOS-style short mode. If the path
45637   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45638   # take no chances and rewrite it.
45639   # Note: m4 eats our [], so we need to use [ and ] instead.
45640   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45641   if test "x$has_forbidden_chars" != x; then
45642     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45643     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45644   fi
45645 
45646 
45647   windows_path="$new_path"
45648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45649     unix_path=`$CYGPATH -u "$windows_path"`
45650     new_path="$unix_path"
45651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45652     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45653     new_path="$unix_path"
45654   fi
45655 
45656   if test "x$path" != "x$new_path"; then
45657     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45658     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45659 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45660   fi
45661 
45662   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45663   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45664 
45665   else
45666     # We're on a posix platform. Hooray! :)
45667     path="$POTENTIAL_FREETYPE_LIB_PATH"
45668     has_space=`$ECHO "$path" | $GREP " "`
45669     if test "x$has_space" != x; then
45670       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45671 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45672       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45673     fi
45674 
45675     # Use eval to expand a potential ~
45676     eval path="$path"
45677     if test ! -f "$path" && test ! -d "$path"; then
45678       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45679     fi
45680 
45681     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45682   fi
45683 
45684 
45685     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45686     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45687 $as_echo_n "checking for freetype includes... " >&6; }
45688     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45689 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45690     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45691     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45692 $as_echo_n "checking for freetype libraries... " >&6; }
45693     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45694 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45695   fi
45696 
45697           fi
45698         else
45699           FREETYPE_BASE_DIR="$SYSROOT/usr"
45700 
45701   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45702   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45703   METHOD="well-known location"
45704 
45705   # First check if the files exists.
45706   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45707     # We found an arbitrary include file. That's a good sign.
45708     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45709 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45710     FOUND_FREETYPE=yes
45711 
45712     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45713     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45714       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45715 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45716       FOUND_FREETYPE=no
45717     else
45718       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45719         # On Windows, we will need both .lib and .dll file.
45720         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45721           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45722 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45723           FOUND_FREETYPE=no
45724         fi
45725       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45726           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45727         # Found lib in isa dir, use that instead.
45728         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45729       fi
45730     fi
45731   fi
45732 
45733   if test "x$FOUND_FREETYPE" = xyes; then
45734 
45735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45736 
45737   # Input might be given as Windows format, start by converting to
45738   # unix format.
45739   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45740   new_path=`$CYGPATH -u "$path"`
45741 
45742   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45743   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45744   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45745   # "foo.exe" is OK but "foo" is an error.
45746   #
45747   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45748   # It is also a way to make sure we got the proper file name for the real test later on.
45749   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45750   if test "x$test_shortpath" = x; then
45751     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45752 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45753     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45754   fi
45755 
45756   # Call helper function which possibly converts this using DOS-style short mode.
45757   # If so, the updated path is stored in $new_path.
45758 
45759   input_path="$new_path"
45760   # Check if we need to convert this using DOS-style short mode. If the path
45761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45762   # take no chances and rewrite it.
45763   # Note: m4 eats our [], so we need to use [ and ] instead.
45764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45765   if test "x$has_forbidden_chars" != x; then
45766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45767     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45768     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45769     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45770       # Going to short mode and back again did indeed matter. Since short mode is
45771       # case insensitive, let's make it lowercase to improve readability.
45772       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45773       # Now convert it back to Unix-stile (cygpath)
45774       input_path=`$CYGPATH -u "$shortmode_path"`
45775       new_path="$input_path"
45776     fi
45777   fi
45778 
45779   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45780   if test "x$test_cygdrive_prefix" = x; then
45781     # As a simple fix, exclude /usr/bin since it's not a real path.
45782     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45783       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45784       # a path prefixed by /cygdrive for fixpath to work.
45785       new_path="$CYGWIN_ROOT_PATH$input_path"
45786     fi
45787   fi
45788 
45789 
45790   if test "x$path" != "x$new_path"; then
45791     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45792     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45793 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45794   fi
45795 
45796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45797 
45798   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45799   has_colon=`$ECHO $path | $GREP ^.:`
45800   new_path="$path"
45801   if test "x$has_colon" = x; then
45802     # Not in mixed or Windows style, start by that.
45803     new_path=`cmd //c echo $path`
45804   fi
45805 
45806 
45807   input_path="$new_path"
45808   # Check if we need to convert this using DOS-style short mode. If the path
45809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45810   # take no chances and rewrite it.
45811   # Note: m4 eats our [], so we need to use [ and ] instead.
45812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45813   if test "x$has_forbidden_chars" != x; then
45814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45815     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45816   fi
45817 
45818 
45819   windows_path="$new_path"
45820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45821     unix_path=`$CYGPATH -u "$windows_path"`
45822     new_path="$unix_path"
45823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45825     new_path="$unix_path"
45826   fi
45827 
45828   if test "x$path" != "x$new_path"; then
45829     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45830     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45831 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45832   fi
45833 
45834   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45835   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45836 
45837   else
45838     # We're on a posix platform. Hooray! :)
45839     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45840     has_space=`$ECHO "$path" | $GREP " "`
45841     if test "x$has_space" != x; then
45842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45843 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45844       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45845     fi
45846 
45847     # Use eval to expand a potential ~
45848     eval path="$path"
45849     if test ! -f "$path" && test ! -d "$path"; then
45850       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45851     fi
45852 
45853     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45854   fi
45855 
45856 
45857   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45858 
45859   # Input might be given as Windows format, start by converting to
45860   # unix format.
45861   path="$POTENTIAL_FREETYPE_LIB_PATH"
45862   new_path=`$CYGPATH -u "$path"`
45863 
45864   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45865   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45866   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45867   # "foo.exe" is OK but "foo" is an error.
45868   #
45869   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45870   # It is also a way to make sure we got the proper file name for the real test later on.
45871   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45872   if test "x$test_shortpath" = x; then
45873     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45874 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45875     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45876   fi
45877 
45878   # Call helper function which possibly converts this using DOS-style short mode.
45879   # If so, the updated path is stored in $new_path.
45880 
45881   input_path="$new_path"
45882   # Check if we need to convert this using DOS-style short mode. If the path
45883   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45884   # take no chances and rewrite it.
45885   # Note: m4 eats our [], so we need to use [ and ] instead.
45886   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45887   if test "x$has_forbidden_chars" != x; then
45888     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45889     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45890     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45891     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45892       # Going to short mode and back again did indeed matter. Since short mode is
45893       # case insensitive, let's make it lowercase to improve readability.
45894       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45895       # Now convert it back to Unix-stile (cygpath)
45896       input_path=`$CYGPATH -u "$shortmode_path"`
45897       new_path="$input_path"
45898     fi
45899   fi
45900 
45901   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45902   if test "x$test_cygdrive_prefix" = x; then
45903     # As a simple fix, exclude /usr/bin since it's not a real path.
45904     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45905       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45906       # a path prefixed by /cygdrive for fixpath to work.
45907       new_path="$CYGWIN_ROOT_PATH$input_path"
45908     fi
45909   fi
45910 
45911 
45912   if test "x$path" != "x$new_path"; then
45913     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45914     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45915 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45916   fi
45917 
45918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45919 
45920   path="$POTENTIAL_FREETYPE_LIB_PATH"
45921   has_colon=`$ECHO $path | $GREP ^.:`
45922   new_path="$path"
45923   if test "x$has_colon" = x; then
45924     # Not in mixed or Windows style, start by that.
45925     new_path=`cmd //c echo $path`
45926   fi
45927 
45928 
45929   input_path="$new_path"
45930   # Check if we need to convert this using DOS-style short mode. If the path
45931   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45932   # take no chances and rewrite it.
45933   # Note: m4 eats our [], so we need to use [ and ] instead.
45934   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45935   if test "x$has_forbidden_chars" != x; then
45936     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45937     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45938   fi
45939 
45940 
45941   windows_path="$new_path"
45942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45943     unix_path=`$CYGPATH -u "$windows_path"`
45944     new_path="$unix_path"
45945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45946     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45947     new_path="$unix_path"
45948   fi
45949 
45950   if test "x$path" != "x$new_path"; then
45951     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45952     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45953 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45954   fi
45955 
45956   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45957   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45958 
45959   else
45960     # We're on a posix platform. Hooray! :)
45961     path="$POTENTIAL_FREETYPE_LIB_PATH"
45962     has_space=`$ECHO "$path" | $GREP " "`
45963     if test "x$has_space" != x; then
45964       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45965 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45966       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45967     fi
45968 
45969     # Use eval to expand a potential ~
45970     eval path="$path"
45971     if test ! -f "$path" && test ! -d "$path"; then
45972       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45973     fi
45974 
45975     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45976   fi
45977 
45978 
45979     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45980     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45981 $as_echo_n "checking for freetype includes... " >&6; }
45982     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45983 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45984     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45985     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45986 $as_echo_n "checking for freetype libraries... " >&6; }
45987     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45988 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45989   fi
45990 
45991 
45992           if test "x$FOUND_FREETYPE" != xyes; then
45993             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
45994 
45995   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45996   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45997   METHOD="well-known location"
45998 
45999   # First check if the files exists.
46000   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46001     # We found an arbitrary include file. That's a good sign.
46002     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46003 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46004     FOUND_FREETYPE=yes
46005 
46006     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46007     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46008       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46009 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46010       FOUND_FREETYPE=no
46011     else
46012       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46013         # On Windows, we will need both .lib and .dll file.
46014         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46015           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46016 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46017           FOUND_FREETYPE=no
46018         fi
46019       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46020           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46021         # Found lib in isa dir, use that instead.
46022         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46023       fi
46024     fi
46025   fi
46026 
46027   if test "x$FOUND_FREETYPE" = xyes; then
46028 
46029   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46030 
46031   # Input might be given as Windows format, start by converting to
46032   # unix format.
46033   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46034   new_path=`$CYGPATH -u "$path"`
46035 
46036   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46037   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46038   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46039   # "foo.exe" is OK but "foo" is an error.
46040   #
46041   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46042   # It is also a way to make sure we got the proper file name for the real test later on.
46043   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46044   if test "x$test_shortpath" = x; then
46045     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46046 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46047     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46048   fi
46049 
46050   # Call helper function which possibly converts this using DOS-style short mode.
46051   # If so, the updated path is stored in $new_path.
46052 
46053   input_path="$new_path"
46054   # Check if we need to convert this using DOS-style short mode. If the path
46055   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46056   # take no chances and rewrite it.
46057   # Note: m4 eats our [], so we need to use [ and ] instead.
46058   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46059   if test "x$has_forbidden_chars" != x; then
46060     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46061     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46062     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46063     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46064       # Going to short mode and back again did indeed matter. Since short mode is
46065       # case insensitive, let's make it lowercase to improve readability.
46066       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46067       # Now convert it back to Unix-stile (cygpath)
46068       input_path=`$CYGPATH -u "$shortmode_path"`
46069       new_path="$input_path"
46070     fi
46071   fi
46072 
46073   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46074   if test "x$test_cygdrive_prefix" = x; then
46075     # As a simple fix, exclude /usr/bin since it's not a real path.
46076     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46077       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46078       # a path prefixed by /cygdrive for fixpath to work.
46079       new_path="$CYGWIN_ROOT_PATH$input_path"
46080     fi
46081   fi
46082 
46083 
46084   if test "x$path" != "x$new_path"; then
46085     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46086     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46087 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46088   fi
46089 
46090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46091 
46092   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46093   has_colon=`$ECHO $path | $GREP ^.:`
46094   new_path="$path"
46095   if test "x$has_colon" = x; then
46096     # Not in mixed or Windows style, start by that.
46097     new_path=`cmd //c echo $path`
46098   fi
46099 
46100 
46101   input_path="$new_path"
46102   # Check if we need to convert this using DOS-style short mode. If the path
46103   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46104   # take no chances and rewrite it.
46105   # Note: m4 eats our [], so we need to use [ and ] instead.
46106   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46107   if test "x$has_forbidden_chars" != x; then
46108     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46109     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46110   fi
46111 
46112 
46113   windows_path="$new_path"
46114   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46115     unix_path=`$CYGPATH -u "$windows_path"`
46116     new_path="$unix_path"
46117   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46118     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46119     new_path="$unix_path"
46120   fi
46121 
46122   if test "x$path" != "x$new_path"; then
46123     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46124     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46125 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46126   fi
46127 
46128   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46129   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46130 
46131   else
46132     # We're on a posix platform. Hooray! :)
46133     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46134     has_space=`$ECHO "$path" | $GREP " "`
46135     if test "x$has_space" != x; then
46136       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46137 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46138       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46139     fi
46140 
46141     # Use eval to expand a potential ~
46142     eval path="$path"
46143     if test ! -f "$path" && test ! -d "$path"; then
46144       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46145     fi
46146 
46147     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46148   fi
46149 
46150 
46151   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46152 
46153   # Input might be given as Windows format, start by converting to
46154   # unix format.
46155   path="$POTENTIAL_FREETYPE_LIB_PATH"
46156   new_path=`$CYGPATH -u "$path"`
46157 
46158   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46159   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46160   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46161   # "foo.exe" is OK but "foo" is an error.
46162   #
46163   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46164   # It is also a way to make sure we got the proper file name for the real test later on.
46165   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46166   if test "x$test_shortpath" = x; then
46167     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46168 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46169     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46170   fi
46171 
46172   # Call helper function which possibly converts this using DOS-style short mode.
46173   # If so, the updated path is stored in $new_path.
46174 
46175   input_path="$new_path"
46176   # Check if we need to convert this using DOS-style short mode. If the path
46177   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46178   # take no chances and rewrite it.
46179   # Note: m4 eats our [], so we need to use [ and ] instead.
46180   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46181   if test "x$has_forbidden_chars" != x; then
46182     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46183     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46184     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46185     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46186       # Going to short mode and back again did indeed matter. Since short mode is
46187       # case insensitive, let's make it lowercase to improve readability.
46188       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46189       # Now convert it back to Unix-stile (cygpath)
46190       input_path=`$CYGPATH -u "$shortmode_path"`
46191       new_path="$input_path"
46192     fi
46193   fi
46194 
46195   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46196   if test "x$test_cygdrive_prefix" = x; then
46197     # As a simple fix, exclude /usr/bin since it's not a real path.
46198     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46199       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46200       # a path prefixed by /cygdrive for fixpath to work.
46201       new_path="$CYGWIN_ROOT_PATH$input_path"
46202     fi
46203   fi
46204 
46205 
46206   if test "x$path" != "x$new_path"; then
46207     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46208     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46209 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46210   fi
46211 
46212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46213 
46214   path="$POTENTIAL_FREETYPE_LIB_PATH"
46215   has_colon=`$ECHO $path | $GREP ^.:`
46216   new_path="$path"
46217   if test "x$has_colon" = x; then
46218     # Not in mixed or Windows style, start by that.
46219     new_path=`cmd //c echo $path`
46220   fi
46221 
46222 
46223   input_path="$new_path"
46224   # Check if we need to convert this using DOS-style short mode. If the path
46225   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46226   # take no chances and rewrite it.
46227   # Note: m4 eats our [], so we need to use [ and ] instead.
46228   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46229   if test "x$has_forbidden_chars" != x; then
46230     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46231     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46232   fi
46233 
46234 
46235   windows_path="$new_path"
46236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46237     unix_path=`$CYGPATH -u "$windows_path"`
46238     new_path="$unix_path"
46239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46240     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46241     new_path="$unix_path"
46242   fi
46243 
46244   if test "x$path" != "x$new_path"; then
46245     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46246     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46247 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46248   fi
46249 
46250   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46251   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46252 
46253   else
46254     # We're on a posix platform. Hooray! :)
46255     path="$POTENTIAL_FREETYPE_LIB_PATH"
46256     has_space=`$ECHO "$path" | $GREP " "`
46257     if test "x$has_space" != x; then
46258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46259 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46260       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46261     fi
46262 
46263     # Use eval to expand a potential ~
46264     eval path="$path"
46265     if test ! -f "$path" && test ! -d "$path"; then
46266       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46267     fi
46268 
46269     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46270   fi
46271 
46272 
46273     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46274     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46275 $as_echo_n "checking for freetype includes... " >&6; }
46276     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46277 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46278     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46279     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46280 $as_echo_n "checking for freetype libraries... " >&6; }
46281     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46282 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46283   fi
46284 
46285           fi
46286 
46287           if test "x$FOUND_FREETYPE" != xyes; then
46288             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46289 
46290   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46291   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46292   METHOD="well-known location"
46293 
46294   # First check if the files exists.
46295   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46296     # We found an arbitrary include file. That's a good sign.
46297     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46298 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46299     FOUND_FREETYPE=yes
46300 
46301     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46302     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46303       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46304 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46305       FOUND_FREETYPE=no
46306     else
46307       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46308         # On Windows, we will need both .lib and .dll file.
46309         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46310           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46311 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46312           FOUND_FREETYPE=no
46313         fi
46314       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46315           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46316         # Found lib in isa dir, use that instead.
46317         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46318       fi
46319     fi
46320   fi
46321 
46322   if test "x$FOUND_FREETYPE" = xyes; then
46323 
46324   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46325 
46326   # Input might be given as Windows format, start by converting to
46327   # unix format.
46328   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46329   new_path=`$CYGPATH -u "$path"`
46330 
46331   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46332   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46333   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46334   # "foo.exe" is OK but "foo" is an error.
46335   #
46336   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46337   # It is also a way to make sure we got the proper file name for the real test later on.
46338   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46339   if test "x$test_shortpath" = x; then
46340     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46341 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46342     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46343   fi
46344 
46345   # Call helper function which possibly converts this using DOS-style short mode.
46346   # If so, the updated path is stored in $new_path.
46347 
46348   input_path="$new_path"
46349   # Check if we need to convert this using DOS-style short mode. If the path
46350   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46351   # take no chances and rewrite it.
46352   # Note: m4 eats our [], so we need to use [ and ] instead.
46353   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46354   if test "x$has_forbidden_chars" != x; then
46355     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46356     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46357     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46358     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46359       # Going to short mode and back again did indeed matter. Since short mode is
46360       # case insensitive, let's make it lowercase to improve readability.
46361       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46362       # Now convert it back to Unix-stile (cygpath)
46363       input_path=`$CYGPATH -u "$shortmode_path"`
46364       new_path="$input_path"
46365     fi
46366   fi
46367 
46368   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46369   if test "x$test_cygdrive_prefix" = x; then
46370     # As a simple fix, exclude /usr/bin since it's not a real path.
46371     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46372       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46373       # a path prefixed by /cygdrive for fixpath to work.
46374       new_path="$CYGWIN_ROOT_PATH$input_path"
46375     fi
46376   fi
46377 
46378 
46379   if test "x$path" != "x$new_path"; then
46380     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46381     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46382 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46383   fi
46384 
46385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46386 
46387   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46388   has_colon=`$ECHO $path | $GREP ^.:`
46389   new_path="$path"
46390   if test "x$has_colon" = x; then
46391     # Not in mixed or Windows style, start by that.
46392     new_path=`cmd //c echo $path`
46393   fi
46394 
46395 
46396   input_path="$new_path"
46397   # Check if we need to convert this using DOS-style short mode. If the path
46398   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46399   # take no chances and rewrite it.
46400   # Note: m4 eats our [], so we need to use [ and ] instead.
46401   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46402   if test "x$has_forbidden_chars" != x; then
46403     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46404     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46405   fi
46406 
46407 
46408   windows_path="$new_path"
46409   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46410     unix_path=`$CYGPATH -u "$windows_path"`
46411     new_path="$unix_path"
46412   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46413     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46414     new_path="$unix_path"
46415   fi
46416 
46417   if test "x$path" != "x$new_path"; then
46418     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46419     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46420 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46421   fi
46422 
46423   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46424   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46425 
46426   else
46427     # We're on a posix platform. Hooray! :)
46428     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46429     has_space=`$ECHO "$path" | $GREP " "`
46430     if test "x$has_space" != x; then
46431       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46432 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46433       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46434     fi
46435 
46436     # Use eval to expand a potential ~
46437     eval path="$path"
46438     if test ! -f "$path" && test ! -d "$path"; then
46439       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46440     fi
46441 
46442     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46443   fi
46444 
46445 
46446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46447 
46448   # Input might be given as Windows format, start by converting to
46449   # unix format.
46450   path="$POTENTIAL_FREETYPE_LIB_PATH"
46451   new_path=`$CYGPATH -u "$path"`
46452 
46453   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46454   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46455   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46456   # "foo.exe" is OK but "foo" is an error.
46457   #
46458   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46459   # It is also a way to make sure we got the proper file name for the real test later on.
46460   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46461   if test "x$test_shortpath" = x; then
46462     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46463 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46464     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46465   fi
46466 
46467   # Call helper function which possibly converts this using DOS-style short mode.
46468   # If so, the updated path is stored in $new_path.
46469 
46470   input_path="$new_path"
46471   # Check if we need to convert this using DOS-style short mode. If the path
46472   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46473   # take no chances and rewrite it.
46474   # Note: m4 eats our [], so we need to use [ and ] instead.
46475   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46476   if test "x$has_forbidden_chars" != x; then
46477     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46478     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46479     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46480     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46481       # Going to short mode and back again did indeed matter. Since short mode is
46482       # case insensitive, let's make it lowercase to improve readability.
46483       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46484       # Now convert it back to Unix-stile (cygpath)
46485       input_path=`$CYGPATH -u "$shortmode_path"`
46486       new_path="$input_path"
46487     fi
46488   fi
46489 
46490   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46491   if test "x$test_cygdrive_prefix" = x; then
46492     # As a simple fix, exclude /usr/bin since it's not a real path.
46493     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46494       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46495       # a path prefixed by /cygdrive for fixpath to work.
46496       new_path="$CYGWIN_ROOT_PATH$input_path"
46497     fi
46498   fi
46499 
46500 
46501   if test "x$path" != "x$new_path"; then
46502     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46503     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46504 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46505   fi
46506 
46507   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46508 
46509   path="$POTENTIAL_FREETYPE_LIB_PATH"
46510   has_colon=`$ECHO $path | $GREP ^.:`
46511   new_path="$path"
46512   if test "x$has_colon" = x; then
46513     # Not in mixed or Windows style, start by that.
46514     new_path=`cmd //c echo $path`
46515   fi
46516 
46517 
46518   input_path="$new_path"
46519   # Check if we need to convert this using DOS-style short mode. If the path
46520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46521   # take no chances and rewrite it.
46522   # Note: m4 eats our [], so we need to use [ and ] instead.
46523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46524   if test "x$has_forbidden_chars" != x; then
46525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46526     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46527   fi
46528 
46529 
46530   windows_path="$new_path"
46531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46532     unix_path=`$CYGPATH -u "$windows_path"`
46533     new_path="$unix_path"
46534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46535     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46536     new_path="$unix_path"
46537   fi
46538 
46539   if test "x$path" != "x$new_path"; then
46540     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46541     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46542 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46543   fi
46544 
46545   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46546   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46547 
46548   else
46549     # We're on a posix platform. Hooray! :)
46550     path="$POTENTIAL_FREETYPE_LIB_PATH"
46551     has_space=`$ECHO "$path" | $GREP " "`
46552     if test "x$has_space" != x; then
46553       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46554 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46555       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46556     fi
46557 
46558     # Use eval to expand a potential ~
46559     eval path="$path"
46560     if test ! -f "$path" && test ! -d "$path"; then
46561       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46562     fi
46563 
46564     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46565   fi
46566 
46567 
46568     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46569     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46570 $as_echo_n "checking for freetype includes... " >&6; }
46571     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46572 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46573     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46574     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46575 $as_echo_n "checking for freetype libraries... " >&6; }
46576     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46577 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46578   fi
46579 
46580           fi
46581 
46582           if test "x$FOUND_FREETYPE" != xyes; then
46583             FREETYPE_BASE_DIR="$SYSROOT/usr"
46584             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46585 
46586   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46587   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46588   METHOD="well-known location"
46589 
46590   # First check if the files exists.
46591   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46592     # We found an arbitrary include file. That's a good sign.
46593     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46594 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46595     FOUND_FREETYPE=yes
46596 
46597     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46598     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46599       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46600 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46601       FOUND_FREETYPE=no
46602     else
46603       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46604         # On Windows, we will need both .lib and .dll file.
46605         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46606           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46607 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46608           FOUND_FREETYPE=no
46609         fi
46610       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46611           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46612         # Found lib in isa dir, use that instead.
46613         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46614       fi
46615     fi
46616   fi
46617 
46618   if test "x$FOUND_FREETYPE" = xyes; then
46619 
46620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46621 
46622   # Input might be given as Windows format, start by converting to
46623   # unix format.
46624   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46625   new_path=`$CYGPATH -u "$path"`
46626 
46627   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46628   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46629   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46630   # "foo.exe" is OK but "foo" is an error.
46631   #
46632   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46633   # It is also a way to make sure we got the proper file name for the real test later on.
46634   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46635   if test "x$test_shortpath" = x; then
46636     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46637 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46638     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46639   fi
46640 
46641   # Call helper function which possibly converts this using DOS-style short mode.
46642   # If so, the updated path is stored in $new_path.
46643 
46644   input_path="$new_path"
46645   # Check if we need to convert this using DOS-style short mode. If the path
46646   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46647   # take no chances and rewrite it.
46648   # Note: m4 eats our [], so we need to use [ and ] instead.
46649   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46650   if test "x$has_forbidden_chars" != x; then
46651     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46652     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46653     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46654     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46655       # Going to short mode and back again did indeed matter. Since short mode is
46656       # case insensitive, let's make it lowercase to improve readability.
46657       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46658       # Now convert it back to Unix-stile (cygpath)
46659       input_path=`$CYGPATH -u "$shortmode_path"`
46660       new_path="$input_path"
46661     fi
46662   fi
46663 
46664   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46665   if test "x$test_cygdrive_prefix" = x; then
46666     # As a simple fix, exclude /usr/bin since it's not a real path.
46667     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46668       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46669       # a path prefixed by /cygdrive for fixpath to work.
46670       new_path="$CYGWIN_ROOT_PATH$input_path"
46671     fi
46672   fi
46673 
46674 
46675   if test "x$path" != "x$new_path"; then
46676     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46677     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46678 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46679   fi
46680 
46681   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46682 
46683   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46684   has_colon=`$ECHO $path | $GREP ^.:`
46685   new_path="$path"
46686   if test "x$has_colon" = x; then
46687     # Not in mixed or Windows style, start by that.
46688     new_path=`cmd //c echo $path`
46689   fi
46690 
46691 
46692   input_path="$new_path"
46693   # Check if we need to convert this using DOS-style short mode. If the path
46694   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46695   # take no chances and rewrite it.
46696   # Note: m4 eats our [], so we need to use [ and ] instead.
46697   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46698   if test "x$has_forbidden_chars" != x; then
46699     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46700     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46701   fi
46702 
46703 
46704   windows_path="$new_path"
46705   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46706     unix_path=`$CYGPATH -u "$windows_path"`
46707     new_path="$unix_path"
46708   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46709     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46710     new_path="$unix_path"
46711   fi
46712 
46713   if test "x$path" != "x$new_path"; then
46714     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46715     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46716 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46717   fi
46718 
46719   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46720   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46721 
46722   else
46723     # We're on a posix platform. Hooray! :)
46724     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46725     has_space=`$ECHO "$path" | $GREP " "`
46726     if test "x$has_space" != x; then
46727       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46728 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46729       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46730     fi
46731 
46732     # Use eval to expand a potential ~
46733     eval path="$path"
46734     if test ! -f "$path" && test ! -d "$path"; then
46735       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46736     fi
46737 
46738     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46739   fi
46740 
46741 
46742   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46743 
46744   # Input might be given as Windows format, start by converting to
46745   # unix format.
46746   path="$POTENTIAL_FREETYPE_LIB_PATH"
46747   new_path=`$CYGPATH -u "$path"`
46748 
46749   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46750   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46751   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46752   # "foo.exe" is OK but "foo" is an error.
46753   #
46754   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46755   # It is also a way to make sure we got the proper file name for the real test later on.
46756   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46757   if test "x$test_shortpath" = x; then
46758     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46759 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46760     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46761   fi
46762 
46763   # Call helper function which possibly converts this using DOS-style short mode.
46764   # If so, the updated path is stored in $new_path.
46765 
46766   input_path="$new_path"
46767   # Check if we need to convert this using DOS-style short mode. If the path
46768   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46769   # take no chances and rewrite it.
46770   # Note: m4 eats our [], so we need to use [ and ] instead.
46771   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46772   if test "x$has_forbidden_chars" != x; then
46773     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46774     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46775     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46776     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46777       # Going to short mode and back again did indeed matter. Since short mode is
46778       # case insensitive, let's make it lowercase to improve readability.
46779       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46780       # Now convert it back to Unix-stile (cygpath)
46781       input_path=`$CYGPATH -u "$shortmode_path"`
46782       new_path="$input_path"
46783     fi
46784   fi
46785 
46786   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46787   if test "x$test_cygdrive_prefix" = x; then
46788     # As a simple fix, exclude /usr/bin since it's not a real path.
46789     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46790       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46791       # a path prefixed by /cygdrive for fixpath to work.
46792       new_path="$CYGWIN_ROOT_PATH$input_path"
46793     fi
46794   fi
46795 
46796 
46797   if test "x$path" != "x$new_path"; then
46798     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46799     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46800 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46801   fi
46802 
46803   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46804 
46805   path="$POTENTIAL_FREETYPE_LIB_PATH"
46806   has_colon=`$ECHO $path | $GREP ^.:`
46807   new_path="$path"
46808   if test "x$has_colon" = x; then
46809     # Not in mixed or Windows style, start by that.
46810     new_path=`cmd //c echo $path`
46811   fi
46812 
46813 
46814   input_path="$new_path"
46815   # Check if we need to convert this using DOS-style short mode. If the path
46816   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46817   # take no chances and rewrite it.
46818   # Note: m4 eats our [], so we need to use [ and ] instead.
46819   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46820   if test "x$has_forbidden_chars" != x; then
46821     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46822     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46823   fi
46824 
46825 
46826   windows_path="$new_path"
46827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46828     unix_path=`$CYGPATH -u "$windows_path"`
46829     new_path="$unix_path"
46830   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46831     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46832     new_path="$unix_path"
46833   fi
46834 
46835   if test "x$path" != "x$new_path"; then
46836     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46837     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46838 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46839   fi
46840 
46841   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46842   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46843 
46844   else
46845     # We're on a posix platform. Hooray! :)
46846     path="$POTENTIAL_FREETYPE_LIB_PATH"
46847     has_space=`$ECHO "$path" | $GREP " "`
46848     if test "x$has_space" != x; then
46849       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46850 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46851       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46852     fi
46853 
46854     # Use eval to expand a potential ~
46855     eval path="$path"
46856     if test ! -f "$path" && test ! -d "$path"; then
46857       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46858     fi
46859 
46860     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46861   fi
46862 
46863 
46864     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46865     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46866 $as_echo_n "checking for freetype includes... " >&6; }
46867     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46868 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46869     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46870     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46871 $as_echo_n "checking for freetype libraries... " >&6; }
46872     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46873 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46874   fi
46875 
46876             else
46877 
46878   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46879   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
46880   METHOD="well-known location"
46881 
46882   # First check if the files exists.
46883   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46884     # We found an arbitrary include file. That's a good sign.
46885     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46886 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46887     FOUND_FREETYPE=yes
46888 
46889     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46890     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46891       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46892 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46893       FOUND_FREETYPE=no
46894     else
46895       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46896         # On Windows, we will need both .lib and .dll file.
46897         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46898           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46899 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46900           FOUND_FREETYPE=no
46901         fi
46902       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46903           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46904         # Found lib in isa dir, use that instead.
46905         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46906       fi
46907     fi
46908   fi
46909 
46910   if test "x$FOUND_FREETYPE" = xyes; then
46911 
46912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46913 
46914   # Input might be given as Windows format, start by converting to
46915   # unix format.
46916   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46917   new_path=`$CYGPATH -u "$path"`
46918 
46919   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46920   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46921   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46922   # "foo.exe" is OK but "foo" is an error.
46923   #
46924   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46925   # It is also a way to make sure we got the proper file name for the real test later on.
46926   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46927   if test "x$test_shortpath" = x; then
46928     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46929 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46930     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46931   fi
46932 
46933   # Call helper function which possibly converts this using DOS-style short mode.
46934   # If so, the updated path is stored in $new_path.
46935 
46936   input_path="$new_path"
46937   # Check if we need to convert this using DOS-style short mode. If the path
46938   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46939   # take no chances and rewrite it.
46940   # Note: m4 eats our [], so we need to use [ and ] instead.
46941   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46942   if test "x$has_forbidden_chars" != x; then
46943     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46944     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46945     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46946     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46947       # Going to short mode and back again did indeed matter. Since short mode is
46948       # case insensitive, let's make it lowercase to improve readability.
46949       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46950       # Now convert it back to Unix-stile (cygpath)
46951       input_path=`$CYGPATH -u "$shortmode_path"`
46952       new_path="$input_path"
46953     fi
46954   fi
46955 
46956   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46957   if test "x$test_cygdrive_prefix" = x; then
46958     # As a simple fix, exclude /usr/bin since it's not a real path.
46959     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46960       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46961       # a path prefixed by /cygdrive for fixpath to work.
46962       new_path="$CYGWIN_ROOT_PATH$input_path"
46963     fi
46964   fi
46965 
46966 
46967   if test "x$path" != "x$new_path"; then
46968     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46969     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46970 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46971   fi
46972 
46973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46974 
46975   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46976   has_colon=`$ECHO $path | $GREP ^.:`
46977   new_path="$path"
46978   if test "x$has_colon" = x; then
46979     # Not in mixed or Windows style, start by that.
46980     new_path=`cmd //c echo $path`
46981   fi
46982 
46983 
46984   input_path="$new_path"
46985   # Check if we need to convert this using DOS-style short mode. If the path
46986   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46987   # take no chances and rewrite it.
46988   # Note: m4 eats our [], so we need to use [ and ] instead.
46989   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46990   if test "x$has_forbidden_chars" != x; then
46991     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46992     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46993   fi
46994 
46995 
46996   windows_path="$new_path"
46997   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46998     unix_path=`$CYGPATH -u "$windows_path"`
46999     new_path="$unix_path"
47000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47001     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47002     new_path="$unix_path"
47003   fi
47004 
47005   if test "x$path" != "x$new_path"; then
47006     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47007     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47008 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47009   fi
47010 
47011   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47012   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47013 
47014   else
47015     # We're on a posix platform. Hooray! :)
47016     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47017     has_space=`$ECHO "$path" | $GREP " "`
47018     if test "x$has_space" != x; then
47019       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47020 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47021       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47022     fi
47023 
47024     # Use eval to expand a potential ~
47025     eval path="$path"
47026     if test ! -f "$path" && test ! -d "$path"; then
47027       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47028     fi
47029 
47030     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47031   fi
47032 
47033 
47034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47035 
47036   # Input might be given as Windows format, start by converting to
47037   # unix format.
47038   path="$POTENTIAL_FREETYPE_LIB_PATH"
47039   new_path=`$CYGPATH -u "$path"`
47040 
47041   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47042   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47043   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47044   # "foo.exe" is OK but "foo" is an error.
47045   #
47046   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47047   # It is also a way to make sure we got the proper file name for the real test later on.
47048   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47049   if test "x$test_shortpath" = x; then
47050     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47051 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47052     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47053   fi
47054 
47055   # Call helper function which possibly converts this using DOS-style short mode.
47056   # If so, the updated path is stored in $new_path.
47057 
47058   input_path="$new_path"
47059   # Check if we need to convert this using DOS-style short mode. If the path
47060   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47061   # take no chances and rewrite it.
47062   # Note: m4 eats our [], so we need to use [ and ] instead.
47063   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47064   if test "x$has_forbidden_chars" != x; then
47065     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47066     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47067     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47068     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47069       # Going to short mode and back again did indeed matter. Since short mode is
47070       # case insensitive, let's make it lowercase to improve readability.
47071       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47072       # Now convert it back to Unix-stile (cygpath)
47073       input_path=`$CYGPATH -u "$shortmode_path"`
47074       new_path="$input_path"
47075     fi
47076   fi
47077 
47078   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47079   if test "x$test_cygdrive_prefix" = x; then
47080     # As a simple fix, exclude /usr/bin since it's not a real path.
47081     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47082       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47083       # a path prefixed by /cygdrive for fixpath to work.
47084       new_path="$CYGWIN_ROOT_PATH$input_path"
47085     fi
47086   fi
47087 
47088 
47089   if test "x$path" != "x$new_path"; then
47090     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47091     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47092 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47093   fi
47094 
47095   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47096 
47097   path="$POTENTIAL_FREETYPE_LIB_PATH"
47098   has_colon=`$ECHO $path | $GREP ^.:`
47099   new_path="$path"
47100   if test "x$has_colon" = x; then
47101     # Not in mixed or Windows style, start by that.
47102     new_path=`cmd //c echo $path`
47103   fi
47104 
47105 
47106   input_path="$new_path"
47107   # Check if we need to convert this using DOS-style short mode. If the path
47108   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47109   # take no chances and rewrite it.
47110   # Note: m4 eats our [], so we need to use [ and ] instead.
47111   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47112   if test "x$has_forbidden_chars" != x; then
47113     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47114     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47115   fi
47116 
47117 
47118   windows_path="$new_path"
47119   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47120     unix_path=`$CYGPATH -u "$windows_path"`
47121     new_path="$unix_path"
47122   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47123     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47124     new_path="$unix_path"
47125   fi
47126 
47127   if test "x$path" != "x$new_path"; then
47128     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47129     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47130 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47131   fi
47132 
47133   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47134   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47135 
47136   else
47137     # We're on a posix platform. Hooray! :)
47138     path="$POTENTIAL_FREETYPE_LIB_PATH"
47139     has_space=`$ECHO "$path" | $GREP " "`
47140     if test "x$has_space" != x; then
47141       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47142 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47143       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47144     fi
47145 
47146     # Use eval to expand a potential ~
47147     eval path="$path"
47148     if test ! -f "$path" && test ! -d "$path"; then
47149       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47150     fi
47151 
47152     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47153   fi
47154 
47155 
47156     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47157     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47158 $as_echo_n "checking for freetype includes... " >&6; }
47159     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47160 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47161     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47162     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47163 $as_echo_n "checking for freetype libraries... " >&6; }
47164     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47165 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47166   fi
47167 
47168               if test "x$FOUND_FREETYPE" != xyes; then
47169 
47170   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47171   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47172   METHOD="well-known location"
47173 
47174   # First check if the files exists.
47175   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47176     # We found an arbitrary include file. That's a good sign.
47177     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47178 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47179     FOUND_FREETYPE=yes
47180 
47181     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
47182     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47183       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47184 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47185       FOUND_FREETYPE=no
47186     else
47187       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47188         # On Windows, we will need both .lib and .dll file.
47189         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
47190           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
47191 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
47192           FOUND_FREETYPE=no
47193         fi
47194       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47195           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47196         # Found lib in isa dir, use that instead.
47197         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47198       fi
47199     fi
47200   fi
47201 
47202   if test "x$FOUND_FREETYPE" = xyes; then
47203 
47204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47205 
47206   # Input might be given as Windows format, start by converting to
47207   # unix format.
47208   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47209   new_path=`$CYGPATH -u "$path"`
47210 
47211   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47212   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47213   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47214   # "foo.exe" is OK but "foo" is an error.
47215   #
47216   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47217   # It is also a way to make sure we got the proper file name for the real test later on.
47218   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47219   if test "x$test_shortpath" = x; then
47220     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47221 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47222     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47223   fi
47224 
47225   # Call helper function which possibly converts this using DOS-style short mode.
47226   # If so, the updated path is stored in $new_path.
47227 
47228   input_path="$new_path"
47229   # Check if we need to convert this using DOS-style short mode. If the path
47230   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47231   # take no chances and rewrite it.
47232   # Note: m4 eats our [], so we need to use [ and ] instead.
47233   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47234   if test "x$has_forbidden_chars" != x; then
47235     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47236     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47237     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47238     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47239       # Going to short mode and back again did indeed matter. Since short mode is
47240       # case insensitive, let's make it lowercase to improve readability.
47241       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47242       # Now convert it back to Unix-stile (cygpath)
47243       input_path=`$CYGPATH -u "$shortmode_path"`
47244       new_path="$input_path"
47245     fi
47246   fi
47247 
47248   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47249   if test "x$test_cygdrive_prefix" = x; then
47250     # As a simple fix, exclude /usr/bin since it's not a real path.
47251     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47252       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47253       # a path prefixed by /cygdrive for fixpath to work.
47254       new_path="$CYGWIN_ROOT_PATH$input_path"
47255     fi
47256   fi
47257 
47258 
47259   if test "x$path" != "x$new_path"; then
47260     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47261     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47262 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47263   fi
47264 
47265   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47266 
47267   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47268   has_colon=`$ECHO $path | $GREP ^.:`
47269   new_path="$path"
47270   if test "x$has_colon" = x; then
47271     # Not in mixed or Windows style, start by that.
47272     new_path=`cmd //c echo $path`
47273   fi
47274 
47275 
47276   input_path="$new_path"
47277   # Check if we need to convert this using DOS-style short mode. If the path
47278   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47279   # take no chances and rewrite it.
47280   # Note: m4 eats our [], so we need to use [ and ] instead.
47281   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47282   if test "x$has_forbidden_chars" != x; then
47283     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47284     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47285   fi
47286 
47287 
47288   windows_path="$new_path"
47289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47290     unix_path=`$CYGPATH -u "$windows_path"`
47291     new_path="$unix_path"
47292   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47293     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47294     new_path="$unix_path"
47295   fi
47296 
47297   if test "x$path" != "x$new_path"; then
47298     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47299     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47300 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47301   fi
47302 
47303   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47304   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47305 
47306   else
47307     # We're on a posix platform. Hooray! :)
47308     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47309     has_space=`$ECHO "$path" | $GREP " "`
47310     if test "x$has_space" != x; then
47311       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47312 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47313       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47314     fi
47315 
47316     # Use eval to expand a potential ~
47317     eval path="$path"
47318     if test ! -f "$path" && test ! -d "$path"; then
47319       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47320     fi
47321 
47322     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47323   fi
47324 
47325 
47326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47327 
47328   # Input might be given as Windows format, start by converting to
47329   # unix format.
47330   path="$POTENTIAL_FREETYPE_LIB_PATH"
47331   new_path=`$CYGPATH -u "$path"`
47332 
47333   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47334   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47335   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47336   # "foo.exe" is OK but "foo" is an error.
47337   #
47338   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47339   # It is also a way to make sure we got the proper file name for the real test later on.
47340   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47341   if test "x$test_shortpath" = x; then
47342     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47343 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47344     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47345   fi
47346 
47347   # Call helper function which possibly converts this using DOS-style short mode.
47348   # If so, the updated path is stored in $new_path.
47349 
47350   input_path="$new_path"
47351   # Check if we need to convert this using DOS-style short mode. If the path
47352   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47353   # take no chances and rewrite it.
47354   # Note: m4 eats our [], so we need to use [ and ] instead.
47355   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47356   if test "x$has_forbidden_chars" != x; then
47357     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47358     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47359     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47360     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47361       # Going to short mode and back again did indeed matter. Since short mode is
47362       # case insensitive, let's make it lowercase to improve readability.
47363       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47364       # Now convert it back to Unix-stile (cygpath)
47365       input_path=`$CYGPATH -u "$shortmode_path"`
47366       new_path="$input_path"
47367     fi
47368   fi
47369 
47370   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47371   if test "x$test_cygdrive_prefix" = x; then
47372     # As a simple fix, exclude /usr/bin since it's not a real path.
47373     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47374       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47375       # a path prefixed by /cygdrive for fixpath to work.
47376       new_path="$CYGWIN_ROOT_PATH$input_path"
47377     fi
47378   fi
47379 
47380 
47381   if test "x$path" != "x$new_path"; then
47382     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47383     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47384 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47385   fi
47386 
47387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47388 
47389   path="$POTENTIAL_FREETYPE_LIB_PATH"
47390   has_colon=`$ECHO $path | $GREP ^.:`
47391   new_path="$path"
47392   if test "x$has_colon" = x; then
47393     # Not in mixed or Windows style, start by that.
47394     new_path=`cmd //c echo $path`
47395   fi
47396 
47397 
47398   input_path="$new_path"
47399   # Check if we need to convert this using DOS-style short mode. If the path
47400   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47401   # take no chances and rewrite it.
47402   # Note: m4 eats our [], so we need to use [ and ] instead.
47403   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47404   if test "x$has_forbidden_chars" != x; then
47405     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47406     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47407   fi
47408 
47409 
47410   windows_path="$new_path"
47411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47412     unix_path=`$CYGPATH -u "$windows_path"`
47413     new_path="$unix_path"
47414   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47415     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47416     new_path="$unix_path"
47417   fi
47418 
47419   if test "x$path" != "x$new_path"; then
47420     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47421     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47422 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47423   fi
47424 
47425   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47426   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47427 
47428   else
47429     # We're on a posix platform. Hooray! :)
47430     path="$POTENTIAL_FREETYPE_LIB_PATH"
47431     has_space=`$ECHO "$path" | $GREP " "`
47432     if test "x$has_space" != x; then
47433       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47434 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47435       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47436     fi
47437 
47438     # Use eval to expand a potential ~
47439     eval path="$path"
47440     if test ! -f "$path" && test ! -d "$path"; then
47441       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47442     fi
47443 
47444     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47445   fi
47446 
47447 
47448     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47449     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47450 $as_echo_n "checking for freetype includes... " >&6; }
47451     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47452 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47453     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47454     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47455 $as_echo_n "checking for freetype libraries... " >&6; }
47456     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47457 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47458   fi
47459 
47460               fi
47461             fi
47462           fi
47463         fi
47464       fi # end check in well-known locations
47465 
47466       if test "x$FOUND_FREETYPE" != xyes; then
47467 
47468   # Print a helpful message on how to acquire the necessary build dependency.
47469   # freetype is the help tag: freetype, cups, pulse, alsa etc
47470   MISSING_DEPENDENCY=freetype
47471 
47472   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47473     cygwin_help $MISSING_DEPENDENCY
47474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47475     msys_help $MISSING_DEPENDENCY
47476   else
47477     PKGHANDLER_COMMAND=
47478 
47479     case $PKGHANDLER in
47480       apt-get)
47481         apt_help     $MISSING_DEPENDENCY ;;
47482       yum)
47483         yum_help     $MISSING_DEPENDENCY ;;
47484       port)
47485         port_help    $MISSING_DEPENDENCY ;;
47486       pkgutil)
47487         pkgutil_help $MISSING_DEPENDENCY ;;
47488       pkgadd)
47489         pkgadd_help  $MISSING_DEPENDENCY ;;
47490     esac
47491 
47492     if test "x$PKGHANDLER_COMMAND" != x; then
47493       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47494     fi
47495   fi
47496 
47497         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47498       fi
47499     fi # end user specified settings
47500 
47501     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47502     if test "x$FREETYPE_CFLAGS" = x; then
47503 
47504   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47505 
47506   # Input might be given as Windows format, start by converting to
47507   # unix format.
47508   path="$FREETYPE_INCLUDE_PATH"
47509   new_path=`$CYGPATH -u "$path"`
47510 
47511   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47512   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47513   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47514   # "foo.exe" is OK but "foo" is an error.
47515   #
47516   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47517   # It is also a way to make sure we got the proper file name for the real test later on.
47518   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47519   if test "x$test_shortpath" = x; then
47520     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47521 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47522     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47523   fi
47524 
47525   # Call helper function which possibly converts this using DOS-style short mode.
47526   # If so, the updated path is stored in $new_path.
47527 
47528   input_path="$new_path"
47529   # Check if we need to convert this using DOS-style short mode. If the path
47530   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47531   # take no chances and rewrite it.
47532   # Note: m4 eats our [], so we need to use [ and ] instead.
47533   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47534   if test "x$has_forbidden_chars" != x; then
47535     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47536     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47537     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47538     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47539       # Going to short mode and back again did indeed matter. Since short mode is
47540       # case insensitive, let's make it lowercase to improve readability.
47541       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47542       # Now convert it back to Unix-stile (cygpath)
47543       input_path=`$CYGPATH -u "$shortmode_path"`
47544       new_path="$input_path"
47545     fi
47546   fi
47547 
47548   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47549   if test "x$test_cygdrive_prefix" = x; then
47550     # As a simple fix, exclude /usr/bin since it's not a real path.
47551     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47552       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47553       # a path prefixed by /cygdrive for fixpath to work.
47554       new_path="$CYGWIN_ROOT_PATH$input_path"
47555     fi
47556   fi
47557 
47558 
47559   if test "x$path" != "x$new_path"; then
47560     FREETYPE_INCLUDE_PATH="$new_path"
47561     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47562 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47563   fi
47564 
47565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47566 
47567   path="$FREETYPE_INCLUDE_PATH"
47568   has_colon=`$ECHO $path | $GREP ^.:`
47569   new_path="$path"
47570   if test "x$has_colon" = x; then
47571     # Not in mixed or Windows style, start by that.
47572     new_path=`cmd //c echo $path`
47573   fi
47574 
47575 
47576   input_path="$new_path"
47577   # Check if we need to convert this using DOS-style short mode. If the path
47578   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47579   # take no chances and rewrite it.
47580   # Note: m4 eats our [], so we need to use [ and ] instead.
47581   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47582   if test "x$has_forbidden_chars" != x; then
47583     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47584     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47585   fi
47586 
47587 
47588   windows_path="$new_path"
47589   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47590     unix_path=`$CYGPATH -u "$windows_path"`
47591     new_path="$unix_path"
47592   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47593     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47594     new_path="$unix_path"
47595   fi
47596 
47597   if test "x$path" != "x$new_path"; then
47598     FREETYPE_INCLUDE_PATH="$new_path"
47599     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47600 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47601   fi
47602 
47603   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47604   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47605 
47606   else
47607     # We're on a posix platform. Hooray! :)
47608     path="$FREETYPE_INCLUDE_PATH"
47609     has_space=`$ECHO "$path" | $GREP " "`
47610     if test "x$has_space" != x; then
47611       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47612 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47613       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47614     fi
47615 
47616     # Use eval to expand a potential ~
47617     eval path="$path"
47618     if test ! -f "$path" && test ! -d "$path"; then
47619       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47620     fi
47621 
47622     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47623   fi
47624 
47625       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47626         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47627       else
47628         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47629       fi
47630     fi
47631 
47632     if test "x$FREETYPE_LIBS" = x; then
47633 
47634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47635 
47636   # Input might be given as Windows format, start by converting to
47637   # unix format.
47638   path="$FREETYPE_LIB_PATH"
47639   new_path=`$CYGPATH -u "$path"`
47640 
47641   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47642   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47643   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47644   # "foo.exe" is OK but "foo" is an error.
47645   #
47646   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47647   # It is also a way to make sure we got the proper file name for the real test later on.
47648   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47649   if test "x$test_shortpath" = x; then
47650     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47651 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47652     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
47653   fi
47654 
47655   # Call helper function which possibly converts this using DOS-style short mode.
47656   # If so, the updated path is stored in $new_path.
47657 
47658   input_path="$new_path"
47659   # Check if we need to convert this using DOS-style short mode. If the path
47660   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47661   # take no chances and rewrite it.
47662   # Note: m4 eats our [], so we need to use [ and ] instead.
47663   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47664   if test "x$has_forbidden_chars" != x; then
47665     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47666     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47667     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47668     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47669       # Going to short mode and back again did indeed matter. Since short mode is
47670       # case insensitive, let's make it lowercase to improve readability.
47671       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47672       # Now convert it back to Unix-stile (cygpath)
47673       input_path=`$CYGPATH -u "$shortmode_path"`
47674       new_path="$input_path"
47675     fi
47676   fi
47677 
47678   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47679   if test "x$test_cygdrive_prefix" = x; then
47680     # As a simple fix, exclude /usr/bin since it's not a real path.
47681     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47682       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47683       # a path prefixed by /cygdrive for fixpath to work.
47684       new_path="$CYGWIN_ROOT_PATH$input_path"
47685     fi
47686   fi
47687 
47688 
47689   if test "x$path" != "x$new_path"; then
47690     FREETYPE_LIB_PATH="$new_path"
47691     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47692 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47693   fi
47694 
47695   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47696 
47697   path="$FREETYPE_LIB_PATH"
47698   has_colon=`$ECHO $path | $GREP ^.:`
47699   new_path="$path"
47700   if test "x$has_colon" = x; then
47701     # Not in mixed or Windows style, start by that.
47702     new_path=`cmd //c echo $path`
47703   fi
47704 
47705 
47706   input_path="$new_path"
47707   # Check if we need to convert this using DOS-style short mode. If the path
47708   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47709   # take no chances and rewrite it.
47710   # Note: m4 eats our [], so we need to use [ and ] instead.
47711   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47712   if test "x$has_forbidden_chars" != x; then
47713     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47714     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47715   fi
47716 
47717 
47718   windows_path="$new_path"
47719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47720     unix_path=`$CYGPATH -u "$windows_path"`
47721     new_path="$unix_path"
47722   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47723     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47724     new_path="$unix_path"
47725   fi
47726 
47727   if test "x$path" != "x$new_path"; then
47728     FREETYPE_LIB_PATH="$new_path"
47729     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47730 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47731   fi
47732 
47733   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47734   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47735 
47736   else
47737     # We're on a posix platform. Hooray! :)
47738     path="$FREETYPE_LIB_PATH"
47739     has_space=`$ECHO "$path" | $GREP " "`
47740     if test "x$has_space" != x; then
47741       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47742 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47743       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47744     fi
47745 
47746     # Use eval to expand a potential ~
47747     eval path="$path"
47748     if test ! -f "$path" && test ! -d "$path"; then
47749       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47750     fi
47751 
47752     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47753   fi
47754 
47755       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47756         FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
47757       else
47758         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
47759       fi
47760     fi
47761 
47762     # Try to compile it
47763     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
47764 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
47765     ac_ext=cpp
47766 ac_cpp='$CXXCPP $CPPFLAGS'
47767 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47768 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47769 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47770 
47771     PREV_CXXCFLAGS="$CXXFLAGS"
47772     PREV_LIBS="$LIBS"
47773     PREV_CXX="$CXX"
47774     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
47775     LIBS="$LIBS $FREETYPE_LIBS"
47776     CXX="$FIXPATH $CXX"
47777     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47778 /* end confdefs.h.  */
47779 
47780           #include<ft2build.h>
47781           #include FT_FREETYPE_H
47782           int main () {
47783             FT_Init_FreeType(NULL);
47784             return 0;
47785           }
47786 
47787 _ACEOF
47788 if ac_fn_cxx_try_link "$LINENO"; then :
47789 
47790           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47791 $as_echo "yes" >&6; }
47792 
47793 else
47794 
47795           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47796 $as_echo "no" >&6; }
47797           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
47798 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
47799           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
47800 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
47801 
47802 
47803   # Print a helpful message on how to acquire the necessary build dependency.
47804   # freetype is the help tag: freetype, cups, pulse, alsa etc
47805   MISSING_DEPENDENCY=freetype
47806 
47807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47808     cygwin_help $MISSING_DEPENDENCY
47809   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47810     msys_help $MISSING_DEPENDENCY
47811   else
47812     PKGHANDLER_COMMAND=
47813 
47814     case $PKGHANDLER in
47815       apt-get)
47816         apt_help     $MISSING_DEPENDENCY ;;
47817       yum)
47818         yum_help     $MISSING_DEPENDENCY ;;
47819       port)
47820         port_help    $MISSING_DEPENDENCY ;;
47821       pkgutil)
47822         pkgutil_help $MISSING_DEPENDENCY ;;
47823       pkgadd)
47824         pkgadd_help  $MISSING_DEPENDENCY ;;
47825     esac
47826 
47827     if test "x$PKGHANDLER_COMMAND" != x; then
47828       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47829     fi
47830   fi
47831 
47832 
47833           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
47834 
47835 
47836 fi
47837 rm -f core conftest.err conftest.$ac_objext \
47838     conftest$ac_exeext conftest.$ac_ext
47839     CXXCFLAGS="$PREV_CXXFLAGS"
47840     LIBS="$PREV_LIBS"
47841     CXX="$PREV_CXX"
47842     ac_ext=cpp
47843 ac_cpp='$CXXCPP $CPPFLAGS'
47844 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47845 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47846 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47847 
47848 
47849     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
47850 $as_echo_n "checking if we should bundle freetype... " >&6; }
47851     if test "x$BUNDLE_FREETYPE" = xyes; then
47852       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
47853     fi
47854     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
47855 $as_echo "$BUNDLE_FREETYPE" >&6; }
47856 
47857   fi # end freetype needed
47858 
47859 
47860 
47861 
47862 
47863 
47864 
47865   ###############################################################################
47866   #
47867   # Check for alsa headers and libraries. Used on Linux/GNU systems.
47868   #
47869 
47870 # Check whether --with-alsa was given.
47871 if test "${with_alsa+set}" = set; then :
47872   withval=$with_alsa;
47873 fi
47874 
47875 
47876 # Check whether --with-alsa-include was given.
47877 if test "${with_alsa_include+set}" = set; then :
47878   withval=$with_alsa_include;
47879 fi
47880 
47881 
47882 # Check whether --with-alsa-lib was given.
47883 if test "${with_alsa_lib+set}" = set; then :
47884   withval=$with_alsa_lib;
47885 fi
47886 
47887 
47888   if test "x$ALSA_NOT_NEEDED" = xyes; then
47889     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
47890       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
47891 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
47892     fi
47893     ALSA_CFLAGS=
47894     ALSA_LIBS=
47895   else
47896     ALSA_FOUND=no
47897 
47898     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
47899       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
47900     fi
47901 
47902     if test "x${with_alsa}" != x; then
47903       ALSA_LIBS="-L${with_alsa}/lib -lasound"
47904       ALSA_CFLAGS="-I${with_alsa}/include"
47905       ALSA_FOUND=yes
47906     fi
47907     if test "x${with_alsa_include}" != x; then
47908       ALSA_CFLAGS="-I${with_alsa_include}"
47909       ALSA_FOUND=yes
47910     fi
47911     if test "x${with_alsa_lib}" != x; then
47912       ALSA_LIBS="-L${with_alsa_lib} -lasound"
47913       ALSA_FOUND=yes
47914     fi
47915     if test "x$ALSA_FOUND" = xno; then
47916 
47917 
47918   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
47919     # Source the builddeps file again, to make sure it uses the latest variables!
47920     . $builddepsfile
47921     # Look for a target and build machine specific resource!
47922     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
47923     if test "x$resource" = x; then
47924       # Ok, lets instead look for a target specific resource
47925       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
47926     fi
47927     if test "x$resource" = x; then
47928       # Ok, lets instead look for a build specific resource
47929       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
47930     fi
47931     if test "x$resource" = x; then
47932       # Ok, lets instead look for a generic resource
47933       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
47934       resource=${builddep_alsa}
47935     fi
47936     if test "x$resource" != x; then
47937       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
47938 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
47939       # If the resource in the builddeps.conf file is an existing directory,
47940       # for example /java/linux/cups
47941       if test -d ${resource}; then
47942         depdir=${resource}
47943       else
47944 
47945   # alsa is for example mymodule
47946   # $resource is for example libs/general/libmymod_1_2_3.zip
47947   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
47948   # $with_builddeps_dir is for example /localhome/builddeps
47949   # depdir is the name of the variable into which we store the depdir, eg MYMOD
47950   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
47951   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
47952   filename=`basename $resource`
47953   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
47954   filebase=${filename%%.*}
47955   extension=${filename#*.}
47956   installdir=$with_builddeps_dir/$filebase
47957   if test ! -f $installdir/$filename.unpacked; then
47958     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
47959 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
47960     if test ! -d $installdir; then
47961       mkdir -p $installdir
47962     fi
47963     if test ! -d $installdir; then
47964       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
47965     fi
47966     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
47967     touch $tmpfile
47968     if test ! -f $tmpfile; then
47969       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
47970     fi
47971 
47972   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
47973   # $tmpfile is the local file name for the downloaded file.
47974   VALID_TOOL=no
47975   if test "x$BDEPS_FTP" = xwget; then
47976     VALID_TOOL=yes
47977     wget -O $tmpfile $with_builddeps_server/$resource
47978   fi
47979   if test "x$BDEPS_FTP" = xlftp; then
47980     VALID_TOOL=yes
47981     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
47982   fi
47983   if test "x$BDEPS_FTP" = xftp; then
47984     VALID_TOOL=yes
47985     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
47986     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
47987     FTPUSERPWD=${FTPSERVER%%@*}
47988     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
47989       FTPUSER=${userpwd%%:*}
47990       FTPPWD=${userpwd#*@}
47991       FTPSERVER=${FTPSERVER#*@}
47992     else
47993       FTPUSER=ftp
47994       FTPPWD=ftp
47995     fi
47996     # the "pass" command does not work on some
47997     # ftp clients (read ftp.exe) but if it works,
47998     # passive mode is better!
47999     ( \
48000         echo "user $FTPUSER $FTPPWD"        ; \
48001         echo "pass"                         ; \
48002         echo "bin"                          ; \
48003         echo "get $FTPPATH $tmpfile"              ; \
48004     ) | ftp -in $FTPSERVER
48005   fi
48006   if test "x$VALID_TOOL" != xyes; then
48007     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48008   fi
48009 
48010     mv $tmpfile $installdir/$filename
48011     if test ! -s $installdir/$filename; then
48012       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48013     fi
48014     case "$extension" in
48015       zip)  echo "Unzipping $installdir/$filename..."
48016         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48017         ;;
48018       tar.gz) echo "Untaring $installdir/$filename..."
48019         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48020         ;;
48021       tgz) echo "Untaring $installdir/$filename..."
48022         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48023         ;;
48024       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48025         ;;
48026     esac
48027   fi
48028   if test -f $installdir/$filename.unpacked; then
48029     depdir=$installdir
48030   fi
48031 
48032       fi
48033       # Source the builddeps file again, because in the previous command, the depdir
48034       # was updated to point at the current build dependency install directory.
48035       . $builddepsfile
48036       # Now extract variables from the builddeps.conf files.
48037       theroot=${builddep_alsa_ROOT}
48038       thecflags=${builddep_alsa_CFLAGS}
48039       thelibs=${builddep_alsa_LIBS}
48040       if test "x$depdir" = x; then
48041         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48042       fi
48043       ALSA=$depdir
48044       if test "x$theroot" != x; then
48045         ALSA="$theroot"
48046       fi
48047       if test "x$thecflags" != x; then
48048         ALSA_CFLAGS="$thecflags"
48049       fi
48050       if test "x$thelibs" != x; then
48051         ALSA_LIBS="$thelibs"
48052       fi
48053       ALSA_FOUND=yes
48054       else ALSA_FOUND=no
48055 
48056     fi
48057     else ALSA_FOUND=no
48058 
48059   fi
48060 
48061     fi
48062     # Do not try pkg-config if we have a sysroot set.
48063     if test "x$SYSROOT" = x; then
48064       if test "x$ALSA_FOUND" = xno; then
48065 
48066 pkg_failed=no
48067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48068 $as_echo_n "checking for ALSA... " >&6; }
48069 
48070 if test -n "$ALSA_CFLAGS"; then
48071     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48072  elif test -n "$PKG_CONFIG"; then
48073     if test -n "$PKG_CONFIG" && \
48074     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48075   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48076   ac_status=$?
48077   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48078   test $ac_status = 0; }; then
48079   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48080 else
48081   pkg_failed=yes
48082 fi
48083  else
48084     pkg_failed=untried
48085 fi
48086 if test -n "$ALSA_LIBS"; then
48087     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48088  elif test -n "$PKG_CONFIG"; then
48089     if test -n "$PKG_CONFIG" && \
48090     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48091   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48092   ac_status=$?
48093   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48094   test $ac_status = 0; }; then
48095   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48096 else
48097   pkg_failed=yes
48098 fi
48099  else
48100     pkg_failed=untried
48101 fi
48102 
48103 
48104 
48105 if test $pkg_failed = yes; then
48106 
48107 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48108         _pkg_short_errors_supported=yes
48109 else
48110         _pkg_short_errors_supported=no
48111 fi
48112         if test $_pkg_short_errors_supported = yes; then
48113                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48114         else
48115                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48116         fi
48117         # Put the nasty error message in config.log where it belongs
48118         echo "$ALSA_PKG_ERRORS" >&5
48119 
48120         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48121 $as_echo "no" >&6; }
48122                 ALSA_FOUND=no
48123 elif test $pkg_failed = untried; then
48124         ALSA_FOUND=no
48125 else
48126         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48127         ALSA_LIBS=$pkg_cv_ALSA_LIBS
48128         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48129 $as_echo "yes" >&6; }
48130         ALSA_FOUND=yes
48131 fi
48132       fi
48133     fi
48134     if test "x$ALSA_FOUND" = xno; then
48135       for ac_header in alsa/asoundlib.h
48136 do :
48137   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48138 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48139   cat >>confdefs.h <<_ACEOF
48140 #define HAVE_ALSA_ASOUNDLIB_H 1
48141 _ACEOF
48142 
48143             ALSA_FOUND=yes
48144             ALSA_CFLAGS=-Iignoreme
48145             ALSA_LIBS=-lasound
48146             DEFAULT_ALSA=yes
48147 
48148 else
48149   ALSA_FOUND=no
48150 fi
48151 
48152 done
48153 
48154     fi
48155     if test "x$ALSA_FOUND" = xno; then
48156 
48157   # Print a helpful message on how to acquire the necessary build dependency.
48158   # alsa is the help tag: freetype, cups, pulse, alsa etc
48159   MISSING_DEPENDENCY=alsa
48160 
48161   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48162     cygwin_help $MISSING_DEPENDENCY
48163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48164     msys_help $MISSING_DEPENDENCY
48165   else
48166     PKGHANDLER_COMMAND=
48167 
48168     case $PKGHANDLER in
48169       apt-get)
48170         apt_help     $MISSING_DEPENDENCY ;;
48171       yum)
48172         yum_help     $MISSING_DEPENDENCY ;;
48173       port)
48174         port_help    $MISSING_DEPENDENCY ;;
48175       pkgutil)
48176         pkgutil_help $MISSING_DEPENDENCY ;;
48177       pkgadd)
48178         pkgadd_help  $MISSING_DEPENDENCY ;;
48179     esac
48180 
48181     if test "x$PKGHANDLER_COMMAND" != x; then
48182       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48183     fi
48184   fi
48185 
48186       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48187     fi
48188   fi
48189 
48190 
48191 
48192 
48193 
48194 
48195   ###############################################################################
48196   #
48197   # Check for the jpeg library
48198   #
48199 
48200 
48201 # Check whether --with-libjpeg was given.
48202 if test "${with_libjpeg+set}" = set; then :
48203   withval=$with_libjpeg;
48204 fi
48205 
48206 
48207   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48208 $as_echo_n "checking for which libjpeg to use... " >&6; }
48209 
48210   # default is bundled
48211   DEFAULT_LIBJPEG=bundled
48212 
48213   #
48214   # if user didn't specify, use DEFAULT_LIBJPEG
48215   #
48216   if test "x${with_libjpeg}" = "x"; then
48217     with_libjpeg=${DEFAULT_LIBJPEG}
48218   fi
48219 
48220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48221 $as_echo "${with_libjpeg}" >&6; }
48222 
48223   if test "x${with_libjpeg}" = "xbundled"; then
48224     USE_EXTERNAL_LIBJPEG=false
48225   elif test "x${with_libjpeg}" = "xsystem"; then
48226     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48227 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48228 
48229 else
48230    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48231 fi
48232 
48233 
48234     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48235 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48236 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48237   $as_echo_n "(cached) " >&6
48238 else
48239   ac_check_lib_save_LIBS=$LIBS
48240 LIBS="-ljpeg  $LIBS"
48241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48242 /* end confdefs.h.  */
48243 
48244 /* Override any GCC internal prototype to avoid an error.
48245    Use char because int might match the return type of a GCC
48246    builtin and then its argument prototype would still apply.  */
48247 #ifdef __cplusplus
48248 extern "C"
48249 #endif
48250 char jpeg_CreateDecompress ();
48251 int
48252 main ()
48253 {
48254 return jpeg_CreateDecompress ();
48255   ;
48256   return 0;
48257 }
48258 _ACEOF
48259 if ac_fn_cxx_try_link "$LINENO"; then :
48260   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48261 else
48262   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48263 fi
48264 rm -f core conftest.err conftest.$ac_objext \
48265     conftest$ac_exeext conftest.$ac_ext
48266 LIBS=$ac_check_lib_save_LIBS
48267 fi
48268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48269 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48270 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48271   cat >>confdefs.h <<_ACEOF
48272 #define HAVE_LIBJPEG 1
48273 _ACEOF
48274 
48275   LIBS="-ljpeg $LIBS"
48276 
48277 else
48278    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48279 fi
48280 
48281 
48282     USE_EXTERNAL_LIBJPEG=true
48283   else
48284     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48285   fi
48286 
48287 
48288 
48289   ###############################################################################
48290   #
48291   # Check for the gif library
48292   #
48293 
48294 
48295 # Check whether --with-giflib was given.
48296 if test "${with_giflib+set}" = set; then :
48297   withval=$with_giflib;
48298 fi
48299 
48300 
48301 
48302   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48303 $as_echo_n "checking for which giflib to use... " >&6; }
48304 
48305   # default is bundled
48306   DEFAULT_GIFLIB=bundled
48307 
48308   #
48309   # if user didn't specify, use DEFAULT_GIFLIB
48310   #
48311   if test "x${with_giflib}" = "x"; then
48312     with_giflib=${DEFAULT_GIFLIB}
48313   fi
48314 
48315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48316 $as_echo "${with_giflib}" >&6; }
48317 
48318   if test "x${with_giflib}" = "xbundled"; then
48319     USE_EXTERNAL_LIBGIF=false
48320   elif test "x${with_giflib}" = "xsystem"; then
48321     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48322 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48323 
48324 else
48325    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48326 fi
48327 
48328 
48329     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48330 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48331 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48332   $as_echo_n "(cached) " >&6
48333 else
48334   ac_check_lib_save_LIBS=$LIBS
48335 LIBS="-lgif  $LIBS"
48336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48337 /* end confdefs.h.  */
48338 
48339 /* Override any GCC internal prototype to avoid an error.
48340    Use char because int might match the return type of a GCC
48341    builtin and then its argument prototype would still apply.  */
48342 #ifdef __cplusplus
48343 extern "C"
48344 #endif
48345 char DGifGetCode ();
48346 int
48347 main ()
48348 {
48349 return DGifGetCode ();
48350   ;
48351   return 0;
48352 }
48353 _ACEOF
48354 if ac_fn_cxx_try_link "$LINENO"; then :
48355   ac_cv_lib_gif_DGifGetCode=yes
48356 else
48357   ac_cv_lib_gif_DGifGetCode=no
48358 fi
48359 rm -f core conftest.err conftest.$ac_objext \
48360     conftest$ac_exeext conftest.$ac_ext
48361 LIBS=$ac_check_lib_save_LIBS
48362 fi
48363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48364 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48365 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48366   cat >>confdefs.h <<_ACEOF
48367 #define HAVE_LIBGIF 1
48368 _ACEOF
48369 
48370   LIBS="-lgif $LIBS"
48371 
48372 else
48373    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48374 fi
48375 
48376 
48377     USE_EXTERNAL_LIBGIF=true
48378   else
48379     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48380   fi
48381 
48382 
48383   ###############################################################################
48384   #
48385   # Check for the lcms2 library
48386   #
48387 
48388 
48389 # Check whether --with-lcms was given.
48390 if test "${with_lcms+set}" = set; then :
48391   withval=$with_lcms;
48392 fi
48393 
48394 
48395   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48396 $as_echo_n "checking for which lcms to use... " >&6; }
48397 
48398   DEFAULT_LCMS=bundled
48399 
48400   #
48401   # If user didn't specify, use DEFAULT_LCMS
48402   #
48403   if test "x${with_lcms}" = "x"; then
48404       with_lcms=${DEFAULT_LCMS}
48405   fi
48406 
48407   if test "x${with_lcms}" = "xbundled"; then
48408     USE_EXTERNAL_LCMS=false
48409     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48410 $as_echo "bundled" >&6; }
48411   elif test "x${with_lcms}" = "xsystem"; then
48412     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48413 $as_echo "system" >&6; }
48414 
48415 pkg_failed=no
48416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48417 $as_echo_n "checking for LCMS... " >&6; }
48418 
48419 if test -n "$LCMS_CFLAGS"; then
48420     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48421  elif test -n "$PKG_CONFIG"; then
48422     if test -n "$PKG_CONFIG" && \
48423     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48424   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48425   ac_status=$?
48426   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48427   test $ac_status = 0; }; then
48428   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48429 else
48430   pkg_failed=yes
48431 fi
48432  else
48433     pkg_failed=untried
48434 fi
48435 if test -n "$LCMS_LIBS"; then
48436     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48437  elif test -n "$PKG_CONFIG"; then
48438     if test -n "$PKG_CONFIG" && \
48439     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48440   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48441   ac_status=$?
48442   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48443   test $ac_status = 0; }; then
48444   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48445 else
48446   pkg_failed=yes
48447 fi
48448  else
48449     pkg_failed=untried
48450 fi
48451 
48452 
48453 
48454 if test $pkg_failed = yes; then
48455 
48456 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48457         _pkg_short_errors_supported=yes
48458 else
48459         _pkg_short_errors_supported=no
48460 fi
48461         if test $_pkg_short_errors_supported = yes; then
48462                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48463         else
48464                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48465         fi
48466         # Put the nasty error message in config.log where it belongs
48467         echo "$LCMS_PKG_ERRORS" >&5
48468 
48469         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48470 $as_echo "no" >&6; }
48471                 LCMS_FOUND=no
48472 elif test $pkg_failed = untried; then
48473         LCMS_FOUND=no
48474 else
48475         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48476         LCMS_LIBS=$pkg_cv_LCMS_LIBS
48477         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48478 $as_echo "yes" >&6; }
48479         LCMS_FOUND=yes
48480 fi
48481     if test "x${LCMS_FOUND}" = "xyes"; then
48482       USE_EXTERNAL_LCMS=true
48483     else
48484       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48485     fi
48486   else
48487     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48488   fi
48489 
48490 
48491 
48492   ###############################################################################
48493   #
48494   # Check for the png library
48495   #
48496 
48497 
48498 # Check whether --with-libpng was given.
48499 if test "${with_libpng+set}" = set; then :
48500   withval=$with_libpng;
48501 fi
48502 
48503 
48504 
48505   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48506 $as_echo_n "checking for which libpng to use... " >&6; }
48507 
48508   # default is bundled
48509   DEFAULT_LIBPNG=bundled
48510 
48511   #
48512   # if user didn't specify, use DEFAULT_LIBPNG
48513   #
48514   if test "x${with_libpng}" = "x"; then
48515       with_libpng=${DEFAULT_LIBPNG}
48516   fi
48517 
48518   if test "x${with_libpng}" = "xbundled"; then
48519       USE_EXTERNAL_LIBPNG=false
48520       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48521 $as_echo "bundled" >&6; }
48522   elif test "x${with_libpng}" = "xsystem"; then
48523 
48524 pkg_failed=no
48525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48526 $as_echo_n "checking for PNG... " >&6; }
48527 
48528 if test -n "$PNG_CFLAGS"; then
48529     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48530  elif test -n "$PKG_CONFIG"; then
48531     if test -n "$PKG_CONFIG" && \
48532     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48533   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48534   ac_status=$?
48535   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48536   test $ac_status = 0; }; then
48537   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48538 else
48539   pkg_failed=yes
48540 fi
48541  else
48542     pkg_failed=untried
48543 fi
48544 if test -n "$PNG_LIBS"; then
48545     pkg_cv_PNG_LIBS="$PNG_LIBS"
48546  elif test -n "$PKG_CONFIG"; then
48547     if test -n "$PKG_CONFIG" && \
48548     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48549   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48550   ac_status=$?
48551   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48552   test $ac_status = 0; }; then
48553   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48554 else
48555   pkg_failed=yes
48556 fi
48557  else
48558     pkg_failed=untried
48559 fi
48560 
48561 
48562 
48563 if test $pkg_failed = yes; then
48564 
48565 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48566         _pkg_short_errors_supported=yes
48567 else
48568         _pkg_short_errors_supported=no
48569 fi
48570         if test $_pkg_short_errors_supported = yes; then
48571                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48572         else
48573                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48574         fi
48575         # Put the nasty error message in config.log where it belongs
48576         echo "$PNG_PKG_ERRORS" >&5
48577 
48578         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48579 $as_echo "no" >&6; }
48580                  LIBPNG_FOUND=no
48581 elif test $pkg_failed = untried; then
48582          LIBPNG_FOUND=no
48583 else
48584         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48585         PNG_LIBS=$pkg_cv_PNG_LIBS
48586         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48587 $as_echo "yes" >&6; }
48588          LIBPNG_FOUND=yes
48589 fi
48590       if test "x${LIBPNG_FOUND}" = "xyes"; then
48591           USE_EXTERNAL_LIBPNG=true
48592           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48593 $as_echo "system" >&6; }
48594       else
48595           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48596 $as_echo "system not found" >&6; }
48597           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48598       fi
48599   else
48600       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48601   fi
48602 
48603 
48604   ###############################################################################
48605   #
48606   # Check for the zlib library
48607   #
48608 
48609 
48610 # Check whether --with-zlib was given.
48611 if test "${with_zlib+set}" = set; then :
48612   withval=$with_zlib;
48613 fi
48614 
48615 
48616   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48617 $as_echo_n "checking for compress in -lz... " >&6; }
48618 if ${ac_cv_lib_z_compress+:} false; then :
48619   $as_echo_n "(cached) " >&6
48620 else
48621   ac_check_lib_save_LIBS=$LIBS
48622 LIBS="-lz  $LIBS"
48623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48624 /* end confdefs.h.  */
48625 
48626 /* Override any GCC internal prototype to avoid an error.
48627    Use char because int might match the return type of a GCC
48628    builtin and then its argument prototype would still apply.  */
48629 #ifdef __cplusplus
48630 extern "C"
48631 #endif
48632 char compress ();
48633 int
48634 main ()
48635 {
48636 return compress ();
48637   ;
48638   return 0;
48639 }
48640 _ACEOF
48641 if ac_fn_cxx_try_link "$LINENO"; then :
48642   ac_cv_lib_z_compress=yes
48643 else
48644   ac_cv_lib_z_compress=no
48645 fi
48646 rm -f core conftest.err conftest.$ac_objext \
48647     conftest$ac_exeext conftest.$ac_ext
48648 LIBS=$ac_check_lib_save_LIBS
48649 fi
48650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
48651 $as_echo "$ac_cv_lib_z_compress" >&6; }
48652 if test "x$ac_cv_lib_z_compress" = xyes; then :
48653    ZLIB_FOUND=yes
48654 else
48655    ZLIB_FOUND=no
48656 fi
48657 
48658 
48659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
48660 $as_echo_n "checking for which zlib to use... " >&6; }
48661 
48662   DEFAULT_ZLIB=bundled
48663   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48664     #
48665     # On macosx default is system...on others default is
48666     #
48667     DEFAULT_ZLIB=system
48668   fi
48669 
48670   if test "x${ZLIB_FOUND}" != "xyes"; then
48671     #
48672     # If we don't find any system...set default to bundled
48673     #
48674     DEFAULT_ZLIB=bundled
48675   fi
48676 
48677   #
48678   # If user didn't specify, use DEFAULT_ZLIB
48679   #
48680   if test "x${with_zlib}" = "x"; then
48681     with_zlib=${DEFAULT_ZLIB}
48682   fi
48683 
48684   if test "x${with_zlib}" = "xbundled"; then
48685     USE_EXTERNAL_LIBZ=false
48686     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48687 $as_echo "bundled" >&6; }
48688   elif test "x${with_zlib}" = "xsystem"; then
48689     if test "x${ZLIB_FOUND}" = "xyes"; then
48690       USE_EXTERNAL_LIBZ=true
48691       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48692 $as_echo "system" >&6; }
48693     else
48694       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48695 $as_echo "system not found" >&6; }
48696       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
48697     fi
48698   else
48699     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
48700   fi
48701 
48702 
48703 
48704   ###############################################################################
48705   LIBZIP_CAN_USE_MMAP=true
48706 
48707 
48708 
48709   ###############################################################################
48710   #
48711   # Check if altzone exists in time.h
48712   #
48713 
48714   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48715 /* end confdefs.h.  */
48716 #include <time.h>
48717 int
48718 main ()
48719 {
48720 return (int)altzone;
48721   ;
48722   return 0;
48723 }
48724 _ACEOF
48725 if ac_fn_cxx_try_link "$LINENO"; then :
48726   has_altzone=yes
48727 else
48728   has_altzone=no
48729 fi
48730 rm -f core conftest.err conftest.$ac_objext \
48731     conftest$ac_exeext conftest.$ac_ext
48732   if test "x$has_altzone" = xyes; then
48733 
48734 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
48735 
48736   fi
48737 
48738   ###############################################################################
48739   #
48740   # Check the maths library
48741   #
48742 
48743   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
48744 $as_echo_n "checking for cos in -lm... " >&6; }
48745 if ${ac_cv_lib_m_cos+:} false; then :
48746   $as_echo_n "(cached) " >&6
48747 else
48748   ac_check_lib_save_LIBS=$LIBS
48749 LIBS="-lm  $LIBS"
48750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48751 /* end confdefs.h.  */
48752 
48753 /* Override any GCC internal prototype to avoid an error.
48754    Use char because int might match the return type of a GCC
48755    builtin and then its argument prototype would still apply.  */
48756 #ifdef __cplusplus
48757 extern "C"
48758 #endif
48759 char cos ();
48760 int
48761 main ()
48762 {
48763 return cos ();
48764   ;
48765   return 0;
48766 }
48767 _ACEOF
48768 if ac_fn_cxx_try_link "$LINENO"; then :
48769   ac_cv_lib_m_cos=yes
48770 else
48771   ac_cv_lib_m_cos=no
48772 fi
48773 rm -f core conftest.err conftest.$ac_objext \
48774     conftest$ac_exeext conftest.$ac_ext
48775 LIBS=$ac_check_lib_save_LIBS
48776 fi
48777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
48778 $as_echo "$ac_cv_lib_m_cos" >&6; }
48779 if test "x$ac_cv_lib_m_cos" = xyes; then :
48780   cat >>confdefs.h <<_ACEOF
48781 #define HAVE_LIBM 1
48782 _ACEOF
48783 
48784   LIBS="-lm $LIBS"
48785 
48786 else
48787 
48788         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
48789 $as_echo "$as_me: Maths library was not found" >&6;}
48790 
48791 
48792 fi
48793 
48794 
48795 
48796   ###############################################################################
48797   #
48798   # Check for libdl.so
48799 
48800   save_LIBS="$LIBS"
48801   LIBS=""
48802   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
48803 $as_echo_n "checking for dlopen in -ldl... " >&6; }
48804 if ${ac_cv_lib_dl_dlopen+:} false; then :
48805   $as_echo_n "(cached) " >&6
48806 else
48807   ac_check_lib_save_LIBS=$LIBS
48808 LIBS="-ldl  $LIBS"
48809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48810 /* end confdefs.h.  */
48811 
48812 /* Override any GCC internal prototype to avoid an error.
48813    Use char because int might match the return type of a GCC
48814    builtin and then its argument prototype would still apply.  */
48815 #ifdef __cplusplus
48816 extern "C"
48817 #endif
48818 char dlopen ();
48819 int
48820 main ()
48821 {
48822 return dlopen ();
48823   ;
48824   return 0;
48825 }
48826 _ACEOF
48827 if ac_fn_cxx_try_link "$LINENO"; then :
48828   ac_cv_lib_dl_dlopen=yes
48829 else
48830   ac_cv_lib_dl_dlopen=no
48831 fi
48832 rm -f core conftest.err conftest.$ac_objext \
48833     conftest$ac_exeext conftest.$ac_ext
48834 LIBS=$ac_check_lib_save_LIBS
48835 fi
48836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
48837 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
48838 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
48839   cat >>confdefs.h <<_ACEOF
48840 #define HAVE_LIBDL 1
48841 _ACEOF
48842 
48843   LIBS="-ldl $LIBS"
48844 
48845 fi
48846 
48847   LIBDL="$LIBS"
48848 
48849   LIBS="$save_LIBS"
48850 
48851 
48852   ###############################################################################
48853   #
48854   # statically link libstdc++ before C++ ABI is stablized on Linux unless
48855   # dynamic build is configured on command line.
48856   #
48857 
48858 # Check whether --with-stdc++lib was given.
48859 if test "${with_stdc__lib+set}" = set; then :
48860   withval=$with_stdc__lib;
48861         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
48862                 && test "x$with_stdc__lib" != xdefault; then
48863           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
48864         fi
48865 
48866 else
48867   with_stdc__lib=default
48868 
48869 fi
48870 
48871 
48872   if test "x$OPENJDK_TARGET_OS" = xlinux; then
48873     # Test if -lstdc++ works.
48874     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
48875 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
48876     ac_ext=cpp
48877 ac_cpp='$CXXCPP $CPPFLAGS'
48878 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48879 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48880 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48881 
48882     OLD_CXXFLAGS="$CXXFLAGS"
48883     CXXFLAGS="$CXXFLAGS -lstdc++"
48884     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48885 /* end confdefs.h.  */
48886 
48887 int
48888 main ()
48889 {
48890 return 0;
48891   ;
48892   return 0;
48893 }
48894 _ACEOF
48895 if ac_fn_cxx_try_link "$LINENO"; then :
48896   has_dynamic_libstdcxx=yes
48897 else
48898   has_dynamic_libstdcxx=no
48899 fi
48900 rm -f core conftest.err conftest.$ac_objext \
48901     conftest$ac_exeext conftest.$ac_ext
48902     CXXFLAGS="$OLD_CXXFLAGS"
48903     ac_ext=cpp
48904 ac_cpp='$CXXCPP $CPPFLAGS'
48905 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48906 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48907 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48908 
48909     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
48910 $as_echo "$has_dynamic_libstdcxx" >&6; }
48911 
48912     # Test if stdc++ can be linked statically.
48913     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
48914 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
48915     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
48916     ac_ext=cpp
48917 ac_cpp='$CXXCPP $CPPFLAGS'
48918 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48919 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48920 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48921 
48922     OLD_LIBS="$LIBS"
48923     OLD_CXX="$CXX"
48924     LIBS="$STATIC_STDCXX_FLAGS"
48925     CXX="$CC"
48926     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48927 /* end confdefs.h.  */
48928 
48929 int
48930 main ()
48931 {
48932 return 0;
48933   ;
48934   return 0;
48935 }
48936 _ACEOF
48937 if ac_fn_cxx_try_link "$LINENO"; then :
48938   has_static_libstdcxx=yes
48939 else
48940   has_static_libstdcxx=no
48941 fi
48942 rm -f core conftest.err conftest.$ac_objext \
48943     conftest$ac_exeext conftest.$ac_ext
48944     LIBS="$OLD_LIBS"
48945     CXX="$OLD_CXX"
48946     ac_ext=cpp
48947 ac_cpp='$CXXCPP $CPPFLAGS'
48948 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48949 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48950 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48951 
48952     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48953 $as_echo "$has_static_libstdcxx" >&6; }
48954 
48955     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
48956       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
48957     fi
48958 
48959     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
48960       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
48961     fi
48962 
48963     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
48964       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
48965     fi
48966 
48967     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
48968 $as_echo_n "checking how to link with libstdc++... " >&6; }
48969     # If dynamic was requested, it's available since it would fail above otherwise.
48970     # If dynamic wasn't requested, go with static unless it isn't available.
48971     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48972       LIBCXX="$LIBCXX -lstdc++"
48973       LDCXX="$CXX"
48974       STATIC_CXX_SETTING="STATIC_CXX=false"
48975       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
48976 $as_echo "dynamic" >&6; }
48977     else
48978       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
48979       LDCXX="$CC"
48980       STATIC_CXX_SETTING="STATIC_CXX=true"
48981       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
48982 $as_echo "static" >&6; }
48983     fi
48984   fi
48985 
48986 
48987   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48988     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
48989 
48990 pkg_failed=no
48991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
48992 $as_echo_n "checking for LIBFFI... " >&6; }
48993 
48994 if test -n "$LIBFFI_CFLAGS"; then
48995     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
48996  elif test -n "$PKG_CONFIG"; then
48997     if test -n "$PKG_CONFIG" && \
48998     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
48999   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49000   ac_status=$?
49001   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49002   test $ac_status = 0; }; then
49003   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49004 else
49005   pkg_failed=yes
49006 fi
49007  else
49008     pkg_failed=untried
49009 fi
49010 if test -n "$LIBFFI_LIBS"; then
49011     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49012  elif test -n "$PKG_CONFIG"; then
49013     if test -n "$PKG_CONFIG" && \
49014     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49015   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49016   ac_status=$?
49017   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49018   test $ac_status = 0; }; then
49019   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49020 else
49021   pkg_failed=yes
49022 fi
49023  else
49024     pkg_failed=untried
49025 fi
49026 
49027 
49028 
49029 if test $pkg_failed = yes; then
49030 
49031 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49032         _pkg_short_errors_supported=yes
49033 else
49034         _pkg_short_errors_supported=no
49035 fi
49036         if test $_pkg_short_errors_supported = yes; then
49037                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49038         else
49039                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49040         fi
49041         # Put the nasty error message in config.log where it belongs
49042         echo "$LIBFFI_PKG_ERRORS" >&5
49043 
49044         as_fn_error $? "Package requirements (libffi) were not met:
49045 
49046 $LIBFFI_PKG_ERRORS
49047 
49048 Consider adjusting the PKG_CONFIG_PATH environment variable if you
49049 installed software in a non-standard prefix.
49050 
49051 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49052 and LIBFFI_LIBS to avoid the need to call pkg-config.
49053 See the pkg-config man page for more details.
49054 " "$LINENO" 5
49055 elif test $pkg_failed = untried; then
49056         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49057 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49058 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49059 is in your PATH or set the PKG_CONFIG environment variable to the full
49060 path to pkg-config.
49061 
49062 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49063 and LIBFFI_LIBS to avoid the need to call pkg-config.
49064 See the pkg-config man page for more details.
49065 
49066 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49067 See \`config.log' for more details" "$LINENO" 5; }
49068 else
49069         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49070         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49071         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49072 $as_echo "yes" >&6; }
49073         :
49074 fi
49075 
49076   fi
49077 
49078   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49079     # Extract the first word of "llvm-config", so it can be a program name with args.
49080 set dummy llvm-config; ac_word=$2
49081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49082 $as_echo_n "checking for $ac_word... " >&6; }
49083 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49084   $as_echo_n "(cached) " >&6
49085 else
49086   if test -n "$LLVM_CONFIG"; then
49087   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49088 else
49089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49090 for as_dir in $PATH
49091 do
49092   IFS=$as_save_IFS
49093   test -z "$as_dir" && as_dir=.
49094     for ac_exec_ext in '' $ac_executable_extensions; do
49095   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49096     ac_cv_prog_LLVM_CONFIG="llvm-config"
49097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49098     break 2
49099   fi
49100 done
49101   done
49102 IFS=$as_save_IFS
49103 
49104 fi
49105 fi
49106 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49107 if test -n "$LLVM_CONFIG"; then
49108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49109 $as_echo "$LLVM_CONFIG" >&6; }
49110 else
49111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49112 $as_echo "no" >&6; }
49113 fi
49114 
49115 
49116 
49117     if test "x$LLVM_CONFIG" != xllvm-config; then
49118       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49119     fi
49120 
49121     llvm_components="jit mcjit engine nativecodegen native"
49122     unset LLVM_CFLAGS
49123     for flag in $("$LLVM_CONFIG" --cxxflags); do
49124       if echo "${flag}" | grep -q '^-[ID]'; then
49125         if test "${flag}" != "-D_DEBUG" ; then
49126           if test "${LLVM_CFLAGS}" != "" ; then
49127             LLVM_CFLAGS="${LLVM_CFLAGS} "
49128           fi
49129           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49130         fi
49131       fi
49132     done
49133     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49134     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49135 
49136     unset LLVM_LDFLAGS
49137     for flag in $("${LLVM_CONFIG}" --ldflags); do
49138       if echo "${flag}" | grep -q '^-L'; then
49139         if test "${LLVM_LDFLAGS}" != ""; then
49140           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49141         fi
49142         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49143       fi
49144     done
49145 
49146     unset LLVM_LIBS
49147     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49148       if echo "${flag}" | grep -q '^-l'; then
49149         if test "${LLVM_LIBS}" != ""; then
49150           LLVM_LIBS="${LLVM_LIBS} "
49151         fi
49152         LLVM_LIBS="${LLVM_LIBS}${flag}"
49153       fi
49154     done
49155 
49156 
49157 
49158 
49159   fi
49160 
49161   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49162   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49163     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49164   fi
49165 
49166   # TODO better (platform agnostic) test
49167   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49168     LIBCXX="-lstdc++"
49169   fi
49170 
49171 
49172 
49173 
49174   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49175 
49176 
49177 # Check whether --with-msvcr-dll was given.
49178 if test "${with_msvcr_dll+set}" = set; then :
49179   withval=$with_msvcr_dll;
49180 fi
49181 
49182 
49183   if test "x$with_msvcr_dll" != x; then
49184     # If given explicitely by user, do not probe. If not present, fail directly.
49185 
49186   POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
49187   METHOD="--with-msvcr-dll"
49188   if test -e "$POSSIBLE_MSVCR_DLL"; then
49189     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49190 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49191 
49192     # Need to check if the found msvcr is correct architecture
49193     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49194 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49195     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49196     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49197       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49198       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49199       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49200         CORRECT_MSVCR_ARCH="PE32 executable"
49201       else
49202         CORRECT_MSVCR_ARCH="PE32+ executable"
49203       fi
49204     else
49205       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49206         CORRECT_MSVCR_ARCH=386
49207       else
49208         CORRECT_MSVCR_ARCH=x86-64
49209       fi
49210     fi
49211     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49212       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49213 $as_echo "ok" >&6; }
49214       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49215       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49216 $as_echo_n "checking for msvcr100.dll... " >&6; }
49217       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49218 $as_echo "$MSVCR_DLL" >&6; }
49219     else
49220       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49221 $as_echo "incorrect, ignoring" >&6; }
49222       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49223 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49224     fi
49225   fi
49226 
49227     if test "x$MSVCR_DLL" = x; then
49228       as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
49229     fi
49230   fi
49231 
49232   if test "x$MSVCR_DLL" = x; then
49233     # Probe: Using well-known location from Visual Studio 10.0
49234     if test "x$VCINSTALLDIR" != x; then
49235       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49236 
49237   windows_path="$CYGWIN_VC_INSTALL_DIR"
49238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49239     unix_path=`$CYGPATH -u "$windows_path"`
49240     CYGWIN_VC_INSTALL_DIR="$unix_path"
49241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49242     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49243     CYGWIN_VC_INSTALL_DIR="$unix_path"
49244   fi
49245 
49246       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49247         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
49248       else
49249         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
49250       fi
49251 
49252   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49253   METHOD="well-known location in VCINSTALLDIR"
49254   if test -e "$POSSIBLE_MSVCR_DLL"; then
49255     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49256 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49257 
49258     # Need to check if the found msvcr is correct architecture
49259     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49260 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49261     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49262     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49263       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49264       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49265       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49266         CORRECT_MSVCR_ARCH="PE32 executable"
49267       else
49268         CORRECT_MSVCR_ARCH="PE32+ executable"
49269       fi
49270     else
49271       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49272         CORRECT_MSVCR_ARCH=386
49273       else
49274         CORRECT_MSVCR_ARCH=x86-64
49275       fi
49276     fi
49277     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49278       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49279 $as_echo "ok" >&6; }
49280       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49281       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49282 $as_echo_n "checking for msvcr100.dll... " >&6; }
49283       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49284 $as_echo "$MSVCR_DLL" >&6; }
49285     else
49286       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49287 $as_echo "incorrect, ignoring" >&6; }
49288       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49289 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49290     fi
49291   fi
49292 
49293     fi
49294   fi
49295 
49296   if test "x$MSVCR_DLL" = x; then
49297     # Probe: Check in the Boot JDK directory.
49298     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
49299 
49300   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49301   METHOD="well-known location in Boot JDK"
49302   if test -e "$POSSIBLE_MSVCR_DLL"; then
49303     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49304 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49305 
49306     # Need to check if the found msvcr is correct architecture
49307     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49308 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49309     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49310     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49311       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49312       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49313       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49314         CORRECT_MSVCR_ARCH="PE32 executable"
49315       else
49316         CORRECT_MSVCR_ARCH="PE32+ executable"
49317       fi
49318     else
49319       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49320         CORRECT_MSVCR_ARCH=386
49321       else
49322         CORRECT_MSVCR_ARCH=x86-64
49323       fi
49324     fi
49325     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49326       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49327 $as_echo "ok" >&6; }
49328       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49329       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49330 $as_echo_n "checking for msvcr100.dll... " >&6; }
49331       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49332 $as_echo "$MSVCR_DLL" >&6; }
49333     else
49334       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49335 $as_echo "incorrect, ignoring" >&6; }
49336       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49337 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49338     fi
49339   fi
49340 
49341   fi
49342 
49343   if test "x$MSVCR_DLL" = x; then
49344     # Probe: Look in the Windows system32 directory
49345     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49346 
49347   windows_path="$CYGWIN_SYSTEMROOT"
49348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49349     unix_path=`$CYGPATH -u "$windows_path"`
49350     CYGWIN_SYSTEMROOT="$unix_path"
49351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49352     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49353     CYGWIN_SYSTEMROOT="$unix_path"
49354   fi
49355 
49356     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
49357 
49358   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49359   METHOD="well-known location in SYSTEMROOT"
49360   if test -e "$POSSIBLE_MSVCR_DLL"; then
49361     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49362 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49363 
49364     # Need to check if the found msvcr is correct architecture
49365     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49366 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49367     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49368     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49369       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49370       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49371       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49372         CORRECT_MSVCR_ARCH="PE32 executable"
49373       else
49374         CORRECT_MSVCR_ARCH="PE32+ executable"
49375       fi
49376     else
49377       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49378         CORRECT_MSVCR_ARCH=386
49379       else
49380         CORRECT_MSVCR_ARCH=x86-64
49381       fi
49382     fi
49383     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49384       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49385 $as_echo "ok" >&6; }
49386       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49387       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49388 $as_echo_n "checking for msvcr100.dll... " >&6; }
49389       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49390 $as_echo "$MSVCR_DLL" >&6; }
49391     else
49392       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49393 $as_echo "incorrect, ignoring" >&6; }
49394       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49395 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49396     fi
49397   fi
49398 
49399   fi
49400 
49401   if test "x$MSVCR_DLL" = x; then
49402     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49403     if test "x$VS100COMNTOOLS" != x; then
49404       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49405 
49406   windows_path="$CYGWIN_VS_TOOLS_DIR"
49407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49408     unix_path=`$CYGPATH -u "$windows_path"`
49409     CYGWIN_VS_TOOLS_DIR="$unix_path"
49410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49412     CYGWIN_VS_TOOLS_DIR="$unix_path"
49413   fi
49414 
49415       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49416         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
49417       else
49418         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
49419       fi
49420 
49421   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49422   METHOD="search of VS100COMNTOOLS"
49423   if test -e "$POSSIBLE_MSVCR_DLL"; then
49424     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49425 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49426 
49427     # Need to check if the found msvcr is correct architecture
49428     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49429 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49430     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49431     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49432       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49433       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49434       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49435         CORRECT_MSVCR_ARCH="PE32 executable"
49436       else
49437         CORRECT_MSVCR_ARCH="PE32+ executable"
49438       fi
49439     else
49440       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49441         CORRECT_MSVCR_ARCH=386
49442       else
49443         CORRECT_MSVCR_ARCH=x86-64
49444       fi
49445     fi
49446     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49447       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49448 $as_echo "ok" >&6; }
49449       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49450       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49451 $as_echo_n "checking for msvcr100.dll... " >&6; }
49452       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49453 $as_echo "$MSVCR_DLL" >&6; }
49454     else
49455       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49456 $as_echo "incorrect, ignoring" >&6; }
49457       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49458 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49459     fi
49460   fi
49461 
49462     fi
49463   fi
49464 
49465   if test "x$MSVCR_DLL" = x; then
49466     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49467     # (This was the original behaviour; kept since it might turn up something)
49468     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49469       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49470         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
49471       else
49472         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49473         if test "x$POSSIBLE_MSVCR_DLL" = x; then
49474           # We're grasping at straws now...
49475           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
49476         fi
49477       fi
49478 
49479 
49480   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49481   METHOD="search of VCINSTALLDIR"
49482   if test -e "$POSSIBLE_MSVCR_DLL"; then
49483     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49484 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49485 
49486     # Need to check if the found msvcr is correct architecture
49487     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49488 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49489     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49490     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49491       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49492       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49493       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49494         CORRECT_MSVCR_ARCH="PE32 executable"
49495       else
49496         CORRECT_MSVCR_ARCH="PE32+ executable"
49497       fi
49498     else
49499       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49500         CORRECT_MSVCR_ARCH=386
49501       else
49502         CORRECT_MSVCR_ARCH=x86-64
49503       fi
49504     fi
49505     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49506       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49507 $as_echo "ok" >&6; }
49508       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49509       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49510 $as_echo_n "checking for msvcr100.dll... " >&6; }
49511       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49512 $as_echo "$MSVCR_DLL" >&6; }
49513     else
49514       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49515 $as_echo "incorrect, ignoring" >&6; }
49516       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49517 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49518     fi
49519   fi
49520 
49521     fi
49522   fi
49523 
49524   if test "x$MSVCR_DLL" = x; then
49525     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49526 $as_echo_n "checking for msvcr100.dll... " >&6; }
49527     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49528 $as_echo "no" >&6; }
49529     as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
49530   fi
49531 
49532 
49533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49534 
49535   # Input might be given as Windows format, start by converting to
49536   # unix format.
49537   path="$MSVCR_DLL"
49538   new_path=`$CYGPATH -u "$path"`
49539 
49540   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49541   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49542   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49543   # "foo.exe" is OK but "foo" is an error.
49544   #
49545   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49546   # It is also a way to make sure we got the proper file name for the real test later on.
49547   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49548   if test "x$test_shortpath" = x; then
49549     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49550 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49551     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
49552   fi
49553 
49554   # Call helper function which possibly converts this using DOS-style short mode.
49555   # If so, the updated path is stored in $new_path.
49556 
49557   input_path="$new_path"
49558   # Check if we need to convert this using DOS-style short mode. If the path
49559   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49560   # take no chances and rewrite it.
49561   # Note: m4 eats our [], so we need to use [ and ] instead.
49562   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49563   if test "x$has_forbidden_chars" != x; then
49564     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49565     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49566     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49567     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49568       # Going to short mode and back again did indeed matter. Since short mode is
49569       # case insensitive, let's make it lowercase to improve readability.
49570       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49571       # Now convert it back to Unix-stile (cygpath)
49572       input_path=`$CYGPATH -u "$shortmode_path"`
49573       new_path="$input_path"
49574     fi
49575   fi
49576 
49577   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49578   if test "x$test_cygdrive_prefix" = x; then
49579     # As a simple fix, exclude /usr/bin since it's not a real path.
49580     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49581       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49582       # a path prefixed by /cygdrive for fixpath to work.
49583       new_path="$CYGWIN_ROOT_PATH$input_path"
49584     fi
49585   fi
49586 
49587 
49588   if test "x$path" != "x$new_path"; then
49589     MSVCR_DLL="$new_path"
49590     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49591 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49592   fi
49593 
49594   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49595 
49596   path="$MSVCR_DLL"
49597   has_colon=`$ECHO $path | $GREP ^.:`
49598   new_path="$path"
49599   if test "x$has_colon" = x; then
49600     # Not in mixed or Windows style, start by that.
49601     new_path=`cmd //c echo $path`
49602   fi
49603 
49604 
49605   input_path="$new_path"
49606   # Check if we need to convert this using DOS-style short mode. If the path
49607   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49608   # take no chances and rewrite it.
49609   # Note: m4 eats our [], so we need to use [ and ] instead.
49610   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49611   if test "x$has_forbidden_chars" != x; then
49612     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49613     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49614   fi
49615 
49616 
49617   windows_path="$new_path"
49618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49619     unix_path=`$CYGPATH -u "$windows_path"`
49620     new_path="$unix_path"
49621   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49622     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49623     new_path="$unix_path"
49624   fi
49625 
49626   if test "x$path" != "x$new_path"; then
49627     MSVCR_DLL="$new_path"
49628     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49629 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49630   fi
49631 
49632   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49633   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49634 
49635   else
49636     # We're on a posix platform. Hooray! :)
49637     path="$MSVCR_DLL"
49638     has_space=`$ECHO "$path" | $GREP " "`
49639     if test "x$has_space" != x; then
49640       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49641 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49642       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49643     fi
49644 
49645     # Use eval to expand a potential ~
49646     eval path="$path"
49647     if test ! -f "$path" && test ! -d "$path"; then
49648       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49649     fi
49650 
49651     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
49652   fi
49653 
49654 
49655 
49656 
49657 # Check whether --with-dxsdk was given.
49658 if test "${with_dxsdk+set}" = set; then :
49659   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
49660 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
49661 fi
49662 
49663 
49664 
49665 
49666 # Check whether --with-dxsdk-lib was given.
49667 if test "${with_dxsdk_lib+set}" = set; then :
49668   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
49669 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
49670 fi
49671 
49672 
49673 
49674 
49675 # Check whether --with-dxsdk-include was given.
49676 if test "${with_dxsdk_include+set}" = set; then :
49677   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
49678 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
49679 fi
49680 
49681 
49682   fi
49683 
49684 
49685 
49686 ###############################################################################
49687 #
49688 # We need to do some final tweaking, when everything else is done.
49689 #
49690 ###############################################################################
49691 
49692 
49693   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
49694 
49695 
49696   # The name of the Service Agent jar.
49697   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
49698   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49699     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
49700   fi
49701 
49702 
49703 
49704     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
49705 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
49706 
49707     if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
49708       ENABLE_INTREE_EC=yes
49709       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49710 $as_echo "yes" >&6; }
49711     else
49712       ENABLE_INTREE_EC=no
49713       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49714 $as_echo "no" >&6; }
49715     fi
49716 
49717 
49718 
49719 
49720 ###############################################################################
49721 #
49722 # Configure parts of the build that only affect the build performance,
49723 # not the result.
49724 #
49725 ###############################################################################
49726 
49727 
49728   # How many cores do we have on this build system?
49729 
49730 # Check whether --with-num-cores was given.
49731 if test "${with_num_cores+set}" = set; then :
49732   withval=$with_num_cores;
49733 fi
49734 
49735   if test "x$with_num_cores" = x; then
49736     # The number of cores were not specified, try to probe them.
49737 
49738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
49739 $as_echo_n "checking for number of cores... " >&6; }
49740   NUM_CORES=1
49741   FOUND_CORES=no
49742 
49743   if test -f /proc/cpuinfo; then
49744     # Looks like a Linux (or cygwin) system
49745     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
49746     FOUND_CORES=yes
49747   elif test -x /usr/sbin/psrinfo; then
49748     # Looks like a Solaris system
49749     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
49750     FOUND_CORES=yes
49751   elif test -x /usr/sbin/system_profiler; then
49752     # Looks like a MacOSX system
49753     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
49754     FOUND_CORES=yes
49755   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
49756     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
49757     FOUND_CORES=yes
49758   elif test -n "$NUMBER_OF_PROCESSORS"; then
49759     # On windows, look in the env
49760     NUM_CORES=$NUMBER_OF_PROCESSORS
49761     FOUND_CORES=yes
49762   fi
49763 
49764   if test "x$FOUND_CORES" = xyes; then
49765     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
49766 $as_echo "$NUM_CORES" >&6; }
49767   else
49768     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
49769 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
49770     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
49771 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
49772   fi
49773 
49774   else
49775     NUM_CORES=$with_num_cores
49776   fi
49777 
49778 
49779 
49780   # How much memory do we have on this build system?
49781 
49782 # Check whether --with-memory-size was given.
49783 if test "${with_memory_size+set}" = set; then :
49784   withval=$with_memory_size;
49785 fi
49786 
49787   if test "x$with_memory_size" = x; then
49788     # The memory size was not specified, try to probe it.
49789 
49790   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
49791 $as_echo_n "checking for memory size... " >&6; }
49792   # Default to 1024 MB
49793   MEMORY_SIZE=1024
49794   FOUND_MEM=no
49795 
49796   if test -f /proc/meminfo; then
49797     # Looks like a Linux (or cygwin) system
49798     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
49799     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
49800     FOUND_MEM=yes
49801   elif test -x /usr/sbin/prtconf; then
49802     # Looks like a Solaris or AIX system
49803     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
49804     FOUND_MEM=yes
49805   elif test -x /usr/sbin/system_profiler; then
49806     # Looks like a MacOSX system
49807     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
49808     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
49809     FOUND_MEM=yes
49810   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
49811     # Windows, but without cygwin
49812     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
49813     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
49814     FOUND_MEM=yes
49815   fi
49816 
49817   if test "x$FOUND_MEM" = xyes; then
49818     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
49819 $as_echo "$MEMORY_SIZE MB" >&6; }
49820   else
49821     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
49822 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
49823     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
49824 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
49825   fi
49826 
49827   else
49828     MEMORY_SIZE=$with_memory_size
49829   fi
49830 
49831 
49832 
49833   # Provide a decent default number of parallel jobs for make depending on
49834   # number of cores, amount of memory and machine architecture.
49835 
49836 # Check whether --with-jobs was given.
49837 if test "${with_jobs+set}" = set; then :
49838   withval=$with_jobs;
49839 fi
49840 
49841   if test "x$with_jobs" = x; then
49842     # Number of jobs was not specified, calculate.
49843     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
49844 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
49845     # Approximate memory in GB, rounding up a bit.
49846     memory_gb=`expr $MEMORY_SIZE / 1100`
49847     # Pick the lowest of memory in gb and number of cores.
49848     if test "$memory_gb" -lt "$NUM_CORES"; then
49849       JOBS="$memory_gb"
49850     else
49851       JOBS="$NUM_CORES"
49852       # On bigger machines, leave some room for other processes to run
49853       if test "$JOBS" -gt "4"; then
49854         JOBS=`expr $JOBS '*' 90 / 100`
49855       fi
49856     fi
49857     # Cap number of jobs to 16
49858     if test "$JOBS" -gt "16"; then
49859       JOBS=16
49860     fi
49861     if test "$JOBS" -eq "0"; then
49862       JOBS=1
49863     fi
49864     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
49865 $as_echo "$JOBS" >&6; }
49866   else
49867     JOBS=$with_jobs
49868   fi
49869 
49870 
49871 
49872 # Setup smart javac (after cores and memory have been setup)
49873 
49874 
49875 # Check whether --with-sjavac-server-java was given.
49876 if test "${with_sjavac_server_java+set}" = set; then :
49877   withval=$with_sjavac_server_java;
49878 fi
49879 
49880 
49881   if test "x$with_sjavac_server_java" != x; then
49882     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
49883     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
49884     if test "x$FOUND_VERSION" = x; then
49885       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
49886     fi
49887   else
49888     SJAVAC_SERVER_JAVA=""
49889     # Hotspot specific options.
49890 
49891   $ECHO "Check if jvm arg is ok: -verbosegc" >&5
49892   $ECHO "Command: $JAVA -verbosegc -version" >&5
49893   OUTPUT=`$JAVA -verbosegc -version 2>&1`
49894   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49895   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49896   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49897     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
49898     JVM_ARG_OK=true
49899   else
49900     $ECHO "Arg failed:" >&5
49901     $ECHO "$OUTPUT" >&5
49902     JVM_ARG_OK=false
49903   fi
49904 
49905     # JRockit specific options.
49906 
49907   $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
49908   $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
49909   OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
49910   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49911   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49912   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49913     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
49914     JVM_ARG_OK=true
49915   else
49916     $ECHO "Arg failed:" >&5
49917     $ECHO "$OUTPUT" >&5
49918     JVM_ARG_OK=false
49919   fi
49920 
49921     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
49922   fi
49923 
49924 
49925   if test "$MEMORY_SIZE" -gt "2500"; then
49926 
49927   $ECHO "Check if jvm arg is ok: -d64" >&5
49928   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
49929   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
49930   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49931   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49932   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49933     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
49934     JVM_ARG_OK=true
49935   else
49936     $ECHO "Arg failed:" >&5
49937     $ECHO "$OUTPUT" >&5
49938     JVM_ARG_OK=false
49939   fi
49940 
49941     if test "$JVM_ARG_OK" = true; then
49942       JVM_64BIT=true
49943       JVM_ARG_OK=false
49944     fi
49945   fi
49946 
49947   if test "$JVM_64BIT" = true; then
49948     if test "$MEMORY_SIZE" -gt "17000"; then
49949 
49950   $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
49951   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
49952   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
49953   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49954   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49955   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49956     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
49957     JVM_ARG_OK=true
49958   else
49959     $ECHO "Arg failed:" >&5
49960     $ECHO "$OUTPUT" >&5
49961     JVM_ARG_OK=false
49962   fi
49963 
49964     fi
49965     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
49966 
49967   $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
49968   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
49969   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
49970   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49971   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49972   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49973     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
49974     JVM_ARG_OK=true
49975   else
49976     $ECHO "Arg failed:" >&5
49977     $ECHO "$OUTPUT" >&5
49978     JVM_ARG_OK=false
49979   fi
49980 
49981     fi
49982     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
49983 
49984   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
49985   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
49986   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
49987   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49988   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49989   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49990     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
49991     JVM_ARG_OK=true
49992   else
49993     $ECHO "Arg failed:" >&5
49994     $ECHO "$OUTPUT" >&5
49995     JVM_ARG_OK=false
49996   fi
49997 
49998     fi
49999     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
50000 
50001   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
50002   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
50003   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
50004   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50005   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50006   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50007     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
50008     JVM_ARG_OK=true
50009   else
50010     $ECHO "Arg failed:" >&5
50011     $ECHO "$OUTPUT" >&5
50012     JVM_ARG_OK=false
50013   fi
50014 
50015     fi
50016   fi
50017   if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
50018 
50019   $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
50020   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
50021   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
50022   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50023   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50024   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50025     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
50026     JVM_ARG_OK=true
50027   else
50028     $ECHO "Arg failed:" >&5
50029     $ECHO "$OUTPUT" >&5
50030     JVM_ARG_OK=false
50031   fi
50032 
50033   fi
50034   if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
50035 
50036   $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
50037   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
50038   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
50039   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50040   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50041   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50042     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
50043     JVM_ARG_OK=true
50044   else
50045     $ECHO "Arg failed:" >&5
50046     $ECHO "$OUTPUT" >&5
50047     JVM_ARG_OK=false
50048   fi
50049 
50050   fi
50051   if test "$JVM_ARG_OK" = false; then
50052 
50053   $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
50054   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
50055   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
50056   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50057   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50058   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50059     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
50060     JVM_ARG_OK=true
50061   else
50062     $ECHO "Arg failed:" >&5
50063     $ECHO "$OUTPUT" >&5
50064     JVM_ARG_OK=false
50065   fi
50066 
50067   fi
50068 
50069   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
50070 $as_echo_n "checking whether to use sjavac... " >&6; }
50071   # Check whether --enable-sjavac was given.
50072 if test "${enable_sjavac+set}" = set; then :
50073   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
50074 else
50075   ENABLE_SJAVAC='no'
50076 fi
50077 
50078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
50079 $as_echo "$ENABLE_SJAVAC" >&6; }
50080 
50081 
50082   if test "x$ENABLE_SJAVAC" = xyes; then
50083     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
50084   else
50085     SJAVAC_SERVER_DIR=
50086   fi
50087 
50088 
50089 
50090 # Can the C/C++ compiler use precompiled headers?
50091 
50092 
50093   ###############################################################################
50094   #
50095   # Can the C/C++ compiler use precompiled headers?
50096   #
50097   # Check whether --enable-precompiled-headers was given.
50098 if test "${enable_precompiled_headers+set}" = set; then :
50099   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
50100 else
50101   ENABLE_PRECOMPH=yes
50102 fi
50103 
50104 
50105   USE_PRECOMPILED_HEADER=1
50106   if test "x$ENABLE_PRECOMPH" = xno; then
50107     USE_PRECOMPILED_HEADER=0
50108   fi
50109 
50110   if test "x$ENABLE_PRECOMPH" = xyes; then
50111     # Check that the compiler actually supports precomp headers.
50112     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50113       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
50114 $as_echo_n "checking that precompiled headers work... " >&6; }
50115       echo "int alfa();" > conftest.h
50116       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
50117       if test ! -f conftest.hpp.gch; then
50118         USE_PRECOMPILED_HEADER=0
50119         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50120 $as_echo "no" >&6; }
50121       else
50122         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50123 $as_echo "yes" >&6; }
50124       fi
50125       rm -f conftest.h conftest.hpp.gch
50126     fi
50127   fi
50128 
50129 
50130 
50131 
50132 # Setup use of ccache, if available
50133 
50134   # Check whether --enable-ccache was given.
50135 if test "${enable_ccache+set}" = set; then :
50136   enableval=$enable_ccache;
50137 fi
50138 
50139 
50140   CCACHE=
50141   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
50142 $as_echo_n "checking is ccache enabled... " >&6; }
50143   ENABLE_CCACHE=$enable_ccache
50144   if test "x$enable_ccache" = xyes; then
50145     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50146 $as_echo "yes" >&6; }
50147     OLD_PATH="$PATH"
50148     if test "x$TOOLCHAIN_PATH" != x; then
50149       PATH=$TOOLCHAIN_PATH:$PATH
50150     fi
50151 
50152 
50153 
50154   # Publish this variable in the help.
50155 
50156 
50157   if test "x$CCACHE" = x; then
50158     # The variable is not set by user, try to locate tool using the code snippet
50159     for ac_prog in ccache
50160 do
50161   # Extract the first word of "$ac_prog", so it can be a program name with args.
50162 set dummy $ac_prog; ac_word=$2
50163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50164 $as_echo_n "checking for $ac_word... " >&6; }
50165 if ${ac_cv_path_CCACHE+:} false; then :
50166   $as_echo_n "(cached) " >&6
50167 else
50168   case $CCACHE in
50169   [\\/]* | ?:[\\/]*)
50170   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50171   ;;
50172   *)
50173   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50174 for as_dir in $PATH
50175 do
50176   IFS=$as_save_IFS
50177   test -z "$as_dir" && as_dir=.
50178     for ac_exec_ext in '' $ac_executable_extensions; do
50179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50180     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50182     break 2
50183   fi
50184 done
50185   done
50186 IFS=$as_save_IFS
50187 
50188   ;;
50189 esac
50190 fi
50191 CCACHE=$ac_cv_path_CCACHE
50192 if test -n "$CCACHE"; then
50193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50194 $as_echo "$CCACHE" >&6; }
50195 else
50196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50197 $as_echo "no" >&6; }
50198 fi
50199 
50200 
50201   test -n "$CCACHE" && break
50202 done
50203 
50204   else
50205     # The variable is set, but is it from the command line or the environment?
50206 
50207     # Try to remove the string !CCACHE! from our list.
50208     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
50209     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50210       # If it failed, the variable was not from the command line. Ignore it,
50211       # but warn the user (except for BASH, which is always set by the calling BASH).
50212       if test "xCCACHE" != xBASH; then
50213         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
50214 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
50215       fi
50216       # Try to locate tool using the code snippet
50217       for ac_prog in ccache
50218 do
50219   # Extract the first word of "$ac_prog", so it can be a program name with args.
50220 set dummy $ac_prog; ac_word=$2
50221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50222 $as_echo_n "checking for $ac_word... " >&6; }
50223 if ${ac_cv_path_CCACHE+:} false; then :
50224   $as_echo_n "(cached) " >&6
50225 else
50226   case $CCACHE in
50227   [\\/]* | ?:[\\/]*)
50228   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50229   ;;
50230   *)
50231   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50232 for as_dir in $PATH
50233 do
50234   IFS=$as_save_IFS
50235   test -z "$as_dir" && as_dir=.
50236     for ac_exec_ext in '' $ac_executable_extensions; do
50237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50238     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50240     break 2
50241   fi
50242 done
50243   done
50244 IFS=$as_save_IFS
50245 
50246   ;;
50247 esac
50248 fi
50249 CCACHE=$ac_cv_path_CCACHE
50250 if test -n "$CCACHE"; then
50251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50252 $as_echo "$CCACHE" >&6; }
50253 else
50254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50255 $as_echo "no" >&6; }
50256 fi
50257 
50258 
50259   test -n "$CCACHE" && break
50260 done
50261 
50262     else
50263       # If it succeeded, then it was overridden by the user. We will use it
50264       # for the tool.
50265 
50266       # First remove it from the list of overridden variables, so we can test
50267       # for unknown variables in the end.
50268       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
50269 
50270       # Check if the provided tool contains a complete path.
50271       tool_specified="$CCACHE"
50272       tool_basename="${tool_specified##*/}"
50273       if test "x$tool_basename" = "x$tool_specified"; then
50274         # A command without a complete path is provided, search $PATH.
50275         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
50276 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
50277         # Extract the first word of "$tool_basename", so it can be a program name with args.
50278 set dummy $tool_basename; ac_word=$2
50279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50280 $as_echo_n "checking for $ac_word... " >&6; }
50281 if ${ac_cv_path_CCACHE+:} false; then :
50282   $as_echo_n "(cached) " >&6
50283 else
50284   case $CCACHE in
50285   [\\/]* | ?:[\\/]*)
50286   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50287   ;;
50288   *)
50289   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50290 for as_dir in $PATH
50291 do
50292   IFS=$as_save_IFS
50293   test -z "$as_dir" && as_dir=.
50294     for ac_exec_ext in '' $ac_executable_extensions; do
50295   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50296     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50297     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50298     break 2
50299   fi
50300 done
50301   done
50302 IFS=$as_save_IFS
50303 
50304   ;;
50305 esac
50306 fi
50307 CCACHE=$ac_cv_path_CCACHE
50308 if test -n "$CCACHE"; then
50309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50310 $as_echo "$CCACHE" >&6; }
50311 else
50312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50313 $as_echo "no" >&6; }
50314 fi
50315 
50316 
50317         if test "x$CCACHE" = x; then
50318           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
50319         fi
50320       else
50321         # Otherwise we believe it is a complete path. Use it as it is.
50322         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
50323 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
50324         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
50325 $as_echo_n "checking for CCACHE... " >&6; }
50326         if test ! -x "$tool_specified"; then
50327           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
50328 $as_echo "not found" >&6; }
50329           as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
50330         fi
50331         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
50332 $as_echo "$tool_specified" >&6; }
50333       fi
50334     fi
50335   fi
50336 
50337 
50338 
50339   if test "x$CCACHE" = x; then
50340     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
50341   fi
50342 
50343 
50344     CCACHE_STATUS="enabled"
50345     PATH="$OLD_PATH"
50346   elif test "x$enable_ccache" = xno; then
50347     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
50348 $as_echo "no, explicitly disabled" >&6; }
50349   elif test "x$enable_ccache" = x; then
50350     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50351 $as_echo "no" >&6; }
50352   else
50353     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
50354 $as_echo "unknown" >&6; }
50355     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
50356   fi
50357 
50358 
50359 
50360 # Check whether --with-ccache-dir was given.
50361 if test "${with_ccache_dir+set}" = set; then :
50362   withval=$with_ccache_dir;
50363 fi
50364 
50365 
50366   if test "x$with_ccache_dir" != x; then
50367     # When using a non home ccache directory, assume the use is to share ccache files
50368     # with other users. Thus change the umask.
50369     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
50370     if test "x$CCACHE" = x; then
50371       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
50372 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
50373     fi
50374   fi
50375 
50376   if test "x$CCACHE" != x; then
50377 
50378   if test "x$CCACHE" != x; then
50379     # Only use ccache if it is 3.1.4 or later, which supports
50380     # precompiled headers.
50381     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
50382 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
50383     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
50384     if test "x$HAS_GOOD_CCACHE" = x; then
50385       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
50386 $as_echo "no, disabling ccache" >&6; }
50387       CCACHE=
50388       CCACHE_STATUS="disabled"
50389     else
50390       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50391 $as_echo "yes" >&6; }
50392       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
50393 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
50394       PUSHED_FLAGS="$CXXFLAGS"
50395       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
50396       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50397 /* end confdefs.h.  */
50398 
50399 int
50400 main ()
50401 {
50402 
50403   ;
50404   return 0;
50405 }
50406 _ACEOF
50407 if ac_fn_cxx_try_compile "$LINENO"; then :
50408   CC_KNOWS_CCACHE_TRICK=yes
50409 else
50410   CC_KNOWS_CCACHE_TRICK=no
50411 fi
50412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50413       CXXFLAGS="$PUSHED_FLAGS"
50414       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
50415         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50416 $as_echo "yes" >&6; }
50417       else
50418         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
50419 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
50420         CCACHE=
50421         CCACHE_STATUS="disabled"
50422       fi
50423     fi
50424   fi
50425 
50426   if test "x$CCACHE" != x; then
50427     CCACHE_SLOPPINESS=time_macros
50428     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
50429     CCACHE_FLAGS=-fpch-preprocess
50430 
50431     if test "x$SET_CCACHE_DIR" != x; then
50432       mkdir -p $CCACHE_DIR > /dev/null 2>&1
50433       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
50434     fi
50435   fi
50436 
50437   fi
50438 
50439 
50440 ###############################################################################
50441 #
50442 # And now the finish...
50443 #
50444 ###############################################################################
50445 
50446 # Check for some common pitfalls
50447 
50448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50449     file_to_test="$SRC_ROOT/LICENSE"
50450     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
50451       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
50452     fi
50453   fi
50454 
50455 
50456   # Did user specify any unknown variables?
50457 
50458   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
50459     # Replace the separating ! with spaces before presenting for end user.
50460     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
50461     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
50462 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
50463   fi
50464 
50465 
50466   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
50467 $as_echo_n "checking if build directory is on local disk... " >&6; }
50468 
50469   # df -l lists only local disks; if the given directory is not found then
50470   # a non-zero exit code is given
50471   if test "x$DF" = x; then
50472     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50473       # msys does not have df; use Windows "net use" instead.
50474       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
50475       if test "x$IS_NETWORK_DISK" = x; then
50476         OUTPUT_DIR_IS_LOCAL="yes"
50477       else
50478         OUTPUT_DIR_IS_LOCAL="no"
50479       fi
50480     else
50481       # No df here, say it's local
50482       OUTPUT_DIR_IS_LOCAL="yes"
50483     fi
50484   else
50485     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
50486       OUTPUT_DIR_IS_LOCAL="yes"
50487     else
50488       OUTPUT_DIR_IS_LOCAL="no"
50489     fi
50490   fi
50491 
50492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
50493 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
50494 
50495 
50496 
50497   # Check if the user has any old-style ALT_ variables set.
50498   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
50499 
50500   # Before generating output files, test if they exist. If they do, this is a reconfigure.
50501   # Since we can't properly handle the dependencies for this, warn the user about the situation
50502   if test -e $OUTPUT_ROOT/spec.gmk; then
50503     IS_RECONFIGURE=yes
50504   else
50505     IS_RECONFIGURE=no
50506   fi
50507 
50508 
50509 # At the end, call the custom hook. (Dummy macro if no custom sources available)
50510 
50511 
50512 # We're messing a bit with internal autoconf variables to put the config.status
50513 # in the output directory instead of the current directory.
50514 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
50515 
50516 # Create the actual output files. Now the main work of configure is done.
50517 cat >confcache <<\_ACEOF
50518 # This file is a shell script that caches the results of configure
50519 # tests run on this system so they can be shared between configure
50520 # scripts and configure runs, see configure's option --config-cache.
50521 # It is not useful on other systems.  If it contains results you don't
50522 # want to keep, you may remove or edit it.
50523 #
50524 # config.status only pays attention to the cache file if you give it
50525 # the --recheck option to rerun configure.
50526 #
50527 # `ac_cv_env_foo' variables (set or unset) will be overridden when
50528 # loading this file, other *unset* `ac_cv_foo' will be assigned the
50529 # following values.
50530 
50531 _ACEOF
50532 
50533 # The following way of writing the cache mishandles newlines in values,
50534 # but we know of no workaround that is simple, portable, and efficient.
50535 # So, we kill variables containing newlines.
50536 # Ultrix sh set writes to stderr and can't be redirected directly,
50537 # and sets the high bit in the cache file unless we assign to the vars.
50538 (
50539   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
50540     eval ac_val=\$$ac_var
50541     case $ac_val in #(
50542     *${as_nl}*)
50543       case $ac_var in #(
50544       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
50545 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
50546       esac
50547       case $ac_var in #(
50548       _ | IFS | as_nl) ;; #(
50549       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
50550       *) { eval $ac_var=; unset $ac_var;} ;;
50551       esac ;;
50552     esac
50553   done
50554 
50555   (set) 2>&1 |
50556     case $as_nl`(ac_space=' '; set) 2>&1` in #(
50557     *${as_nl}ac_space=\ *)
50558       # `set' does not quote correctly, so add quotes: double-quote
50559       # substitution turns \\\\ into \\, and sed turns \\ into \.
50560       sed -n \
50561         "s/'/'\\\\''/g;
50562           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
50563       ;; #(
50564     *)
50565       # `set' quotes correctly as required by POSIX, so do not add quotes.
50566       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
50567       ;;
50568     esac |
50569     sort
50570 ) |
50571   sed '
50572      /^ac_cv_env_/b end
50573      t clear
50574      :clear
50575      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
50576      t end
50577      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
50578      :end' >>confcache
50579 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
50580   if test -w "$cache_file"; then
50581     if test "x$cache_file" != "x/dev/null"; then
50582       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
50583 $as_echo "$as_me: updating cache $cache_file" >&6;}
50584       if test ! -f "$cache_file" || test -h "$cache_file"; then
50585         cat confcache >"$cache_file"
50586       else
50587         case $cache_file in #(
50588         */* | ?:*)
50589           mv -f confcache "$cache_file"$$ &&
50590           mv -f "$cache_file"$$ "$cache_file" ;; #(
50591         *)
50592           mv -f confcache "$cache_file" ;;
50593         esac
50594       fi
50595     fi
50596   else
50597     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
50598 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
50599   fi
50600 fi
50601 rm -f confcache
50602 
50603 test "x$prefix" = xNONE && prefix=$ac_default_prefix
50604 # Let make expand exec_prefix.
50605 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
50606 
50607 DEFS=-DHAVE_CONFIG_H
50608 
50609 ac_libobjs=
50610 ac_ltlibobjs=
50611 U=
50612 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
50613   # 1. Remove the extension, and $U if already installed.
50614   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
50615   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
50616   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
50617   #    will be set to the directory where LIBOBJS objects are built.
50618   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
50619   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
50620 done
50621 LIBOBJS=$ac_libobjs
50622 
50623 LTLIBOBJS=$ac_ltlibobjs
50624 
50625 
50626 
50627 : "${CONFIG_STATUS=./config.status}"
50628 ac_write_fail=0
50629 ac_clean_files_save=$ac_clean_files
50630 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
50631 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
50632 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
50633 as_write_fail=0
50634 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
50635 #! $SHELL
50636 # Generated by $as_me.
50637 # Run this file to recreate the current configuration.
50638 # Compiler output produced by configure, useful for debugging
50639 # configure, is in config.log if it exists.
50640 
50641 debug=false
50642 ac_cs_recheck=false
50643 ac_cs_silent=false
50644 
50645 SHELL=\${CONFIG_SHELL-$SHELL}
50646 export SHELL
50647 _ASEOF
50648 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
50649 ## -------------------- ##
50650 ## M4sh Initialization. ##
50651 ## -------------------- ##
50652 
50653 # Be more Bourne compatible
50654 DUALCASE=1; export DUALCASE # for MKS sh
50655 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
50656   emulate sh
50657   NULLCMD=:
50658   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
50659   # is contrary to our usage.  Disable this feature.
50660   alias -g '${1+"$@"}'='"$@"'
50661   setopt NO_GLOB_SUBST
50662 else
50663   case `(set -o) 2>/dev/null` in #(
50664   *posix*) :
50665     set -o posix ;; #(
50666   *) :
50667      ;;
50668 esac
50669 fi
50670 
50671 
50672 as_nl='
50673 '
50674 export as_nl
50675 # Printing a long string crashes Solaris 7 /usr/bin/printf.
50676 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
50677 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
50678 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
50679 # Prefer a ksh shell builtin over an external printf program on Solaris,
50680 # but without wasting forks for bash or zsh.
50681 if test -z "$BASH_VERSION$ZSH_VERSION" \
50682     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50683   as_echo='print -r --'
50684   as_echo_n='print -rn --'
50685 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50686   as_echo='printf %s\n'
50687   as_echo_n='printf %s'
50688 else
50689   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
50690     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
50691     as_echo_n='/usr/ucb/echo -n'
50692   else
50693     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
50694     as_echo_n_body='eval
50695       arg=$1;
50696       case $arg in #(
50697       *"$as_nl"*)
50698         expr "X$arg" : "X\\(.*\\)$as_nl";
50699         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
50700       esac;
50701       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
50702     '
50703     export as_echo_n_body
50704     as_echo_n='sh -c $as_echo_n_body as_echo'
50705   fi
50706   export as_echo_body
50707   as_echo='sh -c $as_echo_body as_echo'
50708 fi
50709 
50710 # The user is always right.
50711 if test "${PATH_SEPARATOR+set}" != set; then
50712   PATH_SEPARATOR=:
50713   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
50714     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
50715       PATH_SEPARATOR=';'
50716   }
50717 fi
50718 
50719 
50720 # IFS
50721 # We need space, tab and new line, in precisely that order.  Quoting is
50722 # there to prevent editors from complaining about space-tab.
50723 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
50724 # splitting by setting IFS to empty value.)
50725 IFS=" ""        $as_nl"
50726 
50727 # Find who we are.  Look in the path if we contain no directory separator.
50728 as_myself=
50729 case $0 in #((
50730   *[\\/]* ) as_myself=$0 ;;
50731   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50732 for as_dir in $PATH
50733 do
50734   IFS=$as_save_IFS
50735   test -z "$as_dir" && as_dir=.
50736     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
50737   done
50738 IFS=$as_save_IFS
50739 
50740      ;;
50741 esac
50742 # We did not find ourselves, most probably we were run as `sh COMMAND'
50743 # in which case we are not to be found in the path.
50744 if test "x$as_myself" = x; then
50745   as_myself=$0
50746 fi
50747 if test ! -f "$as_myself"; then
50748   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
50749   exit 1
50750 fi
50751 
50752 # Unset variables that we do not need and which cause bugs (e.g. in
50753 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
50754 # suppresses any "Segmentation fault" message there.  '((' could
50755 # trigger a bug in pdksh 5.2.14.
50756 for as_var in BASH_ENV ENV MAIL MAILPATH
50757 do eval test x\${$as_var+set} = xset \
50758   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
50759 done
50760 PS1='$ '
50761 PS2='> '
50762 PS4='+ '
50763 
50764 # NLS nuisances.
50765 LC_ALL=C
50766 export LC_ALL
50767 LANGUAGE=C
50768 export LANGUAGE
50769 
50770 # CDPATH.
50771 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
50772 
50773 
50774 # as_fn_error STATUS ERROR [LINENO LOG_FD]
50775 # ----------------------------------------
50776 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
50777 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
50778 # script with STATUS, using 1 if that was 0.
50779 as_fn_error ()
50780 {
50781   as_status=$1; test $as_status -eq 0 && as_status=1
50782   if test "$4"; then
50783     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
50784     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
50785   fi
50786   $as_echo "$as_me: error: $2" >&2
50787   as_fn_exit $as_status
50788 } # as_fn_error
50789 
50790 
50791 # as_fn_set_status STATUS
50792 # -----------------------
50793 # Set $? to STATUS, without forking.
50794 as_fn_set_status ()
50795 {
50796   return $1
50797 } # as_fn_set_status
50798 
50799 # as_fn_exit STATUS
50800 # -----------------
50801 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
50802 as_fn_exit ()
50803 {
50804   set +e
50805   as_fn_set_status $1
50806   exit $1
50807 } # as_fn_exit
50808 
50809 # as_fn_unset VAR
50810 # ---------------
50811 # Portably unset VAR.
50812 as_fn_unset ()
50813 {
50814   { eval $1=; unset $1;}
50815 }
50816 as_unset=as_fn_unset
50817 # as_fn_append VAR VALUE
50818 # ----------------------
50819 # Append the text in VALUE to the end of the definition contained in VAR. Take
50820 # advantage of any shell optimizations that allow amortized linear growth over
50821 # repeated appends, instead of the typical quadratic growth present in naive
50822 # implementations.
50823 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
50824   eval 'as_fn_append ()
50825   {
50826     eval $1+=\$2
50827   }'
50828 else
50829   as_fn_append ()
50830   {
50831     eval $1=\$$1\$2
50832   }
50833 fi # as_fn_append
50834 
50835 # as_fn_arith ARG...
50836 # ------------------
50837 # Perform arithmetic evaluation on the ARGs, and store the result in the
50838 # global $as_val. Take advantage of shells that can avoid forks. The arguments
50839 # must be portable across $(()) and expr.
50840 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
50841   eval 'as_fn_arith ()
50842   {
50843     as_val=$(( $* ))
50844   }'
50845 else
50846   as_fn_arith ()
50847   {
50848     as_val=`expr "$@" || test $? -eq 1`
50849   }
50850 fi # as_fn_arith
50851 
50852 
50853 if expr a : '\(a\)' >/dev/null 2>&1 &&
50854    test "X`expr 00001 : '.*\(...\)'`" = X001; then
50855   as_expr=expr
50856 else
50857   as_expr=false
50858 fi
50859 
50860 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
50861   as_basename=basename
50862 else
50863   as_basename=false
50864 fi
50865 
50866 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
50867   as_dirname=dirname
50868 else
50869   as_dirname=false
50870 fi
50871 
50872 as_me=`$as_basename -- "$0" ||
50873 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
50874          X"$0" : 'X\(//\)$' \| \
50875          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
50876 $as_echo X/"$0" |
50877     sed '/^.*\/\([^/][^/]*\)\/*$/{
50878             s//\1/
50879             q
50880           }
50881           /^X\/\(\/\/\)$/{
50882             s//\1/
50883             q
50884           }
50885           /^X\/\(\/\).*/{
50886             s//\1/
50887             q
50888           }
50889           s/.*/./; q'`
50890 
50891 # Avoid depending upon Character Ranges.
50892 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
50893 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
50894 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
50895 as_cr_digits='0123456789'
50896 as_cr_alnum=$as_cr_Letters$as_cr_digits
50897 
50898 ECHO_C= ECHO_N= ECHO_T=
50899 case `echo -n x` in #(((((
50900 -n*)
50901   case `echo 'xy\c'` in
50902   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
50903   xy)  ECHO_C='\c';;
50904   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
50905        ECHO_T=' ';;
50906   esac;;
50907 *)
50908   ECHO_N='-n';;
50909 esac
50910 
50911 rm -f conf$$ conf$$.exe conf$$.file
50912 if test -d conf$$.dir; then
50913   rm -f conf$$.dir/conf$$.file
50914 else
50915   rm -f conf$$.dir
50916   mkdir conf$$.dir 2>/dev/null
50917 fi
50918 if (echo >conf$$.file) 2>/dev/null; then
50919   if ln -s conf$$.file conf$$ 2>/dev/null; then
50920     as_ln_s='ln -s'
50921     # ... but there are two gotchas:
50922     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
50923     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
50924     # In both cases, we have to default to `cp -pR'.
50925     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
50926       as_ln_s='cp -pR'
50927   elif ln conf$$.file conf$$ 2>/dev/null; then
50928     as_ln_s=ln
50929   else
50930     as_ln_s='cp -pR'
50931   fi
50932 else
50933   as_ln_s='cp -pR'
50934 fi
50935 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
50936 rmdir conf$$.dir 2>/dev/null
50937 
50938 
50939 # as_fn_mkdir_p
50940 # -------------
50941 # Create "$as_dir" as a directory, including parents if necessary.
50942 as_fn_mkdir_p ()
50943 {
50944 
50945   case $as_dir in #(
50946   -*) as_dir=./$as_dir;;
50947   esac
50948   test -d "$as_dir" || eval $as_mkdir_p || {
50949     as_dirs=
50950     while :; do
50951       case $as_dir in #(
50952       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
50953       *) as_qdir=$as_dir;;
50954       esac
50955       as_dirs="'$as_qdir' $as_dirs"
50956       as_dir=`$as_dirname -- "$as_dir" ||
50957 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50958          X"$as_dir" : 'X\(//\)[^/]' \| \
50959          X"$as_dir" : 'X\(//\)$' \| \
50960          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
50961 $as_echo X"$as_dir" |
50962     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50963             s//\1/
50964             q
50965           }
50966           /^X\(\/\/\)[^/].*/{
50967             s//\1/
50968             q
50969           }
50970           /^X\(\/\/\)$/{
50971             s//\1/
50972             q
50973           }
50974           /^X\(\/\).*/{
50975             s//\1/
50976             q
50977           }
50978           s/.*/./; q'`
50979       test -d "$as_dir" && break
50980     done
50981     test -z "$as_dirs" || eval "mkdir $as_dirs"
50982   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
50983 
50984 
50985 } # as_fn_mkdir_p
50986 if mkdir -p . 2>/dev/null; then
50987   as_mkdir_p='mkdir -p "$as_dir"'
50988 else
50989   test -d ./-p && rmdir ./-p
50990   as_mkdir_p=false
50991 fi
50992 
50993 
50994 # as_fn_executable_p FILE
50995 # -----------------------
50996 # Test if FILE is an executable regular file.
50997 as_fn_executable_p ()
50998 {
50999   test -f "$1" && test -x "$1"
51000 } # as_fn_executable_p
51001 as_test_x='test -x'
51002 as_executable_p=as_fn_executable_p
51003 
51004 # Sed expression to map a string onto a valid CPP name.
51005 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
51006 
51007 # Sed expression to map a string onto a valid variable name.
51008 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
51009 
51010 
51011 exec 6>&1
51012 ## ----------------------------------- ##
51013 ## Main body of $CONFIG_STATUS script. ##
51014 ## ----------------------------------- ##
51015 _ASEOF
51016 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
51017 
51018 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51019 # Save the log message, to keep $0 and so on meaningful, and to
51020 # report actual input values of CONFIG_FILES etc. instead of their
51021 # values after options handling.
51022 ac_log="
51023 This file was extended by OpenJDK $as_me jdk9, which was
51024 generated by GNU Autoconf 2.69.  Invocation command line was
51025 
51026   CONFIG_FILES    = $CONFIG_FILES
51027   CONFIG_HEADERS  = $CONFIG_HEADERS
51028   CONFIG_LINKS    = $CONFIG_LINKS
51029   CONFIG_COMMANDS = $CONFIG_COMMANDS
51030   $ $0 $@
51031 
51032 on `(hostname || uname -n) 2>/dev/null | sed 1q`
51033 "
51034 
51035 _ACEOF
51036 
51037 case $ac_config_files in *"
51038 "*) set x $ac_config_files; shift; ac_config_files=$*;;
51039 esac
51040 
51041 case $ac_config_headers in *"
51042 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
51043 esac
51044 
51045 
51046 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51047 # Files that config.status was made for.
51048 config_files="$ac_config_files"
51049 config_headers="$ac_config_headers"
51050 
51051 _ACEOF
51052 
51053 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51054 ac_cs_usage="\
51055 \`$as_me' instantiates files and other configuration actions
51056 from templates according to the current configuration.  Unless the files
51057 and actions are specified as TAGs, all are instantiated by default.
51058 
51059 Usage: $0 [OPTION]... [TAG]...
51060 
51061   -h, --help       print this help, then exit
51062   -V, --version    print version number and configuration settings, then exit
51063       --config     print configuration, then exit
51064   -q, --quiet, --silent
51065                    do not print progress messages
51066   -d, --debug      don't remove temporary files
51067       --recheck    update $as_me by reconfiguring in the same conditions
51068       --file=FILE[:TEMPLATE]
51069                    instantiate the configuration file FILE
51070       --header=FILE[:TEMPLATE]
51071                    instantiate the configuration header FILE
51072 
51073 Configuration files:
51074 $config_files
51075 
51076 Configuration headers:
51077 $config_headers
51078 
51079 Report bugs to <build-dev@openjdk.java.net>.
51080 OpenJDK home page: <http://openjdk.java.net>."
51081 
51082 _ACEOF
51083 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51084 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51085 ac_cs_version="\\
51086 OpenJDK config.status jdk9
51087 configured by $0, generated by GNU Autoconf 2.69,
51088   with options \\"\$ac_cs_config\\"
51089 
51090 Copyright (C) 2012 Free Software Foundation, Inc.
51091 This config.status script is free software; the Free Software Foundation
51092 gives unlimited permission to copy, distribute and modify it."
51093 
51094 ac_pwd='$ac_pwd'
51095 srcdir='$srcdir'
51096 AWK='$AWK'
51097 test -n "\$AWK" || AWK=awk
51098 _ACEOF
51099 
51100 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51101 # The default lists apply if the user does not specify any file.
51102 ac_need_defaults=:
51103 while test $# != 0
51104 do
51105   case $1 in
51106   --*=?*)
51107     ac_option=`expr "X$1" : 'X\([^=]*\)='`
51108     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51109     ac_shift=:
51110     ;;
51111   --*=)
51112     ac_option=`expr "X$1" : 'X\([^=]*\)='`
51113     ac_optarg=
51114     ac_shift=:
51115     ;;
51116   *)
51117     ac_option=$1
51118     ac_optarg=$2
51119     ac_shift=shift
51120     ;;
51121   esac
51122 
51123   case $ac_option in
51124   # Handling of the options.
51125   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51126     ac_cs_recheck=: ;;
51127   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51128     $as_echo "$ac_cs_version"; exit ;;
51129   --config | --confi | --conf | --con | --co | --c )
51130     $as_echo "$ac_cs_config"; exit ;;
51131   --debug | --debu | --deb | --de | --d | -d )
51132     debug=: ;;
51133   --file | --fil | --fi | --f )
51134     $ac_shift
51135     case $ac_optarg in
51136     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51137     '') as_fn_error $? "missing file argument" ;;
51138     esac
51139     as_fn_append CONFIG_FILES " '$ac_optarg'"
51140     ac_need_defaults=false;;
51141   --header | --heade | --head | --hea )
51142     $ac_shift
51143     case $ac_optarg in
51144     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51145     esac
51146     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
51147     ac_need_defaults=false;;
51148   --he | --h)
51149     # Conflict between --help and --header
51150     as_fn_error $? "ambiguous option: \`$1'
51151 Try \`$0 --help' for more information.";;
51152   --help | --hel | -h )
51153     $as_echo "$ac_cs_usage"; exit ;;
51154   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51155   | -silent | --silent | --silen | --sile | --sil | --si | --s)
51156     ac_cs_silent=: ;;
51157 
51158   # This is an error.
51159   -*) as_fn_error $? "unrecognized option: \`$1'
51160 Try \`$0 --help' for more information." ;;
51161 
51162   *) as_fn_append ac_config_targets " $1"
51163      ac_need_defaults=false ;;
51164 
51165   esac
51166   shift
51167 done
51168 
51169 ac_configure_extra_args=
51170 
51171 if $ac_cs_silent; then
51172   exec 6>/dev/null
51173   ac_configure_extra_args="$ac_configure_extra_args --silent"
51174 fi
51175 
51176 _ACEOF
51177 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51178 if \$ac_cs_recheck; then
51179   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51180   shift
51181   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51182   CONFIG_SHELL='$SHELL'
51183   export CONFIG_SHELL
51184   exec "\$@"
51185 fi
51186 
51187 _ACEOF
51188 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51189 exec 5>>config.log
51190 {
51191   echo
51192   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51193 ## Running $as_me. ##
51194 _ASBOX
51195   $as_echo "$ac_log"
51196 } >&5
51197 
51198 _ACEOF
51199 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51200 _ACEOF
51201 
51202 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51203 
51204 # Handling of arguments.
51205 for ac_config_target in $ac_config_targets
51206 do
51207   case $ac_config_target in
51208     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
51209     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
51210     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
51211     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
51212     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
51213     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
51214     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
51215 
51216   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
51217   esac
51218 done
51219 
51220 
51221 # If the user did not use the arguments to specify the items to instantiate,
51222 # then the envvar interface is used.  Set only those that are not.
51223 # We use the long form for the default assignment because of an extremely
51224 # bizarre bug on SunOS 4.1.3.
51225 if $ac_need_defaults; then
51226   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
51227   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
51228 fi
51229 
51230 # Have a temporary directory for convenience.  Make it in the build tree
51231 # simply because there is no reason against having it here, and in addition,
51232 # creating and moving files from /tmp can sometimes cause problems.
51233 # Hook for its removal unless debugging.
51234 # Note that there is a small window in which the directory will not be cleaned:
51235 # after its creation but before its name has been assigned to `$tmp'.
51236 $debug ||
51237 {
51238   tmp= ac_tmp=
51239   trap 'exit_status=$?
51240   : "${ac_tmp:=$tmp}"
51241   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
51242 ' 0
51243   trap 'as_fn_exit 1' 1 2 13 15
51244 }
51245 # Create a (secure) tmp directory for tmp files.
51246 
51247 {
51248   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
51249   test -d "$tmp"
51250 }  ||
51251 {
51252   tmp=./conf$$-$RANDOM
51253   (umask 077 && mkdir "$tmp")
51254 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
51255 ac_tmp=$tmp
51256 
51257 # Set up the scripts for CONFIG_FILES section.
51258 # No need to generate them if there are no CONFIG_FILES.
51259 # This happens for instance with `./config.status config.h'.
51260 if test -n "$CONFIG_FILES"; then
51261 
51262 
51263 ac_cr=`echo X | tr X '\015'`
51264 # On cygwin, bash can eat \r inside `` if the user requested igncr.
51265 # But we know of no other shell where ac_cr would be empty at this
51266 # point, so we can use a bashism as a fallback.
51267 if test "x$ac_cr" = x; then
51268   eval ac_cr=\$\'\\r\'
51269 fi
51270 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
51271 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
51272   ac_cs_awk_cr='\\r'
51273 else
51274   ac_cs_awk_cr=$ac_cr
51275 fi
51276 
51277 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
51278 _ACEOF
51279 
51280 
51281 {
51282   echo "cat >conf$$subs.awk <<_ACEOF" &&
51283   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
51284   echo "_ACEOF"
51285 } >conf$$subs.sh ||
51286   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51287 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
51288 ac_delim='%!_!# '
51289 for ac_last_try in false false false false false :; do
51290   . ./conf$$subs.sh ||
51291     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51292 
51293   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
51294   if test $ac_delim_n = $ac_delim_num; then
51295     break
51296   elif $ac_last_try; then
51297     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51298   else
51299     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51300   fi
51301 done
51302 rm -f conf$$subs.sh
51303 
51304 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51305 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
51306 _ACEOF
51307 sed -n '
51308 h
51309 s/^/S["/; s/!.*/"]=/
51310 p
51311 g
51312 s/^[^!]*!//
51313 :repl
51314 t repl
51315 s/'"$ac_delim"'$//
51316 t delim
51317 :nl
51318 h
51319 s/\(.\{148\}\)..*/\1/
51320 t more1
51321 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
51322 p
51323 n
51324 b repl
51325 :more1
51326 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51327 p
51328 g
51329 s/.\{148\}//
51330 t nl
51331 :delim
51332 h
51333 s/\(.\{148\}\)..*/\1/
51334 t more2
51335 s/["\\]/\\&/g; s/^/"/; s/$/"/
51336 p
51337 b
51338 :more2
51339 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51340 p
51341 g
51342 s/.\{148\}//
51343 t delim
51344 ' <conf$$subs.awk | sed '
51345 /^[^""]/{
51346   N
51347   s/\n//
51348 }
51349 ' >>$CONFIG_STATUS || ac_write_fail=1
51350 rm -f conf$$subs.awk
51351 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51352 _ACAWK
51353 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
51354   for (key in S) S_is_set[key] = 1
51355   FS = ""
51356 
51357 }
51358 {
51359   line = $ 0
51360   nfields = split(line, field, "@")
51361   substed = 0
51362   len = length(field[1])
51363   for (i = 2; i < nfields; i++) {
51364     key = field[i]
51365     keylen = length(key)
51366     if (S_is_set[key]) {
51367       value = S[key]
51368       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
51369       len += length(value) + length(field[++i])
51370       substed = 1
51371     } else
51372       len += 1 + keylen
51373   }
51374 
51375   print line
51376 }
51377 
51378 _ACAWK
51379 _ACEOF
51380 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51381 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
51382   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
51383 else
51384   cat
51385 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
51386   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
51387 _ACEOF
51388 
51389 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
51390 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
51391 # trailing colons and then remove the whole line if VPATH becomes empty
51392 # (actually we leave an empty line to preserve line numbers).
51393 if test "x$srcdir" = x.; then
51394   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
51395 h
51396 s///
51397 s/^/:/
51398 s/[      ]*$/:/
51399 s/:\$(srcdir):/:/g
51400 s/:\${srcdir}:/:/g
51401 s/:@srcdir@:/:/g
51402 s/^:*//
51403 s/:*$//
51404 x
51405 s/\(=[   ]*\).*/\1/
51406 G
51407 s/\n//
51408 s/^[^=]*=[       ]*$//
51409 }'
51410 fi
51411 
51412 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51413 fi # test -n "$CONFIG_FILES"
51414 
51415 # Set up the scripts for CONFIG_HEADERS section.
51416 # No need to generate them if there are no CONFIG_HEADERS.
51417 # This happens for instance with `./config.status Makefile'.
51418 if test -n "$CONFIG_HEADERS"; then
51419 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
51420 BEGIN {
51421 _ACEOF
51422 
51423 # Transform confdefs.h into an awk script `defines.awk', embedded as
51424 # here-document in config.status, that substitutes the proper values into
51425 # config.h.in to produce config.h.
51426 
51427 # Create a delimiter string that does not exist in confdefs.h, to ease
51428 # handling of long lines.
51429 ac_delim='%!_!# '
51430 for ac_last_try in false false :; do
51431   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
51432   if test -z "$ac_tt"; then
51433     break
51434   elif $ac_last_try; then
51435     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
51436   else
51437     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51438   fi
51439 done
51440 
51441 # For the awk script, D is an array of macro values keyed by name,
51442 # likewise P contains macro parameters if any.  Preserve backslash
51443 # newline sequences.
51444 
51445 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
51446 sed -n '
51447 s/.\{148\}/&'"$ac_delim"'/g
51448 t rset
51449 :rset
51450 s/^[     ]*#[    ]*define[       ][      ]*/ /
51451 t def
51452 d
51453 :def
51454 s/\\$//
51455 t bsnl
51456 s/["\\]/\\&/g
51457 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
51458 D["\1"]=" \3"/p
51459 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
51460 d
51461 :bsnl
51462 s/["\\]/\\&/g
51463 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
51464 D["\1"]=" \3\\\\\\n"\\/p
51465 t cont
51466 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
51467 t cont
51468 d
51469 :cont
51470 n
51471 s/.\{148\}/&'"$ac_delim"'/g
51472 t clear
51473 :clear
51474 s/\\$//
51475 t bsnlc
51476 s/["\\]/\\&/g; s/^/"/; s/$/"/p
51477 d
51478 :bsnlc
51479 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
51480 b cont
51481 ' <confdefs.h | sed '
51482 s/'"$ac_delim"'/"\\\
51483 "/g' >>$CONFIG_STATUS || ac_write_fail=1
51484 
51485 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51486   for (key in D) D_is_set[key] = 1
51487   FS = ""
51488 }
51489 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
51490   line = \$ 0
51491   split(line, arg, " ")
51492   if (arg[1] == "#") {
51493     defundef = arg[2]
51494     mac1 = arg[3]
51495   } else {
51496     defundef = substr(arg[1], 2)
51497     mac1 = arg[2]
51498   }
51499   split(mac1, mac2, "(") #)
51500   macro = mac2[1]
51501   prefix = substr(line, 1, index(line, defundef) - 1)
51502   if (D_is_set[macro]) {
51503     # Preserve the white space surrounding the "#".
51504     print prefix "define", macro P[macro] D[macro]
51505     next
51506   } else {
51507     # Replace #undef with comments.  This is necessary, for example,
51508     # in the case of _POSIX_SOURCE, which is predefined and required
51509     # on some systems where configure will not decide to define it.
51510     if (defundef == "undef") {
51511       print "/*", prefix defundef, macro, "*/"
51512       next
51513     }
51514   }
51515 }
51516 { print }
51517 _ACAWK
51518 _ACEOF
51519 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51520   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
51521 fi # test -n "$CONFIG_HEADERS"
51522 
51523 
51524 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
51525 shift
51526 for ac_tag
51527 do
51528   case $ac_tag in
51529   :[FHLC]) ac_mode=$ac_tag; continue;;
51530   esac
51531   case $ac_mode$ac_tag in
51532   :[FHL]*:*);;
51533   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
51534   :[FH]-) ac_tag=-:-;;
51535   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
51536   esac
51537   ac_save_IFS=$IFS
51538   IFS=:
51539   set x $ac_tag
51540   IFS=$ac_save_IFS
51541   shift
51542   ac_file=$1
51543   shift
51544 
51545   case $ac_mode in
51546   :L) ac_source=$1;;
51547   :[FH])
51548     ac_file_inputs=
51549     for ac_f
51550     do
51551       case $ac_f in
51552       -) ac_f="$ac_tmp/stdin";;
51553       *) # Look for the file first in the build tree, then in the source tree
51554          # (if the path is not absolute).  The absolute path cannot be DOS-style,
51555          # because $ac_f cannot contain `:'.
51556          test -f "$ac_f" ||
51557            case $ac_f in
51558            [\\/$]*) false;;
51559            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
51560            esac ||
51561            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
51562       esac
51563       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
51564       as_fn_append ac_file_inputs " '$ac_f'"
51565     done
51566 
51567     # Let's still pretend it is `configure' which instantiates (i.e., don't
51568     # use $as_me), people would be surprised to read:
51569     #    /* config.h.  Generated by config.status.  */
51570     configure_input='Generated from '`
51571           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
51572         `' by configure.'
51573     if test x"$ac_file" != x-; then
51574       configure_input="$ac_file.  $configure_input"
51575       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
51576 $as_echo "$as_me: creating $ac_file" >&6;}
51577     fi
51578     # Neutralize special characters interpreted by sed in replacement strings.
51579     case $configure_input in #(
51580     *\&* | *\|* | *\\* )
51581        ac_sed_conf_input=`$as_echo "$configure_input" |
51582        sed 's/[\\\\&|]/\\\\&/g'`;; #(
51583     *) ac_sed_conf_input=$configure_input;;
51584     esac
51585 
51586     case $ac_tag in
51587     *:-:* | *:-) cat >"$ac_tmp/stdin" \
51588       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
51589     esac
51590     ;;
51591   esac
51592 
51593   ac_dir=`$as_dirname -- "$ac_file" ||
51594 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51595          X"$ac_file" : 'X\(//\)[^/]' \| \
51596          X"$ac_file" : 'X\(//\)$' \| \
51597          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
51598 $as_echo X"$ac_file" |
51599     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51600             s//\1/
51601             q
51602           }
51603           /^X\(\/\/\)[^/].*/{
51604             s//\1/
51605             q
51606           }
51607           /^X\(\/\/\)$/{
51608             s//\1/
51609             q
51610           }
51611           /^X\(\/\).*/{
51612             s//\1/
51613             q
51614           }
51615           s/.*/./; q'`
51616   as_dir="$ac_dir"; as_fn_mkdir_p
51617   ac_builddir=.
51618 
51619 case "$ac_dir" in
51620 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
51621 *)
51622   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
51623   # A ".." for each directory in $ac_dir_suffix.
51624   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
51625   case $ac_top_builddir_sub in
51626   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
51627   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
51628   esac ;;
51629 esac
51630 ac_abs_top_builddir=$ac_pwd
51631 ac_abs_builddir=$ac_pwd$ac_dir_suffix
51632 # for backward compatibility:
51633 ac_top_builddir=$ac_top_build_prefix
51634 
51635 case $srcdir in
51636   .)  # We are building in place.
51637     ac_srcdir=.
51638     ac_top_srcdir=$ac_top_builddir_sub
51639     ac_abs_top_srcdir=$ac_pwd ;;
51640   [\\/]* | ?:[\\/]* )  # Absolute name.
51641     ac_srcdir=$srcdir$ac_dir_suffix;
51642     ac_top_srcdir=$srcdir
51643     ac_abs_top_srcdir=$srcdir ;;
51644   *) # Relative name.
51645     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
51646     ac_top_srcdir=$ac_top_build_prefix$srcdir
51647     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
51648 esac
51649 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
51650 
51651 
51652   case $ac_mode in
51653   :F)
51654   #
51655   # CONFIG_FILE
51656   #
51657 
51658 _ACEOF
51659 
51660 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51661 # If the template does not know about datarootdir, expand it.
51662 # FIXME: This hack should be removed a few years after 2.60.
51663 ac_datarootdir_hack=; ac_datarootdir_seen=
51664 ac_sed_dataroot='
51665 /datarootdir/ {
51666   p
51667   q
51668 }
51669 /@datadir@/p
51670 /@docdir@/p
51671 /@infodir@/p
51672 /@localedir@/p
51673 /@mandir@/p'
51674 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
51675 *datarootdir*) ac_datarootdir_seen=yes;;
51676 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
51677   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
51678 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
51679 _ACEOF
51680 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51681   ac_datarootdir_hack='
51682   s&@datadir@&$datadir&g
51683   s&@docdir@&$docdir&g
51684   s&@infodir@&$infodir&g
51685   s&@localedir@&$localedir&g
51686   s&@mandir@&$mandir&g
51687   s&\\\${datarootdir}&$datarootdir&g' ;;
51688 esac
51689 _ACEOF
51690 
51691 # Neutralize VPATH when `$srcdir' = `.'.
51692 # Shell code in configure.ac might set extrasub.
51693 # FIXME: do we really want to maintain this feature?
51694 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51695 ac_sed_extra="$ac_vpsub
51696 $extrasub
51697 _ACEOF
51698 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51699 :t
51700 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
51701 s|@configure_input@|$ac_sed_conf_input|;t t
51702 s&@top_builddir@&$ac_top_builddir_sub&;t t
51703 s&@top_build_prefix@&$ac_top_build_prefix&;t t
51704 s&@srcdir@&$ac_srcdir&;t t
51705 s&@abs_srcdir@&$ac_abs_srcdir&;t t
51706 s&@top_srcdir@&$ac_top_srcdir&;t t
51707 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
51708 s&@builddir@&$ac_builddir&;t t
51709 s&@abs_builddir@&$ac_abs_builddir&;t t
51710 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
51711 $ac_datarootdir_hack
51712 "
51713 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
51714   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51715 
51716 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
51717   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
51718   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
51719       "$ac_tmp/out"`; test -z "$ac_out"; } &&
51720   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51721 which seems to be undefined.  Please make sure it is defined" >&5
51722 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51723 which seems to be undefined.  Please make sure it is defined" >&2;}
51724 
51725   rm -f "$ac_tmp/stdin"
51726   case $ac_file in
51727   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
51728   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
51729   esac \
51730   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51731  ;;
51732   :H)
51733   #
51734   # CONFIG_HEADER
51735   #
51736   if test x"$ac_file" != x-; then
51737     {
51738       $as_echo "/* $configure_input  */" \
51739       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
51740     } >"$ac_tmp/config.h" \
51741       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51742     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
51743       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
51744 $as_echo "$as_me: $ac_file is unchanged" >&6;}
51745     else
51746       rm -f "$ac_file"
51747       mv "$ac_tmp/config.h" "$ac_file" \
51748         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51749     fi
51750   else
51751     $as_echo "/* $configure_input  */" \
51752       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
51753       || as_fn_error $? "could not create -" "$LINENO" 5
51754   fi
51755  ;;
51756 
51757 
51758   esac
51759 
51760 done # for ac_tag
51761 
51762 
51763 as_fn_exit 0
51764 _ACEOF
51765 ac_clean_files=$ac_clean_files_save
51766 
51767 test $ac_write_fail = 0 ||
51768   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
51769 
51770 
51771 # configure is writing to config.log, and then calls config.status.
51772 # config.status does its own redirection, appending to config.log.
51773 # Unfortunately, on DOS this fails, as config.log is still kept open
51774 # by configure, so config.status won't be able to write to it; its
51775 # output is simply discarded.  So we exec the FD to /dev/null,
51776 # effectively closing config.log, so it can be properly (re)opened and
51777 # appended to by config.status.  When coming back to configure, we
51778 # need to make the FD available again.
51779 if test "$no_create" != yes; then
51780   ac_cs_success=:
51781   ac_config_status_args=
51782   test "$silent" = yes &&
51783     ac_config_status_args="$ac_config_status_args --quiet"
51784   exec 5>/dev/null
51785   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
51786   exec 5>>config.log
51787   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
51788   # would make configure fail if this is the last instruction.
51789   $ac_cs_success || as_fn_exit 1
51790 fi
51791 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
51792   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
51793 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
51794 fi
51795 
51796 
51797 # Try to move the config.log file to the output directory.
51798 if test -e ./config.log; then
51799   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
51800 fi
51801 
51802 # Make the compare script executable
51803 $CHMOD +x $OUTPUT_ROOT/compare.sh
51804 
51805 # Finally output some useful information to the user
51806 
51807   # Finally output some useful information to the user
51808 
51809   printf "\n"
51810   printf "====================================================\n"
51811   if test "x$no_create" != "xyes"; then
51812     if test "x$IS_RECONFIGURE" != "xyes"; then
51813       printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
51814     else
51815       printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
51816     fi
51817   else
51818     if test "x$IS_RECONFIGURE" != "xyes"; then
51819       printf "A configuration has been successfully checked but not created\n"
51820     else
51821       printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
51822     fi
51823   fi
51824   if test "x$CONFIGURE_COMMAND_LINE" != x; then
51825     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
51826   else
51827     printf "using default settings.\n"
51828   fi
51829 
51830   printf "\n"
51831   printf "Configuration summary:\n"
51832   printf "* Debug level:    $DEBUG_LEVEL\n"
51833   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
51834   printf "* JDK variant:    $JDK_VARIANT\n"
51835   printf "* JVM variants:   $with_jvm_variants\n"
51836   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
51837 
51838   printf "\n"
51839   printf "Tools summary:\n"
51840   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
51841     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
51842   fi
51843   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
51844   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
51845   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
51846   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
51847 
51848   printf "\n"
51849   printf "Build performance summary:\n"
51850   printf "* Cores to use:   $JOBS\n"
51851   printf "* Memory limit:   $MEMORY_SIZE MB\n"
51852   if test "x$CCACHE_STATUS" != "x"; then
51853     printf "* ccache status:  $CCACHE_STATUS\n"
51854   fi
51855   printf "\n"
51856 
51857   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
51858     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
51859     printf "will result in longer build times.\n"
51860     printf "\n"
51861   fi
51862 
51863   if test "x$FOUND_ALT_VARIABLES" != "x"; then
51864     printf "WARNING: You have old-style ALT_ environment variables set.\n"
51865     printf "These are not respected, and will be ignored. It is recommended\n"
51866     printf "that you clean your environment. The following variables are set:\n"
51867     printf "$FOUND_ALT_VARIABLES\n"
51868     printf "\n"
51869   fi
51870 
51871   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
51872     printf "WARNING: Your build output directory is not on a local disk.\n"
51873     printf "This will severely degrade build performance!\n"
51874     printf "It is recommended that you create an output directory on a local disk,\n"
51875     printf "and run the configure script again from that directory.\n"
51876     printf "\n"
51877   fi
51878 
51879   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
51880     printf "WARNING: The result of this configuration has overridden an older\n"
51881     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
51882     printf "proper build. Failure to do so might result in strange build problems.\n"
51883     printf "\n"
51884   fi
51885 
51886   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
51887     printf "WARNING: The result of this configuration was not saved.\n"
51888     printf "You should run without '--no-create | -n' to create the configuration.\n"
51889     printf "\n"
51890   fi
51891